Beispiel #1
0
            public DirectionalSource(Balloon S, double[] power_in_db, Point Source, int[] Bands, int ID)
                : base(power_in_db, Source, ID)
            {
                for (int oct = 0; oct < 8; oct++)
                {
                    if (oct < Bands[0] || oct > Bands[1])
                    {
                        base.SourcePower[oct] = 0;
                        base.SPL[oct]         = 0;
                    }
                }

                type    = "Directional";
                Balloon = new Voxel_Grid(S.Balloons(new double[8] {
                    120, 120, 120, 120, 120, 120, 120, 120
                }), 1);
                ///Testing///
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[0]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[1]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[2]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[3]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[4]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[5]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[6]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[7]);
                /////////////
            }
Beispiel #2
0
            public SpeakerSource(Speaker_Balloon S, double[] power_in_db, double[] phase_in, Point Source, int[] Bands, int ID)
                : base(power_in_db, Source, Phase_Regime.Explicit_Nonhomogeneous, ID)
            {
                for (int oct = 0; oct < 8; oct++)
                {
                    if (oct < Bands[0] || oct > Bands[1])
                    {
                        base.SourcePower[oct] = 0;
                        base.SPL[oct]         = 0;
                    }
                }

                base.phase = phase_in;
                type       = "Loudspeaker";
                Balloon    = new Voxel_Grid(S.Balloons(power_in_db), 1);
                ///Testing///
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[0]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[1]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[2]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[3]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[4]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[5]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[6]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[7]);
                /////////////
            }
            public SpeakerSource(Speaker_Balloon S, double[] power_in_db, double[] phase_in, Point3d Source, int[] Bands, int ID)
                :base(power_in_db, Source, Phase_Regime.Explicit_Nonhomogeneous, ID)
            {
                for (int oct = 0; oct < 8; oct++)
                {
                    if (oct < Bands[0] || oct > Bands[1])
                    {
                        base.SourcePower[oct] = 0;
                        base.SPL[oct] = 0;
                    }
                }

                base.phase = phase_in;
                type = "Loudspeaker";
                Balloon = new Voxel_Grid(S.Balloons(power_in_db), 1);
                ///Testing///
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[0]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[1]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[2]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[3]); 
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[4]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[5]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[6]);
                //Utilities.PachTools.Plot_Hare_Topology(Balloon.Model[7]);
                /////////////
            }