0
$\begingroup$

I have a point on the graph at position X,Y , and I have to draw a square around that point of side X m. I have described my problem in the image.

Example

I have taken an example square of 3 m. The diagonal of this square is 4.24 m(approx). I need to find the coordinates of the sides of the square.

  • 0
    If I understand this correctly then, the square will not be slanted at all, I'm sorry that the image does not depict that correctly.2012-12-12

1 Answers 1

1

If your point is $(x,y)$ and side length is $k$, the coordinates of the square of which the sides are parallel to the x- and y-axes are $(x+n, y+n)$, $(x+n, y-n)$, $(x-n, y+n)$, $(x-n, y-n)$ where $n=k*sqrt(2)/2$. If you want angles by the axes, rotate.

  • 0
    This looks like it'll do the trick, I'll check and get back :)2012-12-12