Grasshopper

algorithmic modeling for Rhino

Hi all,

So I have a list of number 1,4,7,9. And I'm trying to plot these numbers on a curve so If the curve length was 10, they would be points at 1,4,7,9.

Thanks in advance

Tom

Views: 570

Replies to This Discussion

And what would you expect if the curve length is 12?  Or 8?  Or 50?

I don't think you've defined this problem narrowly enough.  It reminds me of some code I posted here back in July ("Maths + Divide Curve") that used a list of numbers to place points on a curve:

Also here in "Incrementally scaled geometry":

http://www.grasshopper3d.com/forum/topics/incrementally-scaled-geom...

Hi Joseph,

Thanks for your reply. So what I'm looking for is that if the length of the curve is 10 or how ever long. I want to be able to plot points on as a percentage, so if I have the numbers 2,2,7,8. It would plot on the line of the 20%, 20%, 70%, 80% of the length of the line. I'm not looking for a way to divide the curve by 2 and then by 2,not steps. So I would have two points at 20%. I hope this is clear.

Thanks,

Tom

Note that the curve (C) input to 'Eval' is reparameterized, meaning it expects 't' values in the range of zero to one.

Attachments:

Hi,


Thanks again for the reply. I now have a further question about a similar problem. 

I am trying to ramap a curve length from '195' to '5.6'. so my list of points, the maximum number is 5.6, i want this number to be at the end point of the curve.

Please see attached script. 

Attachments:

Not big on math, eh?  First, the 't (Parameter)' input of 'Eval' (Evaluate Curve) accepts numbers between zero and one, not points.

Second, to get that number in this case, you just divide each number in that list from 'ReMap' by the maximum value 5.6 (the 'B' input of 'A/B'):

Thank you Joseph, sorted.

I didn't look carefully at your code before but now that I did, I see all that 'ReMap' code as useless clutter.  This is all you need:

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service