HeightField.dpr 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. (*
  2. Advenced for the TGLHeightField object.
  3. Check the fxy sample first.
  4. This sample shows a few more tricks : how to switch formulas at run-time,
  5. effects of base grid extents and resolution change as well as color and
  6. lighting options of the TGLHeightField.
  7. Note that maxed out grid size and minimum step (high resolution) will bring
  8. most of todays cards to their knees (if they do not just crash, that is).
  9. Used formulas :
  10. The Formula1 is of type Sin(d)/(1+d), with d=sqr(x)+sqr(y), you may note
  11. the interesting sampling-interference effect with big step values (low res)
  12. and remember your math teacher's warnings on graph-plotting :)
  13. Formula2 is a more classic sin*cos mix
  14. Dynamic is the third formula, if you pick it, a small ball will appear and
  15. move around, the plotted formula being the square distance to the ball.
  16. *)
  17. program HeightField;
  18. uses
  19. Forms,
  20. fHeightField in 'fHeightField.pas' {FormHeightField};
  21. {$R *.RES}
  22. begin
  23. Application.Initialize;
  24. Application.CreateForm(TFormHeightField, FormHeightField);
  25. Application.Run;
  26. end.