IScene3DDataSource.ArrayY

Syntax

ArrayY: Array;

Description

The ArrayY property determines all values along the OY axis.

Example

This example assumes that there is the S object of the IScene3D type.

Sub Scene;

Var

s : IScene3D;

sur : IScene3DSurface;

i, j : integer;

min, max : double;

x, y : array Of double;

Begin

min := -5;

max := 5;

x := New Double[51];

y := New Double[51];

For i := 0 To 50 Do

x[i] := (max - min)/(50)*i + min;

y[i] := (max - min)/(50)*i + min;

End For;

x[0] := (max - min)/(50)*0 + min;

s.DisplayedObjects.Surfaces.Count := 1;

sur := s.DisplayedObjects.Surfaces.Item(0);

s.BeginUpdate;

sur.DataSource.ArrayX := x;

sur.DataSource.ArrayY := y;

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 Scene;

Executing the example creates a data surface on the scene.

See also:

IScene3DDataSource