Granule Bezier Mesh (Q46350)

From Library of Open Source Hardware
Jump to navigation Jump to search
No description defined
Language Label Description Also known as
English
Granule Bezier Mesh
No description defined

    Statements

    www.thingiverse.com
    0 references
    1.0.0
    0 references
    https://spdx.org/licenses/CC-BY-4.0
    0 references
    WilliamAAdams
    0 references
    auto
    0 references
    en
    0 references
    thingiverse.com
    0 references
    There have been tons of graphics rendering programs developed over the years. Likewise, there are tons of graphics books out there in the world showing you how to use those systems. One such system is OpenGL. As OpenGL is utilized for everything from game development to rendering of body tissue, there are plenty of examples, and models, demonstrating how to do very interesting things. This thing uses the current version of the Granule rendering system being developed in OpenScad, and renders one of the well known samples from OpenGL called "bezmesh". I found an article here: http://www.opengl.org/resources/code/samples/mjktips/grid/index.html and used the bezier mesh control points, unchanged, to render this thing. The picture includes the entirety of the source code needed to render this thing, of course, not including the libraries files. The key function is the bezierMeshSurface() module. It takes 4 bezier control point curves, and does interpolation between them. For the math hearted, the function evaluates along the curves simultaniously (u=0:1), and at each step forms a new curves from the 4 evaluated points, and then renders that curve. Along the way, the bezier.scad library gained a couple more new modules to help render bezier curves using arrays, and honoring all three axis. The other picture, of the arch thing is just another set of control points calling the same Bezier Mesh function. For creating that one, I was thinking of what kind of curves I would need to make something to fit within the web of my hand. It's essentially a saddle. Saddles are good for many things, including joints between bones. So, this shows how easy they are to create with just a few curves. At the current iteration, the library relies on the granule renderer, which is about the slowest way in the world to do things. Thus, it creates a bazillion vertices and polygons, which makes it fairly impractical for printing, although it can be done. The next version will use faces, and thus reduce the vertex and polygon count. Then this tool will be practical. But for now, you can see pretty pictures. UPDATE: Added a couple of pictures of a piece that I actually printed. The .stl is included. It is 3Mb! I don't know how the Thingiverse renderer will handle that. It's an interesting point to me. Perhaps for things that are generated, the .scad file is a better transport mechanism than .stl. Since OpenScad is available everywhere, it's just one step away from 'uncompressing' a design from the .scad to the .stl.
    0 references
    0 references