1
# -*- encoding=utf-8 -*-
5
InsertionSortCollider([Bo1_Sphere_Aabb(),Bo1_Box_Aabb()]),
7
Ig2_Sphere_Sphere_ScGeom(),
8
Ig2_Facet_Sphere_ScGeom(),
10
IPhysDispatcher([Ip2_FrictMat_FrictMat_FrictPhys()]),
12
RotationEngine(ids=[1],rotationAxis=(1,0,0),angularVelocity=.01),
13
RotationEngine(ids=[0],rotationAxis=(1,1,1),angularVelocity=-.02),
14
NewtonIntegrator(damping=.2,gravity=(0,0,-9.81))
16
from yade import utils
17
O.bodies.append(utils.sphere([0,0,0],1,fixed=True,color=[1,0,0],wire=True))
18
O.bodies.append(utils.sphere([0,sqrt(2),sqrt(2)],1,color=[0,1,0],wire=True))
20
O.dt=.01*utils.PWaveTimeStep()
22
#o.run(100000); o.wait(); print o.iter/o.realtime,'iterations/sec'
25
renderer=qt.Renderer()
26
renderer.intrGeom=True
28
O.step(); O.step(); O.step()