using System; using GP = Science.Physics.GeneralPhysics; namespace ScienceTest.PhysicsTest.GeneralPhysicsTest { /// /// RigidBodyTest /// public class RigidBodyTest { public RigidBodyTest() { } private string result; public string Result { get{return result;} } public void Compute() { GP.Position[] r = new GP.Position[3]; GP.Force[] f = new GP.Force[3]; r[0] = new GP.Position(); r[0].X = 0.0; f[0] = new GP.Force(); f[0].YVariableQ = true; r[1] = new GP.Position(); r[1].X = 10.0; f[1] = new GP.Force(); f[1].Y = -8.0; r[2] = new GP.Position(); r[2].X = -5.0; f[2] = new GP.Force(); f[2].YVariableQ = true; GP.RigidBody obj = new GP.RigidBody(); obj.SolveStaticEquilibrium(r,f); result += f[0].ToString() + "\r\n"; result += f[1].ToString() + "\r\n"; result += f[2].ToString() + "\r\n"; } } } /* 0 +/- 0 i +24.0000000000026 +/- 0 j +0 +/- 0 k (N) 0 +/- 0 i -8 +/- 0 j +0 +/- 0 k (N) 0 +/- 0 i -16.0000000000019 +/- 0 j +0 +/- 0 k (N) */