14 Nisan 2009 Salı

Solution for monday exercise


The sample code is located here.

To close up the curve, two cases are treated separately:
1) For all but the last point, draw as previously.
2) For the last point, take for the "end point" the first point.

For the continuity, the condition is that the control-points around an endpoint should lie on a line. Hence every second control-point gets determined by the one before it.

The third problem is of course to combine this so that also the "closing up point" gets smooth as well, and the for that code is added here too.

Now try to translate this code for your three-dimensional sketches...

Hiç yorum yok:

Yorum Gönder