Link to home
Start Free TrialLog in
Avatar of mrbird
mrbird

asked on

3D Simulation Programming

How to program 3D simulation? Draw directly to canvas or else, please suggest me, if possible please give me a sample code.
Avatar of Lischke
Lischke

Hi mrbird,

if you really want you can do all the calculation yourself and draw directly to a canvas, but I don't recommend this since this is a real hard job to do and there are already made libraries available for free. One is the so often cited DirectX (in particular the Direct3D part of it) and another one is OpenGL.

The former deals heavily with COM objects and is hard to understand while the latter is a procedural API and quite easy to learn. OpenGL has very good references (do you know the movies "Independence day", "Terminator 2" or "Jurassic Park"? I'm sure you know at least one of them. The special effects shown in these movies all where made with OpenGL.

To get started with OpenGL (if you prefer it over DX) point your browser to one of the major Delphi sites (DSP, Deli, Torry's) and search for GLScene. There's a D2 version with source code (version 0.3.2 beta) and a D3 version (0.4.3 beta) without sources. A D4 version is under work.

Ciao, Mike
Ooops, I forgot to mention the GLScene home page (http://www.mind-link.com/glscene/). There you'll find the D3 version.

Ciao, Mike
ASKER CERTIFIED SOLUTION
Avatar of tothpaul
tothpaul

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mrbird

ASKER

Thank you for your answer tothpaul. Since I have a little time to finish this project, it difficult to make understand your source code but it is very good to see it, I can study something from it.

And also thanks to Lischke for your suggestion, the component is very interesting and it look easier to code by myself. But I could not install the component (I already ask by email). I hope this will help me a lot.

bird
ps.  Lischke, if you want some points please tell me.. :-)