See what's going on with flipcode!




 


Submitted by , posted on 17 August 2000



Image Description, by


my little opengl metaballs demo. as i started this, it looked very much like paul bourkes code. means, the values were computed for the whole grid (example: 32x32x32 times getting distance to all the balls), and all triangles used there own vertices. then i implemented a bounding box, so only the values in the box around the ball were computed. this was a large speedup, but it also brought problems, when the balls connected or there were all near eachother, the surface could go out of the box, and gaps appeared. the next thing i did was vertex sharing, because all the vertices were computed twice!! yesterday i coded that it computes the values recursively. that means that it startes with a cell, then looks what edges of it are cut by the surface, and then goes to the cells that use this edge. so only the needed values are computed. this meant over 100% speedup! you can set the grid-resolution, the number of balls, the iso-value of the surface, at runtime. i also did 6 presets of some cool settings. i realesed the source for the old bound-box version. get it at http://swiss.scene.org/quixoft/marko



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.