Posted: Fri Jan 23, 2004 11:03 pm Post subject: (No subject)
Great program for being bored. Is it random or does it actually have a scientific way to it?
Catalyst
Posted: Fri Jan 23, 2004 11:05 pm Post subject: (No subject)
uses Newton's
gravitational attraction formula and some vector math
Fg=(m1*m2*G)/(d^2)
AsianSensation
Posted: Fri Jan 23, 2004 11:07 pm Post subject: (No subject)
nice physics stuff, did you do this during your compsci class? it seems that's when you seem to be bored most of the time.
Catalyst
Posted: Fri Jan 23, 2004 11:11 pm Post subject: (No subject)
a lesson on selection (5 months in to ICS3M(full year))
i think you get the idea
Homer_simpson
Posted: Sat Jan 24, 2004 12:48 am Post subject: (No subject)
pretty nice +bits
shorthair
Posted: Sat Jan 24, 2004 12:56 am Post subject: (No subject)
I watched for 15 mins and they dont seem to be going into the center, they stay on there path ,is it becasue its based on a real algorithm
Tony
Posted: Sat Jan 24, 2004 1:27 am Post subject: (No subject)
wow catalyst - if I was your CS teacher I'd made sure you're ALWAYS bored in my class
shorthair - they damn better stay on the path, else Earth will fly right into the sun, and as far as I know, that ain't cool... that's in fact very HOT
Posted: Sat Jan 31, 2004 10:18 am Post subject: (No subject)
wow that's a really good program!
but seriously shorthair, 15 minutes?! crazy..
anyone know off the top of their head if that's the same formula used in the example programs that deal with gravity?
shorthair
Posted: Sat Jan 31, 2004 10:23 am Post subject: (No subject)
when i made one , i used potential energy , and kinetic energy formulas , and obviously your good ol , s = d / t, d = s * t , t = d/s ,.............. i had alot more than one formula
Cervantes
Posted: Sat Jan 31, 2004 10:29 am Post subject: (No subject)
wanna post it?
shorthair
Posted: Sat Jan 31, 2004 10:41 am Post subject: (No subject)
Its not turing , as its dense with graphics ( uses direct X , 0 made with Blitz 3d , you should bee able to understand the code , il ost it if your still intersted in it ,
Here is a tutorial ( i have written yes i actually wrote it ) concerning hte gravitational equations , you will need for orbit , and force attraction
===============================================
code:
The force of attraction, F, between two bodies of mass m1 and m2 is
F = Gm1m2
----------
R squared
m1 and m2 = the mass of both the ojects
R = distance between the two bodies
G = the universal gravitational constant = 6.67 x 10-11 N m2 kg-2
===============================================
code:
Gravitational acceleration, g, of an arbitrary body :
g=G Me
------
R squared
Me = Mass of the Earth
R = distance from the Earth's centre.
code:
Gravitational acceleration on the Earth's surface (assuming it is spherical mass) :
g=G Me
------
Re squared
Re =radius of the Earth.
g = 9.81 m/s/s
===============================================
code:
The corresponding potential, U, is :
U = -6.25 x 107 m2 s-2
Cervantes
Posted: Sat Jan 31, 2004 10:54 am Post subject: (No subject)
interesting, how'd you learn to do this??
I am interested in seeing this program, if you would be so kind as to post it
I think in gr 12 (thats the old gr 12, back when there was OAC / gr 13) my brother made a program (not sure what in) that showed the solar system in its orbit. It also allowed you to change values such as mass for the planets, distance from the sun, etc. I'd like to learn to make a program like that, but I'm not there yet.. someday..
McKenzie
Posted: Sat Jan 31, 2004 11:10 am Post subject: (No subject)
You didn't move from Ajax by chance did you? A few years back when I was teaching in Ajax I had a student make what sounds like the exact same program.
Cervantes
Posted: Sat Jan 31, 2004 12:40 pm Post subject: (No subject)
me? no. been in Newmarket (well, near there) almost all my life. moved when I was two