Regular Polyhedra in WPF

Cristian Merighi () 0.00

My first self-instruction project on Windows Presentation Foundation is about reusable 3D primitives.Tetrahedron, Octahedron, Hexaedron, Icosahedron and Dodecahedron instances - right in theme with my blog - can now be used either at runtime or referenced in XAML.
This article is obsolete. Some functionalities might not work anymore. Comments are disabled.

I had to get an inspiration to fix myself a goal for my WPF "Hello World"... well, my blog itself helped me:
regular polyhedra were the target!

I've been trying to build something reusable, a structure of classes to build something on top of.
There aren't primitives yet in the WPF world - starting from such a low level OOP technology sounds pretty strange - that's a fact, I looked at the SDK samples and got some tips and code picks to figure out how to hierarchically store the objects.

There's the result:

  • Tetrahedron (ModelVisual3D) primitive
  • Octahedron (ModelVisual3D) primitive
  • Hexahedron - Box in the general case - (ModelVisual3D) primitive
  • Icosahedron (ModelVisual3D) primitive
  • Dodecahedron (ModelVisual3D) primitive

The scene is a bit interactive: the solids are scrollable around the vertical axis using the left and the right mouse button.

The nodes of the solid figures have been retrieved using a self-developed tool which were useful as I developed the stub of my 3D Framework for Adobe Flash (can you see the tiny animation on top of the page?). This tool allows to export an .as/.cs class file from an .ASE (ASCII Scene Export) file.

Unfortunately, due to my ISP settings, I can't expose xbap files. But I provide the original project.

zip file « download code

Take care. Bye.




Cristian Merighi facebook twitter google+ youtube

Latest articles

Top rated


Where am I?


Cristian Merighi facebook twitter google+ youtube

I'm now reading