我想用ILNumerics绘制一些3D表面.我注意到,如果我旋转它,ILCube不会保持表面的形状,这是因为它试图使立方体适合ILPanel.但是,如果我使用ILCamera,它会保持形状,但周围没有立方体.这是一个例子,
private void ilPanel1_Load(object sender,EventArgs e) { var scene = new ILScene(); ILArray<float> A = ILSpecialData.torus(0.75f,0.25f); var sf = new ILSurface(A); var pc = new ILPlotCube(); pc.TwoDMode = false; scene.Add(pc); pc.Add(sf); sf.Colormap = Colormaps.Jet; var cb = new ILColorbar(); cb.Location = new PointF(1,.1f); sf.Children.Add(cb); ilPanel1.Scene = scene; }
结果是
并为ILCamera
private void ilPanel1_Load(object sender,0.25f); var sf = new ILSurface(A); var cam = scene.Camera; cam.Add(sf); sf.Colormap = Colormaps.Jet; var cb = new ILColorbar(); cb.Location = new PointF(1,.1f); sf.Children.Add(cb); ilPanel1.Scene = scene; }
结果是
有没有办法让ILCube保持表面的形状?或者在表面周围添加一个立方体到ILCamera?谢谢.