Skip to content

Instantly share code, notes, and snippets.

@bkerley
Created July 29, 2008 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bkerley/2997 to your computer and use it in GitHub Desktop.
Save bkerley/2997 to your computer and use it in GitHub Desktop.
#python or ruby - turns out it doesn't matter
inc = random(0,2*pi)
az = random(0,2*pi)
dist = random(5,80)
cx = dist * cos(az)
cy = dist * sin(az)
sh = (cy/80)*0.6
x = 350 + (250+cx)*cos(inc)
y = 350 + (250+cx)*sin(inc)
z = cy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment