Home Toolbox functions Sample projects Tutorials Downloads |
|
Reference: Chapter 9 in Multibody Mechanics and Visualization by Harry Dankowicz, published by Springer Verlag UK, 2004.
To illustrate
This Mambo project contains two non-stationary spheres and a stationary plane. The configuration of the non-stationary spheres relative to the world observer may be specified in three independent steps, namely
rho: scaling factor corresponding to the radius of the first sphere.
q1, q2, and q3: coordinates of the center of the sphere in a coordinate system with origin at the reference point of the world observer and axes parallel to the basis vectors of the reference triad of the world observer.
q4, q5, and q6: 3-1-3 sequence of Euler angles representing the orientation of the first sphere relative to the reference triad of the world observer.
q7 and q8: spherical angle coordinates of the center of the second sphere in a coordinate system with origin at the center of the first sphere and axes parallel to the basis vectors of the reference triad of the first sphere.
pointcontact.zip (zip file, 17 kb, December 30, 2012) >Restart(): >DeclareObservers(W,A): >DeclarePoints(W,A,P): >DeclareTriads(w,a): >DefineObservers([W,W,w],[A,A,a]): >DefinePoints([W,A,w,q1,q2,q3],[A,P,a,rho*sin(q7)*cos(q8),rho*sin(q7)*sin(q8),rho*cos(q7)]): >DefineTriads(w,a,[q4,3],[q5,1],[q6,3]): >DefineNeighbors(W,A): >DefineObjects( [W,'Block',xlength=rho*10,ylength=rho*10,zlength=rho/20,color=green], [A,'Sphere',radius=rho,color=red], [A,'Sphere',point=P,radius=rho/7,color=blue]): >DeclareStates(q1,q2,q3,q4,q5,q6,q7,q8): >confconst1:=FindTranslation(W,P) &oo MakeTranslations(w,3)=0: >motionconst1:=DiffTime(confconst1): >kde:={seq(LinearVelocity(W,A) &oo MakeTranslations(w,i)=cat(u,i),i=1..3),seq(AngularVelocity(w,a) &oo MakeTranslations(a,i)=cat(u,i+3),i=1..3),LinearVelocity(W,P) &oo MakeTranslations(w,1)=u7,motionconst1}: >GeometryOutput(main=W,parameters=[rho],states=[q1,q2,q3,q4,q5,q6,q7,q8],checktree,checkargs,filename="pointcontact.geo"): >MotionOutput(ode=kde,states=[q1=0,q2=0,q3=.3,q4=.6,q5=1.8,q6=-0.1,q7=5,q8=.355],parameters=[rho=1],insignals=[u1 = 0,u2 = sin(t),u3 = .4*cos(t),u4 = 0,u5 = 1,u6 = 0,u7 = .4*sin(t)],checkargs,checksings,filename="pointcontact.dyn"); |
©2004-2017 Harry Dankowicz Mechanical Science and Engineering University of Illinois at Urbana-Champaign | Home Toolbox functions Sample projects Tutorials Downloads |