My client wants a closed loop to be plotted on top of an image by adding ‘control points’ with the mouse. Have done a bezier with a start and finish at the same point ( to close the loop) and eac other click is a control point. But this isn’t particularly good. Would prefer the loop to go through the points more like a nurbs curve. Any ideas, help pointers…
Looks a bit sketchy, there are two control points P1 & P4, these can be the points put down with the mouse. R1 & R4 are tangents at the respective end-points. Theoretically you should be able to calculate the tangents fairly easily by averaging positions. R4 of curve segment 1 would be equal to (-R1) of curve segment 2…
Another curve type well worth looking at would be Kochanek - Bartels Splines.
NURBS curves dont go through all of their control points.
just being stupid about nurbs, I know what I meant just didn’t convey it too well. Using the hermite curve with curve1_r4 == -curve2_r1
similar to using any curve with two endpoints (start/finish) and two control points which are connected/locked to the previous/next curves control points??
Originally posted by Gavin: similar to using any curve with two endpoints (start/finish) and two control points which are connected/locked to the previous/next curves control points??
yup, you just need to find the position of the ‘invisable’ control points. Using the Hermite would make it slightly easier I’d imagine…