Page 1 of 1
Non-orthoganal data in a tContourSeries
Posted: Sat Dec 18, 2021 2:29 pm
by 16592554
Is there any way to build a tContourSeries with a non-orthoganal regular grid? So for instance, I have a 3x3 set of Operating Points with 4 parameters such as:
A B C D
1 5 1 1
2 10 2 1
3 20 3 1
1 6 1 2
2 12 2 2
3 25 3 2
1 8 1 3
2 15 2 3
3 28 3 3
And I want to plot XYZ using parameters A, B & C.
I am trying to avoid pre-processing the data into a regular grid of A and C.
Re: Non-orthoganal data in a tContourSeries
Posted: Tue Dec 21, 2021 3:06 pm
by yeray
Hello,
A and C look the same. Are you sure this is correct?
A contour with A, B and D looks like this:
- ContourABD.png (14.32 KiB) Viewed 8256 times
Code: Select all
procedure TForm1.FormCreate(Sender: TObject);
begin
Series1.AddXYZ(1, 5, 1);
Series1.AddXYZ(2, 10, 1);
Series1.AddXYZ(3, 20, 1);
Series1.AddXYZ(1, 6, 2);
Series1.AddXYZ(2, 12, 2);
Series1.AddXYZ(3, 25, 2);
Series1.AddXYZ(1, 8, 3);
Series1.AddXYZ(2, 15, 3);
Series1.AddXYZ(3, 28, 3);
end;
Deppending on the data, you may need to add this (but with the data above it isn't necessary):
Re: Non-orthoganal data in a tContourSeries
Posted: Tue Dec 21, 2021 3:31 pm
by 16592554
Sorry that was a bad example. This is more like what I want to do:
Series1.AddXYZ(1, 5, 1.0); // D=1
Series1.AddXYZ(2, 10, 2.0); // D=1
Series1.AddXYZ(3, 20, 3.0); // D=1
Series1.AddXYZ(1, 6, 1.1); // D=2
Series1.AddXYZ(2, 12, 2.1); // D=2
Series1.AddXYZ(3, 25, 3.1); // D=2
Series1.AddXYZ(1, 8, 1.2); // D=3
Series1.AddXYZ(2, 15,2.2); // D=3
Series1.AddXYZ(3, 28, 3.2); // D=3
Re: Non-orthoganal data in a tContourSeries
Posted: Tue Dec 21, 2021 5:07 pm
by 16592554
Here is a bit more background: I am trying to create this chart:
- Contours.png (49.73 KiB) Viewed 8252 times
The black lines in the contour chart are constant Throttle values and a regular grid of sfc=f(Throttle,RPM) is available. Also, BMEP ("Z" in the contour map) is known at each RPM and Throttle operating point. Data outside of the Throttle-RPM range cannot be reliably calculated. It is obviously possible (without too much effort) to filter out any points in a BMEP-RPM grid outside the valid throttle range, but the result is very ragged at the top edge (as you can see). Improving this is more difficult, hence my question about entering a Throttle-RPM grid into a BMEP-RPM chart.
Re: Non-orthoganal data in a tContourSeries
Posted: Thu Dec 23, 2021 3:28 pm
by yeray
Hello,
We've been playing with your data and got to the idea of filling the gaps with 0s (or -1s).
Then, we'd modify the first
UpToValue
in
Levels
so the gaps aren't drawn:
Code: Select all
Series1.Filled:=False;
Series1.IrregularGrid:=True;
Series1.AddXYZ(1, 5, 1.0);
Series1.AddXYZ(2, 0, 1.0);
Series1.AddXYZ(3, 0, 1.0);
Series1.AddXYZ(1, 0, 2.0);
Series1.AddXYZ(2, 10, 2.0);
Series1.AddXYZ(3, 0, 2.0);
Series1.AddXYZ(1, 0, 3.0);
Series1.AddXYZ(2, 0, 3.0);
Series1.AddXYZ(3, 20, 3.0);
Series1.AddXYZ(1, 6, 1.1);
Series1.AddXYZ(2, 0, 1.1);
Series1.AddXYZ(3, 0, 1.1);
Series1.AddXYZ(1, 0, 2.1);
Series1.AddXYZ(2, 12, 2.1);
Series1.AddXYZ(3, 0, 2.1);
Series1.AddXYZ(1, 0, 3.1);
Series1.AddXYZ(2, 0, 3.1);
Series1.AddXYZ(3, 25, 3.1);
Series1.AddXYZ(1, 8, 1.2);
Series1.AddXYZ(2, 0, 1.2);
Series1.AddXYZ(3, 0, 1.2);
Series1.AddXYZ(1, 0, 2.2);
Series1.AddXYZ(2, 15, 2.2);
Series1.AddXYZ(3, 0, 2.2);
Series1.AddXYZ(1, 0, 3.2);
Series1.AddXYZ(2, 0, 3.2);
Series1.AddXYZ(3, 28, 3.2);
Series1.CreateAutoLevels;
Series1.Levels[0].UpToValue:=1;
- Contour.png (22.37 KiB) Viewed 8225 times
Re: Non-orthoganal data in a tContourSeries
Posted: Thu Dec 23, 2021 8:29 pm
by 16592554
Yes, that is pretty much what I did to create the sfc chart I posted previously. My problems are
1) it is computionally intensive to identify the null points (above 100% throttle)
2) the top edge of the contour map is rather ragged, even with reasonably close spacing on the grid. The 100% throttle contour line is never shown and I had to add it using a single XY series line.
3) there is a significant amout of "unecessary" pre-processing to create the X-Z grid required by the TeeChart contour series.
My ideal solution is to allow an fully irregular X-Z data entry and then trangulate the contour series (which is what I am used to in TecPlot). I now understand that this is not currently possible wth TeeChart, but it would be nice if this were to be inluded on a wish list for new features.