Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic SurfaceChart - strange behaviour using InterpolationSensitivity (Read 2079 times)
Vladimir Starec
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jan 12th, 2021
SurfaceChart - strange behaviour using InterpolationSensitivity
Jan 12th, 2021 at 3:23pm
Print Post  
I am testing SurfaceChart component, but I am struggling with strange behavior when testing different InterpolationSensitivity values. Using little updates of your example, I am able to visualize my data, but the chart is distorted whenever I use any value of InterpolationSensitivity higher than 1.

Attachment 1: chart using InterpolationSensitivity=1
Attachment 1: same data using InterpolationSensitivity=15

I am changing the interpolation value in xaml file - so the displayed data are really the same.

What can cause this distortion of chart?
  

1.jpg ( 132 KB | 46 Downloads )
1.jpg
15.jpg ( 133 KB | 40 Downloads )
15.jpg
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 2568
Joined: Oct 19th, 2005
Re: SurfaceChart - strange behaviour using InterpolationSensitivity
Reply #1 - Jan 12th, 2021 at 5:44pm
Print Post  
What value have you set for MeshFaceSize? These two properties are used together - some sensitivity / faceSize ratios in the code - so I guess they should stay within range. Anyway if you attach your test project, our developer will investigate.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Vladimir Starec
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 2
Joined: Jan 12th, 2021
Re: SurfaceChart - strange behaviour using InterpolationSensitivity
Reply #2 - Jan 13th, 2021 at 11:13am
Print Post  
Mesh face size was 1 for both images. I probably don't understand very well, what relationship is between those parameters: InterpolationSensitivity, MeshFaceSize, PointMergeThreshold.

My data comes from laser profiler moving fast using the robot so there is smaller resolution (bigger distance) in x axis (1-2) and higher resolution (smaller distance) in z axis (0.05). Because of bigger distance in X axis, the data are sometimes "not connected" on drawn surface - depending on InterpolationSensitivity. Is higher InterpolationSensitivity right parameter to solve this? The "not connected" points issue is shown in attachment 1.

Test project with my data which shows problem mentioned in previous post is available on following link: https://www.dropbox.com/s/wwyopzn66t8gh30/SurfaceInteraction.CS_debug.zip?dl=0
  

values_not_connected.jpg ( 115 KB | 37 Downloads )
values_not_connected.jpg
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 2568
Joined: Oct 19th, 2005
Re: SurfaceChart - strange behaviour using InterpolationSensitivity
Reply #3 - Jan 13th, 2021 at 3:36pm
Print Post  
By distortion you mean the 3D model bending towards min and max Z after changing sensitivity value, right? Our developer will try to fix that in next few days.
  
Back to top
 
IP Logged
 
Slavcho
God Member
*****
Offline


tech.support

Posts: 2568
Joined: Oct 19th, 2005
Re: SurfaceChart - strange behaviour using InterpolationSensitivity
Reply #4 - Jan 15th, 2021 at 10:43am
Print Post  
Quote:
Mesh face size was 1 for both images. I probably don't understand very well, what relationship is between those parameters: InterpolationSensitivity, MeshFaceSize, PointMergeThreshold.


PointMergeThreshold is used to filter out data points - there will be just one vertex created in the model for points within the threshold distance.

MeshFaceSize is the size of one grid square in the surface mesh (in same units as ModelWidth/Height/Depth properties). The chart expects provided data to be sampled from a Y=F(X,Z) function, ideally uniformly distributed with one point per mesh face, so the end result would be the 3D surface plot of that F function.

InterpolationSensitivity is used to interpolate Y values from data points within that distance around a mesh square - e.g. if your data points are more sparse and some faces would not have associated data point, they will get it from data points in specified radius with some distance weighting.

It seems your data points don't come from a function (there are many repeating Y values per X,Z pairs), and they don't cover the whole X/Z plane in the model range. So, that fools the interpolation code to add those bends due to missing points on other side of mesh to counter-balance the added values. Also our developers aren't sure how the repeating values per X,Z point affect the math, they'll try to work that out. Otherwise if missing values are uniformly enough distributed, you should be able to get the graphics smoothed by setting InterpolationSensitivity just large enough to cover the gaps.

If you are trying to show arbitrary 3d-scanned models, the surface chart might not be a good fit so show them, being designed for showing function plots. Some years ago we added CustomModel* properties for a customer that needed to use the chart as a model viewer of 3D meshes - that would require you to provide your own triangulation for the mesh points though. Let me know if you need that and we'll send you some sample code.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint