2014-06-09 17 views
1

我有三個二維數組,它們都具有相同的X和Y座標,但具有不同的值。這些陣列中的每一個都代表一定高度的房間溫度(例如,陣列1 = 10米,陣列2 = 5米,陣列3 = 3米)。如何將ILContourPlot添加到ILPlotCube中的自定義Z軸位置

我已經創建了一個ILPlotCube具有用於這些陣列,但所有這些三種不同ILContourPlots得到定位以立方體(0)的相同的Z軸點​​:結果的

this.scene = new ILScene(); 
ILPlotCube pc = new ILPlotCube(twoDMode: false); 

ILArray<float> TA = tempRoom.GetILArray("TA"); 
ILContourPlot cpa = new ILContourPlot(TA, create3D: false); 
ILArray<float> TB = tempRoom.GetILArray("TB"); 
ILContourPlot cpb = new ILContourPlot(TB, create3D: false); 
ILArray<float> TC = tempRoom.GetILArray("TC"); 
ILContourPlot cpc = new ILContourPlot(TC, create3D: false); 

pc.Add(cpa); 
pc.Add(cpb); 
pc.Add(cpc); 

scene.Add(pc); 

ilPanel1.Scene = this.scene; 
ilPanel1.Refresh(); 

圖片:http://i.stack.imgur.com/VNLgB.jpg

如何手動設置圖片中顯示的立方體的Z軸範圍,並手動設置每個ILContourPlot的Z軸位置而不會弄亂ILContourPlots中的輪廓?

回答

1

ILNumerics中的輪廓圖是常規場景圖形對象 - 就像evey其他圖。您可以使用常規組對象任意波形變換方式他們:

ILArray<float> A = ILMath.tosingle(ILSpecialData.terrain); 
ilPanel1.Scene.Add(new ILPlotCube(twoDMode: false) { 
    new ILGroup(translate: new Vector3(0,0,10)) { 
     new ILContourPlot(A["0:50;0:50"]) 
    }, 
    new ILGroup(translate: new Vector3(0,0,5)) { 
     new ILContourPlot(A["50:100;50:100"],lineWidth: 3) 
    }, 
    new ILGroup(translate: new Vector3(0,0,3)) { 
     new ILContourPlot(A["150:200;150:200"]) 
    } 
}); 

給出:

Contour Plots ILNumerics stacked

但是,如果你在2D設置中使用它,它很快被混淆。顯然,您必須使用線和輪廓級的配置選項來區分各個等高線圖。或者使用3D視圖。

+0

謝謝,這正是我想知道的! – skutzi

相關問題