3
$\begingroup$

example 1

ParametricPlot3D[{x, y, 0}, {x, y} ∈ MengerMesh[2, 2]] // AbsoluteTiming

enter image description here

example 2

With[{regmem = RegionMember[MengerMesh[2, 2]]}, 
  ParametricPlot[{x, y}, {x, 0, 1}, {y, 0, 1}, PlotPoints -> 50, 
   RegionFunction -> 
    Function[{x, y}, regmem@{x, y}]]] // AbsoluteTiming

enter image description here

example 3

ParametricPlot[{x, y}, {x, 0, 1}, {y, 0, 1}, PlotPoints -> 30, 
  RegionFunction -> 
   Function[{x, y}, {x, y} ∈ 
     MengerMesh[2, 2]]] // AbsoluteTiming

enter image description here

but

example 4

ParametricPlot[{x, y}, {x, y} ∈ MengerMesh[2, 2]] // AbsoluteTiming

enter image description here

It take long time to get this picture(need 148). When I test version 11.3, it only need 0.8

$Version
(* 11.3.0 for Microsoft Windows (64-bit) (March 27, 2018) *)

ParametricPlot[{x, y}, {x, y} ∈ MengerMesh[2, 2]] // AbsoluteTiming

enter image description here

$\endgroup$
6
  • 1
    $\begingroup$ Can you be explicit? What do you regard as a bug here? $\endgroup$
    – MarcoB
    Jul 12, 2023 at 1:25
  • $\begingroup$ Could you use Show[Region[MengerMesh[2, 2], Frame -> True]] instead? $\endgroup$
    – Chris K
    Jul 12, 2023 at 1:39
  • 4
    $\begingroup$ @ChrisK Since I want to transform a region, for example ParametricPlot[{x - y^2/2, y - x^2/2}, {x, y} ∈ MengerMesh[2, 2]], and at usually, ParametricPlot is faster then TransformedRegion. $\endgroup$ Jul 12, 2023 at 1:43
  • $\begingroup$ @herbertfederer Thanks, I'm not familiar with the 2D version of ParametricPlot. $\endgroup$
    – Chris K
    Jul 12, 2023 at 1:46
  • 2
    $\begingroup$ @ChrisK - the Show in your code doesn't contribute anything. Region[MengerMesh[2, 2], Frame -> True] produces the same result. $\endgroup$
    – Bob Hanlon
    Jul 12, 2023 at 1:52

2 Answers 2

3
$\begingroup$

Fixed in version 13.3.1

$Version
ParametricPlot[{x, y}, {x, y} ∈ 
   MengerMesh[2, 2]] // AbsoluteTiming

enter image description here

$\endgroup$
3
  • $\begingroup$ where did you get 13.3.1 from? I went to my portal at Wolfram and it is still says 13.3 latest. I went to the cloud and it says 13.3 there also. Was this even announced? When was it released? $\endgroup$
    – Nasser
    Aug 14, 2023 at 13:39
  • $\begingroup$ @Nasser Some user can update to 13.3.1 now, maybe release soon :) $\endgroup$ Aug 14, 2023 at 14:24
  • $\begingroup$ I got an email about Wolfram Desktop 13.3.1. I have not received an email about Mathematica 13.3.1. $\endgroup$ Aug 19, 2023 at 15:53
2
$\begingroup$

Somebody has forgotten to set the plot point number

ParametricPlot[{x,y}, {x,y} ∈ MengerMesh[2, 2],
  PlotPoints -> 4] // AbsoluteTiming

enter image description here

$\endgroup$
1
  • $\begingroup$ (+1)Thanks, since PlotPoints->0 also work. It indicate that it is actually a bug. $\endgroup$ Jul 12, 2023 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.