Ejemplo n.º 1
0
        public void TestOffsets()
        {
            //Bounds
            Boundary bounds = new Boundary();
            bounds.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            bounds.Width = 10.0f;
            bounds.Height = 10.0f;
            bounds.Depth = 10.0f;

            NutrientField nf = new NutrientField();
            nf.InitialDistribution = InitialNutrientDistribution.DenselyCentredSphere;
            nf.InitialQuantity = 1.0f;
            nf.InitialRadius = 5.0f;
            nf.InitialPosition = new Vector3(0, 0, 0);
            nf.Resolution = 0.5f;
            nf.DiffusionRate = 0f;
            nf.InitField(bounds);
            nf.PrintCubes();
        }
Ejemplo n.º 2
0
        private void InitializeComponent()
        {
            spatialViewState = new SpatialViewState();

            this.OpenGLPanelXY = new OpenGLCellPlacementPanel(spatialViewState, Views.XY);
            this.OpenGLPanelXZ = new OpenGLCellPlacementPanel(spatialViewState, Views.XZ);
            this.OpenGLPanel3D = new OpenGLCellPlacementPanel(spatialViewState, Views.ThreeD);

            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState17 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary17 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.SpatialViewState spatialViewState5 = new MuCell.View.OpenGL.SpatialViewState();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState18 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary18 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState19 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary19 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState20 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary20 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState21 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary21 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.SpatialViewState spatialViewState6 = new MuCell.View.OpenGL.SpatialViewState();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState22 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary22 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState23 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary23 = new MuCell.Model.Boundary();
            MuCell.View.OpenGL.OpenGLPanelViewState openGLPanelViewState24 = new MuCell.View.OpenGL.OpenGLPanelViewState();
            MuCell.Model.Boundary boundary24 = new MuCell.Model.Boundary();
            this.label1 = new System.Windows.Forms.Label();
            this.label2 = new System.Windows.Forms.Label();
            this.label3 = new System.Windows.Forms.Label();
            this.tabPage2 = new System.Windows.Forms.TabPage();
            this.fieldPropertiesGroupBox = new System.Windows.Forms.GroupBox();
            this.viewNutrient = new System.Windows.Forms.Button();
            this.resolutionHelper = new System.Windows.Forms.TextBox();
            this.label6 = new System.Windows.Forms.Label();
            this.resolutoinNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.nutrientsDistributionRadiusNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.label15 = new System.Windows.Forms.Label();
            this.label14 = new System.Windows.Forms.Label();
            this.initialDistributionComboBox = new System.Windows.Forms.ComboBox();
            this.label11 = new System.Windows.Forms.Label();
            this.diffusionRateNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.label7 = new System.Windows.Forms.Label();
            this.initialQuantityNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.nutrientsGroupBox = new System.Windows.Forms.GroupBox();
            this.removeNutrientFieldButton = new System.Windows.Forms.Button();
            this.addNutrientFieldButton = new System.Windows.Forms.Button();
            this.nutrientFieldListBox = new System.Windows.Forms.ListBox();
            this.tabPage1 = new System.Windows.Forms.TabPage();
            this.groupBox3 = new System.Windows.Forms.GroupBox();
            this.cursorPositionLabel = new System.Windows.Forms.Label();
            this.label13 = new System.Windows.Forms.Label();
            this.RadiusNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.label12 = new System.Windows.Forms.Label();
            this.DistributionComboBox = new System.Windows.Forms.ComboBox();
            this.addCellsButton = new System.Windows.Forms.Button();
            this.CellTypeComboBox = new System.Windows.Forms.ComboBox();
            this.label5 = new System.Windows.Forms.Label();
            this.label4 = new System.Windows.Forms.Label();
            this.PopulationNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.groupBox2 = new System.Windows.Forms.GroupBox();
            this.cellCountLabel = new System.Windows.Forms.Label();
            this.removeButton = new System.Windows.Forms.Button();
            this.addGroupButton = new System.Windows.Forms.Button();
            this.groupListBox = new System.Windows.Forms.ListBox();
            this.tabPage3 = new System.Windows.Forms.TabPage();
            this.groupBox4 = new System.Windows.Forms.GroupBox();
            this.label18 = new System.Windows.Forms.Label();
            this.label16 = new System.Windows.Forms.Label();
            this.viscosityNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.collisionsCheckBox = new System.Windows.Forms.CheckBox();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.boundaryRadiusNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.label17 = new System.Windows.Forms.Label();
            this.boundaryDepthNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.boundaryHeightNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.boundaryWidthNumericUpDown = new System.Windows.Forms.NumericUpDown();
            this.label8 = new System.Windows.Forms.Label();
            this.sphereRadioButton = new System.Windows.Forms.RadioButton();
            this.cylinderRadioButton = new System.Windows.Forms.RadioButton();
            this.cuboidRadioButton = new System.Windows.Forms.RadioButton();
            this.label9 = new System.Windows.Forms.Label();
            this.label10 = new System.Windows.Forms.Label();
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
            this.openGLViewsTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
            this.tableLayoutPanel2 = new System.Windows.Forms.TableLayoutPanel();
            this.tabPage2.SuspendLayout();
            this.fieldPropertiesGroupBox.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.resolutoinNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.nutrientsDistributionRadiusNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.diffusionRateNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.initialQuantityNumericUpDown)).BeginInit();
            this.nutrientsGroupBox.SuspendLayout();
            this.tabPage1.SuspendLayout();
            this.groupBox3.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.PopulationNumericUpDown)).BeginInit();
            this.groupBox2.SuspendLayout();
            this.tabPage3.SuspendLayout();
            this.groupBox4.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.viscosityNumericUpDown)).BeginInit();
            this.groupBox1.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryRadiusNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryDepthNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryHeightNumericUpDown)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryWidthNumericUpDown)).BeginInit();
            this.tabControl1.SuspendLayout();
            this.tableLayoutPanel1.SuspendLayout();
            this.openGLViewsTableLayoutPanel.SuspendLayout();
            this.tableLayoutPanel2.SuspendLayout();
            this.SuspendLayout();
            //
            // OpenGLPanelXY
            //
            this.OpenGLPanelXY.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.OpenGLPanelXY.Dock = System.Windows.Forms.DockStyle.Fill;
            this.OpenGLPanelXY.Location = new System.Drawing.Point(3, 19);
            this.OpenGLPanelXY.Name = "OpenGLPanelXY";
            openGLPanelViewState17.Ang3D = 0F;
            openGLPanelViewState17.AngAboutY = 0F;
            openGLPanelViewState17.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState17.AnimationCounter = 0F;
            boundary17.Depth = 5F;
            boundary17.Height = 100F;
            boundary17.Radius = 0F;
            boundary17.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary17.Width = 100F;
            openGLPanelViewState17.CrossSection = boundary17;
            openGLPanelViewState17.CrossSectionEnabled = false;
            openGLPanelViewState17.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState17.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState17.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState17.ViewZoom = 1F;
            openGLPanelViewState17.ViewZoomLinear = 0F;
            this.OpenGLPanelXY.PanelViewState = openGLPanelViewState17;
            this.OpenGLPanelXY.Size = new System.Drawing.Size(228, 208);
            spatialViewState5.CrossHairOutOfBounds = false;
            spatialViewState5.CurrentSimState = null;
            spatialViewState5.InitialSimState = null;
            spatialViewState5.SelectedGroupIndex = -1;
            spatialViewState5.SelectedNutrientIndex = -1;
            spatialViewState5.SimParams = null;
            openGLPanelViewState18.Ang3D = 0F;
            openGLPanelViewState18.AngAboutY = 0F;
            openGLPanelViewState18.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState18.AnimationCounter = 0F;
            boundary18.Depth = 5F;
            boundary18.Height = 100F;
            boundary18.Radius = 0F;
            boundary18.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary18.Width = 100F;
            openGLPanelViewState18.CrossSection = boundary18;
            openGLPanelViewState18.CrossSectionEnabled = false;
            openGLPanelViewState18.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState18.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState18.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState18.ViewZoom = 1F;
            openGLPanelViewState18.ViewZoomLinear = 0F;
            spatialViewState5.ThreeD = openGLPanelViewState18;
            openGLPanelViewState19.Ang3D = 0F;
            openGLPanelViewState19.AngAboutY = 0F;
            openGLPanelViewState19.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState19.AnimationCounter = 0F;
            boundary19.Depth = 5F;
            boundary19.Height = 100F;
            boundary19.Radius = 0F;
            boundary19.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary19.Width = 100F;
            openGLPanelViewState19.CrossSection = boundary19;
            openGLPanelViewState19.CrossSectionEnabled = false;
            openGLPanelViewState19.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState19.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState19.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState19.ViewZoom = 1F;
            openGLPanelViewState19.ViewZoomLinear = 0F;
            spatialViewState5.ThreeDAnalyzer = openGLPanelViewState19;
            spatialViewState5.XY = openGLPanelViewState17;
            openGLPanelViewState20.Ang3D = 0F;
            openGLPanelViewState20.AngAboutY = 0F;
            openGLPanelViewState20.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState20.AnimationCounter = 0F;
            boundary20.Depth = 5F;
            boundary20.Height = 100F;
            boundary20.Radius = 0F;
            boundary20.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary20.Width = 100F;
            openGLPanelViewState20.CrossSection = boundary20;
            openGLPanelViewState20.CrossSectionEnabled = false;
            openGLPanelViewState20.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState20.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState20.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState20.ViewZoom = 1F;
            openGLPanelViewState20.ViewZoomLinear = 0F;
            spatialViewState5.XZ = openGLPanelViewState20;
            this.OpenGLPanelXY.SpatialViewState = spatialViewState5;
            this.OpenGLPanelXY.TabIndex = 7;
            this.OpenGLPanelXY.View = MuCell.View.OpenGL.Views.XY;
            this.OpenGLPanelXY.ChildMouseDownEvent += new System.Windows.Forms.MouseEventHandler(this.OpenGLPanelXY_ChildMouseDownEvent);
            this.OpenGLPanelXY.Resize += new System.EventHandler(this.OpenGLPanelXY_Resize);
            this.OpenGLPanelXY.ChildMouseUpEvent += new System.Windows.Forms.MouseEventHandler(this.OpenGLPanelXY_ChildMouseUpEvent);
            //
            // OpenGLPanelXZ
            //
            this.OpenGLPanelXZ.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.OpenGLPanelXZ.Dock = System.Windows.Forms.DockStyle.Fill;
            this.OpenGLPanelXZ.Location = new System.Drawing.Point(237, 19);
            this.OpenGLPanelXZ.Name = "OpenGLPanelXZ";
            openGLPanelViewState21.Ang3D = 0F;
            openGLPanelViewState21.AngAboutY = 0F;
            openGLPanelViewState21.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState21.AnimationCounter = 0F;
            boundary21.Depth = 5F;
            boundary21.Height = 100F;
            boundary21.Radius = 0F;
            boundary21.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary21.Width = 100F;
            openGLPanelViewState21.CrossSection = boundary21;
            openGLPanelViewState21.CrossSectionEnabled = false;
            openGLPanelViewState21.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState21.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState21.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState21.ViewZoom = 1F;
            openGLPanelViewState21.ViewZoomLinear = 0F;
            this.OpenGLPanelXZ.PanelViewState = openGLPanelViewState21;
            this.OpenGLPanelXZ.Size = new System.Drawing.Size(228, 208);
            spatialViewState6.CrossHairOutOfBounds = false;
            spatialViewState6.CurrentSimState = null;
            spatialViewState6.InitialSimState = null;
            spatialViewState6.SelectedGroupIndex = -1;
            spatialViewState6.SelectedNutrientIndex = -1;
            spatialViewState6.SimParams = null;
            openGLPanelViewState22.Ang3D = 0F;
            openGLPanelViewState22.AngAboutY = 0F;
            openGLPanelViewState22.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState22.AnimationCounter = 0F;
            boundary22.Depth = 5F;
            boundary22.Height = 100F;
            boundary22.Radius = 0F;
            boundary22.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary22.Width = 100F;
            openGLPanelViewState22.CrossSection = boundary22;
            openGLPanelViewState22.CrossSectionEnabled = false;
            openGLPanelViewState22.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState22.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState22.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState22.ViewZoom = 1F;
            openGLPanelViewState22.ViewZoomLinear = 0F;
            spatialViewState6.ThreeD = openGLPanelViewState22;
            openGLPanelViewState23.Ang3D = 0F;
            openGLPanelViewState23.AngAboutY = 0F;
            openGLPanelViewState23.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState23.AnimationCounter = 0F;
            boundary23.Depth = 5F;
            boundary23.Height = 100F;
            boundary23.Radius = 0F;
            boundary23.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary23.Width = 100F;
            openGLPanelViewState23.CrossSection = boundary23;
            openGLPanelViewState23.CrossSectionEnabled = false;
            openGLPanelViewState23.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState23.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState23.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState23.ViewZoom = 1F;
            openGLPanelViewState23.ViewZoomLinear = 0F;
            spatialViewState6.ThreeDAnalyzer = openGLPanelViewState23;
            openGLPanelViewState24.Ang3D = 0F;
            openGLPanelViewState24.AngAboutY = 0F;
            openGLPanelViewState24.Animation = MuCell.View.OpenGL.AnimationState.None;
            openGLPanelViewState24.AnimationCounter = 0F;
            boundary24.Depth = 5F;
            boundary24.Height = 100F;
            boundary24.Radius = 0F;
            boundary24.Shape = MuCell.Model.BoundaryShapes.Cuboid;
            boundary24.Width = 100F;
            openGLPanelViewState24.CrossSection = boundary24;
            openGLPanelViewState24.CrossSectionEnabled = false;
            openGLPanelViewState24.CrossSectionFacing = MuCell.View.OpenGL.CrossSectionFacingDirection.Front;
            openGLPanelViewState24.CurrentCameraPos = MuCell.View.OpenGL.CameraPosition.Corner;
            openGLPanelViewState24.NextCameraPos = MuCell.View.OpenGL.CameraPosition.Front;
            openGLPanelViewState24.ViewZoom = 1F;
            openGLPanelViewState24.ViewZoomLinear = 0F;
            spatialViewState6.XY = openGLPanelViewState24;
            spatialViewState6.XZ = openGLPanelViewState21;
            this.OpenGLPanelXZ.SpatialViewState = spatialViewState6;
            this.OpenGLPanelXZ.TabIndex = 8;
            this.OpenGLPanelXZ.View = MuCell.View.OpenGL.Views.XZ;
            this.OpenGLPanelXZ.ChildMouseDownEvent += new System.Windows.Forms.MouseEventHandler(this.OpenGLPanelXZ_ChildMouseDownEvent);
            this.OpenGLPanelXZ.Resize += new System.EventHandler(this.OpenGLPanelXZ_Resize);
            this.OpenGLPanelXZ.ChildMouseUpEvent += new System.Windows.Forms.MouseEventHandler(this.OpenGLPanelXZ_ChildMouseUpEvent);
            //
            // OpenGLPanel3D
            //
            this.OpenGLPanel3D.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.OpenGLPanel3D.Dock = System.Windows.Forms.DockStyle.Fill;
            this.OpenGLPanel3D.Location = new System.Drawing.Point(471, 19);
            this.OpenGLPanel3D.Name = "OpenGLPanel3D";
            this.OpenGLPanel3D.Size = new System.Drawing.Size(228, 208);
            this.OpenGLPanel3D.TabIndex = 9;
            this.OpenGLPanel3D.View = MuCell.View.OpenGL.Views.ThreeD;
            this.OpenGLPanel3D.Resize += new System.EventHandler(this.OpenGLPanel3D_Resize);
            //
            // label1
            //
            this.label1.AutoSize = true;
            this.label1.Location = new System.Drawing.Point(3, 0);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(54, 13);
            this.label1.TabIndex = 1;
            this.label1.Text = "Side (X-Y)";
            //
            // label2
            //
            this.label2.AutoSize = true;
            this.label2.Location = new System.Drawing.Point(471, 0);
            this.label2.Name = "label2";
            this.label2.Size = new System.Drawing.Size(46, 13);
            this.label2.TabIndex = 4;
            this.label2.Text = "3D view";
            //
            // label3
            //
            this.label3.AutoSize = true;
            this.label3.Location = new System.Drawing.Point(237, 0);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(84, 13);
            this.label3.TabIndex = 5;
            this.label3.Text = "Top-down  (X-Z)";
            //
            // tabPage2
            //
            this.tabPage2.Controls.Add(this.fieldPropertiesGroupBox);
            this.tabPage2.Controls.Add(this.nutrientsGroupBox);
            this.tabPage2.Location = new System.Drawing.Point(4, 22);
            this.tabPage2.Name = "tabPage2";
            this.tabPage2.Padding = new System.Windows.Forms.Padding(3);
            this.tabPage2.Size = new System.Drawing.Size(686, 171);
            this.tabPage2.TabIndex = 1;
            this.tabPage2.Text = "Setup Concentration Fields";
            this.tabPage2.UseVisualStyleBackColor = true;
            //
            // fieldPropertiesGroupBox
            //
            this.fieldPropertiesGroupBox.Controls.Add(this.viewNutrient);
            this.fieldPropertiesGroupBox.Controls.Add(this.resolutionHelper);
            this.fieldPropertiesGroupBox.Controls.Add(this.label6);
            this.fieldPropertiesGroupBox.Controls.Add(this.resolutoinNumericUpDown);
            this.fieldPropertiesGroupBox.Controls.Add(this.nutrientsDistributionRadiusNumericUpDown);
            this.fieldPropertiesGroupBox.Controls.Add(this.label15);
            this.fieldPropertiesGroupBox.Controls.Add(this.label14);
            this.fieldPropertiesGroupBox.Controls.Add(this.initialDistributionComboBox);
            this.fieldPropertiesGroupBox.Controls.Add(this.label11);
            this.fieldPropertiesGroupBox.Controls.Add(this.diffusionRateNumericUpDown);
            this.fieldPropertiesGroupBox.Controls.Add(this.label7);
            this.fieldPropertiesGroupBox.Controls.Add(this.initialQuantityNumericUpDown);
            this.fieldPropertiesGroupBox.Location = new System.Drawing.Point(205, 6);
            this.fieldPropertiesGroupBox.Name = "fieldPropertiesGroupBox";
            this.fieldPropertiesGroupBox.Size = new System.Drawing.Size(450, 162);
            this.fieldPropertiesGroupBox.TabIndex = 28;
            this.fieldPropertiesGroupBox.TabStop = false;
            this.fieldPropertiesGroupBox.Text = "Concentration Field Properties";
            //
            // viewNutrient
            //
            this.viewNutrient.Location = new System.Drawing.Point(344, 11);
            this.viewNutrient.Name = "viewNutrient";
            this.viewNutrient.Size = new System.Drawing.Size(43, 25);
            this.viewNutrient.TabIndex = 25;
            this.viewNutrient.Text = "View";
            this.viewNutrient.UseVisualStyleBackColor = true;
            this.viewNutrient.Click += new System.EventHandler(this.viewNutrient_Click);
            //
            // resolutionHelper
            //
            this.resolutionHelper.BackColor = System.Drawing.Color.White;
            this.resolutionHelper.BorderStyle = System.Windows.Forms.BorderStyle.None;
            this.resolutionHelper.Location = new System.Drawing.Point(10, 94);
            this.resolutionHelper.Margin = new System.Windows.Forms.Padding(6);
            this.resolutionHelper.Multiline = true;
            this.resolutionHelper.Name = "resolutionHelper";
            this.resolutionHelper.ReadOnly = true;
            this.resolutionHelper.Size = new System.Drawing.Size(358, 61);
            this.resolutionHelper.TabIndex = 41;
            this.resolutionHelper.Text = "Resolution helper\r\n";
            //
            // label6
            //
            this.label6.AutoSize = true;
            this.label6.Location = new System.Drawing.Point(240, 68);
            this.label6.Name = "label6";
            this.label6.Size = new System.Drawing.Size(85, 13);
            this.label6.TabIndex = 40;
            this.label6.Text = "Field Resolution:";
            //
            // resolutoinNumericUpDown
            //
            this.resolutoinNumericUpDown.DecimalPlaces = 3;
            this.resolutoinNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.resolutoinNumericUpDown.Location = new System.Drawing.Point(344, 66);
            this.resolutoinNumericUpDown.Maximum = new decimal(new int[] {
            8,
            0,
            0,
            0});
            this.resolutoinNumericUpDown.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.resolutoinNumericUpDown.Name = "resolutoinNumericUpDown";
            this.resolutoinNumericUpDown.Size = new System.Drawing.Size(54, 20);
            this.resolutoinNumericUpDown.TabIndex = 39;
            this.resolutoinNumericUpDown.Value = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.resolutoinNumericUpDown.ValueChanged += new System.EventHandler(this.resolutoinNumericUpDown_ValueChanged);
            //
            // nutrientsDistributionRadiusNumericUpDown
            //
            this.nutrientsDistributionRadiusNumericUpDown.DecimalPlaces = 2;
            this.nutrientsDistributionRadiusNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            65536});
            this.nutrientsDistributionRadiusNumericUpDown.Location = new System.Drawing.Point(344, 40);
            this.nutrientsDistributionRadiusNumericUpDown.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.nutrientsDistributionRadiusNumericUpDown.Name = "nutrientsDistributionRadiusNumericUpDown";
            this.nutrientsDistributionRadiusNumericUpDown.Size = new System.Drawing.Size(54, 20);
            this.nutrientsDistributionRadiusNumericUpDown.TabIndex = 37;
            this.nutrientsDistributionRadiusNumericUpDown.Value = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.nutrientsDistributionRadiusNumericUpDown.ValueChanged += new System.EventHandler(this.nutrientsDistributionRadiusNumericUpDown_ValueChanged);
            //
            // label15
            //
            this.label15.AutoSize = true;
            this.label15.Location = new System.Drawing.Point(205, 42);
            this.label15.Name = "label15";
            this.label15.Size = new System.Drawing.Size(180, 13);
            this.label15.TabIndex = 36;
            this.label15.Text = "Distribution Radius (mm):";
            //
            // label14
            //
            this.label14.AutoSize = true;
            this.label14.Location = new System.Drawing.Point(12, 17);
            this.label14.Name = "label14";
            this.label14.Size = new System.Drawing.Size(100, 13);
            this.label14.TabIndex = 35;
            this.label14.Text = "Initial Distribution:";
            //
            // initialDistributionComboBox
            //
            this.initialDistributionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.initialDistributionComboBox.Location = new System.Drawing.Point(135, 14);
            this.initialDistributionComboBox.Name = "initialDistributionComboBox";
            this.initialDistributionComboBox.Size = new System.Drawing.Size(201, 21);
            this.initialDistributionComboBox.TabIndex = 38;
            this.initialDistributionComboBox.SelectedIndexChanged += new System.EventHandler(this.initialDistributionComboBox_SelectedIndexChanged);
            this.initialDistributionComboBox.SelectedValueChanged += new System.EventHandler(this.initialDistributionComboBox_SelectedValueChanged);
            //
            // label11
            //
            this.label11.AutoSize = true;
            this.label11.Location = new System.Drawing.Point(37, 68);
            this.label11.Name = "label11";
            this.label11.Size = new System.Drawing.Size(77, 13);
            this.label11.TabIndex = 32;
            this.label11.Text = "Diffusion Rate:";
            //
            // diffusionRateNumericUpDown
            //
            this.diffusionRateNumericUpDown.DecimalPlaces = 3;
            this.diffusionRateNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            65536});
            this.diffusionRateNumericUpDown.Location = new System.Drawing.Point(135, 66);
            this.diffusionRateNumericUpDown.Maximum = new decimal(new int[] {
            50,
            0,
            0,
            0});
            this.diffusionRateNumericUpDown.Name = "diffusionRateNumericUpDown";
            this.diffusionRateNumericUpDown.Size = new System.Drawing.Size(64, 20);
            this.diffusionRateNumericUpDown.TabIndex = 31;
            this.diffusionRateNumericUpDown.ValueChanged += new System.EventHandler(this.diffusionRateNumericUpDown_ValueChanged);
            //
            // label7
            //
            this.label7.AutoSize = true;
            this.label7.Location = new System.Drawing.Point(8, 42);
            this.label7.Name = "label7";
            this.label7.Size = new System.Drawing.Size(140, 13);
            this.label7.TabIndex = 30;
            this.label7.Text = "Quantity (moles E-6):";
            //
            // initialQuantityNumericUpDown
            //
            this.initialQuantityNumericUpDown.DecimalPlaces = 3;
            this.initialQuantityNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.initialQuantityNumericUpDown.Location = new System.Drawing.Point(135, 40);
            this.initialQuantityNumericUpDown.Minimum = new decimal(new int[] {
            0,
            0,
            0,
            131072});
            this.initialQuantityNumericUpDown.Name = "initialQuantityNumericUpDown";
            this.initialQuantityNumericUpDown.Size = new System.Drawing.Size(64, 20);
            this.initialQuantityNumericUpDown.TabIndex = 29;
            this.initialQuantityNumericUpDown.Value = new decimal(new int[] {
            1,
            0,
            0,
            131072});
            this.initialQuantityNumericUpDown.ValueChanged += new System.EventHandler(this.initialQuantityNumericUpDown_ValueChanged);
            //
            // nutrientsGroupBox
            //
            this.nutrientsGroupBox.Controls.Add(this.removeNutrientFieldButton);
            this.nutrientsGroupBox.Controls.Add(this.addNutrientFieldButton);
            this.nutrientsGroupBox.Controls.Add(this.nutrientFieldListBox);
            this.nutrientsGroupBox.Location = new System.Drawing.Point(6, 6);
            this.nutrientsGroupBox.Name = "nutrientsGroupBox";
            this.nutrientsGroupBox.Size = new System.Drawing.Size(193, 162);
            this.nutrientsGroupBox.TabIndex = 26;
            this.nutrientsGroupBox.TabStop = false;
            this.nutrientsGroupBox.Text = "Nutrient Fields";
            //
            // removeNutrientFieldButton
            //
            this.removeNutrientFieldButton.Location = new System.Drawing.Point(122, 113);
            this.removeNutrientFieldButton.Name = "removeNutrientFieldButton";
            this.removeNutrientFieldButton.Size = new System.Drawing.Size(61, 27);
            this.removeNutrientFieldButton.TabIndex = 24;
            this.removeNutrientFieldButton.Text = "Remove";
            this.removeNutrientFieldButton.UseVisualStyleBackColor = true;
            this.removeNutrientFieldButton.Click += new System.EventHandler(this.removeNutrientFieldButton_Click);
            //
            // addNutrientFieldButton
            //
            this.addNutrientFieldButton.Location = new System.Drawing.Point(122, 80);
            this.addNutrientFieldButton.Name = "addNutrientFieldButton";
            this.addNutrientFieldButton.Size = new System.Drawing.Size(61, 27);
            this.addNutrientFieldButton.TabIndex = 23;
            this.addNutrientFieldButton.Text = "Add";
            this.addNutrientFieldButton.UseVisualStyleBackColor = true;
            this.addNutrientFieldButton.Click += new System.EventHandler(this.addNutrientFieldButton_Click);
            //
            // nutrientFieldListBox
            //
            this.nutrientFieldListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.nutrientFieldListBox.FormattingEnabled = true;
            this.nutrientFieldListBox.Location = new System.Drawing.Point(6, 19);
            this.nutrientFieldListBox.Name = "nutrientFieldListBox";
            this.nutrientFieldListBox.Size = new System.Drawing.Size(110, 121);
            this.nutrientFieldListBox.TabIndex = 20;
            this.nutrientFieldListBox.MouseUp += new System.Windows.Forms.MouseEventHandler(this.nutrientFieldListBox_MouseUp);
            this.nutrientFieldListBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.nutrientFieldListBox_MouseDoubleClick);
            this.nutrientFieldListBox.SelectedValueChanged += new System.EventHandler(this.nutrientFieldListBox_SelectedValueChanged);
            //
            // tabPage1
            //
            this.tabPage1.Controls.Add(this.groupBox3);
            this.tabPage1.Controls.Add(this.groupBox2);
            this.tabPage1.Font = new System.Drawing.Font("Microsoft Sans Serif", 8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.tabPage1.Location = new System.Drawing.Point(4, 22);
            this.tabPage1.Name = "tabPage1";
            this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
            this.tabPage1.Size = new System.Drawing.Size(686, 171);
            this.tabPage1.TabIndex = 0;
            this.tabPage1.Text = "Setup Cells";
            this.tabPage1.UseVisualStyleBackColor = true;
            //
            // groupBox3
            //
            this.groupBox3.Controls.Add(this.cursorPositionLabel);
            this.groupBox3.Controls.Add(this.label13);
            this.groupBox3.Controls.Add(this.RadiusNumericUpDown);
            this.groupBox3.Controls.Add(this.label12);
            this.groupBox3.Controls.Add(this.DistributionComboBox);
            this.groupBox3.Controls.Add(this.addCellsButton);
            this.groupBox3.Controls.Add(this.CellTypeComboBox);
            this.groupBox3.Controls.Add(this.label5);
            this.groupBox3.Controls.Add(this.label4);
            this.groupBox3.Controls.Add(this.PopulationNumericUpDown);
            this.groupBox3.Location = new System.Drawing.Point(205, 6);
            this.groupBox3.Name = "groupBox3";
            this.groupBox3.Size = new System.Drawing.Size(376, 162);
            this.groupBox3.TabIndex = 26;
            this.groupBox3.TabStop = false;
            this.groupBox3.Text = "Cluster generation";
            //
            // cursorPositionLabel
            //
            this.cursorPositionLabel.AutoSize = true;
            this.cursorPositionLabel.BackColor = System.Drawing.Color.Gainsboro;
            this.cursorPositionLabel.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
            this.cursorPositionLabel.ForeColor = System.Drawing.SystemColors.HotTrack;
            this.cursorPositionLabel.Location = new System.Drawing.Point(6, 127);
            this.cursorPositionLabel.Name = "cursorPositionLabel";
            this.cursorPositionLabel.Size = new System.Drawing.Size(167, 13);
            this.cursorPositionLabel.TabIndex = 0;
            this.cursorPositionLabel.Text = "    Crosshair : (0.00, 0.00, 0.00)     ";
            //
            // label13
            //
            this.label13.AutoSize = true;
            this.label13.Location = new System.Drawing.Point(4, 101);
            this.label13.Name = "label13";
            this.label13.Size = new System.Drawing.Size(68, 13);
            this.label13.TabIndex = 16;
            this.label13.Text = "Radius (mm):";
            //
            // RadiusNumericUpDown
            //
            this.RadiusNumericUpDown.DecimalPlaces = 2;
            this.RadiusNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            65536});
            this.RadiusNumericUpDown.Location = new System.Drawing.Point(83, 99);
            this.RadiusNumericUpDown.Maximum = new decimal(new int[] {
            10000,
            0,
            0,
            0});
            this.RadiusNumericUpDown.Name = "RadiusNumericUpDown";
            this.RadiusNumericUpDown.Size = new System.Drawing.Size(64, 20);
            this.RadiusNumericUpDown.TabIndex = 15;
            this.RadiusNumericUpDown.Value = new decimal(new int[] {
            700,
            0,
            0,
            65536});
            //
            // label12
            //
            this.label12.AutoSize = true;
            this.label12.Location = new System.Drawing.Point(15, 51);
            this.label12.Name = "label12";
            this.label12.Size = new System.Drawing.Size(62, 13);
            this.label12.TabIndex = 10;
            this.label12.Text = "Distribution:";
            //
            // DistributionComboBox
            //
            this.DistributionComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.DistributionComboBox.FormattingEnabled = true;
            this.DistributionComboBox.Location = new System.Drawing.Point(83, 47);
            this.DistributionComboBox.Name = "DistributionComboBox";
            this.DistributionComboBox.Size = new System.Drawing.Size(120, 21);
            this.DistributionComboBox.TabIndex = 9;
            //
            // addCellsButton
            //
            this.addCellsButton.Location = new System.Drawing.Point(233, 22);
            this.addCellsButton.Name = "addCellsButton";
            this.addCellsButton.Size = new System.Drawing.Size(101, 23);
            this.addCellsButton.TabIndex = 5;
            this.addCellsButton.Text = "Add cells";
            this.addCellsButton.UseVisualStyleBackColor = true;
            this.addCellsButton.Click += new System.EventHandler(this.addCellsButton_Click);
            //
            // CellTypeComboBox
            //
            this.CellTypeComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.CellTypeComboBox.FormattingEnabled = true;
            this.CellTypeComboBox.Location = new System.Drawing.Point(83, 19);
            this.CellTypeComboBox.Name = "CellTypeComboBox";
            this.CellTypeComboBox.Size = new System.Drawing.Size(120, 21);
            this.CellTypeComboBox.TabIndex = 3;
            //
            // label5
            //
            this.label5.AutoSize = true;
            this.label5.Location = new System.Drawing.Point(34, 76);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(38, 13);
            this.label5.TabIndex = 2;
            this.label5.Text = "Count:";
            //
            // label4
            //
            this.label4.AutoSize = true;
            this.label4.Location = new System.Drawing.Point(23, 22);
            this.label4.Name = "label4";
            this.label4.Size = new System.Drawing.Size(54, 13);
            this.label4.TabIndex = 1;
            this.label4.Text = "Cell Type:";
            //
            // PopulationNumericUpDown
            //
            this.PopulationNumericUpDown.Location = new System.Drawing.Point(83, 74);
            this.PopulationNumericUpDown.Maximum = new decimal(new int[] {
            10000,
            0,
            0,
            0});
            this.PopulationNumericUpDown.Minimum = new decimal(new int[] {
            1,
            0,
            0,
            0});
            this.PopulationNumericUpDown.Name = "PopulationNumericUpDown";
            this.PopulationNumericUpDown.Size = new System.Drawing.Size(64, 20);
            this.PopulationNumericUpDown.TabIndex = 0;
            this.PopulationNumericUpDown.Value = new decimal(new int[] {
            100,
            0,
            0,
            0});
            //
            // groupBox2
            //
            this.groupBox2.Controls.Add(this.cellCountLabel);
            this.groupBox2.Controls.Add(this.removeButton);
            this.groupBox2.Controls.Add(this.addGroupButton);
            this.groupBox2.Controls.Add(this.groupListBox);
            this.groupBox2.Location = new System.Drawing.Point(6, 6);
            this.groupBox2.Name = "groupBox2";
            this.groupBox2.Size = new System.Drawing.Size(193, 162);
            this.groupBox2.TabIndex = 25;
            this.groupBox2.TabStop = false;
            this.groupBox2.Text = "Cell Groups";
            //
            // cellCountLabel
            //
            this.cellCountLabel.AutoSize = true;
            this.cellCountLabel.ForeColor = System.Drawing.SystemColors.ControlDarkDark;
            this.cellCountLabel.Location = new System.Drawing.Point(6, 146);
            this.cellCountLabel.Name = "cellCountLabel";
            this.cellCountLabel.Size = new System.Drawing.Size(58, 13);
            this.cellCountLabel.TabIndex = 25;
            this.cellCountLabel.Text = "Cell Count:";
            //
            // removeButton
            //
            this.removeButton.Location = new System.Drawing.Point(122, 113);
            this.removeButton.Name = "removeButton";
            this.removeButton.Size = new System.Drawing.Size(61, 27);
            this.removeButton.TabIndex = 24;
            this.removeButton.Text = "Remove";
            this.removeButton.UseVisualStyleBackColor = true;
            this.removeButton.Click += new System.EventHandler(this.removeButton_Click);
            //
            // addGroupButton
            //
            this.addGroupButton.Location = new System.Drawing.Point(122, 80);
            this.addGroupButton.Name = "addGroupButton";
            this.addGroupButton.Size = new System.Drawing.Size(61, 27);
            this.addGroupButton.TabIndex = 23;
            this.addGroupButton.Text = "Add";
            this.addGroupButton.UseVisualStyleBackColor = true;
            this.addGroupButton.Click += new System.EventHandler(this.addGroupButton_Click);
            //
            // groupListBox
            //
            this.groupListBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                        | System.Windows.Forms.AnchorStyles.Left)));
            this.groupListBox.FormattingEnabled = true;
            this.groupListBox.Location = new System.Drawing.Point(6, 19);
            this.groupListBox.Name = "groupListBox";
            this.groupListBox.Size = new System.Drawing.Size(110, 121);
            this.groupListBox.TabIndex = 20;
            this.groupListBox.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.groupListBox_MouseDoubleClick);
            this.groupListBox.SelectedValueChanged += new System.EventHandler(this.groupListBox_SelectedValueChanged);
            //
            // tabPage3
            //
            this.tabPage3.Controls.Add(this.groupBox4);
            this.tabPage3.Controls.Add(this.groupBox1);
            this.tabPage3.Location = new System.Drawing.Point(4, 22);
            this.tabPage3.Name = "tabPage3";
            this.tabPage3.Size = new System.Drawing.Size(686, 171);
            this.tabPage3.TabIndex = 2;
            this.tabPage3.Text = "Spatial settings";
            this.tabPage3.UseVisualStyleBackColor = true;
            //
            // groupBox4
            //
            this.groupBox4.Controls.Add(this.label18);
            this.groupBox4.Controls.Add(this.label16);
            this.groupBox4.Controls.Add(this.viscosityNumericUpDown);
            this.groupBox4.Controls.Add(this.collisionsCheckBox);
            this.groupBox4.Location = new System.Drawing.Point(503, 6);
            this.groupBox4.Name = "groupBox4";
            this.groupBox4.Size = new System.Drawing.Size(168, 161);
            this.groupBox4.TabIndex = 13;
            this.groupBox4.TabStop = false;
            this.groupBox4.Text = "Environment Settings";
            //
            // label18
            //
            this.label18.AutoSize = true;
            this.label18.Location = new System.Drawing.Point(4, 73);
            this.label18.Name = "label18";
            this.label18.Size = new System.Drawing.Size(73, 13);
            this.label18.TabIndex = 3;
            this.label18.Text = "Cell Collisions:";
            //
            // label16
            //
            this.label16.AutoSize = true;
            this.label16.Location = new System.Drawing.Point(26, 44);
            this.label16.Name = "label16";
            this.label16.Size = new System.Drawing.Size(51, 13);
            this.label16.TabIndex = 2;
            this.label16.Text = "Viscosity:";
            //
            // viscosityNumericUpDown
            //
            this.viscosityNumericUpDown.DecimalPlaces = 3;
            this.viscosityNumericUpDown.Increment = new decimal(new int[] {
            1,
            0,
            0,
            65536});
            this.viscosityNumericUpDown.Location = new System.Drawing.Point(83, 42);
            this.viscosityNumericUpDown.Name = "viscosityNumericUpDown";
            this.viscosityNumericUpDown.Size = new System.Drawing.Size(75, 20);
            this.viscosityNumericUpDown.TabIndex = 1;
            this.viscosityNumericUpDown.ValueChanged += new System.EventHandler(this.viscosityNumericUpDown_ValueChanged);
            //
            // collisionsCheckBox
            //
            this.collisionsCheckBox.AutoSize = true;
            this.collisionsCheckBox.Location = new System.Drawing.Point(83, 71);
            this.collisionsCheckBox.Name = "collisionsCheckBox";
            this.collisionsCheckBox.Size = new System.Drawing.Size(65, 17);
            this.collisionsCheckBox.TabIndex = 0;
            this.collisionsCheckBox.Text = "Enabled";
            this.collisionsCheckBox.UseVisualStyleBackColor = true;
            this.collisionsCheckBox.CheckedChanged += new System.EventHandler(this.collisionsCheckBox_CheckedChanged);
            //
            // groupBox1
            //
            this.groupBox1.Controls.Add(this.boundaryRadiusNumericUpDown);
            this.groupBox1.Controls.Add(this.label17);
            this.groupBox1.Controls.Add(this.boundaryDepthNumericUpDown);
            this.groupBox1.Controls.Add(this.boundaryHeightNumericUpDown);
            this.groupBox1.Controls.Add(this.boundaryWidthNumericUpDown);
            this.groupBox1.Controls.Add(this.label8);
            this.groupBox1.Controls.Add(this.sphereRadioButton);
            this.groupBox1.Controls.Add(this.cylinderRadioButton);
            this.groupBox1.Controls.Add(this.cuboidRadioButton);
            this.groupBox1.Controls.Add(this.label9);
            this.groupBox1.Controls.Add(this.label10);
            this.groupBox1.Location = new System.Drawing.Point(3, 6);
            this.groupBox1.Name = "groupBox1";
            this.groupBox1.Size = new System.Drawing.Size(489, 162);
            this.groupBox1.TabIndex = 12;
            this.groupBox1.TabStop = false;
            this.groupBox1.Text = "Boundary shape";
            //
            // boundaryRadiusNumericUpDown
            //
            this.boundaryRadiusNumericUpDown.Location = new System.Drawing.Point(380, 42);
            this.boundaryRadiusNumericUpDown.Maximum = new decimal(new int[] {
            1000,
            0,
            0,
            0});
            this.boundaryRadiusNumericUpDown.Name = "boundaryRadiusNumericUpDown";
            this.boundaryRadiusNumericUpDown.Size = new System.Drawing.Size(86, 20);
            this.boundaryRadiusNumericUpDown.TabIndex = 12;
            this.boundaryRadiusNumericUpDown.ValueChanged += new System.EventHandler(this.boundaryRadiusNumericUpDown_ValueChanged);
            //
            // label17
            //
            this.label17.AutoSize = true;
            this.label17.Location = new System.Drawing.Point(306, 44);
            this.label17.Name = "label17";
            this.label17.Size = new System.Drawing.Size(68, 13);
            this.label17.TabIndex = 11;
            this.label17.Text = "Radius (mm):";
            //
            // boundaryDepthNumericUpDown
            //
            this.boundaryDepthNumericUpDown.Location = new System.Drawing.Point(199, 101);
            this.boundaryDepthNumericUpDown.Maximum = new decimal(new int[] {
            1000,
            0,
            0,
            0});
            this.boundaryDepthNumericUpDown.Name = "boundaryDepthNumericUpDown";
            this.boundaryDepthNumericUpDown.Size = new System.Drawing.Size(86, 20);
            this.boundaryDepthNumericUpDown.TabIndex = 10;
            this.boundaryDepthNumericUpDown.ValueChanged += new System.EventHandler(this.boundaryDepthNumericUpDown_ValueChanged);
            //
            // boundaryHeightNumericUpDown
            //
            this.boundaryHeightNumericUpDown.Location = new System.Drawing.Point(199, 71);
            this.boundaryHeightNumericUpDown.Maximum = new decimal(new int[] {
            1000,
            0,
            0,
            0});
            this.boundaryHeightNumericUpDown.Name = "boundaryHeightNumericUpDown";
            this.boundaryHeightNumericUpDown.Size = new System.Drawing.Size(86, 20);
            this.boundaryHeightNumericUpDown.TabIndex = 9;
            this.boundaryHeightNumericUpDown.ValueChanged += new System.EventHandler(this.boundaryHeightNumericUpDown_ValueChanged);
            //
            // boundaryWidthNumericUpDown
            //
            this.boundaryWidthNumericUpDown.Location = new System.Drawing.Point(199, 40);
            this.boundaryWidthNumericUpDown.Maximum = new decimal(new int[] {
            1000,
            0,
            0,
            0});
            this.boundaryWidthNumericUpDown.Name = "boundaryWidthNumericUpDown";
            this.boundaryWidthNumericUpDown.Size = new System.Drawing.Size(86, 20);
            this.boundaryWidthNumericUpDown.TabIndex = 8;
            this.boundaryWidthNumericUpDown.ValueChanged += new System.EventHandler(this.boundaryWidthNumericUpDown_ValueChanged);
            //
            // label8
            //
            this.label8.AutoSize = true;
            this.label8.Location = new System.Drawing.Point(119, 105);
            this.label8.Name = "label8";
            this.label8.Size = new System.Drawing.Size(74, 13);
            this.label8.TabIndex = 7;
            this.label8.Text = "Depth Z (mm):";
            //
            // sphereRadioButton
            //
            this.sphereRadioButton.AutoSize = true;
            this.sphereRadioButton.Location = new System.Drawing.Point(25, 103);
            this.sphereRadioButton.Name = "sphereRadioButton";
            this.sphereRadioButton.Size = new System.Drawing.Size(59, 17);
            this.sphereRadioButton.TabIndex = 2;
            this.sphereRadioButton.TabStop = true;
            this.sphereRadioButton.Text = "Sphere";
            this.sphereRadioButton.UseVisualStyleBackColor = true;
            this.sphereRadioButton.CheckedChanged += new System.EventHandler(this.sphereRadioButton_CheckedChanged);
            //
            // cylinderRadioButton
            //
            this.cylinderRadioButton.AutoSize = true;
            this.cylinderRadioButton.Location = new System.Drawing.Point(25, 71);
            this.cylinderRadioButton.Name = "cylinderRadioButton";
            this.cylinderRadioButton.Size = new System.Drawing.Size(62, 17);
            this.cylinderRadioButton.TabIndex = 1;
            this.cylinderRadioButton.TabStop = true;
            this.cylinderRadioButton.Text = "Cylinder";
            this.cylinderRadioButton.UseVisualStyleBackColor = true;
            this.cylinderRadioButton.CheckedChanged += new System.EventHandler(this.cylinderRadioButton_CheckedChanged);
            //
            // cuboidRadioButton
            //
            this.cuboidRadioButton.AutoSize = true;
            this.cuboidRadioButton.Location = new System.Drawing.Point(25, 42);
            this.cuboidRadioButton.Name = "cuboidRadioButton";
            this.cuboidRadioButton.Size = new System.Drawing.Size(58, 17);
            this.cuboidRadioButton.TabIndex = 0;
            this.cuboidRadioButton.TabStop = true;
            this.cuboidRadioButton.Text = "Cuboid";
            this.cuboidRadioButton.UseVisualStyleBackColor = true;
            this.cuboidRadioButton.CheckedChanged += new System.EventHandler(this.cuboidRadioButton_CheckedChanged);
            //
            // label9
            //
            this.label9.AutoSize = true;
            this.label9.Location = new System.Drawing.Point(117, 73);
            this.label9.Name = "label9";
            this.label9.Size = new System.Drawing.Size(76, 13);
            this.label9.TabIndex = 3;
            this.label9.Text = "Height Y (mm):";
            //
            // label10
            //
            this.label10.AutoSize = true;
            this.label10.Location = new System.Drawing.Point(120, 44);
            this.label10.Name = "label10";
            this.label10.Size = new System.Drawing.Size(73, 13);
            this.label10.TabIndex = 6;
            this.label10.Text = "Width X (mm):";
            //
            // tabControl1
            //
            this.tabControl1.Controls.Add(this.tabPage3);
            this.tabControl1.Controls.Add(this.tabPage1);
            this.tabControl1.Controls.Add(this.tabPage2);
            this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tabControl1.Location = new System.Drawing.Point(4, 4);
            this.tabControl1.Margin = new System.Windows.Forms.Padding(4);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new System.Drawing.Size(694, 197);
            this.tabControl1.TabIndex = 6;
            this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged);
            //
            // tableLayoutPanel1
            //
            this.tableLayoutPanel1.ColumnCount = 1;
            this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel1.Controls.Add(this.openGLViewsTableLayoutPanel, 0, 0);
            this.tableLayoutPanel1.Controls.Add(this.tableLayoutPanel2, 0, 1);
            this.tableLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel1.Location = new System.Drawing.Point(0, 0);
            this.tableLayoutPanel1.Name = "tableLayoutPanel1";
            this.tableLayoutPanel1.RowCount = 2;
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53F));
            this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 47F));
            this.tableLayoutPanel1.Size = new System.Drawing.Size(708, 447);
            this.tableLayoutPanel1.TabIndex = 10;
            //
            // openGLViewsTableLayoutPanel
            //
            this.openGLViewsTableLayoutPanel.ColumnCount = 3;
            this.openGLViewsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
            this.openGLViewsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
            this.openGLViewsTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 33.33333F));
            this.openGLViewsTableLayoutPanel.Controls.Add(this.OpenGLPanelXY, 0, 1);
            this.openGLViewsTableLayoutPanel.Controls.Add(this.label2, 2, 0);
            this.openGLViewsTableLayoutPanel.Controls.Add(this.label3, 1, 0);
            this.openGLViewsTableLayoutPanel.Controls.Add(this.OpenGLPanel3D, 2, 1);
            this.openGLViewsTableLayoutPanel.Controls.Add(this.OpenGLPanelXZ, 1, 1);
            this.openGLViewsTableLayoutPanel.Controls.Add(this.label1, 0, 0);
            this.openGLViewsTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
            this.openGLViewsTableLayoutPanel.Location = new System.Drawing.Point(3, 3);
            this.openGLViewsTableLayoutPanel.Name = "openGLViewsTableLayoutPanel";
            this.openGLViewsTableLayoutPanel.RowCount = 2;
            this.openGLViewsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 16F));
            this.openGLViewsTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.openGLViewsTableLayoutPanel.Size = new System.Drawing.Size(702, 230);
            this.openGLViewsTableLayoutPanel.TabIndex = 0;
            //
            // tableLayoutPanel2
            //
            this.tableLayoutPanel2.ColumnCount = 1;
            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel2.Controls.Add(this.tabControl1, 0, 0);
            this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.tableLayoutPanel2.Location = new System.Drawing.Point(3, 239);
            this.tableLayoutPanel2.Name = "tableLayoutPanel2";
            this.tableLayoutPanel2.RowCount = 1;
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
            this.tableLayoutPanel2.Size = new System.Drawing.Size(702, 205);
            this.tableLayoutPanel2.TabIndex = 1;
            //
            // SpatialConfigurationPanelUI
            //
            this.Controls.Add(this.tableLayoutPanel1);
            this.Name = "SpatialConfigurationPanelUI";
            this.Size = new System.Drawing.Size(708, 447);
            this.VisibleChanged += new System.EventHandler(this.SpatialConfigurationPanelUI_VisibleChanged);
            this.tabPage2.ResumeLayout(false);
            this.fieldPropertiesGroupBox.ResumeLayout(false);
            this.fieldPropertiesGroupBox.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.resolutoinNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.nutrientsDistributionRadiusNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.diffusionRateNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.initialQuantityNumericUpDown)).EndInit();
            this.nutrientsGroupBox.ResumeLayout(false);
            this.tabPage1.ResumeLayout(false);
            this.groupBox3.ResumeLayout(false);
            this.groupBox3.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.RadiusNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.PopulationNumericUpDown)).EndInit();
            this.groupBox2.ResumeLayout(false);
            this.groupBox2.PerformLayout();
            this.tabPage3.ResumeLayout(false);
            this.groupBox4.ResumeLayout(false);
            this.groupBox4.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.viscosityNumericUpDown)).EndInit();
            this.groupBox1.ResumeLayout(false);
            this.groupBox1.PerformLayout();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryRadiusNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryDepthNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryHeightNumericUpDown)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.boundaryWidthNumericUpDown)).EndInit();
            this.tabControl1.ResumeLayout(false);
            this.tableLayoutPanel1.ResumeLayout(false);
            this.openGLViewsTableLayoutPanel.ResumeLayout(false);
            this.openGLViewsTableLayoutPanel.PerformLayout();
            this.tableLayoutPanel2.ResumeLayout(false);
            this.ResumeLayout(false);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Given the boundary, computes the dimensions of the field array
        /// at its current resolution
        /// </summary>
        /// <param name="bounds"></param>
        // There are currently lots of assumptions and restrictions
        // ONLY CUBOID ENVIRONMENTS ARE ALLOWED!
        public void UpdateDimensions(Boundary bounds)
        {
            switch (bounds.Shape)
            {
                case BoundaryShapes.Cuboid:
                    this.dim[0] = (int)Math.Ceiling(bounds.Width * this.resolution);
                    this.dim[1] = (int)Math.Ceiling(bounds.Height * this.resolution);
                    this.dim[2] = (int)Math.Ceiling(bounds.Depth * this.resolution);
                    this.worldOffset.x = -bounds.Width / 2;
                    this.worldOffset.y = -bounds.Height / 2;
                    this.worldOffset.z = -bounds.Depth / 2;
                    break;

                case BoundaryShapes.Cylinder:
                    this.dim[0] =  this.dim[2] = 1 + (int)Math.Ceiling(2*bounds.Radius * this.resolution);
                    this.dim[1] = 1 + (int)Math.Ceiling(bounds.Height * this.resolution);
                    this.worldOffset.x = this.worldOffset.z = -bounds.Radius;
                    this.worldOffset.y = -bounds.Height / 2;
                    break;

                case BoundaryShapes.Sphere:
                    // previously:
                    // this.dim[0] = this.dim[1] = this.dim[2] = 1 + (int)Math.Ceiling(2*bounds.Radius * this.resolution);

                    // changed 26/04/2009

                    this.dim[0] = this.dim[1] = this.dim[2] = (int)Math.Ceiling(2*bounds.Radius * this.resolution);
                    this.worldOffset.x = this.worldOffset.y = this.worldOffset.z = -bounds.Radius;

                    break;
            }

            // these calculations imply only a cuboid is allowed
            // Normalise so that environment is 1x1x1
            this.cubeLength = (float)(1.0f / dim[0]);
            this.cubeArea = (float)(Math.Pow(this.cubeLength, 2));
            this.cubeVolume = (float)(Math.Pow(this.cubeLength, 3));

            // old code that was fixed for 100*100*100 cuboid
            //this.cubeVolume = (float)Math.Pow( 1.0f / (resolution*100) , 3.0f );
            //this.cubeArea = (float)Math.Pow(1.0f / (resolution*100), 2.0f);
            //this.cubeLength = (float)1.0f / (resolution*100);

            this.FieldLoaded = false;
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Computes the dimensions of the field array, loads it into memory, 
        /// and sets initial values;
        /// </summary>
        public void InitField(Boundary bounds)
        {
            TestRigs.ErrorLog.LogError("bounds x: " + bounds.Width + " y: " + bounds.Height + " z: " + bounds.Depth);

            UpdateDimensions(bounds);

            this.field = new float[dim[0]][][];
            for (int i = 0; i < this.field.Length; i++)
            {
                this.field[i] = new float[dim[1]][];
                for (int j = 0; j < this.field[i].Length; j++)
                {
                    this.field[i][j] = new float[dim[2]];
                }
            }
            //this.field = new float[dim[0], dim[1], dim[2]];

            //init all values to 0
            for (int i = 0; i < dim[0]; i++)
            {
                for (int j = 0; j < dim[1]; j++)
                {
                    for (int k = 0; k < dim[2]; k++)
                    {
                        if (bounds.InsideBoundary(FieldToWorldCoord((float)i, (float)j, (float)k)))
                        {
                            field[i][j][k] = 0.0f;
                        }
                    }
                }
            }

            switch (initialDistribution)
            {
                case InitialNutrientDistribution.UniformThroughout:
                    {

                        /*
                         * Uniformly distribute the nutrient in the environment
                         * by counting the number of cubes inside the env, and then
                         * adding an equal fraction of nutrients to each of these
                         * field cubes.
                         */

                        int cubesInside = 0;

                        for (int m = 0; m < 2; m++)
                        {

                            //m=0 : begin by counting how many field cubes are inside the boundary
                            //m=1 : Distribute evenly amongst all cubes inside the boundary
                            for (int i = 0; i < dim[0]; i++)
                            {
                                for (int j = 0; j < dim[1]; j++)
                                {
                                    for (int k = 0; k < dim[2]; k++)
                                    {
                                        if (bounds.InsideBoundary(FieldToWorldCoord((float)i, (float)j, (float)k)))
                                        {
                                            if (m == 0)
                                            {
                                                cubesInside++;
                                            }
                                            else
                                            {
                                                field[i][j][k] =  InitialQuantity / cubesInside;
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }
                case InitialNutrientDistribution.DenselyCentredSphere:
                    {

                        Boundary innerSphere = new Boundary();
                        innerSphere.Radius = this.InitialRadius;
                        innerSphere.Shape = BoundaryShapes.Sphere;

                        /*
                         * Here we use a similar techique, however the quantity
                         * to be added decreases exponentially with the distance
                         * from the centre of the sphere. We need to first calculate
                         * the sum of these exponentials so that we know the scaling
                         * factor for the final values. By doing this we ensure that
                         * exactly the correct quantity of nutrients is added.
                         */
                        float sumOfExp = 0;

                        for (int m = 0; m < 2; m++)
                        {

                            for (int i = 0; i < dim[0]; i++)
                            {
                                for (int j = 0; j < dim[1]; j++)
                                {
                                    for (int k = 0; k < dim[2]; k++)
                                    {
                                        //test that location is inside the env boundary
                                        if (bounds.InsideBoundary(FieldToWorldCoord((float)i, (float)j, (float)k)))
                                        {
                                            Vector3 pos = FieldToWorldCoord((float)i, (float)j, (float)k);
                                            pos.x -= this.InitialPosition.x;
                                            pos.y -= this.InitialPosition.y;
                                            pos.z -= this.InitialPosition.z;

                                            if (innerSphere.InsideBoundary(pos))
                                            {
                                                float dist = pos.magnitude();
                                                if (m == 0)
                                                {

                                                    //begin by summing total distances from each point to the centre of the sphere
                                                    sumOfExp += (float)Math.Pow(2, -5 * dist / this.InitialRadius);
                                                    //sumOfExp += 1;
                                                }
                                                else
                                                {
                                                    //once counted, distribute evenly
                                                    //System.Console.WriteLine("(i,j,k)=("+i+","+j+","+k+") dist = "+dist+" q="+InitialQuantity+" r="+this.InitialRadius +
                                                    //	" 2 ^ ? = 2 ^ "+(-4 * dist / this.InitialRadius)+ " sumofexp="+sumOfExp+" 2^?/s="+
                                                    //	((float)Math.Pow(2, -4 * dist / this.InitialRadius) / sumOfExp)+" final = "+(InitialQuantity * (float)Math.Pow(2, -4 * dist / this.InitialRadius) / sumOfExp));

                                                    field[i][j][k] = InitialQuantity * (float)Math.Pow(2, -5 * dist / this.InitialRadius) / sumOfExp;
                                                    //field[i][j][k] = InitialQuantity / sumOfExp;
                                                }
                                            }

                                        }
                                    }
                                }
                            }
                        }
                    }

                    break;

                /*
                 * Nutrient quantity is evenly distrubted in a sphere, again
                 * we use multiple passes to ensure that exactly the correct
                 * quantity is added
                 */
                case InitialNutrientDistribution.UniformSphere:
                    {

                        Boundary innerSphere = new Boundary();
                        innerSphere.Radius = this.InitialRadius;
                        innerSphere.Shape = BoundaryShapes.Sphere;

                        int cubesInside = 0;

                        for (int m = 0; m < 2; m++)
                        {

                            for (int i = 0; i < dim[0]; i++)
                            {
                                for (int j = 0; j < dim[1]; j++)
                                {
                                    for (int k = 0; k < dim[2]; k++)
                                    {
                                        //test that location is inside the env boundary
                                        if (bounds.InsideBoundary(FieldToWorldCoord((float)i, (float)j, (float)k)))
                                        {
                                            Vector3 pos = FieldToWorldCoord((float)i, (float)j, (float)k);
                                            pos.x -= this.InitialPosition.x;
                                            pos.y -= this.InitialPosition.y;
                                            pos.z -= this.InitialPosition.z;

                                            //test that location is inside desired sphere
                                            if (innerSphere.InsideBoundary(pos))
                                            {
                                                if (m == 0)
                                                {
                                                    //begin by counting how many field cubes are inside the boundary and sphere
                                                    cubesInside++;
                                                }
                                                else
                                                {
                                                    //once counted, distribute evenly
                                                    field[i][j][k] =  InitialQuantity / cubesInside;
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }

                        break;
                    }
            }

            this.fieldLoaded = true;
        }
Ejemplo n.º 5
0
 /// <summary>
 /// Estimates space consumption of this field in MB
 /// </summary>
 /// <param name="bounds"></param>
 /// <returns></returns>
 public float EstimateSpaceConsumption(Boundary bounds)
 {
     return (float)(dim[0] * dim[1] * dim[2] * 4) / 1048576;
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Given the boundary, computes the dimensions of the field array
        /// at its current resolution
        /// </summary>
        /// <param name="bounds"></param>
        public void UpdateDimensions(Boundary bounds)
        {
            switch (bounds.Shape)
            {
                case BoundaryShapes.Cuboid:
                    this.dim[0] = 1 + (int)Math.Ceiling(bounds.Width * this.resolution);
                    this.dim[1] = 1 + (int)Math.Ceiling(bounds.Height * this.resolution);
                    this.dim[2] = 1 + (int)Math.Ceiling(bounds.Depth * this.resolution);
                    this.worldOffset.x = -bounds.Width / 2;
                    this.worldOffset.y = -bounds.Height / 2;
                    this.worldOffset.z = -bounds.Depth / 2;
                    break;

                case BoundaryShapes.Cylinder:
                    this.dim[0] =  this.dim[2] = 1 + (int)Math.Ceiling(2*bounds.Radius * this.resolution);
                    this.dim[1] = 1 + (int)Math.Ceiling(bounds.Height * this.resolution);
                    this.worldOffset.x = this.worldOffset.z = -bounds.Radius;
                    this.worldOffset.y = -bounds.Height / 2;
                    break;

                case BoundaryShapes.Sphere:
                    this.dim[0] = this.dim[1] = this.dim[2] = 1 + (int)Math.Ceiling(2*bounds.Radius * this.resolution);
                    this.worldOffset.x = this.worldOffset.y = this.worldOffset.z = -bounds.Radius;

                    break;
            }

            this.cubeVolume = (float)Math.Pow( 1.0f / (resolution*100) , 3.0f );
            this.cubeArea = (float)Math.Pow(1.0f / (resolution * 100), 2.0f);
            this.cubeLength = (float)1.0f / (resolution * 100);

            this.FieldLoaded = false;
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Constructor
        /// </summary>
        public OpenGLPanelViewState()
        {
            ang3D = 0;
            viewZoom = 1;
            viewZoomLinear = 0;

            viewOffset = new Vector2(0.0f, 0.0f);
            viewTempOffset = new Vector2(0.0f, 0.0f);

            drawNutrientInitialPos = false;

             crossSection = new Boundary(BoundaryShapes.Cuboid, 100, 100, 5, 0);
            crossSectionFacing = CrossSectionFacingDirection.Front;
            CrossSectionOffset = new Vector3(0,0,0);
            crossSectionEnabled = false;

            currentCameraPos = CameraPosition.Corner;
            nextCameraPos = CameraPosition.Front;
            animationCounter = 0.0f;
            angAboutY = 0.0f;
            oldAngAboutY = 0.0f;

            currentCamCoords = new Vector3(80.0f, 80.0f, 80.0f);
            oldCamCoords = new Vector3(0.0f, 0.0f, 0.0f);
            currentUpVect = new Vector3(0.0f, 1.0f, 0.0f);
            oldUpVect = new Vector3(0.0f, 0.0f, 0.0f);
        }
Ejemplo n.º 8
0
        /// <summary>
        /// updates the size of the cross section given a facing and boundary
        /// </summary>
        /// <param name="facing"></param>
        /// <param name="bounds"></param>
        public void UpdateCrossSectionSize(CrossSectionFacingDirection facing, Boundary bounds)
        {
            float width = 0;
            float height = 0;
            float depth = 0;

            this.crossSectionFacing = facing;

            switch (bounds.Shape)
            {

                case BoundaryShapes.Cuboid:

                    width = bounds.Width;
                    height = bounds.Height;
                    depth = bounds.Depth;

                    break;

                case BoundaryShapes.Cylinder:

                    width = depth = bounds.Radius * 2;
                    height = bounds.Height;

                    break;

                case BoundaryShapes.Sphere:

                    width = height = depth = bounds.Radius * 2;

                    break;

            }

            switch (facing)
            {

                case CrossSectionFacingDirection.Front:
                    crossSection = new Boundary(BoundaryShapes.Cuboid, width * 1.3f, height * 1.3f, depth*0.05f, 0);
                    break;

                case CrossSectionFacingDirection.Top:
                    crossSection = new Boundary(BoundaryShapes.Cuboid, width * 1.3f, height * 0.05f, depth * 1.3f, 0);
                    break;

            }
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Updates the size of the cross section given a boundary
 /// </summary>
 /// <param name="bounds"></param>
 public void UpdateCrossSectionSize(Boundary bounds)
 {
     UpdateCrossSectionSize(this.crossSectionFacing, bounds);
 }