PDA

View Full Version : distance of a point along a nurbs curve.


MOSS
04-07-2008, 03:50 AM
Is there any way to find the distance along a nurbs curve a point is?

ZeBoxx2
04-07-2008, 12:25 PM
you need the reverse of...

evalPos <nurbscurve> <u_param>

Returns the position in space of the given parametric point along the curve.

?

Can't say I spotted one - you could use the above function to try and find the u_param by generating a bunch and then seeing if the resulting point3 is close enough to yours... but if the NURBS curve is very wild, you might miss it... or if the curve touches/crosses itself, there'll be more than 1 single valid point.

If you're referring to having a reference to an actual NURBS point, then .u_param should yield the value you're looking for.

How to get a u_param into scene units, however, is a different matter... *stares himself blind trying to find the equivalent to splineshapes' curveLength/etc.*

CGTalk Moderation
04-07-2008, 12:25 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.