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.
tangentialcontact.zip (zip file, 15 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: >confconst2:=MakeTranslations(a,rho*cos(q7)*cos(q8),rho*cos(q7)*sin(q8),-rho*sin(q7)) &oo MakeTranslations(w,3)=0: >confconst3:=MakeTranslations(a,-rho*sin(q7)*sin(q8),rho*sin(q7)*cos(q8),0) &oo MakeTranslations(w,3)=0: >motionconst1:=DiffTime(confconst1): >motionconst2:=DiffTime(confconst2): >motionconst3:=DiffTime(confconst3): >linvel:=LinearVelocity(W,A): >angvel:=AngularVelocity(w,a): >kde:={seq(linvel &oo MakeTranslations(w,i)=cat(u,i),i=1..2),seq(angvel &oo MakeTranslations(a,i)=cat(u,i+3),i=1..3),motionconst1,motionconst2,motionconst3}: >GeometryOutput(main=W,parameters=[rho],states=[q1,q2,q3,q4,q5,q6,q7,q8],checktree,checkargs,filename="tangentialcontact.geo"): >MotionOutput(ode=kde,states=[q1=0,q2=0,q3=1,q4=.6,q5=1.8,q6=-0.1,q7=7.624777961,q8=-7.753989756],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="tangentialcontact.dyn"); |
©2004-2017 Harry Dankowicz Mechanical Science and Engineering University of Illinois at Urbana-Champaign | Home Toolbox functions Sample projects Tutorials Downloads |