Wednesday, April 20, 2011
3D Boolean Operations
A Boolean operation is a process of creating a result set from combining two 3D objects. In this case, I'm creating the union of the two objects. See the picture above of the latest output from the algorithm i'm writing.
It has been challenging to say the least. You have to calculate intersection between the objects for both coplanar (flat surface) and nonplanar scenarios. Once this is done you must triangulate the triangles and then sort them and return the solution. I'll post more pics after a few more nights of testing. Fun stuff! Reply if you want me to blog more on the actual algorithms I'm using. I came up with a few interesting techniques for doing this.
Happy Coding!
Jason
Subscribe to:
Post Comments (Atom)
Congrats. I know you've been working hard on this for a while now. I'm so proud of you!
ReplyDeleteSlowly getting rid of bugs on the union and added subtraction. It turns out pretty good but I'm still seeing these little micro-cracks ("two polys that don't quite line up, but look like they do). I can see blue lines where there is an edge so I know there is a problem and on my cylinder I get these spikes. So, once I get this resolved I'll be ready for an enhancement I'm planning on it. I want to make sure the base algorithm works first.
ReplyDeletehi,
ReplyDeletethis is very interesting to say the least :)
can your algo handle arbitrary objects or does it work like a CSG, with primitives?
anyway congrats and, yes, I'd love to see more pics and get more info.
cheers
Hi nicolas,
ReplyDeleteYes, it works with any object. Although it is not in my current build, I expect that it will make a future release.