   [c#][dx9] Catmull-Rom issue.
  Hopefully anyone using catmull rom splines should be able to answer this question.I have the following code for the spline below. My control points are :V0 (207.3548,307.411133,0.0)V1 (216.346, 307.809326,0.0)V2 (220.2217,307.9812,  1.026721)V3 (276.0361,310.452759,2.12494135)And the weights are:Weights 0,   0.257406383,   0.51481276,   0.77221918,   1But the points I receive are:xyz216.3460228307.80932830.0000216.4302368307.81304930.1897215.3150024307.76367190.4618215.9187622307.79040530.7674220.2271271307.98120121.0267The part that I find confusing is why the x value reduces then increases which should not be the case. I have tried a few control points and most times it works but sometimes is doesn't. Could someone please input these values into their equation and check they get the same. Or see where I am going wrong.Thanks [   public Vector3 D3DXVec3CatmullRom(Vector3 pV0, Vector3 pV1, Vector3 pV2, Vector3 pV3, double s)   {  Vector3 Vector = new Vector3(0,0,0);  Vector = 0.5f * (    (2 * pV1) +  (-pV0 + pV2) *((float)s) +  (2 * pV0 - 5 * pV1 + 4 * pV2 - pV3) *((float) Math.Pow( s,2)) +  (-pV0 + 3 * pV1 - 3 * pV2 + pV3) *((float) Math.Pow( s,3))    );  return Vector;}]
Quote:Original post by Carbon_PhDThe part that I find confusing is why the x value reduces then increases which should not be the case. What makes you think that? [smile]It's an incorrect assumption on your part. Try playing around with this and see what happens when you create a curve similar to the one you have above.   ;  Maybe the image below will help explain. I understand how the catmull roms work (i think) and the line in question is the horizontal red one. When ever it crosses over another line the z value is increased slightly.So for that line there are 2 end points at the ends of each line, 4 crossover points and 2 more dummy nodes that are close to the endpoints and share the same line equation.I am just looking at the left hand edge where the first point is the dummy point, the second is the endpoint of the line, the third the intersection and the 4th the next intersection.Its a simple curve and i was expecting quite simple interpolation between the two ponts but instead is goes back on its self and then all of a sudden jumps from 215 to 20 (in x). Which leads me to believe that I have not coded it right?A similar problem occurs at the third crossover point as well?!