Page 1 of 1

Posted: Tue Apr 13, 2004 9:12 am
by Marjan
Hi.

When using surface series you only have to worry about two things:

1) Is the data tabular (y=y(x,z) where x and z form a grid) ?
2) Are x,z values indexed (integer) or double values ?

1: TSurfaceSeries requires tabular data. If you have arbitrary y=y(x,z) values then TSurfaceSeries drawin algorithm will not work. In this case you're encouraged to use the TTriSurfaceSeries to construct/display surface.
2: In case x, and z values are real, you should set the TSurafaceSeries.IrregularGrid to true before you start adding points. If values are (indexed) integers, you should se the IrregularGrid to false.

In the example bellow I'm drawing the y(x,z)=sin(x*z) for x=[2,5],z=[-3,5]:

Code: Select all

Series1.IrregularGrid := False;
Series1.Clear;
for i := 2 to 5 do
  for j := -3 to 5 do
   Series1.AddXYZ(i,sin(i*j),j);