#         fn.path_to_textures = argv[1]
#     }

  ## create world
ode.dInitODE()

contactgroup.create (0)
world.setGravity (0,0,-0.5)
ode.dWorldSetCFM (world.id(),1e-5)
plane = ode.dPlane(space.id(),0.0,0.0,1.0,0.0)

for i in range (NUM):
    body[i].create (world.id())
    k = i*SIDE
    body[i].setPosition (k,k,k+0.4)
    m = ode.dMass()
    m.setBox (1,SIDE,SIDE,SIDE)
    m.adjust (MASS)
    body[i].setMass (m)
    body[i].setData (i)
    
    box[i].create (space.id(),SIDE,SIDE,SIDE)
    box[i].setBody (body[i].id())
for i in range(NUM-1):
    joint[i].create (world.id())
    joint[i].attach (body[i].id(),body[i+1].id())
    k = (i+0.5)*SIDE
    joint[i].setAnchor (k,k,k+0.4)

## run simulation
#dsSimulationLoop (argc,argv,352,288,&fn)