|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi Pov Ray community,
i have started creating a animation where a laserbeam should go through a solid,
rounded glass box. So i created a hollow cone with gaussian distributed red
glowing media in it. I overlapped it with the glass box (ior = 1.5).
=> there are surfaces with different ior in the glass box visible.
Here the object code:
//Declarations in mm
#declare scalef = 10;
#declare edgeR=0.025;
#declare su8l=10;
#declare su8b=8;
#declare su8h=0.037;
#declare capinn=0.170;
#declare capout=0.200;
#declare capl=4;
#declare groveb=0.060;
#declare fiberb=0.125;
#declare w0=0.1; //core radius
#declare fiberoffset=capout/2+0.2;
#declare beaml=1.9999*fiberoffset; //2*fiberoffset;
#declare beamNA=0.1;
#declare beamw = beaml * beamNA;
//declare beam
#declare lamda = 0.001;
#declare z0 = pi*w0*w0/lamda;
#declare fiberbeam = function (x,y,z) {1*exp(-2*(x*x+y*y)/pow(w0,2))}
//1*exp(-(x*x+y*y)/w0)};
//fiber beam
#declare gaussbeam1 = function (x,y,z)
{1*pow(w0/(w0*sqrt(1+50*(z-1)*(z-1)/z0*z0)),2)*exp(-2*(x*x+y*y)/pow((w0*sqrt(1+50*(z-1)*(z-1)/z0*z0)),2))};
#declare gaussbeam2 = function (x,y,z)
{1*pow(w0/(w0*sqrt(1+50*z*z/z0*z0)),2)*exp(-2*(x*x+y*y)/pow((w0*sqrt(1+50*z*z/z0*z0)),2))};
//------------------------------------------------------------------------
camera {
location scalef*<0.5,0.6,-0.6>*.8
//location scalef*<-0.4,.9,0.1>*1
look_at 0 angle 50 }
///////////////////////////////////////////////////////////////////////////
#declare M_Glass2 =
material {
texture {
pigment {rgbt <1,1,1,0.8>}
}
interior {
ior 1.5
}
}
#declare matbeam =
material {
texture {
pigment {rgbt <1,1,1,1>}
} // end of texture
interior {
media{
emission <50,0,0>/scalef
//scattering {1,rgb <1,0,0> extinction 0}
density{
function{gaussbeam1(x,y,z)}
density_map {
[0 rgb 0]
[1 rgb 1]
} // end color_map
} // end of density
} // end of media1 --
} // end of interior
} // end of material
////////////////////////////////////////////////
////////////////CAPILLARY
#declare round = difference { //define round edge
box {
<-0.5,-0.5,-0.5>, <capl+0.5,edgeR,edgeR>
}
cylinder {
<-1,edgeR,edgeR>,<capl+1,edgeR,edgeR>,edgeR
}
}
#declare cinn = difference{ //define inner capillary
box {
<0,0,0>, <capl,capinn,capinn>
}
object {round}
object {round rotate <90,0,0> translate <0,capinn,0>}
object {round rotate <180,0,0> translate
<0,capinn,capinn>}
object {round rotate <270,0,0> translate <0,0,capinn>}
}
#declare capillary = object {cinn
translate
<-0.0001,(capout-capinn)/2,(capout-capinn)/2>
material{
M_Glass2
}
hollow
scale <su8l,1,1>
translate <-su8l/2,0,-capout/2>
no_shadow
}
////////////////////////////////////////////////
////////////////BEAM body with both beams in it
#declare beam =
cylinder{<0,0,0>,<0,0,0.99>,1
material {matbeam}
hollow
scale <fiberb/2,fiberb/2,beaml>
translate
<0,su8h+sqrt(fiberb/2*fiberb/2-groveb/2*groveb/2),-fiberoffset>
}//----- end of beam
object {beam rotate <0,0,0> scale scalef}
object {capillary scale scalef}
///////////////////////////////////////////////////////
almost 20h on this problem.
Tanks in advance
Roll
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi Pov Ray community,
>
> i have started creating a animation where a laserbeam should go through a solid,
> rounded glass box. So i created a hollow cone with gaussian distributed red
> glowing media in it. I overlapped it with the glass box (ior = 1.5).
> => there are surfaces with different ior in the glass box visible.
>
> almost 20h on this problem.
>
>
> Tanks in advance
> Roll
>
>
>
Usualy, the best way to make a beam visible is to use scatering media.
As your beam get refracted and possibly reflected, you need to use photons.
That way, you no longer need to fake the beam's path, the media makes it
visible, and the photons will make the path of the refracted ray visible
along the real path. POV-Rqay will do all the math for you.
You need:
1 light_source with cylindrical and parallel to make your beam emiter.
Use radius, falloff and tightness to controll the spread of your light.
Suggested starting values: radius 0 falloff 1 tightness 3
(a cylindrical, parllel light_source is perfect to make a laser beam)
Scatering media. ONLY use intervals 1 and adjust samples as needed.
A photons block in the global_settings section:
photons{spacing 0.1 media 100}
A photons block on your target object:
photons{target refraction on reflection on collect off}
If you use a larger media container object, give it this photons block:
photons{pass_through}
You don't need any photons block for the light_source. All
non-shadowless light_source have this default photons block:
photons{reflection on refraction on area_light off}
That way, if you ever change the shape of your object or the direction
of the beam, you don't have to recalculate the path.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Usualy, the best way to make a beam visible is to use scatering media.
> As your beam get refracted and possibly reflected, you need to use photons.
>
> That way, you no longer need to fake the beam's path, the media makes it
> visible, and the photons will make the path of the refracted ray visible
> along the real path. POV-Rqay will do all the math for you.
That sounds great so far. I will try as soon as possible and let you know the
result.
greets
roll
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain <aze### [at] qwertyorg> wrote:
> You need:
Why not use the documentation, since it exists for this exact purpose?
http://wiki.povray.org/content/Documentation:Tutorial_Section_3.6#Simple_Media_Tutorial
--
- Warp
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"roll" <nomail@nomail> wrote:
> i have started creating a animation where a laserbeam should go through a solid,
> rounded glass box. So i created a hollow cone with gaussian distributed red
> glowing media in it.
> [snip]
This is a nit pick, but if the beam is conical, then technically, it's not a
laser.
> almost 20h on this problem.
I second Alain's basic suggestion: Use photon mapping and scattering media and
POV-Ray will take care of it. (If you wish to retain a conical beam, then do
not use cylinder and parallel.)
"Let the machine do the dirty work." --Kernighan & Plauger
For an example of how to use photons and scattering in this manner, go to
http://lib.povray.org/ and type beamtest in the search box. Note that I set
extinction to 0. According to the POV-Ray docs, this is physically incorrect,
but it was the key to accomplishing my goal for this module.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> "roll"<nomail@nomail> wrote:
>> i have started creating a animation where a laserbeam should go through a solid,
>> rounded glass box. So i created a hollow cone with gaussian distributed red
>> glowing media in it.
>> [snip]
>
> This is a nit pick, but if the beam is conical, then technically, it's not a
> laser.
>
>> almost 20h on this problem.
>
> I second Alain's basic suggestion: Use photon mapping and scattering media and
> POV-Ray will take care of it. (If you wish to retain a conical beam, then do
> not use cylinder and parallel.)
>
> "Let the machine do the dirty work." --Kernighan& Plauger
>
> For an example of how to use photons and scattering in this manner, go to
> http://lib.povray.org/ and type beamtest in the search box. Note that I set
> extinction to 0. According to the POV-Ray docs, this is physically incorrect,
> but it was the key to accomplishing my goal for this module.
>
>
extinction 0 also slightly faster. You skip calculations for self
shadowing and light atenuation.
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 09.09.2011 21:17, schrieb Cousin Ricky:
> "roll"<nomail@nomail> wrote:
>> i have started creating a animation where a laserbeam should go through a solid,
>> rounded glass box. So i created a hollow cone with gaussian distributed red
>> glowing media in it.
>> [snip]
>
> This is a nit pick, but if the beam is conical, then technically, it's not a
> laser.
That - to do some nitpicking of my own - is untrue.
LASER is Light Amplification by Stimulated Emission of Radiation, and is
a way of producing coherent light - that is, a stream of photons all
having the same wavelength and phase. Those photons do not need to
propagate in the same direction though, as long as they create a common
wavefront.
As a matter of fact, solid-state lasers (i.e. laser diodes) typically
produce light that spreads out quite significantly in one plane, and
require additional optics to focus the beam to a point at infinite distance.
Which brings us to the fact that even the classic lasers that /do/ emit
a unidirectional stream of photos can be combined with optics to produce
a cone-shaped stream of photos.
As for the practical side, CD and DVD players even /need/ a strongly
cone-shaped beam, focused on the data-carrying layer, to read out
individual bits without getting distracted by impurities in the
transparent carrier material, dirt on the surface, minor scratches, or
dust in the air gap.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Am 17.09.2011 08:03, schrieb clipka:
> Which brings us to the fact that even the classic lasers that /do/ emit
> a unidirectional stream of photos can be combined with optics to produce
> a cone-shaped stream of photos.
Duh - someone stole a few "n"s here...
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|