algorithmic modeling for Rhino
Hello All,
I'am after a 'Conditional Function'.
I want a polygon with 'n' number of sides having an area as follows
1) area More than or Equal to 50sqm but Less than or Equal to 100Sqm
2) If Less than 50Sqm than 50Sqm
3) If More than 100Sqm than 100Sqm
Can any-1 help?
Kind regards,
AB
Tags:
I think the best way to approach this is to always scale the object, but use a scaling factor of 1.0 if the area is between the limits (L0 and L1). The algorithm would thus look like:
The scaling factor which changes the area from A to At incidentally is the square-root of the ratio of the two.
--
David Rutten
david@mcneel.com
Tirol, Austria
David,
Works great.
Thank you so much for your help. Especially explaining the logic. Just 1 question, how did you get
Scaling factor = square-root of the ratio?
thanks
AB
Well, scaling factors are basically the same as linear dimensions, i.e. length. Lengths are expressed in meters. Areas are expressed in meters-squared. So when you scale something with a factor 2, the area becomes 4 times bigger (and the volume 8 times as volumes are expressed in meters cubed).
Scaling lengths is quite straight-forward. If you have a curve that has a length of 10m and you want it to have a length of 15, you just divide 15 by 10, giving you 1.5 which is the scaling factor you need.
Since Areas have that square in there, you need to cancel it out by using a square-root. If you wanted to match a specific volume, then you need the cube-root of the ratio.
--
David Rutten
david@mcneel.com
Tirol, Austria
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by