nuclear@1: metasurf - a library for implicit surface polygonization nuclear@1: nuclear@1: 1. Overview nuclear@1: ----------- nuclear@1: nuclear@1: Metasurf is a library for implict surface polygonization. You only need to nuclear@1: set a callback that returns the scalar field value at any given point in nuclear@1: 3-space, and another callback to accept isosurface vertices. Then at any point nuclear@1: just call msurf_polygonize, and the library handles everything else for you. nuclear@1: nuclear@1: 2. Usage nuclear@1: -------- nuclear@2: The following snippet is sufficient to draw the surface of an implicit unit nuclear@2: sphere, centered around the origin. nuclear@1: nuclear@1: struct metasurface *ms; nuclear@1: nuclear@1: /* initialization */ nuclear@1: ms = msurf_create(); nuclear@1: msurf_eval_func(ms, eval); nuclear@1: msurf_vertex_func(ms, glVertex3f); nuclear@1: nuclear@1: /* drawing */ nuclear@1: glBegin(GL_TRIANGLES); nuclear@1: msurf_polygonize(ms); nuclear@1: glEnd(); nuclear@1: nuclear@1: /* evaluator */ nuclear@1: float eval(float x, float y, float z) nuclear@1: { nuclear@2: return (x * x + y * y + z * z) - 1.0; nuclear@1: } nuclear@1: nuclear@1: See the examples subdirectory for more examples. nuclear@1: nuclear@1: 3. License nuclear@1: ---------- nuclear@1: Copyright: John Tsiombikas nuclear@1: nuclear@1: Metasurf is free software, you may use, modify, and redistribute it freely under nuclear@1: the terms of the GNU Lesser General Public License (LGPL) v3 (or at your option, nuclear@1: any later version published by the Free Software Foundation). See COPYING and nuclear@1: COPYING.LESSER for more details. nuclear@1: nuclear@1: nuclear@1: 4. Contributions nuclear@1: ---------------- nuclear@1: If you'd like to fix the marching tetrahedra implementation or have any other nuclear@1: ideas for improving this library drop me an email at: nuclear@member.fsf.org. nuclear@1: Also feel free to submit patches for bugfixes.