tangentBezier3D @ last/first spline segments. Random results?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  12 December 2011
tangentBezier3D @ last/first spline segments. Random results?

Max 2010 SP1.
Re: tangentBezier3D @ last/first segment.

The image shows the results of obtaining the point3 tangent of a spline segment using tangentBezier3D.
There are four separate sets of results, those on the left use a 'param' value of 1.0, those on the right 0.99999.

Hopefully its evident to see that using a 'param' value of 1.0 gives different (random?) results each time, out of the four shown three of them are different, only the second and third 'run' gave identical results. I've even had it output "[-1.#QNAN,-1.#QNAN,-1.#QNAN]" as well but predictably it wouldn't when I needed a screen grab.

This seems to only happen with the last segment, all the others appear fine.

Is this something peculiar to Max 2010 SP1 or is it just me?
Does this also happen in later versions of Max?

If anyone can shed any light on this I'd very much appreciate it.

I've also asked this on Autodesk Area some 4 weeks ago but so far no joy.

Many thanks.
The early bird may catch the worm, but it's the second mouse that get's the cheese.
  12 December 2011
what the tangent is? i will not tell too much about the math but vulgarly it's a vector from p0 to p1, where p0 and p1 are first and next points on spline with some interval.
when you ask the last point on a spline (param 1.0) how can we get the next? no next - no vector - no tangent ...
the solution is to get not 1.0 path param but very close ~ 0.999 as you do in your sample.
  12 December 2011
Thanks Denis, very much appreciated, i'm still a little confused though.

Are you saying that the last segment in a closed spline is treated as if it were the last segment of an open spline? If this is the case then by the same token wouldn't the first segment also suffer these random results for a param value of 0.0? Shouldn't I have to use 0.0001 as the param value for segment 1 in the same way?

The thing is, the results I get for the first segment at param 0.0 (in pink) seem to work out ok, both sides have exactly the same output.

I've also tried changing which knot is #1 but the problem just moves round with it, it's always the last segment in the spline.

Anyways, its not an issue for concern, 0.9999 will do for my needs, its more a curiosity thing than an actual problem. I'll just have to watch out for it in the future.

Thanks again.

The early bird may catch the worm, but it's the second mouse that get's the cheese.
  12 December 2011
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:48 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.