6 Replies - 772 Views - Last Post: 23 August 2010 - 09:53 AM Rate Topic: -----

#1 shamerella  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 27
  • Joined: 05-October 09

Simulating Fun Things!

Posted 16 August 2010 - 06:16 PM

I've been trying to code a planetary gravity simulator and I've reached the point of no progress much earlier than usual. I simply don't have a good enough (ie any) background in physics to know what to do. However it's a very interesting area and I would like to do more in it.

So I ask any who are knowledgeable to think of simple things to simulate.

I thought of simulating gears but it seems a little complicated.

This post has been edited by shamerella: 16 August 2010 - 06:17 PM

Is This A Good Question/Topic? 0
  • +

Replies To: Simulating Fun Things!

#2 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10596
  • View blog
  • Posts: 39,257
  • Joined: 27-December 08

Re: Simulating Fun Things!

Posted 16 August 2010 - 06:27 PM

I wrote a 2D Gravity Tutorial covering Calculus and Parametric equations. Hope it helps some. :)
Was This Post Helpful? 1
  • +
  • -

#3 shamerella  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 27
  • Joined: 05-October 09

Re: Simulating Fun Things!

Posted 16 August 2010 - 07:01 PM

I just read your tutorial, it was interesting. I can see how utilizing equations explicitly could make things simpler and more controllable. Unfortunately I tend to just hack it out with a 'hope it works' attitude.

With equations you have a look it up approach, changing the time value and getting the position back.
The approach I usually take is more of a modifying one, where I just change the current position by all the things like gravity and movement.

In your tutorial's example of a character jumping I would do something like

while (!done)
input ()

vely+=jumpspeed;
vely-=gravity;



ect.
With an equation you have much more control (Extrapolating into the FUTURE!), I will definitely try creating and using them for my future programs. Thanks!

Simulation Project Ideas Anyone?

This post has been edited by shamerella: 16 August 2010 - 07:06 PM

Was This Post Helpful? 0
  • +
  • -

#4 macosxnerd101  Icon User is offline

  • Self-Trained Economist
  • member icon




Reputation: 10596
  • View blog
  • Posts: 39,257
  • Joined: 27-December 08

Re: Simulating Fun Things!

Posted 16 August 2010 - 07:06 PM

Glad you enjoyed my tutorial!
Was This Post Helpful? 0
  • +
  • -

#5 Fib  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 161
  • View blog
  • Posts: 554
  • Joined: 12-March 09

Re: Simulating Fun Things!

Posted 19 August 2010 - 11:47 AM

You could simulate plant life growing. Like flowers, trees, ect.

If you want to go further, you could simulate an ecology. Create an environment, populate it with animals, plant life, insects. Make some animals carnivors, others herbivors. You could make some animals predators who hunt down other animals for food. Make all the plants and trees grow.

I think that would be awesome. :)
Was This Post Helpful? 1
  • +
  • -

#6 shamerella  Icon User is offline

  • New D.I.C Head

Reputation: 5
  • View blog
  • Posts: 27
  • Joined: 05-October 09

Re: Simulating Fun Things!

Posted 19 August 2010 - 07:18 PM

Wow that would be cool, sounds hard though but I'll look into it. I was also thinking of simulating the traffic of a small section of a city with random destinations and cars that would navigate a few blocks and follow the rules of the road.

So I guess for the plants the only equations I have are the chemistry ones, otherwise everything is just me guessing. I would need the photosynthesis one for starters and one for how the glucose is converted into plant mass for it to grow. Then i need to treat some fraction of the plant mass as leaves to absorb sunlight, as well as roots for water. It seems like it could get really complicated. I wouldn't be satisfied with something that was inaccurate because I had to make up my own light to plant mass ratios. Its a fantastic idea and I'm going to try it but its going to take some planning.


Anyone got anything else?
Was This Post Helpful? 0
  • +
  • -

#7 SpeedisaVirus  Icon User is offline

  • Baller
  • member icon

Reputation: 114
  • View blog
  • Posts: 855
  • Joined: 06-October 08

Re: Simulating Fun Things!

Posted 23 August 2010 - 09:53 AM

Simulating body interactions ala n-bodies is an interesting exercise. Naively, it's pretty simple. Making it scalable is where the more interesting aspects of implementing it.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1