Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

3D Scatter Graph in WPF - Ideas?

$
0
0

Hey folks,

We're building a 3D scatter graph control and are having performance issues when adding lots of points (3000+).  I don't suspect it is a WPF problem per say but rather, we are not very efficient in the manner which we are doing the graph.

In short, our app adds 3D cubes into the viewport at specific coordinates. 

// 1. Make the 3D object (mesh and material)
GeometryModel3D cube = newGeometryModel3D((MeshGeometry3D)Resources["ZPlane"], (Material)Resources["SteelBlue"]);

// 2. Define how the 3D object will be positioned in space
ModelVisual3D model = newModelVisual3D
();
model.Content = cube;
Transform3DGroup myTg = newTransform3DGroup
();
myTg.Children.Add((Transform3DGroup)Resources["tMakeNormal"
]);
myTg.Children.Add(newTranslateTransform3D
(x,y,z));
model.Transform = myTg;

// 3. We add the 3D object into our 3D space
this.vMain.Children.Add(model);

This works fine up until the 1000 cube mark.  It becomes un-useable after 3000 cubes.  Our goal is to hit the 1,000,000 points (does not have to be cubes as long as we can see something representing the point).

When the app works, it looks great and we’re able to zoom in, out and move around.  Any suggestions / tips the community is willing to offer?

FYI – This “control” is not for commercial use and will be released to the community.  We will be happy to share the code.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>