POV-Ray : Newsgroups : povray.general : A little math help please. Server Time
7 Aug 2024 17:27:44 EDT (-0400)
  A little math help please. (Message 1 to 3 of 3)  
From: Andy Cocker
Subject: A little math help please.
Date: 31 Aug 2001 23:40:22
Message: <3b9058a6@news.povray.org>
Hi,

A---------C--------B----------------D

If point A is my camera location, and point B is the look_at, how would I
find points C and D?

I want to know so that I can use the data in conjunction with Francois
Dispot's Depth Of Field include file as I animate the camera.

Thanks in advance,

Andy Cocker


Post a reply to this message

From: Tek
Subject: Re: A little math help please.
Date: 1 Sep 2001 05:22:04
Message: <3b90a8bc@news.povray.org>
Not sure if this is what you mean, but if you want to generate other points on
the line you could do this:
dir = B - A
C = A + dir*0.6
D = A + dir*2.0

Then just change the 0.6 and 2.0 according to where you want the points to be
(if you use 1.0 the point will be in the same place as B, and if you use 0.0 it
will be in the same place as A)

--
Tek
http://www.evilsuperbrain.com


Andy Cocker <big### [at] mariner9fsnetcouk> wrote in message
news:3b9058a6@news.povray.org...
> Hi,
>
> A---------C--------B----------------D
>
> If point A is my camera location, and point B is the look_at, how would I
> find points C and D?
>
> I want to know so that I can use the data in conjunction with Francois
> Dispot's Depth Of Field include file as I animate the camera.
>
> Thanks in advance,
>
> Andy Cocker
>
>


Post a reply to this message

From: Andy Cocker
Subject: Re: A little math help please.
Date: 1 Sep 2001 10:08:11
Message: <3b90ebcb@news.povray.org>
"Tek" <tek### [at] evilsuperbraincom> wrote in message
news:3b90a8bc@news.povray.org...
> Not sure if this is what you mean, but if you want to generate other
points on
> the line you could do this:
> dir = B - A
> C = A + dir*0.6
> D = A + dir*2.0
>
> Then just change the 0.6 and 2.0 according to where you want the points to
be
> (if you use 1.0 the point will be in the same place as B, and if you use
0.0 it
> will be in the same place as A)

Yes, that's it, thanks. Seems really obvious now you've shown me it.

Andy Cocker


Post a reply to this message

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