
-----------------------------------
Catalyst
Fri Jan 23, 2004 10:58 pm

Gravity
-----------------------------------
I was bored in comp sci. so i made this

-----------------------------------
sport
Fri Jan 23, 2004 11:03 pm


-----------------------------------
Great program for being bored. Is it random or does it actually have a scientific way to it?

-----------------------------------
Catalyst
Fri Jan 23, 2004 11:05 pm


-----------------------------------
uses Newton's
gravitational attraction formula and some vector math
Fg=(m1*m2*G)/(d^2)

-----------------------------------
AsianSensation
Fri Jan 23, 2004 11:07 pm


-----------------------------------
nice physics stuff, did you do this during your compsci class?  :lol:  it seems that's when you seem to be bored most of the time.

-----------------------------------
Catalyst
Fri Jan 23, 2004 11:11 pm


-----------------------------------
a lesson on selection (5 months in to ICS3M(full year))
i think you get the idea

-----------------------------------
Homer_simpson
Sat Jan 24, 2004 12:48 am


-----------------------------------
pretty nice +bits

-----------------------------------
shorthair
Sat Jan 24, 2004 12:56 am


-----------------------------------
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
Sat Jan 24, 2004 1:27 am


-----------------------------------
wow catalyst - if I was your CS teacher I'd made sure you're ALWAYS bored in my class :lol:

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 :twisted:

-----------------------------------
Cervantes
Sat Jan 31, 2004 10:18 am


-----------------------------------
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
Sat Jan 31, 2004 10:23 am


-----------------------------------
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
Sat Jan 31, 2004 10:29 am


-----------------------------------
wanna post it? :)

-----------------------------------
shorthair
Sat Jan 31, 2004 10:41 am


-----------------------------------
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
===============================================

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


===============================================


Gravitational acceleration, g, of an arbitrary body  :

g=G Me
    ------
    R squared

Me = Mass of the Earth  

R   = distance from the Earth's centre.



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


===============================================

The corresponding potential, U, is :
U = -6.25 x 107 m2 s-2


-----------------------------------
Cervantes
Sat Jan 31, 2004 10:54 am


-----------------------------------
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
Sat Jan 31, 2004 11:10 am


-----------------------------------
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
Sat Jan 31, 2004 12:40 pm


-----------------------------------
me? no.  been in Newmarket (well, near there) almost all my life. moved when I was two :P

-----------------------------------
shorthair
Sat Jan 31, 2004 12:42 pm


-----------------------------------
i lerned all that from grade 11 physics , ( rockin course by the way ) , you learn all that and more

-----------------------------------
Cervantes
Sat Jan 31, 2004 12:46 pm


-----------------------------------
sweet, I can't wait to take that course.  Hope I get it first semester along with compsci next year. :D

-----------------------------------
Paul
Sat Jan 31, 2004 12:51 pm


-----------------------------------
This reminds me of a black hole, except its not black, you know with the event horizon and stuff. A great extension to this program would be to have random rays of light passing, and those that come to the event horizon, would get sucked in. (I of course have no idea how to do it)

-----------------------------------
shorthair
Sat Jan 31, 2004 12:57 pm


-----------------------------------
basic formulas of light , justneed to know that light always travels in straight lines , we know light travels at , 3.0 x 10 to the 8 m/s , so just give me a dirrection ditsance and a time , and its there right in fromnt of you , also you can use light ray diagrams to find the position of the light

-----------------------------------
Cervantes
Sat Jan 31, 2004 1:08 pm


-----------------------------------
black holes aren't black necessarily black paulbian :P  there is no light to reflect off the black hole to show us what colour the black hole is.

a black hole could be pink :P

shorthair, "light always travels in straight lines" you said. except when near a black hole right?  or am I hugely mistaken :?

-----------------------------------
Paul
Sat Jan 31, 2004 1:10 pm


-----------------------------------
Ah, but if you do a simulation of a black hole, the center should be black, maybe the surroundings should have colors, cause there's light and other cosmic rays thats pulled in a crazy swirl but not inside the event horizon.

-----------------------------------
Cervantes
Sat Jan 31, 2004 1:12 pm


-----------------------------------
if its not pulled inside the event horizon then how would it be reflected off the black hole to show us the black hole's colour?

-----------------------------------
shorthair
Sat Jan 31, 2004 1:14 pm


