3D graphic with different x values

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
S-ON-S
Newbie
Newbie
Posts: 12
Joined: Tue Jun 07, 2005 4:00 am

3D graphic with different x values

Post by S-ON-S » Mon Jan 23, 2012 10:29 am

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

Yeray
Site Admin
Site Admin
Posts: 9602
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: 3D graphic with different x values

Post by Yeray » Tue Jan 24, 2012 12:02 pm

Hi Dennis,

Have you tried setting IrregularGrid=true? Notice that such series need to be populated as described here
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

S-ON-S
Newbie
Newbie
Posts: 12
Joined: Tue Jun 07, 2005 4:00 am

Re: 3D graphic with different x values

Post by S-ON-S » Tue Jan 24, 2012 12:57 pm

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

Sandra
Site Admin
Site Admin
Posts: 3132
Joined: Fri Nov 07, 2008 12:00 am

Re: 3D graphic with different x values

Post by Sandra » Wed Jan 25, 2012 2:52 pm

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,
Best Regards,
Sandra Pazos / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply