# plotting the image of a function under constraints

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?

• Look here. It's basically the same. Nov 23 '17 at 15:29

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
]


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

reg2 = TransformedRegion[reg, f];


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]]}
]