POV-Ray : Newsgroups : povray.newusers : Hole in the wall : Re: Hole in the wall Server Time
5 Nov 2024 05:24:02 EST (-0500)
  Re: Hole in the wall  
From: Ken
Date: 10 Mar 2002 17:49:13
Message: <3C8BE32B.CAC1BE38@pacbell.net>
Parasonic wrote:
> 
> Now that I have made my wall, I need to cut a few shapes into it (i.e.: for
> a door). I have tried the difference statement, but the recursiveness of a
> while loop is giving me trouble on one hand, errors on the other. Can you
> help me to simply make a hole in the wall?

Wrap your while loop in a union and difference from that.

Using Peter's example

#declare Box = box { -1, 1 }

#declare Wall =
union{
#declare i=0;
#while (i<5)
  object { Box translate 2.1*i*x }
  #declare i=i+1;
#end
}

difference {
 object {Wall}
  box{-1,1}
}

-- 
Ken Tyler


Post a reply to this message

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