2
$\begingroup$

I try to create a parametric plot which maps from the complex unit circle to a different region in the complex plane. That works fine but I have one problem: I want to see the images of a mesh with respect to polar coordinates in the unit circle AND I want to map a picture embedded in the unit circle as a texture for the plot. The problem for me is, that if I parametrize the plot by polar coordinates, Mathematica uses the x- and y-axis of the image as angle/modulus-axes. Is there any way to use Cartesian Coordinates for the texture of the plot? Here is my code:

n = 6;
G[z_] := Exp[I Pi/4] NIntegrate[Power[(1 - (s)^n), -2/n], {s, 0, z},
   AccuracyGoal -> 2];

ParametricPlot[ReIm[G[x + I y]], {x, y} \[Element] Disk[],
  Mesh -> {10, 10},
PlotPoints -> {30, 30},
MaxRecursion -> 2,
PlotStyle -> {Opacity[1],
  Texture[ExampleData[{"TestImage", "House"}]]}
 ]

First code

Result of the first code. I want the image to be this way but not the "cartesian" mesh.

n = 6;
G[z_] := Exp[I Pi/4] NIntegrate[Power[(1 - (s)^n), -2/n], {s, 0, z},
   AccuracyGoal -> 2];

ParametricPlot[ReIm[G[r Exp[I s]]], {r, 0, 1}, {s, 0, 2 Pi},
  Mesh -> {10, 10},
PlotPoints -> {30, 30},
MaxRecursion -> 2,
PlotStyle -> {Opacity[1],
  Texture[ExampleData[{"TestImage", "House"}]]}
 ]

This code now gives the following picture (note that the only difference lies in the parametrization).

Second code

I would like to keep the mesh coming from polar coordinates in the second case and combine it with the cartesian texture from the first case.

I hope the formulation was understandable. Any advice is highly appreciated!

$\endgroup$
1
  • 1
    $\begingroup$ Please edit your question to add the code you've tried. The code will help people to answer your question. $\endgroup$
    – creidhne
    Aug 11, 2021 at 22:19

2 Answers 2

0
$\begingroup$

Edit

One way is using polar coordinate in mesh. MeshFunctions -> {Norm[{#3, #4}] &, ArcTan[#3, #4] &}. The other way need time to work out.

n = 6;
G[z_] = Exp[I Pi/4] Integrate[Power[(1 - (s)^n), -2/n], {s, 0, z}];
ParametricPlot[ReIm[G[x + I*y]], {x, y} ∈ Disk[], 
 Mesh -> {10, 10}, 
 MeshFunctions -> {Norm[{#3, #4}] &, ArcTan[#3, #4] &}, 
 BoundaryStyle -> Red, 
 TextureCoordinateFunction -> Function[{u, v, x, y}, {x, y}], 
 PlotStyle -> {Opacity[1], 
   Texture[ExampleData[{"TestImage", "House"}]]}]

enter image description here

Original Set TextureCoordinateFunction -> Function[{x, y, r, s}, {x, y}]

n = 6;
G[z_] = Exp[I Pi/4] Integrate[Power[(1 - (s)^n), -2/n], {s, 0, z}];
ParametricPlot[ReIm[G[r Exp[I s]]], {r, 0, 1}, {s, 0, 2 Pi}, 
 Mesh -> {10, 10}, 
 TextureCoordinateFunction -> Function[{x, y, r, s}, {x, y}], 
 PlotStyle -> {Opacity[1], 
   Texture[ExampleData[{"TestImage", "House"}]]}]

enter image description here

$\endgroup$
1
  • $\begingroup$ Hi, I tried to use TextureCoordinateFunction, too (without success), but I do not know if this is the right thing to do here. Your code simply puts in the image and cuts the border according to the region after the transformation. What I need is that the picture is transformed as well (as in the first case above). $\endgroup$
    – Gragarian
    Aug 12, 2021 at 9:59
2
$\begingroup$

A lazy way to do it:

texture = Texture[ExampleData[{"TestImage", "House"}]];

p1 = ParametricPlot[ReIm[G[x + I y]], {x, y} ∈ Disk[], 
  Mesh -> None, PlotPoints -> {30, 30}, MaxRecursion -> 2, 
  PlotStyle -> Directive[Opacity[1], texture]];

p2 = ParametricPlot[ReIm[G[r Exp[I s]]], {r, 0, 1}, {s, 0, 2 Pi}, 
  Mesh -> {10, 10}, PlotPoints -> {30, 30}, MaxRecursion -> 2, 
  PlotStyle -> None, BoundaryStyle -> None];

Show[p1, p2]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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