Code Sample

Processing Tutorial: Spherical Coordinates

Tutorial notes: This is a short (well, sort of short) tutorial intended to demonstrate how to use Spherical Coordinates. The example here will be built in Processing, though a similar effect could be achieved in virtually any environment. This is a low-level tutorial - it assumes basic programming knowledge, but doesn't do anything particularly complex. Click here to see what the resulting looks like in action (click!). It looks fairly basic, but I am going to follow this tutorial up with some examples of how we can use this system as a base to do some more interesting things. Enjoy!

Typically when we are working in three dimensions, we use the standard Cartesian coordinate set - x, y, and z. While this is suitable for most cases, it is easier and smarter to use a different set of coordinates when we are rendering spheres, or placing objects in orbits around points in 3d space. In this tutorial, we'll take a look at Spherical coordinates, and we'll walk through an example in Processing to show how it all works.

Spherical coordinates are much easier to use when we are dealing (surprise, surprise) with spheres. This is a similar reason to why we use polar coordinates when we are describing circles or ellipses in two dimensions. Indeed, spherical coordinates can be thought of as polar coordinates with one extra dimension:

Cartesian 2d: x,y
Cartesian 3d: x, y, z
Polar: θ, r
Spherical: θ, ø, r

Posted in Code Sample | Processing Submitted by blprnt on Sat, 2008-04-19 00:34.
blprnt's blog | login or register to post comments | read more | 3308 reads

FlashForward Austin Follow-up

As promised during my presentation at FlashForward Austin, here is a tasty little .ZIP file (11.9Mb) for you to have a look at. It contains my presentation, my lecture notes, and full source for my Smart Rockets and Darwinstruments projects. The source for Variance isn't in there yet, but I have put up a pre-alpha version of the project here, so that you can play around with it to your hearts' content.

Thank-you to everyone who attended and particularly to those who came up and talked to me after, or sent me an e-mail. It is always good to hear from people; indeed, it's proabably the best part of the whole deal.

I'll be posting about some of the great presentations that I saw during the conference as I get my head back together, so stay tuned! 

Posted in ActionScript | Code Sample | Computer-aided Creativity | Event | Evolutionary Computing | Flash Submitted by blprnt on Wed, 2006-09-20 23:58.
blprnt's blog | 1 comment | 1690 reads

XML feed