POV-Ray : Newsgroups : povray.newusers : camera angle : Re: camera angle Server Time
2 Nov 2024 17:20:02 EDT (-0400)
  Re: camera angle  
From: Bill Hails
Date: 13 Oct 2003 15:51:54
Message: <3f8b0259@news.povray.org>
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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.