Grasshopper

algorithmic modeling for Rhino

controlling arc curve distance "partial circumference"

Hello,

im currently taking 2 separate curves and dividing them into a specified amount of points and creating an arc between the 2 points on each curve with the vector in the z direction. what i would like to control is the distance of the curve (partial circumference) made by the arc so that it stays constant at a specified amount that i can set with a number slider, so if i were to move some of the start and end points closer to each other the top of the arc would become higher than others on the z plane(essentially the circle would become more and more complete)

thanks, jason

Views: 809

Replies to This Discussion

So instead of a z-tangent constraint you want a curve length constraint?

First the obligatory Galapagos solution (best result is to start with the Simulated Annealing solver, then switch to the Evolutionary solver from current slider layout to get really close to the target lengths).

--

David Rutten

david@mcneel.com

I'm not entirely awake yet, but as far as I can work out the relevant equations here are:

Where A is one arc startpoint, B is the other (they need to be in the same horizontal plane). M is the point halfway between A and B. M' is the point directly above M, raised by an elevation of z. C is the centre of the arc/circle we're after and r is the radius of said circle. d is the distance from A to M and d' is the distance from A to M'.

I think (I may well be wrong) that the equations describing d', alpha and r (as functions of z) are as written. However I'm not smart enough to rewrite the equation and extract z.

--

David Rutten

david@mcneel.com

thanks for the quick help..

the first solution seems to work just fine, it doesnt have to be perfect, but this definitely makes it easier to fiddle with things. ill try to continue to work out the equations and see what i come up with.

It would be fairly trivial to code this up using a divide and conquer approach, see attached.

--

David Rutten

david@mcneel.com

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2025   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service