Piecewise linear integer curve interpolation in C#/Unity3D

I would use this interpolation cubic: x=a0+a1*t+a2*t*t+a3*t*t*t y=b0+b1*t+b2*t*t+b3*t*t*t where a0..a3 are computed like this: d1=0.5*(p2.x-p0.x); d2=0.5*(p3.x-p1.x); a0=p1.x; a1=d1; a2=(3.0*(p2.x-p1.x))-(2.0*d1)-d2; a3=d1+d2+(2.0*(-p2.x+p1.x)); b0 .. b3 are computed in same way but use y coordinates of course p0..p3 are control points for cubic interpolation curve t = < 0.0 , 1.0 > is curve parameter from p1 to … Read more

How exactly does OpenGL do perspectively correct linear interpolation?

The output of a vertex shader is a four component vector, vec4 gl_Position. From Section 13.6 Coordinate Transformations of core GL 4.4 spec: Clip coordinates for a vertex result from shader execution, which yields a vertex coordinate gl_Position. Perspective division on clip coordinates yields normalized device coordinates, followed by a viewport transformation (see section 13.6.1) … Read more

How can i produce multi point linear interpolation? [closed]

For multi point interpolation there are 3 options: piecewise linear interpolation choose 2 closest points to your known coordinate if you use parameter then select the points containing parameter range and change the parameter range/scale to interpolation range (usually <0,1>) and interpolate as linear interpolation. example of linear DDA on integers and more is in … Read more