|
|
Frozenport.com nous illumina en ce 2008-07-13 00:50 -->
> Hello,
>
> I am trying to create a cylindrical light source that will project something
> visual similar to a laser. This light beam should then go rough some optical
> component such as a prisim and then split into the appropriate patern.
>
> My problems is that I can not get the path of the light to either be visible or
> to interact with the optical component.
>
> Here is the code I have to make a laser beam going straight down. How do I make
> the beam visible and interact with optical components?
>
> #include "colors.inc"
> #include "textures.inc"
> #include "woods.inc"
> #declare Use_Photons = yes;
> plane { y, 0 texture{Chrome_Metal}}
>
> global_settings {
> max_trace_level 10
> photons {
> count 1000000
> autostop 0
> media 1000
> //jitter .4
> max_trace_level 10
> }
> }
>
> light_source {<0,20,0> color White*.2 photons {reflection off}}
With this, your photons will never get reflected, no mather the content of the
photon{} block of any object.
> camera { location <2,10,7> look_at <0,0,0>}
>
> box {<10,10,10>, 0 pigment{ color Clear } photons{target on}}
Is this box suposed to contain your medis? If so, you must add "hollow" and an
interion block defining the media used. For this object, remove target on and
add pass_through.
>
> // Right Barrier
> box { <1,3,-10>, 0 texture{T_Wood14} translate <-6,0,4>}
> // The Slab
> box { <2,1,-10>, 0 translate <1,0,4> interior{ior 1.5 }
> finish{ ior 1.5 ambient 1 diffuse 1 reflection .9 }
Why put the ior in the finish? It should ONLY apears in the interior block.
> //now for the photons
> photons { target refraction on reflection on pass_through on}
> }
pass_trough on turn off photons interactions for that object. It's similar to
no_shadow.
> //The LaserBox
> box { <4,1,-2>, 0 texture{Candy_Cane} translate <5,0,0>}
> //The LaserTip
> cylinder {<0,0,0>,<0,5,0>,.1 texture{Chrome_Metal} translate <.75,-9.5,-1.25>
> rotate<0,0,90>}
> //The Photon Shooter
> light_source {<0,5,0> color Red cylinder point_at <0,0,0> photons{reflection
> on refraction on}}
You may add parallel to the light. It will keep the beam tighter after it have
interacted with some object. The point of origin of that light is coincident
with one end of the cylinder. You should shift it a little, or use the
looks_like statement:
Remove the "LaserBox" and alter the light_source as follow:
light_source {<0,5,0> color Red cylinder point_at <0,0,0>
photons{reflection on refraction on}
looks_like{cylinder{<0,0,0>,<0,5,0>,.1 texture{Chrome_Metal}}}
>
>
>
Curently, your scene don't have any media, resulting in an invisible beam.
--
Alain
-------------------------------------------------
If you pick up a starving dog and make him prosperous, he will not bite you;
that is the principal difference between a dog and a man.
Mark Twain
Post a reply to this message
|
|