Marc
Nombre de messages : 2466 Age : 63 Localisation : TOURS (37) Date d'inscription : 17/03/2014
| Sujet: roue "analogique" Ven 3 Aoû 2018 - 18:01 | |
| Bonjour à tous ! Voici une autre exploitation de la roue à "n faces" (Voir => ICI <=). Cette roue permet de voir défiler les secondes. Elle tourne sans fin... - Code:
-
' ------------------------------------------------------------------------------ ' PANORAMIC Pendule 3D / 3D Clock ' Marc - August 2018 - Panoramic v.0.9.28 ' http://panoramic-language.pagesperso-orange.fr/French/index.html ' http://panoramic.top-forum.net ' ------------------------------------------------------------------------------ ' main Init() Faces(10) CAM_MOVE -150 Time_Synchro() END ' ------------------------------------------------------------------------------ SUB Init() LABEL Quit DEGREES DIM Nb%,i%,Teta,x,y,z,a$ HEIGHT 0,200 + HEIGHT(0)-HEIGHT_CLIENT(0) WIDTH 0,200 + WIDTH(0)-WIDTH_CLIENT(0) LEFT 0,(screen_x-WIDTH(0))/2 TOP 0,(screen_y-HEIGHT(0))/2 COLOR 0,0,0,0 ON_CLOSE 0, Quit END_SUB ' ------------------------------------------------------------------------------ SUB Faces(n%) DIM_LOCAL i% Nb%=n% y=0 z=(5/tan(360/n%/2))-.1 Teta=360/n% SCENE3D 100 HEIGHT 100,200 WIDTH 100,200 COLOR 100,0,0,0 CAM_POSITION 0,0,6 PICTURE 1 WIDTH 1,200 HEIGHT 1,200 2D_TARGET_IS 1 PRINT_TARGET_IS 1 FONT_NAME 1,"Times New Roman" FONT_SIZE 1,130 Face1(1) Face2(2) Face3(3) Face4(4) Face5(5) Face6(6) Face7(7) Face8(8) Face9(9) Face10(10) FOR i%= 1 to Nb% 3D_X_ROTATE i%,y+((i%-1)*Teta) 3D_Y_POSITION i%,z*(SIN(y+((i%-1)*Teta))) 3D_Z_POSITION i%,z*(COS(y+((i%-1)*Teta))) NEXT i% END_SUB ' ------------------------------------------------------------------------------ SUB Offset() x=(200-TEXT_WIDTH(a$,1))/2 END_SUB ' ------------------------------------------------------------------------------ SUB Face1(n%) COLOR 1,0,0,0 2D_FILL_COLOR 0,0,0 FONT_COLOR 1,255,255,255 a$="0" Offset() PRINT_LOCATE x,0 PRINT a$ IMAGE 10 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face2(n%) a$="1" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face3(n%) a$="2" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face4(n%) a$="3" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face5(n%) a$="4" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face6(n%) a$="5" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face7(n%) a$="6" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face8(n%) a$="7" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face9(n%) a$="8" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Face10(n%) a$="9" Offset() PRINT_LOCATE x,0 PRINT a$ 2D_IMAGE_COPY 10,0,0,200,200 3D_PLANE n% 3D_V_TILE n%,1 3D_U_TILE n%,1 3D_IMAGE_TEXTURE n%,10 END_SUB ' ------------------------------------------------------------------------------ SUB Time_Synchro() WHILE 0=0 y=(WRAP_VALUE(NUMBER_TICKS/36))*-1 FOR i%= 1 to Nb% 3D_X_ROTATE i%,y+((i%-1)*Teta) 3D_Y_POSITION i%,z*(SIN(y+((i%-1)*Teta))) 3D_Z_POSITION i%,z*(COS(y+((i%-1)*Teta))) NEXT i% pause 30 END_WHILE END_SUB ' ------------------------------------------------------------------------------ Quit: TERMINATE RETURN
| |
|
Jean Claude
Nombre de messages : 5950 Age : 70 Localisation : 83 Var Date d'inscription : 07/05/2009
| Sujet: Re: roue "analogique" Ven 3 Aoû 2018 - 18:33 | |
| Mon dieu que c'est hypnotisant à consommer avec modération, sinon A+ | |
|