Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Basic Physics in openGL  (C++)

Posted on 2003-02-20
Medium Priority
439 Views
I am trying to write a very basic physics engine for simple 3d objects such as cubes.  I only intend to use gravity, collision detection, and possibly thrust.  This isnt for a game, just for experimentation.  My problem is that I have no clue where to start.  If anyone could explain the basic way to implement physics into a 3d environment or has a link to a site that does, that would be great.
0
Question by:mgeeps
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 4

Accepted Solution

joachimc earned 200 total points
ID: 7992207
I would check the Physics tutorials at
http://www.gamedev.net/reference/list.asp?categoryid=28

Gravity is pretty simple to implement. asume you have a vector moving up (0, 10, 0) with this speed.

The gravity here on earth is 10 M/S ^ 2 (asuming that you have no recistance like air :). This means after one second your upward motion will stop and you start to fall. Then the speed will increase with time.

Thrust is also just to add a vector to your current position. The trick here is to add the vector in the direction you want to move. Normally your objects z+.

Collision you can look at in the turorials :)=

/Joachim
0

Expert Comment

ID: 7997003
You could try this book from amazon as an introduction?

http://www.amazon.co.uk/exec/obidos/ASIN/0596000065/ref=pd_sim_b_dp/026-0048815-9004409

Regards,
0

Author Comment

ID: 8002398
Thank you very very much. The tutorials are a big help and I've got some connections at amazon so I'll see if I can't get a hold of that book.

0

Expert Comment

ID: 8046034
also try
http://nehe.gamedev.net

its a site with lots of opengl game/engine creation tutorials
0

Expert Comment

ID: 9464263
mgeeps:
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Artificial Intelligence comes in many forms, and for game developers, Path-Finding is an important ability for making an NPC (Non-Playable Character) maneuver through terrain.  A* is a particularly easy way to approach it.  I’ll start with the algor…
Recently, in one of the tech-blogs I usually read, I saw a post about the best-selling video games through history. The first place in the list is for the classic, extremely addictive Tetris. Well, a long time ago, in a galaxy far far away, I was…
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
###### Suggested Courses
Course of the Month8 days, 22 hours left to enroll