public SphereConduit(Sphere_Plot plot_in, Hare.Geometry.Point center_in, Pach_Graphics.colorscale C_in, double[] V_Bounds_in) { plot = plot_in; center = center_in; C = C_in; Instance = this; }
public void Update_Scale() { switch (Color_Selection.Text) { case "R-O-Y-G-B-I-V": c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 4.0 / 3.0, 1, 0, 1, 0, this.Discretize.Checked, 24); break; case "R-O-Y": c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 1.0 / 3.0, 1, 0, 1, 0, this.Discretize.Checked, 12); break; case "Y-G-B": c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, Math.PI / 3.0, 2.0 / 3.0, 1, 0, 1, 0, this.Discretize.Checked, 12); break; case "R-M-B": c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 0, 1, 0, 1, -1, this.Discretize.Checked, 12); break; case "W-B": c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 0, 0, 0, 1, -1, this.Discretize.Checked, 12); break; default: Rhino.RhinoApp.WriteLine("Whoops... Color selection invalid... Bright green substituted!"); c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, Math.PI / 2.0, 0, 0, 1, 1, this.Discretize.Checked, 12); break; } this.Param_Scale.Image = c_scale.PIC; }
public WaveConduit(ParticleRays[] PR_in, Pach_Graphics.colorscale C_in, double[] V_Bounds_in, Scene S) { min = Utilities.RC_PachTools.HPttoRPt(S.Min()); Hare.Geometry.Vector range = S.Max() - S.Min(); nx = (int)System.Math.Ceiling(range.x); ny = (int)System.Math.Ceiling(range.y); nz = (int)System.Math.Ceiling(range.z); ptgrid = new List <int> [nx, ny, nz]; for (int x = 0; x < nx; x++) { for (int y = 0; y < ny; y++) { for (int z = 0; z < nz; z++) { ptgrid[x, y, z] = new List <int>(); } } } dx = range.x / nx; dy = range.y / ny; dz = range.z / nz; C = C_in; V_Bounds = V_Bounds_in; PR = PR_in; }
private void Color_Selection_SelectedIndexChanged(object sender, EventArgs e) { Pach_Graphics.colorscale scale; switch (this.Color_Selection.Text) { case "R-O-Y-G-B-I-V": scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 4.0 / 3.0, 1, 0, 1, 1, false, 12); Param_Scale.Image = scale.PIC; break; case "Y-G-B": scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, Math.PI / 3.0, 2.0 / 3.0, 1, 0, 1, 0, false, 12); Param_Scale.Image = scale.PIC; break; case "R-O-Y": scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 1.0 / 3.0, 1, 0, 1, 0, false, 12); Param_Scale.Image = scale.PIC; break; case "W-B": scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 0, 0, 0, 1, -1, false, 12); Param_Scale.Image = scale.PIC; break; case "R-M-B": scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, 0, 1, 0, 1, -1, false, 12); Param_Scale.Image = scale.PIC; break; default: scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, 0, Math.PI / 2.0, 0, 0, 1, 1, false, 12); Param_Scale.Image = scale.PIC; break; } if (P != null) { P.SetColorScale(scale, new double[] { (double)Param_Min.Value, (double)Param_Max.Value }); } }
/// <summary> /// Updates color scale /// </summary> public void Update_Scale() { double H_OFFSET; double H_BREADTH; double S_OFFSET; double S_BREADTH; double V_OFFSET; double V_BREADTH; System.Drawing.Color[] Colors; switch (Color_Selection.Text) { case "R-O-Y-G-B-I-V": H_OFFSET = 0; H_BREADTH = 4.0 / 3.0; S_OFFSET = 1; S_BREADTH = 0; V_OFFSET = 1; V_BREADTH = 0; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 24); break; case "R-O-Y": Colors = new System.Drawing.Color[2]; H_OFFSET = 0; H_BREADTH = 1.0 / 3.0; S_OFFSET = 1; S_BREADTH = 0; V_OFFSET = 1; V_BREADTH = 0; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 12); break; case "Y-G": Colors = new System.Drawing.Color[2]; H_OFFSET = Math.PI / 3.0; H_BREADTH = 1.0 / 3.0; S_OFFSET = 1; S_BREADTH = 0; V_OFFSET = 1; V_BREADTH = 0; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 12); break; case "R-M-B": Colors = new System.Drawing.Color[2]; H_OFFSET = 0; H_BREADTH = -2.0 / 3.0; S_OFFSET = 1; S_BREADTH = 0; V_OFFSET = 1; V_BREADTH = 0; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 12); break; case "W-B": H_OFFSET = 0; H_BREADTH = 0; S_OFFSET = 0; S_BREADTH = 0; V_OFFSET = 1; V_BREADTH = -1; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 12); break; default: Rhino.RhinoApp.WriteLine("Whoops... Color selection invalid... Bright green substituted!"); Colors = new System.Drawing.Color[2]; H_OFFSET = 2.0 * Math.PI / 3; H_BREADTH = 0; S_OFFSET = 1; S_BREADTH = -1; V_OFFSET = 1; V_BREADTH = 0; c_scale = new Pach_Graphics.HSV_colorscale(Param_Scale.Height, Param_Scale.Width, H_OFFSET, H_BREADTH, S_OFFSET, S_BREADTH, V_OFFSET, V_BREADTH, this.Discretize.Checked, 12); break; } this.Param_Scale.Image = c_scale.PIC; }
/// <summary> /// Allows user to change the colors of the particles. /// </summary> /// <param name="Colors"></param> /// <param name="Values"></param> public void SetColorScale(Pach_Graphics.colorscale C_in) { C = C_in; }
/// <summary> /// Allows user to change the colors of the particles. /// </summary> /// <param name="Colors"></param> /// <param name="Values"></param> public void SetColorScale(Pach_Graphics.colorscale C_in, double[] Values) { V_Bounds = Values; C = C_in; }
public WaveConduit(Pach_Graphics.colorscale C_in, double[] V_Bounds_in) { C = C_in; V_Bounds = V_Bounds_in; }