Super merci ! Je comprends maintenant pourquoi j'y arrivait pas je rajoutais un angle a l'angle d'origine sur la spiral...donc c'est le point qui était un peu plus prêt du noyaux, mais pas la spiral en elle même qui pivotait...
J'ai fait une petite correction sur ton code pour centrer notre superbe spiral !
et voici pour le centre de la spiral ...

Le hic ! je me demande si je vais pas être obligé de stocké tout les points et de les triers pour que le centre soit au centre ... a moins de trouver une astuce.
J'ai fait plein de test pour rajouter les étoiles dans les bras de la spiral mais rien de bien... que du tres moche !!!
En tout cas merci Dobro sans toi j'en serais pas encore là lolllllllll Je me suis vraiment rouillé en Trigo moi !
Code : Tout sélectionner
UsePNGImageDecoder()
#dobro=1
#Police=1
#sprite=1
; ***********************************
InitSprite()
InitSprite3D()
InitKeyboard()
FontID = LoadFont(#Police, "arial", 50, #PB_Font_Bold )
EcranX = GetSystemMetrics_(#SM_CXSCREEN):;=largeur de l'ecran
EcranY = GetSystemMetrics_(#SM_CYSCREEN):;=hauteur de l'ecran
WindowID = OpenWindow(1, 0, 0, EcranX, EcranY, "hello", #PB_Window_SystemMenu|#PB_Window_BorderLess |#PB_Window_ScreenCentered )
WindowID = WindowID(1)
Result = OpenWindowedScreen(WindowID,0,0, EcranX, EcranY, 1, 0,0)
Debug FileSize("Gfx/holehand.png")
LoadSprite(1,"Gfx/holehand.png",#PB_Sprite_Texture|#PB_Sprite_AlphaBlending)
CreateSprite3D(1,1)
LoadSprite(2,"Gfx/sun.png",#PB_Sprite_Texture|#PB_Sprite_AlphaBlending)
CreateSprite3D(2,2)
Structure MyHole
Rayon.l
EndStructure
Global NewList MyHole.MyHole()
NbStar=120
For z=NbStar To 1 Step -1
AddElement(MyHole())
MyHole()\Rayon=Pow(z,1.3)*(EcranX/4)/(NbStar*2)
Next
degres=-15
Coef=10
Repeat
ExamineKeyboard()
Event=WindowEvent()
Delay(1)
ClearScreen(RGB(0,0,0)) ; *****<------- si tu Rem ceci le sprite laisse une trace :D
;StartDrawing( ScreenOutput())
Start3D()
t.f=ElapsedMilliseconds()/10000
CordX=EcranX/2
CordY=EcranY/2
ForEach MyHole()
x=MyHole()\Rayon*Cos(t+ListIndex(MyHole())/Coef)
y=MyHole()\Rayon/2*Sin(t+ListIndex(MyHole())/Coef)
x2=MyHole()\Rayon*Cos(#PI+t+ListIndex(MyHole())/Coef)
y2=MyHole()\Rayon/2*Sin(#PI+t+ListIndex(MyHole())/Coef)
x3=MyHole()\Rayon*Cos(#PI/2+t+ListIndex(MyHole())/Coef)
y3=MyHole()\Rayon/2*Sin(#PI/2+t+ListIndex(MyHole())/Coef)
x4=MyHole()\Rayon*Cos(#PI+#PI/2+t+ListIndex(MyHole())/Coef)
y4=MyHole()\Rayon/2*Sin(#PI+#PI/2+t+ListIndex(MyHole())/Coef)
; ********* voici la formule de la rotation d'image *********
;<------------ en degres !!! :o)
x= x * Cos (degres* #PI /180) +( Y)* Sin (degres* #PI /180)
Y=x * Sin (degres* #PI /180) + (Y)* Cos (degres* #PI /180)
x2= x2 * Cos (degres* #PI /180) +( y2)* Sin (degres* #PI /180)
y2= x2 * Sin (degres* #PI /180) + (y2)* Cos (degres* #PI /180)
x3= x3 * Cos (degres* #PI /180) +( y3)* Sin (degres* #PI /180)
y3= x3 * Sin (degres* #PI /180) + (y3)* Cos (degres* #PI /180)
x4= x4 * Cos (degres* #PI /180) +( Y4)* Sin (degres* #PI /180)
Y4= x4 * Sin (degres* #PI /180) + (Y4)* Cos (degres* #PI /180)
;*****************************************************
size=(ListSize(MyHole())-ListIndex(MyHole()))*128/ListSize(MyHole())
Angle=(ListSize(MyHole())-ListIndex(MyHole()))*360/ListSize(MyHole())
Alpha=255-((ListSize(MyHole())-ListIndex(MyHole()))*255/ListSize(MyHole()))
ZoomSprite3D(1,size,size)
RotateSprite3D(1,Angle,#PB_Absolute)
DisplaySprite3D(1,CordX+x-Size/2,CordY+y-Size/2,Alpha)
DisplaySprite3D(1,CordX+x2-Size/2,CordY+y2-Size/2,Alpha)
DisplaySprite3D(1,CordX+x3-Size/2,CordY+y3-Size/2,Alpha)
DisplaySprite3D(1,CordX+x4-Size/2,CordY+y4-Size/2,Alpha)
Next
;Sprite3DBlendingMode(12,6)
DisplaySprite3D(2,CordX-SpriteWidth(2)/2,Cordy-SpriteHeight(2)/2,255)
Stop3D()
;StopDrawing()
StartDrawing(ScreenOutput())
DrawText(10,10,Str(degres),$ffffff)
StopDrawing()
FlipBuffers():; affiche l'ecran
Event=WindowEvent()
If KeyboardPushed(#PB_Key_Escape)
End
EndIf
If KeyboardReleased(#PB_Key_Down) And degres>-45
degres=degres-1
EndIf
If KeyboardReleased(#PB_Key_Up) And degres<50
degres=degres+1
EndIf
Until Event=#PB_Event_CloseWindow