negative space

I’m working on building a log cabin, and I’ve got 4 walls made of cylinders (logs) so far. I’m curious to find a way to subtract another volume from these in order to create, for instance, a door or window. I’m using glut currently. Any suggestions or tuts that may cover this? Thanks in advance!

-AsylumX

as far as i know what you need are boolean operations.

implementation of this isn’t easy, generally you should find intersections between any 2 triangles one from your cabine, another from object you want to subtract (for example box, so you have rectangular window)…then depending on sides these triangles intersect, get rid of interior parts

boolean operations are offered by many, more or less professional 3d editors

search this forum and google for CSG (constructive solid geometry). BSP trees can be used to achieve this. if you’re using glut, i’m assuming your drawing glut cylinders. to perform CSG you’d have to construct the cylinders yourself. good luck.

b

Oye… Why’s my prof asking me to do this in my spring semester?!

Alright, I’ll look into CSG and see if I can figure it out. In a meantime, if anyone else has a suggestion let me know!

Perhaps I should hard-code the openings into the walls…

-AsylumX