using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// AngularAccelerationTest /// public class AngleVectorTest { private string result; public string Result { get{return result;} } public AngleVectorTest() { } public void Compute() { GP.Vector.FunctionOfTime w = new GP.Vector.FunctionOfTime(ff); GP.AngularVelocity omega = new GP.AngularVelocity(); omega.VectorFunctionOfTime = w; GP.Time t = new GP.Time(); t.s = 2.0; omega.Set(t); result+=omega.ToString()+"\r\n"; GP.Time tini = new GP.Time(); tini.s = 1.0; GP.Time tfinal = new GP.Time(); tfinal.s = 2.0; GP.AngleVector theta1 = new GP.AngleVector(); theta1.X = 0.0; theta1.Y = 0.0; theta1.Z = 0.0; GP.AngleVector theta = new GP.AngleVector(tini, theta1, omega, tfinal); result += theta.ToString(); } public GP.Vector ff(GP.Time t) { GP.Vector om = new GP.Vector(); om.X = t.s; om.Y = t.s * t.s; om.Z = t.s * t.s * t.s; return om; } } } /* 2 +/- 0 i +4 +/- 0 j +8 +/- 0 k (rad/s) 1.5 +/- 0 i +2.33333333333333 +/- 0 j +3.75 +/- 0 k (rad) */