|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Can someone post some code to produce a conical light beam in rainbow
colors. A beam one might see coming from a prism, for example, Note: not a
light source; a beam using scattering or emitting media. For Win PovRay
3.1a. Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
/*
Here's a quick try at it. If you use a cone instead of the box the thin
edges won't look right, I can tell you that without even having tried it in
this. At least not without first narrowing its thickness. In fact this one
doesn't look very spectrum like when oriented away from the camera.
This should be okay for POV-Ray 3.1
You'll need to work out the layout from what's in the comments and object
transformations in order to use it in other ways of your own.
*/
// example of faked light spectrum from a prism
#declare Scale=5; // overall size
#declare Illum=2; // brightness
// prism paired with spectrum
union {
// prism
intersection {
plane {x,.1}
plane {x,.1 rotate 120*y}
plane {x,.1 rotate 240*y}
plane {-y,0}
plane {+y,1}
pigment {rgbf <0.8,1,0.9,1>}
interior {ior 1.5}
rotate -45*y scale <0.75,1,0.5> translate <-0.025,0,-0.025>
}
// media spectrum
box {0,1 hollow
pigment {rgbt 1}
interior {
media {
emission 1
density { radial frequency 4
density_map {
[0 rgb <0,0,0>]
[0.1 rgb <1,0,0>*Illum/Scale]
[0.3 rgb <1,0.5,0>*Illum/Scale]
[0.4 rgb <1,1,0>*Illum/Scale]
[0.7 rgb <0,1,0>*Illum/Scale]
[0.85 rgb <0,1,1>*Illum/Scale]
[0.9 rgb <0,0,1>*Illum/Scale]
[1 rgb <0,0,0>]
}
}
}
media {
absorption 1
density { radial frequency 4
density_map {
[0 rgb <0,0,0>] // adjust colors to liking
[0.1 rgb <1,0,0>*Illum/Scale]
[0.3 rgb <1,0.5,0>*Illum/Scale]
[0.4 rgb <1,1,0>*Illum/Scale]
[0.7 rgb <0,1,0>*Illum/Scale]
[0.85 rgb <0,1,1>*Illum/Scale]
[0.9 rgb <0,0,1>*Illum/Scale]
[1 rgb <0,0,0>]
}
}
}
}
}
rotate 45*y scale <2,1,1>*Scale
rotate -42*x // -45 to align with camera as is (perpendicular)
}
// end spectrum
light_source {
0,0.5
}
camera {
location <0,0,-10>
look_at <2,0.5,0.5>
angle 30
rotate 42*x // +45 to be opposite the wedges upper face when as
above
}
// room
box {-15,15
pigment {rgb 0.9}
finish {ambient 0.1}
inverse
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
hey thats cool!
I'm still amazed at the thing people can make this program do.
Gary
Bob H. <omn### [at] msncom> wrote in message
news:3ba84ced@news.povray.org...
> /*
> Here's a quick try at it. If you use a cone instead of the box the thin
> edges won't look right, I can tell you that without even having tried it
in
> this. At least not without first narrowing its thickness. In fact this
one
> doesn't look very spectrum like when oriented away from the camera.
> This should be okay for POV-Ray 3.1
> You'll need to work out the layout from what's in the comments and object
> transformations in order to use it in other ways of your own.
> */
>
> // example of faked light spectrum from a prism
>
> #declare Scale=5; // overall size
> #declare Illum=2; // brightness
>
> // prism paired with spectrum
> union {
>
> // prism
> intersection {
> plane {x,.1}
> plane {x,.1 rotate 120*y}
> plane {x,.1 rotate 240*y}
> plane {-y,0}
> plane {+y,1}
> pigment {rgbf <0.8,1,0.9,1>}
> interior {ior 1.5}
> rotate -45*y scale <0.75,1,0.5> translate <-0.025,0,-0.025>
> }
>
> // media spectrum
> box {0,1 hollow
> pigment {rgbt 1}
> interior {
> media {
> emission 1
> density { radial frequency 4
> density_map {
> [0 rgb <0,0,0>]
> [0.1 rgb <1,0,0>*Illum/Scale]
> [0.3 rgb <1,0.5,0>*Illum/Scale]
> [0.4 rgb <1,1,0>*Illum/Scale]
> [0.7 rgb <0,1,0>*Illum/Scale]
> [0.85 rgb <0,1,1>*Illum/Scale]
> [0.9 rgb <0,0,1>*Illum/Scale]
> [1 rgb <0,0,0>]
> }
> }
> }
> media {
> absorption 1
> density { radial frequency 4
> density_map {
> [0 rgb <0,0,0>] // adjust colors to liking
> [0.1 rgb <1,0,0>*Illum/Scale]
> [0.3 rgb <1,0.5,0>*Illum/Scale]
> [0.4 rgb <1,1,0>*Illum/Scale]
> [0.7 rgb <0,1,0>*Illum/Scale]
> [0.85 rgb <0,1,1>*Illum/Scale]
> [0.9 rgb <0,0,1>*Illum/Scale]
> [1 rgb <0,0,0>]
> }
> }
> }
> }
> }
> rotate 45*y scale <2,1,1>*Scale
>
> rotate -42*x // -45 to align with camera as is (perpendicular)
> }
> // end spectrum
>
> light_source {
> 0,0.5
> }
>
> camera {
> location <0,0,-10>
> look_at <2,0.5,0.5>
> angle 30
> rotate 42*x // +45 to be opposite the wedges upper face when as
> above
> }
>
> // room
> box {-15,15
> pigment {rgb 0.9}
> finish {ambient 0.1}
> inverse
> }
>
>
>
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Right on Bob! Just what I needed. Thanks.
"Bob H." <omn### [at] msncom> wrote in news:3ba84ced@news.povray.org:
> /*
> Here's a quick try at it. If you use a cone instead of the box the
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Welcome to it. If I didn't have the help of everyone else myself it
wouldn't be as possible :-)
Bob H.
"Gary Cramblitt" <NOS### [at] Homecom> wrote in message
news:Xns### [at] 204213191226...
> Right on Bob! Just what I needed. Thanks.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|