Eelco: Thanx for the info... I am actually having a harder time figuring out how to come up with the splines given control points.... Would you be able to provide me with some equations? preferably in the polar coordinate system... I guess then differentiating would then be very easy because it would be reduced to constants, the control points, and t, the increment variable used for the polar function. If you are going to let me in on how to make the splines, I would also like to add that I would like them to at-least be differentiable at points where two meet. SO if I had 8 points which defined two splines, I''d like for them to be formed so that the point at which the two share a point have the same slope...
Thanx a lot!!!!!
Dwiel
[edited by - Anonymous Poster on Febtober 93, -4793 BC 56:69:80 MP]
path finding using splines and thier derivatives...
>SO if I had 8 points which defined two splines, I''d like for
>them to be formed so that the point at which the two share a
>point have the same slope...
thats simply a matter of placing the endpoint of one spline on the startpoint of the other. besides the two controllpoints next to these equally positioned two points should both point away from eachother, ie their dotproduct should be -max. if you want the second dericative to be a smooth curve too, they should also be of equal length, but i think thats not an issue.
i wouldnt know what you need polar coords for btw... anyeway here are the formulas, you can convert the outcome of those to polar as you please. this is for cubic splines btw.
Pn are controlpoints 1-4
then the spline can be redefined as C3 * T^3 + C2 * T^2 + C1 * T^1 + C0 * T^0
where:
C3 = P1 - P2 + P3 - P4
C2 = P2 - 2P3 + 3P4
C1 = P3 - 3P4
C0 = P4
then you an easily get the derivative, by doing 3C3 * T^2 + 2C2 * T^1 + 1C1 * T^0, or the integral if you wanted to, but im not sure what could be an application of the integral. anyway i hope this gets you a little further
>them to be formed so that the point at which the two share a
>point have the same slope...
thats simply a matter of placing the endpoint of one spline on the startpoint of the other. besides the two controllpoints next to these equally positioned two points should both point away from eachother, ie their dotproduct should be -max. if you want the second dericative to be a smooth curve too, they should also be of equal length, but i think thats not an issue.
i wouldnt know what you need polar coords for btw... anyeway here are the formulas, you can convert the outcome of those to polar as you please. this is for cubic splines btw.
Pn are controlpoints 1-4
then the spline can be redefined as C3 * T^3 + C2 * T^2 + C1 * T^1 + C0 * T^0
where:
C3 = P1 - P2 + P3 - P4
C2 = P2 - 2P3 + 3P4
C1 = P3 - 3P4
C0 = P4
then you an easily get the derivative, by doing 3C3 * T^2 + 2C2 * T^1 + 1C1 * T^0, or the integral if you wanted to, but im not sure what could be an application of the integral. anyway i hope this gets you a little further
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement