PDA

View Full Version : negative space



AsylumX
05-29-2002, 04:29 AM
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

MickeyMouse
05-29-2002, 04:50 AM
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

coredump
05-29-2002, 05:42 AM
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

AsylumX
05-31-2002, 03:15 AM
Oye... Why's my prof asking me to do this in my spring semester?! http://www.opengl.org/discussion_boards/ubb/wink.gif

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