POV-Ray : Newsgroups : povray.unofficial.patches : Tesselation and mesh data extraction patches : Re: Tesselation and mesh data extraction patches Server Time
28 Apr 2024 01:15:22 EDT (-0400)
  Re: Tesselation and mesh data extraction patches  
From: Chris Huff
Date: 13 Dec 2000 16:45:58
Message: <chrishuff-679ACB.16465513122000@news.povray.org>
In article <3a37dd81@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   - The mesh data extraction patch
>     ==============================

This definitely looks useful!


>   - The tesselation patch
>     =====================

This reminds me of something I have been thinking of but don't know 
enough about meshes to do...extending the mesh object so you can put 
other objects in it and have them be automatically tesselated. There 
would also be various mesh processes that could do things like remove 
internal triangles, auto-smooth normals, remove redundant triangles, 
replace groups of tiny triangles with larger ones, apply a warp to the 
points to displace the mesh(I actually tried this one, I never got it to 
work), and various subdivision features...these would be in a 
"process_mesh" block and would be done in the order they are found.
The syntax would be something like this:

mesh {
    ...triangles and/or smooth triangles...
    OBJECT {OBJECT_STUFF TESSELATION_OPTIONS}
    process_mesh {
        warp {WARP}
        smooth SMOOTH_METHOD
        strip_interior_triangles
        subdivide {...}
        round_edges {...}
        ...
    }
}

TESSELATION_OPTIONS would vary from object to object, but would contain 
things like method, uv resolution, a target triangle area, whatever...as 
well as commands for how to add the tesselated object to the mesh: union 
would just add the triangles, merge would strip the interior triangles, 
etc...it could also contain mesh processing commands applied to the mesh 
generated from that object, before it is added into the main mesh.
An example would be:

mesh {
    sphere {<-1, 0, 0>, 1
        method 1, 4// 0=usual sin/cos tesselation, 1=subdividing 
polyhedron with depth as second parameter, something like a geodesic 
sphere
    }
    sphere {< 2, 0, 0>, 2
        method 1, 4
        merge// tell it to automatically remove interior triangles and 
produce the proper "seams"
        process_mesh {
            warp {turbulence 0.3}
        }
    }
    process_mesh {
        smooth SMOOTH_METHOD
    }
}

This could be very useful for manipulating meshes by hand...I had 
visualized it as using an approximation of objects which it couldn't 
tesselate directly, the bounding box of a julia_fractal for instance, 
but your tesselation algorithm would be a much better choice for this.

-- 
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.