Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - citizen-erased

Pages: [1]
1
Graphics / Technique for drawing splines?
« on: September 11, 2011, 04:45:03 am »
You can draw nice looking splines by drawing many lines between control points. Interpolate between 2 control points using a small step size and draw a straight line between each point as you step along. If your step size generates points smaller than a pixel you'll get a very good approximation of the curve but you can get away with using a large size. To draw the whole curve just apply the same concept to each pair of control points.

Also keep in mind that the interpolation is non linear. The distance between points found by stepping along the spline at regular intervals of t (interpolation amount) will be different (in most cases) but this is not likely to be a problem for displaying it in the editor.

Pages: [1]