NURBS surface with Toxiclibs

Hi all,

I’m desperately trying to create a nurbs surface using the toxiclibs library.

Because of the missing Java doc and also because of the complete lack of related example on the web I contacted Karsten Schmidt about a month ago and asked him if he could provide a simple working example.

He recently replied he didnt have much time to dig through his old projects but provided the following details as a form of guidance:

Have a look at the dozen or so static methods in the NurbsCreator class:

Once you have a NurbsSurface instance built, you can then pass it to the NurbsMeshCreator to convert the surface to triangle mesh with customizable resolution:

toxiclibs/src.core/toxi/geom/nurbs/NurbsMeshCreator.java at master · postspectacular/toxiclibs · GitHub

The difference between createControlMesh() and createMesh() is that the former constructs a mesh from the surface’s control points, whereas the latter performs the full nurbs interpolation and results in a smooth surface representation (depending on chosen resolution)…

I spent hours since then trying to figure out how to build a simple NurbsSurface instance but without success. I am so confused about this that I can’t even provide here a single snippet of code.

I would therefore be immensely grateful if someone could help me understanding at least how to deal with the static methods submited by Karsten.

Again, my apologies for the lack of code, I’m really at a loss about how to tackle that issue.

an example of a NURBS surface created with Toxiclibs (see gallery here)

@solub – am I right that you are trying to achieve a 3D NURBS surface based on sample points on the surface, not control points – e.g. using the createMesh() approach?

Do you mind sharing something about what your data looks like and where is it coming from? Maybe share a small point collection, or whatever?

Dear @jeremydouglass,

Thank you for the reply. Ideally I would like to create a 3D NURBS surface and distort/warp it freely in real time with draggable control points (no predetermined/fixed positions), quite like in the example below.

I don’t even know if that’s possible with toxiclibs.