Thor> voilà un exemple pour faire tourner une image quelquonque autour d'un centre (xo,yo).
1) c très très lent :-\
2) c pour v200, mais tu peux l'adapter pour 89 en remplaçant (239,127) par (159,99)
3) il est optimisable en vitesse, je pense :-).
4) c toi qui commandes la rotation avec les flèches <- ->
5) tu seras sûrement déçu par le résultat
rotpic(pict,xo,yo) \pict="nom image", (xo,yo) coordonnées du centre de rotation
Prgm
Local xydim,pictmat,xpictmat,ypictmat,screen,p,q,onoff,matrot,vectmat
vertel("d save","screen",0,0,239,127,"/","d clrs","/","d size",pict,"/","e retr","xydim")
vertel("d pict",pict,xo-floor(xydim[1]/2),yo-floor(xydim[2]/2),1)
Define matrot(@)=Func
Return [[cos(@),-sin(@)][sin(@),cos(@)]]
EndFunc
Define colget(@m,@n)=Func
(@m™[@n])™
EndFunc
mat>list((newMat(xydim[2],1)) .^ 0*list>mat(seq(q,q,1,xydim[1])) .- floor(xydim[1]/2))»xpictmat
mat>list((list>mat(seq(p,p,1,xydim[2])))™*((newMat(xydim[1],1))™) .^ 0 .- floor(xydim[2]/2))»ypictmat
vertel("d test",xpictmat .+ xo-1,ypictmat .+ yo-1,"/","e retr","pictmat")
pictmat .+ 1->pictmat
augment((list>mat(xpictmat))™,(list>mat(ypictmat))™)->vectmat
0->@
Lbl t@
floor(vectmat*matrot(@))->lvectmat
mat>list(colget(lvectmat,1)) .+ xo->xpictmat
mat>list(colget(lvectmat,2)) .+ yo->ypictmat
vertel("d clrs","/","d pixl",xpictmat,ypictmat,pictmat,"/",
"t draw","j'attends

",90,90,1,"/","e paus","/","e retr","@k","/","d clrs")
If @k[1]=340 Then
@-Pi/6->@
Goto t@
ElseIf @k[1]=337 Then
@+Pi/6->@
Goto t@
Else
EndIf
vertel("d pict","screen",0,0,1)
EndPrgm