POV-Ray : Newsgroups : povray.general : Math Question : Re: Math Question Server Time
10 Aug 2024 15:20:05 EDT (-0400)
  Re: Math Question  
From: Chris Colefax
Date: 2 Dec 1999 18:40:13
Message: <3847035d@news.povray.org>
Robert J Becraft <cas### [at] aolcom> wrote:
> I'm posting this because I'm sure it is a simple trig thing and that
was too
> many years ago for me to remember it.
>
> I have an object... let us assume it is a picture for simplicity....
> In this scenario, the picture is perpendicular to the viewing angle of
the
> camera.  What I want is the formula that will tell me how much to
rotate the
> picture to keep the picture perpendicular when I MOVE the camera.
>
> For example, if the camera is at <0,0,0> and the picture is at
<10,0,0>  and
> then I move the camera to <0,0,5>, how much do I need to rotate the
picture
> to get it back to a 90 degree angle respective to the camera?   X,Z
> coordinates are fine, I don't need any 3-D solutions to this problem.

If you are looking for a more general purpose solution to this problem,
you could try a custom lens effect using the Lens Effects include file
(http://www.geocities.com/~ccolefax).  This will allow you to position
an object (such as an image-mapped disc/polygon) perpendicular to the
camera, given the camera location and look_at, and the object position.
Further to that, you can create the effect as part of the scene (so it
is centred where you declare the object to be) or as an overlay (so it
appears to be centred where you declare the object to be, but actually
overlays the rest of the scene).  And you don't have to worry about any
of the math!


Post a reply to this message

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