IScene3DDataSource.ValueZ

Syntax

ValueZ(IndexX: Integer; IndexY: Integer): Double;

Parameters

IndexX - index of value along the OX axis.

IndexY - index of value along the OY axis.

Description

The ValueZ property determines the value along the OZ axis in the data source.

Example

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;

After executing the example a data surface is created on the scene.

See also:

IScene3DDataSource