Welcome, Guest. Please Login.
Gravity Simulator
11/21/17 at 19:29:52
News: Registration for new users has been disabled to discourage spam. If you would like to join the forum please send me an email with your desired screen name to tony at gravitysimulator dot com.
Home Help Search Login


Pages: 1
Send Topic Print
Personal side project (Read 3231 times)
ssc4k
Uploader



I Love YaBB 2!

Posts: 18
Personal side project
12/23/10 at 08:59:37
 
In order to introduce some new stuff into my knowledge of c++ over break I thought I would make a more relaxed (centered around being fun, not accurate) interactive gravity simulation. Unfortunately it doesn't really do much more than one would expect from these sorts of programs:
 
escape = close
c = clear screen
space = pause
v = change view, currently 3 modes. 1 = normal, 2 = point, 3 = velocity.
l-click = create new moving particle, drag before releasing to create velocity, the longer you hold the bigger the mass
r-click = create new stationary particle, the longer you hold the bigger the mass
plus/minus = increase/decrease simulation accuracy
arrow keys = move camera
h = home
t = trace
s = save contents to save.grv (no load function yet)
 
But I invite you all to check out the projects homepage and download the latest installer. Any input is welcome as I have 90% of break left.
Back to top
 
 
View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Personal side project
Reply #1 - 12/25/10 at 01:20:44
 
Nice job.  It's hard to pick the right velocity to get an orbit, but it was fun trying.  I couldn't keep the system centered though.  It kept moving off the screen.
Back to top
 
 
Email View Profile WWW   IP Logged
abyssoft
YaBB Administrator
*****


I love YaBB 1G -
SP1!

Posts: 302
Re: Personal side project
Reply #2 - 12/29/10 at 12:00:34
 
adding a zoom feature is always a good idea, makes it easier to keep system on screen.
Back to top
 
 
View Profile WWW   IP Logged
frankuitaalst
Ultimate Member
*****


Great site

Posts: 1507
Gender: male
Re: Personal side project
Reply #3 - 12/30/10 at 11:47:32
 
I've found some nice features such as for creating new masses and giving them a velocity and direction on screen.  
I also got a system with some fixed masses , through which an extra body can manoeuver in a way I've never seen before .  
Nicely done !
Back to top
 
 
Email View Profile   IP Logged
ssc4k
Uploader



I Love YaBB 2!

Posts: 18
Re: Personal side project
Reply #4 - 12/31/10 at 10:16:43
 
Wow I expected everyone would think it was complete crap to be honest XD well I'll odd object tracking, zoom, load (you can save in human readable format but not load yet), and some other changes. Thanks for the input and check back next week for that stuff to be implemented Tongue.
 
EDIT: v1.9.1 has full save/load capability, it will save camera, mode, and object data into a human readable text format in save.grv. The format is as follows
line 1: how many objects there are
line 2 though line 11 * objects +1: object data lines = (1 = x, 2 = y, 3 = x velocity, 4 = y velocity, 5 = mass, 6 = alive , 7 8 9 = r g b, 10 = radius, 11 stationary?)
line 11 * objects + 1 through line 11 * objects + 4: camera (1 = x, 2 = y, 3 = zoom factor)
line 11 * objects + 1 through line 11 * objects + 4: 1 = draw mode (2 = mode count, 3 = pause, 4 = trace)
 
or if you just want to save and load it's "s" for save "l" for load Tongue
Back to top
 
« Last Edit: 01/02/11 at 07:54:22 by ssc4k »  
View Profile   IP Logged
Tony
YaBB Administrator
*****




Posts: 1051
Gender: male
Re: Personal side project
Reply #5 - 01/26/11 at 00:22:01
 
I just noticed your "Edit".  That's the problem with edits.  It doesn't show up as a new post, so nobody reads it.  I'm anxious to try your improvements!
Back to top
 
 
Email View Profile WWW   IP Logged
Pages: 1
Send Topic Print