4
$\begingroup$

consider a function

$$ f\colon \mathbb{R}^2\to\mathbb{R^2}. $$

i'd like to plot the image of a set $A\subset\mathbb{R}^2$ under $f$, that is $f(A)$. for example, the image of $\{ x>0, y>0, x+y<1 \}$ under $(x,y)\mapsto(x+y,x-y)$. is there a way to do this?

$\endgroup$
1
  • 2
    $\begingroup$ Look here. It's basically the same. $\endgroup$
    – halirutan
    Nov 23 '17 at 15:29
5
$\begingroup$

You can use this, the MaxCellMeasure option is used to control the region discretization refinement.

reg = DiscretizeRegion[
           ImplicitRegion[(x > 0) && (y > 0) && (x + y < 1), {x, y}],
           MaxCellMeasure -> 0.001
      ]

enter image description here

f[x_, y_] := {x + y, x - y}

reg2 = TransformedRegion[reg, f];

enter image description here

$\endgroup$
2
$\begingroup$
R = DiscretizeRegion@ImplicitRegion[x > 0 && y > 0 && x + y < 1, {x, y}];
f = {x, y} \[Function] {1 - Cos[x] + y, x - Sin[y]};
Graphics[{Texture[ExampleData[{"Texture", "Bark"}]],
  GraphicsComplex[MeshCoordinates[R], MeshCells[R, 2], 
   VertexTextureCoordinates -> MeshCoordinates[R]]}
 ]
Graphics[{Texture[ExampleData[{"Texture", "Bark"}]],
  GraphicsComplex[f @@@ MeshCoordinates[R], MeshCells[R, 2], 
   VertexTextureCoordinates -> MeshCoordinates[R]]}
 ]

enter image description here

enter image description here

$\endgroup$

Your Answer

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