-----------------------------------
nothing reflects off a black hole , it apparently sucks up all light , so we could never actually see one , because there would e no light that reflects off it , we cant recodt it becuase the lense relys on light coming back into it , also  why is there a need for a black hole , i can make an event horizon , and a darn good reflecton engine based on a rotating side view of hte planets

-----------------------------------
Catalyst
Sat Jan 31, 2004 1:31 pm


-----------------------------------
some radiation comes out of a black hole
its called hawking radiation

-----------------------------------
shorthair
Sat Jan 31, 2004 1:45 pm


-----------------------------------
Never Heard about that , care to explain , before i go deep into a google search

-----------------------------------
Catalyst
Sat Jan 31, 2004 1:53 pm


-----------------------------------
its a bit complicated
but in a nutshell

according to quantum theory there are pairs of virtual particles (one normal one antimatter) randomly appearing and disappering in "empty space" all the time 
stephen hawking proved that if this happens near the event horizon of a black hole, one of the particles may fall in and the 
other would would escape the black hole via energy from the mass of the black hole itself 
this is the "hawking radiation"
(it solved the confilict of black holes with the second law of thermodynamics)
this radiation implies that black holes will eventually evaporate away

(there is a lot of math and such behind this as well, and it seems very complicated)

-----------------------------------
shorthair
Sat Jan 31, 2004 1:57 pm


-----------------------------------
i remember that now , i have his book , the universe in a nutshell , i have never read it yet , but i looked over it and found some awsome stuff

-----------------------------------
Catalyst
Sat Jan 31, 2004 2:19 pm


-----------------------------------
his books are good  :D 
if u havent already be sure to read a brief history of time

-----------------------------------
Cervantes
Sat Jan 31, 2004 3:09 pm


-----------------------------------
I think I heard of that hawking radiation bit before, at least some of it.
that seems so wierd though, that matter and antimatter particles could just pop in and out of 'empty space'.  and if they pop in and out of 'empty space', why can't they do it in 'not empty space' like a meter to my left :think:

-----------------------------------
Catalyst
Sat Jan 31, 2004 4:35 pm


-----------------------------------
i beleive it happens everywhere , but its only noticable when the space is "empty". There was an experiment that proved these pairs. Two metal plates were put really close together in a vacuum. This space was too small for the pairs to form, so the pressure from the pairs was less between the plates then around them. So the pressure difference pushed the plates together. (known as the casimir effect)

-----------------------------------
Cervantes
Sat Jan 31, 2004 4:44 pm


-----------------------------------
damn thats cool.  (i seem to be asking this a lot lately but) where'd you learn that one? :think:

-----------------------------------
Catalyst
Sat Jan 31, 2004 4:48 pm


-----------------------------------
im not sure
i think it was brief history of time, but i may be wrong

-----------------------------------
Cervantes
Sat Jan 31, 2004 5:04 pm


-----------------------------------
so you don't learn anything like that in school?   :(

-----------------------------------
Andy
Sat Jan 31, 2004 5:05 pm


-----------------------------------
catalyst never learned anything in school...

-----------------------------------
Paul
Sat Jan 31, 2004 5:10 pm


-----------------------------------
Ha, I get all my science facts from science fiction (oh the irony). Seriously, many science fiction books are written by scientists, and has real science facts. You just need to tell the difference between facts or fiction.

-----------------------------------
Cervantes
Sat Jan 31, 2004 5:19 pm


-----------------------------------
which books?  there is an author who writes scifi about space that's apparently really really good and accurate on a lot of facts too.. can't remember his name offhand though :(

-----------------------------------
Paul
Sat Jan 31, 2004 5:24 pm


-----------------------------------
I don't really know, I've read many books, but Isaac Isimov and his robot books are good.  :)

-----------------------------------
Catalyst
Sat Jan 31, 2004 5:27 pm


-----------------------------------
clarke's books are good

-----------------------------------
Kuntzy
Sat Jan 31, 2004 6:12 pm


-----------------------------------
I'm reading a book called Physics for Game Developers by David M. Bourg. I'm just at the beginning of the book, but from what i've seen of it so far, I would recommend it for antone who wants to put real time physics in their games. You don;t have to seperate fact from fiction in this book  :lol:

-----------------------------------
Cervantes
Sat Jan 31, 2004 6:16 pm


-----------------------------------
sweet!! I gotta get me a copy of this book!  :)
