Subdividing 3D mesh into arbitrarily sized pieces

Posted by Groky on Stack Overflow See other posts from Stack Overflow or by Groky
Published on 2010-05-19T14:32:09Z Indexed on 2010/05/19 18:10 UTC
Read the original article Hit count: 219

Filed under:
|
|
|

I have a mesh defined by 4 points in 3D space. I need an algorithm which will subdivide that mesh into subdivisions of an arbitrary horizontal and vertical size. If the subdivision size isn't an exact divisor of the mesh size, the edge pieces will be smaller.

All of the subdivision algorithms I've found only subdivide meshes into exact powers of 2. Does anyone know of one that can do what I want?

Failing that, my thoughts about a possible implementation is to rotate the mesh so that it is flat on the Z axis, subdivide in 2D and then translate back into 3D. That's because my mind finds 3D hard ;) Any better suggestions?

Using C# if that makes any difference.

© Stack Overflow or respective owner

Related posts about 3d

Related posts about math