Page 1 of 1

3D graphic with different x values

Posted: Mon Jan 23, 2012 10:29 am
by 9342094
Hi there,

I use the TSurfaceSeries in OpenGl mode.
What can I do if I have different x values ​​for individual z levels? See Picture 1 with different x values.
The graphic shouldn't have gaps. See Picture 2 with same values ​​x.

Picture 1:
Image

Picture 2:
Image

Thanks in advance,
Dennis

Re: 3D graphic with different x values

Posted: Tue Jan 24, 2012 12:02 pm
by yeray
Hi Dennis,

Have you tried setting IrregularGrid=true? Notice that such series need to be populated as described here

Re: 3D graphic with different x values

Posted: Tue Jan 24, 2012 12:57 pm
by 9342094
Hi Yeray,

yes IrregularGrid is true. But what I do if I don't have a grid-structure.
For example:

Code: Select all

Series1.addxyz(0,0,0.5);
Series1.addxyz(10,0,0.5); // X=10
Series1.addxyz(25,0,0.5);

Series1.addxyz(0,1.1,0.6);
Series1.addxyz(11,1.5,0.6); // X=11
Series1.addxyz(25,1.3,0.6);

Series1.addxyz(0,2,0.75);
Series1.addxyz(12,2,0.75); // X=12
Series1.addxyz(25,2,0.75);

Series1.IrregularGrid:=true;
Is there a better Series in TChart? Or how can I solve the problem?

Thanks in advance,
Dennis

Re: 3D graphic with different x values

Posted: Wed Jan 25, 2012 2:52 pm
by 10050769
Hello Dennis,

When you draw a Grid, always you need intervals of values X and Z, are repeated if you want the points of Grid are drawn correctly, therefore, you can not add diferents values X or Z in the diferent intervals. For example, in your code you have added next values X:
First interval X: 0,10,25.
Second interval X : 0,11,25(Wrong)
Third interval X:0,12,25.(Wrong)
If you want to Grid is drawn correctly, you need add the same interval values X,so,correct way is:
First interval X: 0,10,25.
Second interval X : 0,10,25(Correct)
Third interval X:0,10,25.(Correct)
In your case the Interval of Z valuesm is correct.

I recommend you take a look in this thread to see the correct way to add values in Grid.

I hope will helps.

Thanks,