Grasshopper

algorithmic modeling for Rhino

Hello. I'm wondering if someone could help me out with this:

I have several curves with different slopes. I need to divide them according to their slopes from a linear graph to an exponential one.

That would mean that the curve with the smaller slope has to be divided in equals parts (linear) and that the curve with the bigger slope has to be divided in unequal parts (exponentially). The rest of the curves inbetween would be an interpolation of these concepts.

Then, it would be a sort of "range" for graph mapper from linear to exponential. How can I do this ?

Thank you !!

Views: 1812

Attachments:

Replies to This Discussion

Since you have an exact definition of your divisions already, I recommend not using GraphMapper but just a straight up equation. A bezier curve is not exponential btw.

What I would recommend is generating a bunch of numbers between zero and one. These will eventually be your division parameters, so the number of values needs to match the number of points you want. You'll end up with lists of numbers that looks like [0.0, 0.2, 0.4, 0.6, 0.8, 1.0].

You then process all the numbers using some equation. For example you could use a polynomial (which is not the same as exponential) x^n, where x is your numbers and n is some fixed value which depends on the slope. For a horizontal line you'd use n=1, for a slightly more inclined line x=1.1, etc. etc. The steeper the line the higher the exponent.

But you could also go for an n^x approach, which is exponential.

Hello David. Could you be so kind to explain me how to put an equation like the one you describe in GH?

Thanks 

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service