# How to plot $\lbrace (x+y,x-y) \vert (x,y)\in (-1/2,1/2)^{2} \rbrace$

I want to visualize the following set in Maple:

$\lbrace (x+y,x-y) \vert (x,y)\in (-\frac{1}{2},\frac{1}{2})^{2} \rbrace$

Which commands should I use? Is it even possible?

-
You are trying to visualize a function that has two inputs and two outputs. So That is like trying to graph a four dimensional object. Your function is really a 2 by 2 matrix, or linear transformation. There are ways of graphing it but only based on limiting your input or output to certain regions. – Maesumi Jan 13 '13 at 16:43
Your input is square. Your may trace what happens to edges of the square and see where each point goes. So you are mapping a square from your initial coordinate system to a familiar shape in another coordinate system. – Maesumi Jan 13 '13 at 16:46
Why don't you try at mapleprimes.com? I asked some question there. I agree with @Maesumi, but do try at there. I am eager to know the commands. :-) – S. Snape Jan 13 '13 at 16:50
To correct my comments: Upon re-reading your question I realize you are asking for a set to be graphed, not a function. This problem is doable by hand, but of course Maple commands can help when the problem is more involved. – Maesumi Jan 13 '13 at 16:55

Try this:

with(plots):
for i from $0$ to $100$ do
$a_i$ := evalf($-\frac12+\frac{i}{100}$):
$b_i$ := evalf($-\frac12+\frac{i}{100}$):
od:
points := ${\text{seq}(\text{seq}([a_n+b_m, \ a_n-b_m, \ 1], n = 0 .. 100), m = 0 .. 100)}$:
pointplot3d(points, axes = normal, symbol = box);

-

The domain S can be visualized as a plot of the shaded interior of a polygon (square). This plot can be transformed by the given mapping.

f := plottools:-transform((x,y)->[x+y,x-y]):

S := plots:-polygonplot([[-1/2,-1/2], [-1/2,1/2],
[1/2,1/2], [1/2,-1/2]],
axes=box):

plots:-display(Array([S, f(S)]));

-