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