Grasshopper

algorithmic modeling for Rhino

Either there is something up with curve parameters, or I'm misunderstanding them. 

In the attached image you'll see I started with a 3D line, took it's length and divided it into equal segments. The final t parameter returns the same number as its length. Great. BUT, when I try to feed those parameter numbers and evaluate the original curve at those intervals the final number its giving me is much larger. I've tried a bunch of different components and they're all giving me a different final parameter number at the end, which to me is telling me it's giving me a different curve length than it did the first time.

Unexpected behavior, or user error?

Views: 1715

Replies to This Discussion

Hi Austin,

 

Its a misunderstanding. Length does not equal Parameter. If you want to evaluate a curve at a given length then there is a separate component "Evaluate Length". By default this component's Input N is set to true which Normalizes the Length, allowing you to use a slider from 0 to 1 to get all the way along the curve. If you set this to False you can supply the actual length at which you want to evaluate the curve.

Thanks for your reply. 

I think I did that in one of my alternate method tests in the top right. The parameters I'm getting (from the lower box in purple) are the same as real length numbers because the curve is flat and straight, you can see that the final parameter is the same as the overall length of the line. 

In the top right of the file I used the Evaluate Length component (N set to false) with those lengths into the same curve and it's still giving me a larger number.

Are you saying that even though the original line length is ~8680 and feeding that as the Length to evaluate into Evaluate Length component it will give me the t of ~8826 because parameter is different than length? I hope this isn't a daft question, I just want to understand the behavior. 

Thanks.

Hi Austin,

 

parameters only rarely coincide with Length. A single line curve can be assigned a parameter domain from 0.0 to Length, in which case the two will match. However a linear nurbs curve of higher degree than 1 might have the same shape as a line, but it won't have the same parameter distribution.

 

In fact, look at a sine curve:

 

The red crosses are spaced along equal x intervals. These represent the parameters. As you can see the actual distance between any two subsequent crosses is not constant, even though their parameter distance (distance along x-axis) is.

 

Nurbs curves suffer from the exact same problem, it's just that they are proper 3D curves which are defined by 3 separate equations for all three world axis directions.

 

If I ask you what the coordinate is for this curve at x = 2.3, it's very easy to compute:

 

{2.3, sin(2.3), 0}

 

If I ask you what the coordinate is for this curve at 2.3 units along its length, you'd probably be stuck.

 

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Thank you both, I get it now.

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