Problem on adding XYZ poins in 3D surface wireframe chart

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
psau
Newbie
Newbie
Posts: 1
Joined: Sun Nov 03, 2002 5:00 am

Problem on adding XYZ poins in 3D surface wireframe chart

Post by psau » Thu May 28, 2009 1:34 pm

Teechart pro v5 VCL
BCB6

Hi,

Y would like to draw a cylinder with several steps depth.
Using surface wireframe and AddXYZ method.
The first 180 ° ar ok
but while drawing the remainder, points are not joined correctly.
(irregular is checked)

Here is a trivial sample of code

Code: Select all

      for(int i = 0; i < 360; i ++)
      {
         float angle = DegToRad(i);
         x = cos(angle);
         y = sin(angle);
         Series1->AddXYZ(x, y, 0);
         Series1->AddXYZ(x, y, 1);
      }
Thanks a lot for your help...

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

Post by Yeray » Thu May 28, 2009 2:13 pm

Hi psau,

First, the problem is that you are trying to draw an irregular surface and that's why only a few points are drawn.
To see a "better" result you could do this:

Code: Select all

Series1.IrregularGrid := true;
But these series aren't thought to draw things like that so the result isn't the expected. On the other hand, maybe you could try using a Point3D series with invisible pointer so that only the line will be drawn. But now you will see that the lines are drawn doing a "zigzag" so here you should adjust your adding loop to draw lines as you want.
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

Post Reply