I have a bit of a simple problem, I just cannot find out how can get to fit a rectangle inside a circle. I tried it with an Inside Top but it only fits outside of it. I want to have the rectangle touch with all the corner on to he circle, with different types of rectangles.
If you would like to put a ‘rectangle’ inside a circle and let all corners touch the circumference of the circle, that rectangle would be a square. In your example image the circle is an ellipse.
Instead of trying to fit the square inside the circle by eye, it might be better to do a little math to calculate how big the size of the square should be. If the square is in the center of the circle, the diagonal from the center to a corner would be the same size as a the radius of the circle (let’s call it ‘r’). Then using Pythagoras: x^2 + y^2 = z^2 we can calculate what the sides of the rectangle should be. z^2 would be r^2 (the diagonal) and x & y would be half the side of the square (in your example a/2 and b/2, and since we’re talking about a square: ‘a’ == ‘b’).
So:
So if you set the width & height of a rectangleTOP to sqrt(2 r^2) where ‘r’ is the size (radius) of the circle, it will perfectly fit. Might be confusing with all these textmode math, so perhaps the screenshot & tox makes more sense :).
To do this with a ellipse, the math becomes a bit more complicated.
(edit) after trying to solve it for an ellipse I realized the solution is similar. You can just add another ‘radius2’ to the constantCHOP and link the height to that to both the circle as what comes out in the nullCHOP.
In a circle with radius R, for any angle of the diagonal inside your rectangle, the width of your rectangular shape can be expressed as 2 *R*cos(angle)
The height is 2 * R * sin(angle)