使用 Silverlight 2 实现模拟 3D 方法分析

Declan Brennan  研究的 3D 多面体模型是基于 Platonic and Archimedian polyhedra (柏拉图和阿基米德多面形)的模型。具体的模型信息你可以查看 这里 获得。

image

把平面模型放到 3D 坐标系中,之后再在 XAML 中使用一个数组来分别描述 3D 模型的各种状体和属性。

  image

Declan 在项目中引用了描述多面体的路径 .shp 和3维空间角度 .dihedrals 文件

之后用 init() 方法来绘制 3D 模型

    1: private void init(System.IO.Stream shapeStream, System.IO.Stream dihedralStream)
    2: {
    3:    using (System.IO.TextReader reader = new System.IO.StreamReader(shapeStream))
    4:       readConnectivity(reader);
    5:    if (dihedralStream != null)
    6:       _dihedrals = new DihedralCache(dihedralStream);
    7: }

 

示例源码,你可以点击下面下载: