POV-Ray : Newsgroups : povray.binaries.images : The Case of the Disappearing building part Server Time
19 Aug 2024 04:20:59 EDT (-0400)
  The Case of the Disappearing building part (Message 1 to 3 of 3)  
From: Leitha & Mark Hyde
Subject: The Case of the Disappearing building part
Date: 29 Dec 2000 04:42:05
Message: <3A4C5CBB.5F2A87F9@optusnet.com.au>
Can someone tell me what went wrong and how to fix it, please?

The problem only appeared when "Building3" was placed in a difference
statement and only affects the section called "Building3.  The part of
the code for the building is included below:

#declare BrickTex =  texture {
  pigment {brick Tan, NewTan
     brick_size <10, 5, 5>
  }
  normal {brick 1}
  normal {granite 0.04}
}

#declare Building = difference {
  box{<-50, -50, -50> <50, 50, 50>
    texture {BrickTex}
  }
  box{<-45, -45, -45> <45, 45, 45>}
  box {<0,5,50> <-45, -30, 45>}
  box {<50, -50, 50> <39, 20, 45>}
}

#declare Building2 = box{<-50, -50, -50> <-150, 50, 150>
  texture { BrickTex }
}

#declare Building3 = difference {
  box{<50, 50, 50> <100, 50, 0>
    texture {BrickTex}
  }
  box{<50, -45, 45> <95, 45, 5>}
  box {<79, -50, 50> <50, 20, 45>}
}

#declare Church = union {
 object {Building}
 object {Building2}
 object {Building3}
}

object {Church}

                                 [Image]


Post a reply to this message


Attachments:
Download 'us-ascii' (2 KB) Download 'd:\temp\nsmailbu.jpeg.jpg' (10 KB)

Preview of image 'd:\temp\nsmailbu.jpeg.jpg'
d:\temp\nsmailbu.jpeg.jpg


 

From: Jérôme Grimbert
Subject: Re: The Case of the Disappearing building part
Date: 29 Dec 2000 04:50:01
Message: <3A4C5E85.B01597AC@atosorigin.com>
Leitha & Mark Hyde wrote:
> 
> Can someone tell me what went wrong and how to fix it, please?
> 
> The problem only appeared when "Building3" was placed in a difference
> statement and only affects the section called "Building3.  The part of the
> code for the building is included below:
> 

> #declare Building3 = difference {
>   box{<50, 50, 50> <100, 50, 0>
>                          

Is it me, or you intend to have a VERY FINE box in a difference ?
 (look at the .y : 50 to 50 : no thickness)


Post a reply to this message

From: Fabien Mosen
Subject: Re: The Case of the Disappearing building part
Date: 29 Dec 2000 10:02:58
Message: <3A4CA776.168C186D@skynet.be>
Leitha & Mark Hyde wrote:
> 
> Can someone tell me what went wrong and how to fix it, please?

Jerome is right about the thickness problem, and also :

> #declare Building = difference {
>   box{<-50, -50, -50> <50, 50, 50>
>     texture {BrickTex}
>   }
>   box{<-45, -45, -45> <45, 45, 45>}
>   box {<0,5,50> <-45, -30, 45>}
>   box {<50, -50, 50> <39, 20, 45>}
> }

this is wrong, because you don't give a texture to the "negative"
objects.  You should do as follows :

 #declare Building = difference {
   box{<-50, -50, -50> <50, 50, 50>}

    box{<-45, -45, -45> <45, 45, 45>}
    box {<0,5,50> <-45, -30, 45>}
    box {<50, -50, 50> <39, 20, 45>}

  texture {BrickTex}
 }

And, in fact, using a difference to define a set of walls is not
a very good thing, as difference is slow to render.  You'll do it
better by defining an union of some boxes.

Fabien.


Post a reply to this message

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