Grasshopper

algorithmic modeling for Rhino

How to move a point along a curve with a certain distance

Hi,

I created a closed planar curve and have a set of t paramets, that define points on that curve. I would like to move the points all about 15 units along the curve to the right.
I tried the shift component, but it didn't work because the points are not equally distributed.

Q: How can I move a point, that lies on a curve a certain distance along the curve. (Also, if the curve is closed, how can I manage, that the point also moves from the end back to the beginning e.g. moving the t value from 0.9 to 0.1)

Thanks in advance for your Help.

Martin

Views: 2872

Attachments:

Replies to This Discussion

Hi Martin,
i'm not sure if i understood you problem...
you should try this: right cklick on the CRV container -> Reparameterize
or do you really want to move from 0.9 to 0.1 (=1.1 > 1) ?
Hi,

here are the files, I'm working with right now.

Maybe it is easier to illustrate the problem.

I want to move the points on the top line x units to the right, so that the lines are tilted.

How do I move the points?

- About this 0.9 to 0.1
If a curve's parameters go from 0 to 1 and the curve is closed, then the point with the parameter 0 and the point with the parameter 1 are identical.
So
If I move the Point with the t-value of 0.1 up by the 0.2 the new value is 0.3.
If I move the Point with the t-value of 0.9 up by the 0.2 the new value is supposed to be 0.1 - because it goes in a circle. But it returns 1.1, which is not a parameter on the curve anymore.
Attachments:
Attachments:
or this...
Attachments:
Hi,

That is great. I never really knew what this dispatch and merge really were for. Thanks.

-----

But I still have a little problem with the distance between the points. If I add the same number to each parameter, the distance between the points is not exactly the same.

So I need to somehow calculate the t value, that is exactly x units to the left of the point. (which is probably different for each t- parameter).

I was wondering if there is an easy way to calculate that. (I haven't found one, yet)
What I need is basically the opposite of the "evaluatelength" component. You input a curve, a starting point and a lenght and get out a new t-parameter.

I could think of a workaround for my Problem by dividing the curve in x-times as many pointsthan I need and the filter out the shifted points, but I'd rather not do that :-)

Martin

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