POV-Ray : Newsgroups : povray.windows : newbie: lights and cut-outs Server Time
26 Jun 2024 03:53:07 EDT (-0400)
  newbie: lights and cut-outs (Message 1 to 2 of 2)  
From: Lee Brown
Subject: newbie: lights and cut-outs
Date: 19 Nov 2003 16:53:55
Message: <3fbbe673@news.povray.org>
I am trying to make a scene with cutouts using csg.
In this example, I've taken two sphere's the smaller subtracted from the
larger to make a sphere with a hole.

If I have a light source outside of this construct, the effects are correct
(this is a glass object).  here is the script:

global_settings {
   photons {
     count 200000
     autostop 0
     jitter .4
     media 100
     max_trace_level 10
   }
 }

#include "colors.inc"
#include "textures.inc"

camera {
    location <0, 2, -10>
    look_at  <0, 1,  2>
  }

light_source {
  <1,2,-3>
  color White
  photons {
    refraction on
  }
}

difference {
  sphere {
    <0,1,0>
    1

  }
  sphere {
    <0,1,0>
    .9

  }
  inverse
  texture {
    pigment { color <1,1,1,.9> }
  }
  interior {
    ior 1.5
  }
  photons {
    target
    refraction on
  }
}

plane {
  y,-1
  texture { pigment { color White } }
}

Now if the light is repositioned to <0,1,0> it doesn't seem to produce the
expected result.

There must be a simple solution to this problem.  Can somebody please help
me with it?  Thanks,
Lee


Post a reply to this message

From: Mikael Pohjola
Subject: Re: newbie: lights and cut-outs
Date: 20 Nov 2003 13:15:51
Message: <opryx7otsi0x9foi@news.povray.org>
On Wed, 19 Nov 2003 15:53:51 -0600, Lee Brown 
<mr_### [at] acruelandbeautifulworldcouk> wrote:>
> difference {
>   sphere {
>     <0,1,0>
>     1
>
>   }
>   sphere {
>     <0,1,0>
>     .9
>
>   }
>   inverse
> ...

What is the inverse doing there? Now you are creating a glass filled scene 
with a small spherical shell without glass. As you perhaps notice the 
rendering messages warn you of a camera inside a non-hollow object.

> Now if the light is repositioned to <0,1,0> it doesn't seem to produce 
> the
> expected result.

I don't know what effect you expect, but that seems to be the right 
behavior. (In the center of your "sphere construction" the light won't 
bend and focus to a bright area on the ground)

-- 
light_source{20*y,1}#macro _(M,X,Y,P)#macro L(N,D)#if(N)#declare 
P=P+D;box{-
0.5,0.5translate z*mod(9*P.gray,4)pigment{rgb P}rotate 45*x+clock*y 
translate
P}L(N-1,D)#end#end#if(M)L(mod(M,8)<mod(X,3)mod(Y,3)1>-1)_(div(M,8)div(X,3)div
(Y,3)P)#end#end _(2301603551,12850,60365,20*z-5*x)plane{y,-9pigment{rgb 1}}


Post a reply to this message

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