dbf-udg
diff libs/metasurf/README @ 12:1abbed71e9c9
cleanup, copyright statements and notices, readme files
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 20 Feb 2013 05:45:27 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/libs/metasurf/README Wed Feb 20 05:45:27 2013 +0200 1.3 @@ -0,0 +1,50 @@ 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 implicit unit 1.17 +sphere, centered around the origin. 1.18 + 1.19 + struct metasurface *ms; 1.20 + 1.21 + /* initialization */ 1.22 + ms = msurf_create(); 1.23 + msurf_eval_func(ms, eval); 1.24 + msurf_vertex_func(ms, glVertex3f); 1.25 + 1.26 + /* drawing */ 1.27 + glBegin(GL_TRIANGLES); 1.28 + msurf_polygonize(ms); 1.29 + glEnd(); 1.30 + 1.31 + /* evaluator */ 1.32 + float eval(float x, float y, float z) 1.33 + { 1.34 + return (x * x + y * y + z * z) - 1.0; 1.35 + } 1.36 + 1.37 +See the examples subdirectory for more examples. 1.38 + 1.39 +3. License 1.40 +---------- 1.41 +Copyright: John Tsiombikas <nuclear@member.fsf.org> 1.42 + 1.43 +Metasurf is free software, you may use, modify, and redistribute it freely under 1.44 +the terms of the GNU Lesser General Public License (LGPL) v3 (or at your option, 1.45 +any later version published by the Free Software Foundation). See COPYING and 1.46 +COPYING.LESSER for more details. 1.47 + 1.48 + 1.49 +4. Contributions 1.50 +---------------- 1.51 +If you'd like to fix the marching tetrahedra implementation or have any other 1.52 +ideas for improving this library drop me an email at: nuclear@member.fsf.org. 1.53 +Also feel free to submit patches for bugfixes.