metasurf

diff README @ 1:dc0e882ec3f9

renamed example source file test.c -> metaballs.c
author John Tsiombikas <nuclear@member.fsf.org>
date Tue, 25 Oct 2011 07:57:07 +0300
parents
children 9ab057fba0c5
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/README	Tue Oct 25 07:57:07 2011 +0300
     1.3 @@ -0,0 +1,49 @@
     1.4 +metasurf - a library for implicit surface polygonization
     1.5 +
     1.6 +1. Overview
     1.7 +-----------
     1.8 +
     1.9 +Metasurf is a library for implict surface polygonization. You only need to
    1.10 +set a callback that returns the scalar field value at any given point in
    1.11 +3-space, and another callback to accept isosurface vertices. Then at any point
    1.12 +just call msurf_polygonize, and the library handles everything else for you.
    1.13 +
    1.14 +2. Usage
    1.15 +--------
    1.16 +The following snippet is sufficient to draw the surface of an implict sphere.
    1.17 +
    1.18 +     struct metasurface *ms;
    1.19 +     
    1.20 +     /* initialization */
    1.21 +     ms = msurf_create();
    1.22 +     msurf_eval_func(ms, eval);
    1.23 +     msurf_vertex_func(ms, glVertex3f);
    1.24 +     
    1.25 +     /* drawing */
    1.26 +     glBegin(GL_TRIANGLES);
    1.27 +     msurf_polygonize(ms);
    1.28 +     glEnd();
    1.29 +     
    1.30 +     /* evaluator */
    1.31 +     float eval(float x, float y, float z)
    1.32 +     {
    1.33 +         return x * x + y * y + z * z;
    1.34 +     }
    1.35 +
    1.36 +See the examples subdirectory for more examples.
    1.37 +
    1.38 +3. License
    1.39 +----------
    1.40 +Copyright: John Tsiombikas <nuclear@member.fsf.org>
    1.41 +
    1.42 +Metasurf is free software, you may use, modify, and redistribute it freely under
    1.43 +the terms of the GNU Lesser General Public License (LGPL) v3 (or at your option,
    1.44 +any later version published by the Free Software Foundation). See COPYING and
    1.45 +COPYING.LESSER for more details.
    1.46 +
    1.47 +
    1.48 +4. Contributions
    1.49 +----------------
    1.50 +If you'd like to fix the marching tetrahedra implementation or have any other
    1.51 +ideas for improving this library drop me an email at: nuclear@member.fsf.org.
    1.52 +Also feel free to submit patches for bugfixes.