-->
Ressort
Xmin = -7
Xmax = 130
Ymin = -4
Ymax = 2
trait = 0.05
traceX()
traceY()
sens = 1
cd = 1
timer = setInterval( function (){ressort()},10 )
tps = 0
function ressort(){
peinture = blanc
couleur = blanc
transparence = 1
trait = 0.05
rectangle([-3,3],150,4)
couleur = noir
cd = cd+cos(tps)*0.05
for(t=0.1/cd; cd*t < 47.3; t=t+0.01){
point([3+t-1.5*cos(cd*t),0.5*sin(cd*t)])
}
trait = 10
segment([-5,1],[-5,-0.6])
segment([-7,-0.7],[130,-0.7])
trait = 1
segment([-5,0.05],[1.5,0.05])
segment([10+t-1.5*cos(cd*t),0.5*sin(cd*t)],[3+t-1.5*cos(cd*t),0.5*sin(cd*t)])
peinture = 'rgb(200,255,20)'
rectangle([10+t-1.5*cos(cd*t),0.5*sin(cd*t)+0.5],20,1)
tps = tps+0.1
}