POV-Ray : Newsgroups : povray.advanced-users : Automised visualization of a 'hasn't to be square' room : Re: Automised visualization of a 'hasn't to be square' room Server Time
29 Jul 2024 20:15:01 EDT (-0400)
  Re: Automised visualization of a 'hasn't to be square' room  
From: Chris Huff
Date: 25 Dec 2000 11:59:11
Message: <chrishuff-FC7DFE.12002625122000@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.