Surfaces: IScene3DSurfaces;
The Surfaces property determines data view surfaces. Use the IScene3DSurfaces to work with available parameters.
This example assumes that there is the S object of the IScene3D type.
Sub Chart3D;
Var
s : IScene3D;
sur : IScene3DSurface;
i, j : integer;
min, max : double;
Begin
min := -5;
max := 5;
s.DisplayedObjects.Surfaces.Count := 1;
sur := s.DisplayedObjects.Surfaces.Item(0);
s.BeginUpdate;
For i := 0 To 50 Do
sur.DataSource.NewColumn := (max - min)/(50)*i + min;
End For;
sur.DataSource.ValueY(0) := (max - min)/(50)*0 + min;
For i := 1 To 50 Do
sur.DataSource.NewRow := (max - min)/(50)*i + min;
End For;
For i := 0 To sur.DataSource.ColumnCount - 1 Do
For j := 0 To sur.DataSource.RowCount - 1 Do
sur.DataSource.ValueZ(i, j) := Math.sin(sur.DataSource.ValueX(i)) + Math.sin(sur.DataSource.ValueY(j));
End For;
End For;
s.EndUpdate;
End Sub Chart3D;
Executing the example creates a data surface on the scene.
See also: