POV-Ray : Newsgroups : povray.programming : Help with camera Server Time
22 Dec 2024 07:41:58 EST (-0500)
  Help with camera (Message 1 to 3 of 3)  
From: David Curtis
Subject: Help with camera
Date: 15 Aug 2005 10:22:06
Message: <4300a50e@news.povray.org>
Hi, i've written a patch that adds an interactive opengl preview. I want to
release it soon, but i'm having problems with matching the pov and ogl
views.

This is the code that i'm using to get pov's horizontal aperture and
converting that to opengl's vertical aperture:

   VLength(Direction_Length, pCam->Direction);
   VLength(Right_Length, pCam->Right);
   Horizontal_Aperture = atan(Right_Length / Direction_Length);
   Vertical_Aperture = atan(height * tan(Horizontal_Aperture) / width);

This code has been taken from 3.6 docs and from Paul Bourke's web site.
I'm using gluPerspective to set fov, and i'm using gluLook_At to position
camera.

Is there anyone that can help me with this?

Send me an email, i'd be happy to share the patch source with anyone
interested.

Dave


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Help with camera
Date: 15 Aug 2005 14:17:26
Message: <4300dc36$1@news.povray.org>
David Curtis wrote:
> Hi, i've written a patch that adds an interactive opengl preview. I want to
> release it soon, but i'm having problems with matching the pov and ogl
> views.
<snip>
> This code has been taken from 3.6 docs and from Paul Bourke's web site.
> I'm using gluPerspective to set fov, and i'm using gluLook_At to position
> camera.

Why would you get such information from the documentation when you have 
access to the POV-Ray sources code???

	Thorsten


Post a reply to this message

From: David Curtis
Subject: Re: Help with camera
Date: 15 Aug 2005 16:24:00
Message: <4300f9e0$1@news.povray.org>
"Thorsten Froehlich" <tho### [at] trfde> wrote in message news:4300dc36
> Why would you get such information from the documentation when you have 
> access to the POV-Ray sources code???
>
It came up in a google search. Of course i've studied POV-Ray source code,
but my matrix math is a bit weak.


Post a reply to this message

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