POV-Ray : Newsgroups : povray.general : Camera macros : Camera macros Server Time
4 Aug 2024 22:17:36 EDT (-0400)
  Camera macros  
From: Tor Olav Kristensen
Date: 22 Jan 2003 18:11:26
Message: <Xns930C27E8DAB2torolavk@204.213.191.226>
I have spent some time now working on a
set of macros for setting up, manipulating
and visualizing perspective cameras.

Below is a list of some of these macros.

The most useful ones, might be the ones
that shows a simple "model" of a camera
and it's "field of view".

If one sets up more than one camera, one
can look at the scene and all the other
camera "models" through any one of the
cameras.

There are macros for moving cameras
relative to it's own axes, macros for
moving cameras relative to what they are
looking at and macros for moving cameras
relative to scene's coordinate system.
(And several others.)

Any perspective camera possible in POV-
Ray v3.5 can be set up. And one can
choose which camera vectors and/or camera
modifiers to use while setting up the
cameras.

I thought that I could make all these
available to all of you if there is any
interest.

BUT: I do not have time to write any
documentation for them.

Is there anyone that is interested in
helping by making this documentation ?


Tor Olav


DefaultCamera()

CameraLoc(Camera)
CameraDir(Camera)
CameraRight(Camera)
CameraUp(Camera)
CameraSky(Camera)
CameraLookAt(Camera)
CameraPlaneOrigo(Camera)

PerspCamera(Camera)

SetCameraLoc(Camera, pLoc)
SetCameraDir(Camera, vDir)
SetCameraRight(Camera, vRight)
SetCameraUp(Camera, vUp)
SetCameraSky(Camera, vSky)
SetCameraLookAt(Camera, pLookAt)

IsRightHandCamera(Camera)
IsLeftHandCamera(Camera)
SwapHandednessForCamera(Camera)
SetLeftHandCamera(Camera)
SetRightHandCamera(Camera)

ChangeCameraLookAt(Camera, pLookAt)
ChangeCameraAngle(Camera, Angle)

CalcCameraAngle(Camera)

MakeCamera(pLoc, vDir, vRight, vUp, Angle, vSky, pLookAt)

TransformCamera(Camera, Transform)

RotateCamera(Camera, vAngle)
TranslateCamera(Camera, vTranslate)
ScaleCamera(Camera, vScale)

PanCameraRight(Camera, Angle)
PanCameraLeft(Camera, Angle)
TiltCameraForward(Camera, Angle)
TiltCameraBackward(Camera, Angle)
RollCameraRight(Camera, Angle)
RollCameraLeft(Camera, Angle)
UnRollCamera(Camera)

RotateCameraRight(Camera, Angle)
RotateCameraLeft(Camera, Angle)
RotateCameraUp(Camera, Angle)
RotateCameraDown(Camera, Angle)

TranslateCameraForward(Camera, Distance)
TranslateCameraBackward(Camera, Distance)
TranslateCameraRight(Camera, Distance)
TranslateCameraLeft(Camera, Distance)
TranslateCameraUp(Camera, Distance)
TranslateCameraDown(Camera, Distance)

StraightenUpCamera(Camera)

ScaleCameraVectors(Camera, Factor)
ExtendCameraVectors(Camera)

ShowCameraCyls(Camera, Extend, FrameOn, LinesOn, Radius)
ShowCameraPlanes(Camera, Extend, PlaneOn, WallsOn)
ShowCameraVectors(Camera, Extend, Radius)
ShowCamera(Camera, Extend, Radius)

PointToCameraPlane(Camera, Extend, p0)

CameraCoordsToPoint(Camera, Extend, pCamera)
PointToCameraCoords(Camera, p0)

ScreenCoordsToPoint(Camera, Extend, pScreen, vScreenRes)
PointToScreenCoords(Camera, p0, vScreenRes)


Post a reply to this message

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