|
|
In article <3A4### [at] homenl>, Remco Poelstra
<rjp### [at] homenl> wrote:
> The biggest problem is now the CSG of the planes. I don't know how to
> determine when to use invert and when not. Just checking whether D (in
> <A,B,C>,D) is negative doesn't work, like it would do for a perfect box,
> with 0,0,0 in it's center.
You shouldn't need to use "inverse". Just make sure that a point in the
room is "inside" all of the planes, and intersect them all together.
What is the data you have to work with? Axis-aligned planes and
transformations? Plane normal and distance? Vertices?
You could start with something like this as a base:
#declare CeilingTrans = transform {...}
#declare FloorTrans = transform {...}
#declare LeftWallTrans = transform {...}
#declare RightWallTrans = transform {...}
#declare FarWallTrans = transform {...}
#declare NearWallTrans = transform {...}
intersection {
plane {y, 0 transform CeilingTrans translate y}
plane {-y, 0 transform FloorTrans translate -y}
plane {x, 0 transform LeftWallTrans translate x}
plane {-x, 0 transform RightWallTrans translate -x}
plane {z, 0 transform FarWallTrans translate z}
plane {-z, 0 transform NearWallTrans translate -z}
}
This should give you an axis-aligned cube where you can adjust each wall
individually.
> Perhaps I should use a completly different method to create the box,
> but I don't know how, because just giving to points like in box{ can't
> give me the possibillity to place walls rotated.
Well, you could do rhomboid or sheared rooms with a box, but you
couldn't do trapezoidal shapes. An intersection of planes should work
fine.
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|