# Rectangle and Circle

Although area is fixed,radius of the circle is varying and also one of side of the rectangle is varying according to the rectangle area.
i guess they have big potential for your works.
rec_circle.gh (8.5 KB)

1 Like

Is this a question? What in the world are you doing with that Python ‘rectangle’ component? 59 seconds to open this file!!??

``````import rhinoscriptsyntax as rs

if a>b:
b=A/a
else:
a=A/b

print(a)
print(b)
``````

was it compliment or are you teasing me_?
if you have a better solution in this issue i m ready to learn with scripting or GH components.

What exactly do your components do that vanilla Grasshopper components (i.e. Rectangle, Sphere) don’t already?

What exactly is the issue? Also 59.4 seconds… wow…

These appear to behave the same way? Standard GH (white group, returns “Rectangle”) matching your Python (yellow group, returns “Polyline Curve”). The logic is curious, but they do the same thing?

rec_circle_2019Oct9a.gh (17.9 KB)

Below, a cluster called RecArea (green group), standard GH components (where ‘A’ = “Area” of course):

rec_circle_2019Oct9b.gh (21.3 KB)

Inside cluster RecArea:

That Python circle (yellow group below) can be replaced by a standard GH Circle (green group) with this expression on the ‘R’ (Radius) input:

`if(x>0, sqrt(x/Pi),1)`

circle_2019Oct9a.gh (5.5 KB)

Rectangle and Circle, no Python:

rec_circle_2019Oct9c.gh (16.7 KB)

1 Like

let’s go back to 2012