开发者

Marching cubes?

开发者 https://www.devze.com 2023-03-07 11:06 出处:网络
I have an object made of points, lets say its point cloud, i want to render object from those points, i want object to look like those points were wrapped in a sheet of paper. I want to animate it, so

I have an object made of points, lets say its point cloud, i want to render object from those points, i want object to look like those points were wrapped in a sheet of paper. I want to animate it, so first thing that came on my mind was marching cubes, but my object will not be a ball o开发者_开发问答r cube, it will morph, is there any simpler approach than marching cubes?


Depending on what you mean by "wrapped" a 3D convex hull may produce the effect that you want.

Animate your vertices however you want and re-run the hull algorithm each time.


The Marching Cubes algorithm seems like the best fit to what you're looking for -- not all point clouds are convex. The algorithm may seem intimidating because of the large lookup table, but it is actually pretty straightforward. I have posted an example (using Three.js) at:

http://stemkoski.github.com/Three.js/Marching-Cubes.html


This seems like what you're looking for: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=25

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号