POV-Ray : Newsgroups : povray.general : Camera macros Server Time
17 Nov 2024 19:16:01 EST (-0500)
  Camera macros (Message 1 to 3 of 3)  
From: Tor Olav Kristensen
Subject: Camera macros
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

From: Mick Hazelgrove
Subject: Re: Camera macros
Date: 23 Jan 2003 02:29:57
Message: <3e2f99f5@news.povray.org>
Wow Having done all that work Tor Olav you really must publish - I can see
so many uses for these macros.

Mick


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: Camera macros
Date: 23 Jan 2003 21:13:08
Message: <Xns930D214FDE216torolavk@204.213.191.226>
"Mick Hazelgrove" <mic### [at] mhazelgrovefsnetcouk> wrote in
news:3e2f99f5@news.povray.org: 

> Wow Having done all that work Tor Olav you really must publish - I
> can see so many uses for these macros.
> 
> Mick

Ok Mick, I'll publish them. And maybe I
can find time later to show examples on
how to use some of them.


Tor Olav


Post a reply to this message

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