Grasshopper

algorithmic modeling for Rhino

I would like to divide a line with points based on the distance of 1 point (Point C) from the start point of the line (Point A). For instance:

A-------C-----(d)---(e)--(f)-------B

I would like for Point D to be 3/4 of the distance from C as C is to A.
Then Point E = (Distance CD)3/4
Point F = (Distance DE)3/4

I imagine that I need some sort of loop to iterate the variable.

My Eval module is y=y(.75) but that only makes each line 3/4 of the length of the original line AC.

What sort of modules can I add to store the variable for x number of divided distances needed for the line?



Views: 1206

Attachments:

Replies to This Discussion

Hi Aleksandr,

from how I understand what you are trying to achieve this cannot be done with components. You will have to write a small script component to do this since you need a loop.

What you are trying to achieve is some kind of "Cantor dust". There is no component in grasshopper to do this because with your 3/4th algorithm there will be infinite many points between A and B! ...which would certainly crash Grasshopper, Rhino and your computer...

You will need to write a script which generates the points for you and in which you can control the number of iterations after which the algorithm breaks.

Kind regards,

Florian

Unless I'm very confused, this results in an infinite amount of points as you never actually get to B (Zeno's paradox).

Do you need to generate a fixed amount of points, or until points are closer together than x, or...?

I'm pretty sure it can be done using an expression and a series component, but it'll take some time before I figure out exactly how.

Attachments:

David,

This is wonderful. I now understand one application of the Series component. The order of components looked backwards to me at first as I would usually start with the curve component and work my way from there. How was the formula derived? I guess I should be taking more math classes.

Well it was clearly an exponential function of some sort, I just had to fiddle a bit with the 'one minus' to go from 0.75 to a series that starts at zero and approximates one.

Math classes are great, get them while you can.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service