|
![](/i/fill.gif) |
"Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote:
> "Rafal 'Raf256' Maj" <raf### [at] raf256 com> wrote in
> news:Xns### [at] 204 213 191 226
>
> > I thought that this would be 90*sin(_rad/_dist) but following example
> > (full posted to p.b.s-f) shows that it is 57*sin(_rad/_dist)
>
> Sorry, how stupid :/ I forgot about rad -> deg calculations :(
Mmm, plus the formula isn't right.
I had to refresh my memory about base trigonometry, a good exercice :-)
I give here the result, if anybody is interested.
To reuse your simple scene (slightly modified):
#declare _rad = 1.0; // <-- configuration
#declare _dist = 5.0;
camera { location <0,_dist,-10> look_at <0,0,0> angle 15 }
background { color rgb <.3,.3,1> }
cylinder {
<0,-0.1,0>, <0,0,0>,
_rad
pigment { color rgb <.7,1.0,.7> } finish { ambient .4 }
}
light_source { <40,160,-100>*1e3 color rgb .4 } // ambient
light_source { // SPOT
<0,_dist,0> color rgb 1
spotlight point_at <0,0,0>
// #declare _f = sin(_rad/_dist)*57;
#declare _f = atan2(_rad,_dist)*180/pi;
radius _f
falloff _f
tightness 1
}
plane {
y, -0.1
pigment {
checker rgb <.5,.5,1> rgb <1,.5,1>
}
}
-- #=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=# --
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/
Post a reply to this message
|
![](/i/fill.gif) |