|Surface 3D||Lab Report|
"Surface3D" produces several perspective plots of a "fishnet" surface described mathematically as
z = f(x,y) = x * y * (x2 - y2) / (x2 + y2).
( Hidden lines are not removed.)
Materials and Equipment
Windows 95, Delphi 3 (to recompile)
Best when run on an 800 x 600 pixel (or higher) display.
The DrawSurface procedure draws the surface views on the Image.Canvas, the Printer.Canvas or a Bitmap.Canvas using four different viewports.
The RepaintNeeded parameter to DrawSurface is a bit of a kludge. When this parameter has the value TRUE, the Image is updated after each column or row is plotted. This is only needed for the Draw method. This parameter is set FALSE for creating the file or printed output.
As a simple way to blank an image, the ButtonClearClick method assigns NIL to Image.Picture.
See the 3D Lab to interactively change the camera viewpoint.
This example shows how to draw perspective views of a "fishnet" surface.
D/3D vector graphics, translation, rotation, scaling, view transform, homogeneous coordinates, clipping, projections, vectors, matrices, TPantograph, Delphi 3
Delphi 3 Source and EXE (136 KB): Surface3D.ZIP
26 Feb 2005
since 1 Nov 1998