Skip to content

A camera class for Processing to control an inward pointing camera with zenith and azimuth angles instead of cartesian coords.

Notifications You must be signed in to change notification settings

stefang/SphereCamera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

A 3d camera class for Processing to control an inward pointing camera with zenith and azimuth angles instead of cartesian coords.

The movement is damped so you set the targets, not the actual angles like so...

sCam.camAzimuthTarget = random(-85,85);
sCam.camZenithTarget = random(0,360);
sCam.camSphereRadiusTarget = random(400)+500;
sCam.camTargTarget = random(1,10);

And it will make it's way there.  

To slow down or speed up the movement you use the integer passed in to the drawCamera() method in the render loop.  Lower numbers are faster.

sCam.drawCamera(64);

The targTarget is the cartesian coords of what the camera is pointing at but only accepts one number and adjusts X, Y and Z all at once which is a bit crap but I never really ever used it to do anything but slightly adjust the view so never got round to making it a full coord.

The boolean 'handheld' set to true will add a small amount of 3d perlin noise to the target to simulate the slight wobble you get with hand held cameras.

The sCam.axis() method called in the render loop will draw an XYZ axis at 0,0,0 cartesian to give you a starting point.

About

A camera class for Processing to control an inward pointing camera with zenith and azimuth angles instead of cartesian coords.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages