POV-Ray : Newsgroups : povray.newusers : Help need on intersection please Server Time
31 Oct 2024 12:15:45 EDT (-0400)
  Help need on intersection please (Message 1 to 3 of 3)  
From: Bob Frew
Subject: Help need on intersection please
Date: 19 Apr 2008 11:12:31
Message: <480a0bdf@news.povray.org>
Am not really a newbie, thought I had CSG sussed.  However !!!
Can not see the reason I get a hollow object from the following code. See 
attached picture
All help appreciated
Bob

#############################################################################
#version 3.6;
#include "colors.inc"
global_settings { assumed_gamma 1.0}
// ----------------------------------------
#local cam_type = "t";
#if (strcmp(cam_type, "f") = 0)  // f = from front
     #local cam_location = <0.0, 0.5, -3.0>;
     #local cam_look_at  = <0.0, 0.5,  0.0>;
#end
#if (strcmp(cam_type, "t") = 0)        // t = from top
     #local cam_location = <0.0, 4.5, -0.1>;
     #local cam_look_at  = <0.0, 0.0,  0.0>;
#end
camera {
  direction 1.5*z
  right     x*image_width/image_height
  location  cam_location
  look_at   cam_look_at
}

sky_sphere {
  pigment {
    gradient y
    color_map {
      [0.0 rgb <0.6,0.7,1.0>]
      [0.7 rgb <0.0,0.1,0.8>]
    }
  }
}
plane { y, 0
        pigment { checker
                pigment { color rgb <0.7,0.0,0.0> }
                pigment { color rgb <1.0,1,1> } }
  }
light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-0.1, 100, -0.2>}
light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-5, 5, -0.2>}
// -------------------------------------------------------------------
intersection {
    cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate -0.5*x }
    cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate  0.5*x }
    pigment  { Yellow }
  }

############################################


Post a reply to this message


Attachments:
Download 'tst2_top.jpg' (16 KB)

Preview of image 'tst2_top.jpg'
tst2_top.jpg


 

From: Jan Dvorak
Subject: Re: Help need on intersection please
Date: 19 Apr 2008 13:34:20
Message: <480a2d1c@news.povray.org>
Bob Frew napsal(a):
> Am not really a newbie, thought I had CSG sussed.  However !!!
> Can not see the reason I get a hollow object from the following code. See 
> attached picture
> All help appreciated
> Bob
> 
> #############################################################################
> #version 3.6;
> #include "colors.inc"
> global_settings { assumed_gamma 1.0}
> // ----------------------------------------
> #local cam_type = "t";
> #if (strcmp(cam_type, "f") = 0)  // f = from front
>      #local cam_location = <0.0, 0.5, -3.0>;
>      #local cam_look_at  = <0.0, 0.5,  0.0>;
> #end
> #if (strcmp(cam_type, "t") = 0)        // t = from top
>      #local cam_location = <0.0, 4.5, -0.1>;
>      #local cam_look_at  = <0.0, 0.0,  0.0>;
> #end
> camera {
>   direction 1.5*z
>   right     x*image_width/image_height
>   location  cam_location
>   look_at   cam_look_at
> }
> 
> sky_sphere {
>   pigment {
>     gradient y
>     color_map {
>       [0.0 rgb <0.6,0.7,1.0>]
>       [0.7 rgb <0.0,0.1,0.8>]
>     }
>   }
> }
> plane { y, 0
>         pigment { checker
>                 pigment { color rgb <0.7,0.0,0.0> }
>                 pigment { color rgb <1.0,1,1> } }
>   }
> light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-0.1, 100, -0.2>}
> light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-5, 5, -0.2>}
> // -------------------------------------------------------------------
> intersection {
>     cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate -0.5*x }
>     cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate  0.5*x }
>     pigment  { Yellow }
>   }
> 
> ############################################
> 
> 
> 
Make one of the cylinders slightly longer. POVray does not know how to 
handle coincident surfaces. This is a common problem of all or nearly 
all raytracers.


Post a reply to this message

From: Bob Frew
Subject: Re: Help need on intersection please
Date: 19 Apr 2008 18:26:08
Message: <480a7180$1@news.povray.org>
Surprising the difference 0.00001 makes.
I knew about that for punching holes through objects, but I didn't for 
intersection.
Many thanks.       Bob
"Jan Dvorak" <jan### [at] centrumcz> wrote in message 
news:480a2d1c@news.povray.org...
> Bob Frew napsal(a):
>> Am not really a newbie, thought I had CSG sussed.  However !!!
>> Can not see the reason I get a hollow object from the following code. See 
>> attached picture
>> All help appreciated
>> Bob
>>
>> #############################################################################
>> #version 3.6;
>> #include "colors.inc"
>> global_settings { assumed_gamma 1.0}
>> // ----------------------------------------
>> #local cam_type = "t";
>> #if (strcmp(cam_type, "f") = 0)  // f = from front
>>      #local cam_location = <0.0, 0.5, -3.0>;
>>      #local cam_look_at  = <0.0, 0.5,  0.0>;
>> #end
>> #if (strcmp(cam_type, "t") = 0)        // t = from top
>>      #local cam_location = <0.0, 4.5, -0.1>;
>>      #local cam_look_at  = <0.0, 0.0,  0.0>;
>> #end
>> camera {
>>   direction 1.5*z
>>   right     x*image_width/image_height
>>   location  cam_location
>>   look_at   cam_look_at
>> }
>>
>> sky_sphere {
>>   pigment {
>>     gradient y
>>     color_map {
>>       [0.0 rgb <0.6,0.7,1.0>]
>>       [0.7 rgb <0.0,0.1,0.8>]
>>     }
>>   }
>> }
>> plane { y, 0
>>         pigment { checker
>>                 pigment { color rgb <0.7,0.0,0.0> }
>>                 pigment { color rgb <1.0,1,1> } }
>>   }
>> light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-0.1, 100, -0.2>}
>> light_source {<0, 0, 0> color rgb <1, 1, 1>  translate <-5, 5, -0.2>}
>> // -------------------------------------------------------------------
>> intersection {
>>     cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate -0.5*x }
>>     cylinder { <0, -1, 0>, <0, 1, 0>, 1 translate  0.5*x }
>>     pigment  { Yellow }
>>   }
>>
>> ############################################
>>
>>
>>
> Make one of the cylinders slightly longer. POVray does not know how to 
> handle coincident surfaces. This is a common problem of all or nearly all 
> raytracers.


Post a reply to this message

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