NewtonDensityD.dpr 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. (* Newton Game Dynamics Physics Engine demo.
  2. This demo explains how to use customForceAndTorque and show the newton api
  3. buoyancy effect as example.
  4. Density unit is the number of mass unit per volume unit: D=M/V
  5. Body volume is calculated by Newton, and Mass is the product result of
  6. Density*Volume.
  7. If fluidDensity=bodyDensity, the body will be immerged like a submarine.
  8. Bugs:
  9. -Viscosities does not seem to affect buoyancy.
  10. -Small bodies have huge Viscosities.
  11. -Sphere and Capsule flows when their density equal fluid density.
  12. (For sphere we can correct this by multiplying fluidDensity by 1.43)
  13. Density is also an important parameter when two bodies collide.
  14. The middle mouse button shoot a small cube with impulse.
  15. You can see the result when the cube hit the paper ball or the lead ball.
  16. Updated for GLScene by Franck Papouin 31/01/11
  17. *)
  18. program NewtonDensityD;
  19. uses
  20. Forms,
  21. fNewtonDensityD in 'fNewtonDensityD.pas' {FormNewtonDensity};
  22. {$R *.res}
  23. begin
  24. Application.Initialize;
  25. Application.MainFormOnTaskbar := True;
  26. Application.CreateForm(TFormNewtonDensity, FormNewtonDensity);
  27. Application.Run;
  28. end.