[Fluxus] nurbs problems

Dave Griffiths dave at pawfal.org
Thu Jul 17 07:53:30 PDT 2008


> i encountered some problems with nurbs shapes.
>
> build-nurbs-plane generates funny shapes sometimes:
>
> (clear)
> (hint-none)
> (hint-wire)
>
> (for* ([x (in-range 3 11)]
>         [y (in-range 3 11)])
>      (identity)
>      (translate (vector x 0 y))
>      (build-nurbs-plane x y))
>
> http://www.flickr.com/photos/gaborpapp/2676541153/sizes/o/
>
>
> nurbs-sphere pdata-size differs from the expected value. a 10x10 sphere
> is supposed to have 100 pdata elements, but it has 130 instead.
>
> (clear)
> (define p (build-nurbs-sphere 10 10))
> (with-primitive p
>      (display (pdata-size))(newline))
>
> are these bugs or am i doing something wrong?
>
> dave, do you have any idea why these happen or should i look into the
> nurbs functions?

This is partially to do with the fact that you need to add extra control
vertices to maintain continuity across the surface of the sphere, this
could be hidden from the pdata interface, but I think it's better not to.

There is some dodgy looking code in libfluxus/src/GraphicsUtils.cpp
MakeNURBSSphere() and MakeNURBSPlane(). The offsets in the for loops
generating the knot vectors look a bit strange to me. It's probable that
they were arrived at in an ad hoc manner... :)

cheers,

dave




More information about the Fluxus mailing list