I want to build some 3d surfaces using ILNumerics. I noticed that the ILCube does not preserve the shape of the surface if I rotate it, and that is because it is trying to put the cube in the ILPanel. However, if I use ILCamera, it will save the form, but there is no cube around it. Here is an example
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; }
and result

and for 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 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; }
and result

Is there a way to get the ILCube to maintain its shape? Or add a cube around the surface in ILCamera? Thanks.
c # plot numeric 3d ilnumerics
Ehsan
source share