using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// SimpleHarmonicMotionTest /// public class SimpleHarmonicMotionTest { public SimpleHarmonicMotionTest() { } private string result; public string Result { get{return result;} } public void Compute() { GP.SimpleHarmonicMotion obj = new GP.SimpleHarmonicMotion(); obj.Amplitude = 10.0; obj.AngularFrequency = 23.0; obj.PhaseConstant = 0.0; GP.Time t = new GP.Time(); for(int k = 0 ; k < 100 ; k++) { t.s = 0.01*k; double x = obj.Position(t); result += x.ToString()+"\r\n"; } } } } /* 10 9.73666395005375 8.96052497525525 7.71246014997107 6.05820156643463 4.08487440884157 1.89640831297834 -0.391936317729877 -2.6596387560898 -4.7872654415872 -6.66276021279824 -8.18734599277382 -9.28072710209333 -9.88531820827396 -9.96927718456887 -9.52818214594305 -8.58526433742102 -7.19018460922681 -5.41641791835699 -3.35738360759151 -1.12152526935054 1.17340067575955 3.40652688107789 5.46024081981648 7.22637910870592 8.61192417161521 9.54390321576654 9.97323150513601 9.87729751655308 9.26115382553954 8.15725100125357 6.62372852554955 4.74135274867862 2.60926315095993 0.339750942952423 -1.94765499931161 -4.13248338674028 -6.09966540386242 -7.74559506229517 -8.98358583909032 -9.74843621404164 -9.99986365184122 -9.7246261708254 -8.93721976120377 -7.67911492169875 -6.01657252408102 -4.03715403792196 -1.84510991228872 0.444111004548262 2.70994183385018 4.83304758753006 6.70161020902945 8.21721771838378 9.30004729663661 9.89306933100751 9.96505100548402 9.51220124610112 8.55837038622981 7.15379403606115 5.37244731317542 3.30814877949049 1.06961927936044 -1.22524408396423 -3.45557725983067 -5.50391482251953 -7.26237654748781 -8.63834916180853 -9.55936402686382 -9.97691385935259 -9.86900747456617 -9.2413280007313 -8.12693356450238 -6.58451621166313 -4.69531076082658 -2.55881639218479 -0.287556303291872 1.99884857381025 4.1799796733388 6.14096290566081 7.77851875509419 9.0064017238477 9.75994264176377 9.99945461108303 9.7123232046224 8.91367083246047 7.64556028679028 5.97477941201023 3.98932357529838 1.79376119613126 -0.4962735806231 -2.76017101249467 -4.87869793804494 -6.74027745481808 -8.2468653634925 -9.31911388231478 -9.90055067338345 -9.96055308312783 -9.49596095203404 -8.53124305142974 -7.11720838156647 */