codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
import random import math output = "Gravity Fun at TestTubeGames.com: [ForceG: -2,Qual: 1,Zoom: 1,xSet: 0,ySet: 0]" for a in range(24): rand = math.log(random.random(),.95) rand2 = random.random()*2*math.pi rand3 = math.log(random.random(),.5) rand4 = random.random()*2*math.pi rand5 = math.log(random.random(),.992) X = rand*math.cos(rand2) Y = rand*math.sin(rand2) XV = rand3*math.cos(rand4) YV = rand3*math.sin(rand4) output = output + ", [x0: " + str(X) + ",y0: " + str(Y) + ",vx: " + str(XV) + ",vy: " + str(YV) + ",t0: 0,who: 2,m: "+ str(rand5) + "]" print output
Private
[
?
]
Run code
Submit