I am busy reading 3D building models from a tool and thus generating a bunch of Line(p1, p2)
objects, each consisting of two Point(x, y, z)
objects. I would like to display these things in a simple 3D viewer, kind of like SVG (which, as I understand, only supports 2D).
The reading is done in Python, specifically IronPython. I could use either a .NET viewer library or write out a text/xml/whatnot file with the data to be displayed by manually opening the result in the appropriate program.
What format / tool would you use to view the data?
(At the moment, this is only for debugging purposes, so it doesn't have to be top-notch. Just a wire-frame will do!)
I did check the mathplot library, but that seems to only plot functions...
EDIT: I eventually did go the X3D route and wrote a little blog post on how to do it. Here is a sample X3D wireframe file for a 1x1x1 cube:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"
"http://www.web3d.org/specifications/x3d-3.0.dtd">
<X3D profile="Immersive" >
<Scene>
<Transform>
<Shape>
<LineSet vertexCount="5">
<Coordinate point="1 0 0
1 1 0
0 1 0
0 0 0
1 0 0"
/>
</LineSet>
</Shape>
<Shape>
<LineSet vertexCount="5">
<Coordinate point="1 0 1
1 1 1
0 1 1
0 0 1
1 0 1"
/>
</LineSet>
</Shape>
<Shape>
<LineSet vertexCount="5">
<Coordinate point="0 0 1
1 0 1
1 0 0
0 0 0
0 0 1"
/>
</LineSet>
</Shape>
<Shape>
<LineSet vertexCount="5">
<Coordinate point="0 1 1
1 1 1
1 1 0
0 1 0
0 1 1"
/>
</LineSet>
</Shape>
</Transform>
</Scene>
</X3D>