Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README
Octocat-spinner-32 Render.pde
Octocat-spinner-32 SphereCamera.pde
Octocat-spinner-32 SphereCameraClass.pde
README
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.

Something went wrong with that request. Please try again.