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?
Axes and ordering
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
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:
Questions 3 and 4: Always last Y value will be drawn, example:
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);
}
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
-
- Advanced
- Posts: 192
- Joined: Thu Feb 01, 2007 12:00 am
- Contact:
follow up question
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[]).