The ultimate in Bezier curviness in OpenScad is to have thickness of surface, without having to use a bazillion granules to render an object.

This thing is some updating of the bezier functions to deal with the mesh better. Specifically, you can hand the BezierMesh() module a set of 4 Bezier curves, and it will do the surface interpolation/tesselation, and generate a mesh of triangle patches that will represent the surface.

I labelled this as version '0.5' because there are some pretty horrible bugs. As can be seen in the first picture, those blue dots are the calculated surface normals for each of the quad faces. There is a flaw in the rotation angle calculations such that there is a bias, which causes the normals to point off axis in the wrong direction depending on this and that. On more interesting meshes, this will show up even worse.

Also, there are still cracks between the 'rows' as I am not properly calculating the lengths of the sides to match up properly. I know what needs to be done, but I was trying to get the normals right first.

I'm releasing this now, even though it's not quite functional, because I want other people to take a look and possibly do the math better than I am. It's all really straight forward actually. Nothing too harry other than getting some trig right. The rest is just multiplication and addition. Easy optimizations abound, particularly in the BezierMesh() module. The first, to speed up processing, would be to separate the Bezier coefficient calculations from the general 'pointoncurve' calculation. That would be way efficient.

There are some updated functions in the 'maths.scad' file, as well as the 'Render2D.scad' file.

For the final, I'll separate out the "render" stuff for granules from the core drawing. The ideal would be that you could drop in your own renderer, and get totally different behavior. I think that's a fairly easy way to extend OpenScad.

At any rate, just a step along the path...

UPDATE: Here's a blog entry to go with it...

Discuss this model in the 3D-Printing-Community