Grasshopper

algorithmic modeling for Rhino

Hi!

I have a irregular closed curve and a goal length. I want to scale it up or down to have its length match my goal length.

I initially though about creating a VB component which would loop and scale it up or down by small amounts until it reaches the desired length, but I am afraid this would no be that efficient... 

maybe anyone has any other solution??
any algorithm or formulas?

Thanks!!
D.

Views: 3420

Replies to This Discussion

1. If it's linear, simply scale it by the factor of (target length / current length).
2. If it's not linear, try Galapago (Params > Special > Galapago).
not linear...

i actually thought about galapagos...
i'll give it a try!
thanx
That'll work on all curves, not just linear ones.

--
David Rutten
david@mcneel.com
Seattle, WA
maybe it is simpler than I thought.
I just divided the desired length by the original length and scaled it by this factor!
using the geometrical center point of the curve as the scaling center point.

maybe it is just coincidence but worked perfectly in several trials...

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service