|
|
Tor Olav Kristensen <tor_olav_kCURLYAhotmail.com> wrote:
> Bill Hails <bil### [at] europeyahoo-inccom> wrote in
> news:3f896cbf@news.povray.org:
>
>> hmm, 2 questions in a row, at least you know I'm keen :-)
> ...
>> #local Direction = LookAt - Location;
>> #local Distance = vlength(Direction);
>> #local PerpDirection = vcross(Direction, y);
>> #local PerpDistance = sind(Angle/2) * Distance;
> ...
>
>
> Try tand() instead of sind()
Doh! Thanks.
That's embarrassing. I'm fiddling around with half-remembered
school trig, and there are real mathematicians out there.
fyi what I'm trying to achieve is a macro that will calculate the angle
given the location, look_at and the distance from the look_at along that
line to the edge of the screen. That way I can move the camera backwards and
forwards and keep the subject of the picture occupying the right amount of
the screen.
>
> Tor Olav
--
Bill Hails
Post a reply to this message
|
|