POV-Ray : Newsgroups : povray.binaries.images : Possible Bug? : Re: Possible Bug? Server Time
13 Aug 2024 11:25:10 EDT (-0400)
  Re: Possible Bug?  
From: Christoph Hormann
Date: 27 Mar 2003 16:32:23
Message: <3E836E14.FF554990@gmx.de>
Jeff Baskin wrote:
> 
>         I was trying to create something similar to an Army Balowick, but I am
> running into some problems.  I've got the aluminium frame up, but I run
> into a problem when I try to punch out some windows.  Instead of getting
> window holes, I get bars.  I have included the code I am using, and a
> picture of what I am getting.  I am assuming that I have done something
> wrong, but I can't figure out what.  Anyone have a suggestion?
> 
> [...]

I think you have some misunderstanding on how CSG works.  You probably
want something like:

object{ 
        isosurface{
                // This creates the corragated metal hull
                function{
                       
sqrt(pow(y,2)+pow(z,2))+(sin(atan2(z,y)*pi*RAD*6)/24)
                }
                threshold RAD
                contained_by{
                        box{
                                <0,-19, 0>, <LEN,19,19>
                        }
                }
                open
                rotate <-90,0,0>
        }
        // Now create the opennings for the hutch
        // These are 1 x 2 holes in the wall.
        #declare Divisions = 10;
        #declare Space = ( LEN - ( Divisions * 2 ) ) / ( Divisions + 1 );
        #declare Count = 0;
        clipped_by {
          union{
                #while( Count < Divisions )
                        box{
                                <Space + Count * ( Space + 2 ),5,-20>, 
                                <Space + Count * ( Space + 2 ) + 2,6,20>
                        }
                        #declare Count = Count + 1;
                #end
                inverse
          } 
        }
        texture{
                pigment{ P_Chrome5 }
                finish{ F_MetalA }
        }
}

Christoph

-- 
POV-Ray tutorials, include files, Sim-POV,
HCR-Edit and more: http://www.tu-bs.de/~y0013390/
Last updated 28 Feb. 2003 _____./\/^>_*_<^\/\.______


Post a reply to this message

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