【问题标题】:Beginner ILNumerics Plotting Sphere example初学者 ILNumerics 绘图球体示例
【发布时间】:2013-06-23 10:41:43
【问题描述】:

未能遵循初学者示例:使用 ILNumerics 创建一个交互球体。我添加了 nuget 包作为参考,并将 ILPanel 从工具栏拖到我的表单中。

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using ILNumerics; 
using ILNumerics.Drawing; 
using ILNumerics.Drawing.Plotting; 

namespace WindowsFormsApplication1 {
    public partial class Form1 : Form {
        public Form1() {
            InitializeComponent();
        }

        private void ilPanel1_Load_1(object sender, EventArgs e) {
            var scene = new ILScene(); 
            scene.Add(new ILSphere()); 
            ilPanel1.Scene = scene; 

        }
    }
}

它显示一个球体。但球体始终是窗口的全尺寸。鼠标旋转也不起作用。我错过了什么?

【问题讨论】:

    标签: winforms 3d plot ilnumerics


    【解决方案1】:

    代替

    scene.Add(new ILSphere()); 
    

    您可以在场景中的标准相机下方添加球体:

    scene.Camera.Add(new ILSphere()); 
    

    这将为您提供所需的结果。相机创建自己的坐标系,在其子树中定位对象并为它们提供所有交互选项(旋转、缩放、平移等)

    【讨论】:

      猜你喜欢
      • 2013-07-14
      • 2012-11-17
      • 1970-01-01
      • 2016-07-19
      • 2012-04-10
      • 1970-01-01
      • 1970-01-01
      • 2013-09-19
      • 2016-02-14
      相关资源
      最近更新 更多