Axes and ordering

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

Axes and ordering

Post by Mike Jones » Fri Apr 20, 2007 4:31 pm

We have a complex application that generates arrays of points. We are working on optimizing the generation algorithms, thus is it important for us to understand the best ways to populate arrays of doubles to be consumed by various Series Styles.

Can someone explain HOW the following scenarios will work for 3 dimensional charts such as Surface, Vector3D , & Points3D

(1) If your X and Z form a regular grid, do they also need to be sorted? If so, does it have to be a particular sort?

(2) If your X and Z form a regular grid, except that there are some missing points in that grid, will that cause problems?

(3) If your X and Z form a regular grid, except that there are some duplicate points (same X,Y,Z), will that cause problems?

(4) If your X and Z form a regular grid, except that there are some duplicate X-Z pairs, with slightly different Y's, will that cause problems?

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Mon Apr 23, 2007 10:43 am

Hi Mikes

Question 1: It's indifferent how you add values X and Z, by default, will be sorted ascendingly.

Question 2: No, it will not cause problems. You can try to do a test, as below code:

Code: Select all

//surface1 in tChart1.
            //surface2 in tChart2.
            for (int i = 0; i < 4; i++)
                for (int j = 0; j < 4; j++)
                {
                    double d = rnd.NextDouble();
                    if (i != 2 & j != 3) surface1.Add(i, d, j);
                    surface2.Add(i, d, j);
                }
Questions 3 and 4: Always last Y value will be drawn, example:

Code: Select all

surface1.Add(0, 12, 0); //Now point[0,0] has value = 12
surface1.Add(0, 5, 0); //Now point[0,0] has value = 5
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Mike Jones
Advanced
Posts: 192
Joined: Thu Feb 01, 2007 12:00 am
Contact:

follow up question

Post by Mike Jones » Mon Apr 23, 2007 1:57 pm

Regarding your answer to Question #1, does this apply if we pass in arrays of doubles? We do not call Add(double, double). Instead we call Add(double[],double[]).

Edu
Advanced
Posts: 206
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia

Post by Edu » Tue Apr 24, 2007 8:44 am

Hi Mike

It doesn't matter how is the array sorted. Even you don't provide sorted values to the series they will be automatically sorted according to X and Z valuelists order property.
Best Regards,
Edu

Steema Support Central
http://support.steema.com/

Post Reply