Profile Picture

Surface chart with more than one surface

Posted By Kevin Harrison 9 Years Ago
Author
Message
Kevin Harrison
Question Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
Hi

Is it possible to draw more than one surface on a grid surface chart?

We are generating a surface by fitting the best surface to a series of (x, y, z) points, and we want to overlay the original (x, y, z) data to see how good the fit is. The original data is ideally drawn as series of points, with a drop down line onto the base "plane" so we can get an idea where the points lie in relation to the fitted surface.

We would also want to highlight one point on the surface as a the selected surface location.

Hope this makes sense.

Thanks

Kevin

Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,000
Hi Kevin,

You can mix the surface chart with any other 3D chart type - so in order to achieve the requirement you'll probably need the following:

1. An XYZ scatter point series holding the original points.
2. A surface series holding the best fit values.
3. An XYZ scatter line holding the line segments connecting each point to the best fit on the surface. In order to draw disconnected line segments you can insert an empty data point between each pair of valid points.

Hit testing the point / line series is trivial - the hit test result object will contain the data point index of the currently hit point / line segment. In order to hit test the surface you need to inspect the SurfaceDataPointX and SurfaceDataPointZ properties of the hit test result which contain the indices of the current data point inside the surface grid. Hope this helps - let us know if you meet any problems or have any questions.


Best Regards,
Nevron Support Team



Kevin Harrison
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
Thanks for the rapid reply, Supreme Being (?!).

I tried adding two surface grid series but I see they are not overlayed on each other, so I suspect your suggestion is the better one.

Thanks

Kevin

Kevin Harrison
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
Hi

I've tried your suggestion but have a problem placing the scatter series on a grid surface - what are the x and z values to use? I just end up with the points and lines in a separate area off the surface. Is there any way to achieve this for a grid surface, or will I have to use a mesh surface?

Thanks

Kevin

Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,000

Hi Kevin,

Unless you've not specified otherwise the coordinates for the X/Z dimension start from 0 and grow with 1 - 0, 1, 2, etc. in each dimension. You can modify the origin and step for grid surface series. For mesh the coordinates are arbitrary for each point. Another option that came to mind is to use another grid surface series that just draws a dots frame (without filling). Hope this helps - let us know if the problem persists.



Best Regards,
Nevron Support Team



Kevin Harrison
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
That's what I thought. Here's a sample of my code with the added points and lines:

for (int zIndex = 0; zIndex < zLength; zIndex++)
{
for (int xIndex = 0; xIndex < xLength; xIndex++)
{
gridSurface.Data.SetValue(xIndex, zIndex, yData[yIndex]);

series.AddDataPoint(new NDataPoint(xIndex, yData[yIndex], zIndex));

dropLines.AddDataPoint(new NDataPoint(xIndex, 0, zIndex));
dropLines.AddDataPoint(new NDataPoint(xIndex, yData[yIndex], zIndex));
dropLines.AddDataPoint(new NDataPoint(xIndex, double.NaN, zIndex));

yIndex++;
}
}

I wanted to attach an image but can't see how to. Basically the series and droplines ignore the z values. My grid has a maximum z of 5. Series is displayed at fixed z = 6 and droplines at z = 8.

I've tried adding the point surface, but that is also offset from the original surface.
The same thing happens if I switch to using a mesh surface.

I'm not quite on the latest version if this was fixed recently.

Any ideas?

Thanks

Kevin




Nevron Support
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Last Week
Posts: 3,054, Visits: 4,000
Hi Kevin,
Make sure that series and dropLines have UseXValues and UseZValues set to true. Is this the problem?


Best Regards,
Nevron Support Team



Kevin Harrison
Posted 9 Years Ago
View Quick Profile
Supreme Being

Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)Supreme Being (79 reputation)

Group: Forum Members
Last Active: 3 Years Ago
Posts: 176, Visits: 1,865
That would be it! Now we're getting somewhere. Now I need to work out how to make the surface partially transparent, so the points are readily visible.

Thanks for all the help and quick responses. Much appreciated.

Kevin



Similar Topics


Reading This Topic