Evenly spaced points with hermite function?

Become a member of the CGSociety

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

Thread Tools Display Modes
  02 February 2011
Evenly spaced points with hermite function?

Run this code is script editor:

int $i=0;
vector $start=<<0,0,0>>;
vector $end=<<10,0,0>>;
vector $tan1=<<10,30,0>>;
vector $tan2=<<10,-30,0>>;

while ($i<=10)
float $pointOnCurve[]=`hermite $start $end $tan1 $tan2 ($i*0.1)`;

spaceLocator -p $pointOnCurve[0] $pointOnCurve[1] $pointOnCurve[2];

So i want evenly spaced locators along this curve.

I read little about this , and i think what i need to do reparameterization of this curve(based on lenght).
But i don't know where to find info about this.

For example maya don't allow to rebuild bezier curve(this actually like hermite as i understand) so i don't know this is possible or not.

Last edited by ginodauri : 02 February 2011 at 10:00 AM.
  02 February 2011
well if you don't need a dynamic implementation, then you can simply go with "convert bezier to NURBS", then rebuild that nurbs curve uniformly.
ngskintools.com - skinning plugin for Autodesk Maya
  02 February 2011
I need this for some particle expression , and i want to adjust hermite tangents in this expression , so maya bezier to nurbs conversion is not best idea here.
  03 March 2011
I haven't run the script, but if you've created a curve and want locators placed down it's length you can attach a locator to the curve by using "attach to motion path" and then break the connection of the U-value in the motionpath1 node of the locator. 0 is the start of the curve and 1 is the end.

so by inserting 0.5 for U-value the locator will be placed exactly in the middle of the curve's length.
  03 March 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 02:34 AM.

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