> #declare R=1;//Radius of projected sphere
> #declare d=2;//distance from center of sphere
> camera {
> user_defined
> location{
> function{(u-1/2)*2*(R+d)}
> function{d}
> function{(v-1/2)*2*(R+d)}
> }
> direction{
> function{-(u-1/2)*2}
> function{-1}
> function{-(v-1/2)*2}
> }
> }
I don't think this will do. Basically, this doubles the tangent of the angle,
not the angle itself.
But if that is the syntax for user-defined cameras, the following should work:
#declare Width = ... // corresponds to length of right in other camera types
#declare Height = ... // corresponds to length of up in other camera types
camera {
user_defined
location {function {0} function {0} function {0}}
direction {
function {tan (atan((u-1/2)*Width) * 2)}
function {1}
function {tan (atan((v-1/2)*Height) * 2)}
}
}
Mark Weyer
Post a reply to this message
|