How to create a polygon that sits within the bounds of a rectangle

Hi, I’m new to grasshopper and I’m struggling to figure out how to create a polygon that sits within the bounds of a rectangle. I want to create either a circle or triangle that extends to the bounds of, but doesn’t go past a set boundary of a rectangle or square.

Thanks!

Many solutions. Try to be specific.

I am trying to make the 3 points of the triangle all touch the edges of the square. I have been trying to do so by working with the center point of the square, but by doing so, only one corner touches.

How do I make the largest triangle possible within the square?

random tries.gh (10.5 KB)
Honeycam 2023-08-11 13-40-54

Thanks! Is there a way to ensure that the triangle is an equilateral that shrinks and grows with changing size of bounding box?

Hi Kate -

Perhaps you are looking for something like this?

Circle and Triangle in Rectangle.gh (12.2 KB)
-wim

random tries V1.gh (16.2 KB)

1 Like

Yes, this is what I was aiming for, thanks for the help!