You are not logged in.
Pages: 1
Thanks mate.
p.x := round((h1 * p1.x) + (h2 * p2.x) + (h3 * t1.x) + (h4 * t2.x));
p.y := round((h1 * p1.y) + (h2 * p2.y) + (h3 * t1.y) + (h4 * t2.y));
This is what you actually drawing a point derived from x,y coords of p1,t1,t2,p2 and then next set starting from last point p2 t3 t4 p3
Once again thank you for your answer. Yes, that it. You have a number of start/end points and start/end tangents and then you produce a 2D curve (that was the initial set of x,y points coords I was talking about)
http://en.wikipedia.org/wiki/Cubic_Hermite_spline
Actually, I am bit confused by the derivative formula you have mentioned.
This is what I was doing but I am NOT satisfied with the results I need more accuracy
dx := p1.x - p0.x;
dy := p1.y - p0.y;
theta := 180 - 180/pi * arctan2(dy,dx);
Then this theta angle is used to rotate the points of the circle accordinly on the Z axis in order to follow the path.
The problem is that I get some strange rotation values throughout the path.
I am trying to produce a circle to extrude along a spline in 3D space
Thank you for your answer. This is the polynomial I am using.
It sounds like you want your object to be facing in the direction of the tangent to your curve.
That's it
Hi, all
I have a set of x,y points that define a curve (path) that was delivered by a Hermite polynomial.
Anyway, I need to find the rotation angle for each x,y point so that if an arrow moves along
this curve it will always point to the direction of the curve.
Here is a flash animation of what I am trying to implement (see the sprite rotates along path)
http://www.developingwebs.net/flash/orient.php
Any ideas,
Cheers
Pages: 1