POV-Ray : Newsgroups : povray.newusers : Hole in the wall : Re: Hole in the wall Server Time
5 Nov 2024 05:22:59 EST (-0500)
  Re: Hole in the wall  
From: Christopher James Huff
Date: 11 Mar 2002 18:21:05
Message: <chrishuff-E10340.18203311032002@netplex.aussie.org>
In article <a2vp8ukt97hjbfnf0qkatteubd2qn26llh@4ax.com>,
 Peter Popov <pet### [at] vipbg> wrote:

> >Alternatively, loop through once, if the block is partially cut use a 
> >difference *for that block*.
> 
> But that's what I meant!

Sorry, I thought you were talking about not generating blocks that would 
be completely removed anyway.


> Even better. If the door is a box, don't intersect at all, just
> generate the necessary boxes as wide as necessary :)

Could take quite a few boxes and be tedious to code if you want to cover 
all cases, and probably wouldn't be much faster (a cutout from the very 
center of the block would require 6 boxes, an equivalent difference 
would only need 2). However, if you only consider the most likely cases 
(cutting off one end or cutting off one edge), you could keep it down to 
1 or 2 boxes.

Actually, I think I'm making it too hard, trying to imitate the effect 
of CSG...bricks usually aren't cut that way, they are just chopped off. 
Just use one block that is shortened to fit, maybe with some randomness 
to make the edge slightly uneven.

-- 
Christopher James Huff <chr### [at] maccom>
POV-Ray TAG e-mail: chr### [at] tagpovrayorg
TAG web site: http://tag.povray.org/


Post a reply to this message

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