I have been trying to render a complex set of points into a 3d visualization. I have a set of layers, each with a number of polygons, each polygon with a varying number of points.
I've toyed a great deal of .NET libraries (wrappers for OpenGL, DirectX, and others), and ultimately arrived at the super simple WPF 3D control with Helix Toolkit just to render a 3d point cloud visualization. My super simple code looks like this:
private void Render3D(List<Layer> layers) {
var layerIndex = 0;
var pts = new Point3DCollection();
foreach (var layer in layers) {
foreach (var shape in layer.Shapes) {
foreach (var point in shape.Points) {
pts.Add(new Point3D(point.Item1, point.Item2, layerIndex * .5));
}
}
layerIndex++;
}
var vis = new PointsVisual3D() { Points = pts };
_viewport.Children.Add(vis);
}
My XAML is as follows:
<Window xmlns:h="http://helix-toolkit.org/wpf">
<h:HelixViewport3D Name="_viewport">
<h:SunLight />
</h:HelixViewport3D>
</Window>
The result of this code, along with my arranged data is as follows:
This is great, and I was tremendously excited to actually see my data in 3D, but I would like to go further and start actually rendering solid shapes from my point data, sort of like this:
I'm using .NET and would appreciate sticking to this platform if possible, but I'm open to other ideas. Hopefully this is agnostic enough to get a pointed answer.