POV-Ray : Newsgroups : povray.binaries.utilities : About Juha's solution for camera positionning(long I'm afraid) : Re: About Juha's solution for camera positionning(long I'm afraid) Server Time
1 Jul 2024 06:07:41 EDT (-0400)
  Re: About Juha's solution for camera positionning(long I'm afraid)  
From: Nieminen Juha
Date: 3 Sep 1999 03:59:20
Message: <37cf7fd8@news.povray.org>
Sorry for the delay in my answers. I seldom read this newsgroup...

Jean Montambeault <jrm### [at] videotronca> wrote:
: (BTW is there any simple way to spin the camera on itself to look around ?)

  It depends on what else you want to do to it. The easiest way would be:

camera
{ location 0 look_at z
  rotate SpinAroundAngles
  translate CameraLocation
}

:>: If I use your method for
:>: positionning the camera how do I extract the information about the
:>: vector where it is sitting then ?

:     The question remains interesting. Using rotations for setting up
: the altitude and azimuth leaves me with no clue as how to get the
: vector of the camera's location once that set up is done. Is there a
: function in POV that achieves that ?

  You can use vrotate() to achieve this. For example:

#declare CameraLocation = -z*DistanceFromOrigin;
#declare CameraLocation = vrotate(CameraLocation, CameraRotation);
camera
{ location CameraLocation
  look_at 0
  translate CameraTranslation // or ObjectCenter or whatever
}
#declare CameraFinalLocation = CameraLocation+CameraTranslation;

  Now the vector CameraFinalLocation indicates the location of the camera in
space.

: I haven't explored thing like
: vector functions yet.

  You should. They are very handy.

:     Thanks Mika (how do you pronounce Juha anyway ? I only know Temu,
: Mika, Yari, Yaku... hockey players... )

  You mean Teemu, Jari and Saku?

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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