-2

I need a formula for a rectangle based on a rectangle like this:

https://i.stack.imgur.com/olGMJ.png

Okay, so i have the black rectangle, from 0,0 to whatever xy size, and then i need a new rectangle over it (blue one) shaped based on the black one touching the angles, and to know the abcd positions. As shown in the picture.

I would be tons happy if someone can help me.

Henry
  • 157,058
  • 1
    Unless the black rectangle is a square, then the angle can not be 45 degrees. – Teoc Jul 14 '15 at 16:47
  • $C$ is the point $\left(\dfrac{x}{2},y+\dfrac{x}{2}\right)$. The others are no more complicated – Henry Jul 14 '15 at 17:49

2 Answers2

1

Notice that if you cut the blue rectangle along the sides of the black rectangle, the result is a dissection of the blue rectangle into a rectangle (the black one) and four right triangles.

If one angle of one of those right triangles is $45$ degrees, as shown, then the other acute angle of that triangle is also $45$ degrees, and so are all the acute angles of all the other triangles. In other words, once you choose the angle $45$ degrees, it results in four $45-45-90$ triangles.

In fact, the blue rectangle turns out to be a square whose diagonals are parallel to the sides of the black triangle. The vertices of the square are easy enough to find if you draw a graph. Suppose the black rectangle is parallel to the $x$ and $y$ axes with one corner at $(0,0)$ and the diagonally opposite corner at $(x,y)$, where $x > 0$ and $y > 0$, then the vertices of the blue triangle are:

$$A = \left( \frac x2, -\frac x2 \right)$$ $$B = \left( x + \frac y2, \frac y2 \right)$$ $$C = \left( \frac x2, y + \frac x2 \right)$$ $$D = \left( -\frac y2, \frac y2 \right)$$

David K
  • 98,388
  • Thanks, that was really fast. I am impressed :D I have already run the formula through the program and its working great. – Lucijan Jul 14 '15 at 20:05
0

Here's a picture:

enter image description here

The two orange circles have centers as centers of the edges of the rectangle with radii half the respective edge length. The non-trivial intersection point means that the blue angle is a right-angle, and so by symmetry so is the angle formed by the green triangle. This allows construction of the rectangle required.

JMP
  • 21,771