Verlet physics engine demo

Miscellaneous Forums/Blitz Showcase/Verlet physics engine demo

Graphics3D 640,480,0,2

Dim RetV2.verlet(25,25)

Include "cam code.bb"
Include "verletlib.bb"
Include "verlet entities/cloth.bb"
Include "worlds/quad box.bb"

s.sph_col=csph.sph_col(root_group,-30,-160,-30,30,-100,30)
so=CreateSphere()
ScaleEntity so,30,30,30
PositionEntity so,0,-130,0

r=MilliSecs()

SeedRnd 1

st1.structure=vcloth.structure(10,10,5)
repetitions st1,4

PositionEntity cam,0,-50,-200

While Not KeyHit(1)
 update
 dophysics
 positionreps 
 docam
 RenderWorld
 Flip
Wend


here's a much better cloth example. please note that this is real time physics, and when you have a slow computer, or alot of stuff runing, the results are unsatisfactory. sometimes the cloth actually goes through the sphere.