Marc
Nombre de messages : 2466 Age : 63 Localisation : TOURS (37) Date d'inscription : 17/03/2014
| Sujet: Animation : Pangine2D's Girl chez le docteur Sam 14 Avr 2018 - 1:23 | |
| Bonjour à tous ! Voici une nouvelle aventure de Pangine2D’s girl. (Il faudrait lui trouver un p’tit nom) " Pangine2D’s girl chez le docteur." Attention, elle va apparaitre dénudée, très dénudée. Trop dénudée ? Ce programme a été réalisé en 5D. Aie aie aie ! La jolie fille a fait perdre la tête de ce pauvre Marc ! Mais non ! Pourquoi 5D ? Eh bien parce qu’il est fait avec de la 2D et de la 3D. Et… 2D + 3D = 5D ! Les deux techniques se marient parfaitement. Je vous laisse découvrir cette petite animation… ==> Fichiers à télécharger sur mon Webdav, dossier X_RAY. - Code:
-
' ------------------------------------------------------------------------------ ' X_Ray 3D ' Marc37 - April 2018 - Panoramic v0.9.28i17 ' http://panoramic-language.pagesperso-orange.fr/French/index.html ' http://panoramic.1fr1.net ' http://panoramic.top-forum.net/ ' ------------------------------------------------------------------------------ Init() Medical_room() Animation() END ' ------------------------------------------------------------------------------ SUB Init() DIM_LOCAL y_fenetre, x_fenetre, A$ LABEL Resize IF SCREEN_X < 1360 OR SCREEN_Y < 768 PRINT_LOCATE 280,220 PRINT "Aie ! :-( " DIM_LOCAL A$ A$ = "Désolé !"+ CHR$(13) A$ = A$ + "Résolution minimum d'écran requise :" + CHR$(13) A$ = A$ + " 1360 x 768 pixels" MESSAGE A$ TERMINATE END END_IF HEIGHT 0, 650 + HEIGHT(0) - HEIGHT_CLIENT(0) WIDTH 0, 1200 + WIDTH(0) - WIDTH_CLIENT(0) LEFT 0,(SCREEN_X-WIDTH(0))/2 TOP 0,(SCREEN_Y-HEIGHT(0))/2 ON_RESIZE 0,Resize END_SUB ' ------------------------------------------------------------------------------ Resize: HEIGHT 0, 650 + HEIGHT(0) - HEIGHT_CLIENT(0) WIDTH 0, 1200 + WIDTH(0) - WIDTH_CLIENT(0) RETURN ' ------------------------------------------------------------------------------ SUB Medical_room() PICTURE 1 FULL_SPACE 1 2D_TARGET_IS 1 X_Ray_Machine() Floor_walls() Door() Baseboard() Tiles() X_Ray_Feet(722,532) X_Ray_Feet(986,532) IMAGE 2 2D_IMAGE_COPY 2,0,0,1200,650 SCENE2D 3 FULL_SPACE 3 SPRITE 21 SPRITE_IMAGE_LOAD 21,2 Sprite_Girl() Finish_door() Sprite_X_Ray_Machine() Three_D_X_Ray_Machine() END_SUB ' ------------------------------------------------------------------------------ SUB X_Ray_Machine() DIM_LOCAL i% 2D_PEN_COLOR 10,10,10 2D_FILL_COLOR 15,15,15 2D_RECTANGLE 730,80,980,530 2D_PEN_COLOR 250,250,0 2D_FILL_COLOR 250,250,0 2D_RECTANGLE 730,40,980,80 X_Ray(760,60,15) PRINT_TARGET_IS 1 FONT_NAME 1,"Arial" FONT_SIZE 1,12 FONT_BOLD 1 FONT_COLOR 1,1,1,1 2D_FILL_COLOR 250,250,0 PRINT_LOCATE 800,53 PRINT "X-RAY Scanner XU1" FOR i% = 7 to 1 STEP -1 2D_PEN_COLOR 150-20*i%,150-20*i%,150-20*i% 2D_LINE 719+i%,40,719+i%,540 NEXT i% FOR i% = 1 to 7 2D_PEN_COLOR 10+20*i%,10+20*i%,10+20*i% 2D_LINE 982+i%,40,982+i%,540 NEXT i% 2D_PEN_COLOR 0,0,0 FOR i% = 1 to 3 2D_LINE 725+i%,40,725+i%,540 NEXT i% FOR i% = 1 to 3 2D_LINE 979+i%,40,979+i%,540 NEXT i% 2D_PEN_COLOR 2,2,2 2D_FILL_COLOR 2,2,2 2D_RECTANGLE 720,90,732,100 2D_RECTANGLE 720,470,732,480 2D_RECTANGLE 980,90,992,100 2D_RECTANGLE 980,470,992,480 IMAGE 5 2D_IMAGE_COPY 5,720,40,989,530 END_SUB ' ------------------------------------------------------------------------------ SUB X_Ray(x1%,y1%,r%) DEGREES DIM_LOCAL x,y,i% 2D_PEN_COLOR 250,250,0 2D_FILL_COLOR 1,1,1 2D_CIRCLE x1%,y1%,r% FOR i% = 0 to 360 STEP 60 x=COS(i%)*r%+x1% y=SIN(i%)*r%+y1% 2D_LINE x1%,y1%,x,y NEXT i% FOR i% = 30 to 390 STEP 120 x=COS(i%)*2+x1% y=SIN(i%)*2+y1% 2D_FLOOD x,y,250,250,0 NEXT i% 2D_CIRCLE x1%,y1%,r%/4 2D_FILL_COLOR 1,1,1 2D_CIRCLE x1%,y1%,r%/6+0.5 END_SUB ' ------------------------------------------------------------------------------ SUB Floor_Walls() COLOR 1,230,230,240 2D_PEN_COLOR 190,190,190 2D_LINE 0,650,200,400 2D_LINE 200,0,200,400 2D_LINE 200,400,1000,400 2D_LINE 1000,0,1000,400 2D_LINE 1000,400,1200,650 2D_FLOOD 100,20,2,250,2 2D_FLOOD 600,20,210,210,210 2D_FLOOD 1100,20,200,200,200 END_SUB ' ------------------------------------------------------------------------------ SUB Door() 2D_PEN_COLOR 90,90,90 2D_FILL_COLOR 90,90,90 2D_LINE 120,90,120,500 2D_LINE 165,75,165,445 2D_LINE 120,90,165,75 2D_LINE 117,88,117,506 2D_LINE 167,72,167,443 2D_LINE 117,88,167,72 2D_FLOOD 125,125,50,50,50 2D_FLOOD 119,470,90,90,90 2D_RECTANGLE 160,75,167,442 2D_FLOOD 125,125,50,50,50 IMAGE 4 2D_IMAGE_COPY 4,0,90,120,490 END_SUB ' ------------------------------------------------------------------------------ SUB Baseboard() 2D_PEN_COLOR 90,90,90 2D_LINE 164,433,200,390 2D_LINE 0,628,118,487 2D_LINE 200,391,1000,391 2D_LINE 1000,390,1200,628 2D_FLOOD 210,395,90,90,90 2D_FLOOD 195,400,90,90,90 2D_FLOOD 1005,400,90,90,90 2D_FLOOD 90,530,90,90,90 END_SUB ' ------------------------------------------------------------------------------ SUB Tiles() DIM_LOCAL i%,j,k,l,x,y 2D_PEN_COLOR 90,90,90 FOR i% = 40 to 760 STEP 40 2D_LINE 200+i%,400,i%*1.5,650 NEXT i% j=650 k=38 l=0 FOR i% = 1 TO 7 j=j-k l=0.8*j+680 2D_LINE 0+l,j,1200-l,j k=k-1.93 NEXT i% y=635 k=75 l=118 FOR j = 1 to 4 x=520-0.75*y FOR i% = 1 to 10 2D_FLOOD x,y,200,200,200 x = x + l NEXT i% y=y-k k=k-10 l=l- 11 NEXT j y=560 k=73 l=113 FOR j = 1 to 4 x=480-0.7*y FOR i% = 1 to 10 2D_FLOOD x+30,y+35,200,200,200 x = x + l NEXT i% y=y-k k=k-10 l=l- 11 NEXT j END_SUB ' ------------------------------------------------------------------------------ SUB X_Ray_Feet(x1,y1) DIM_LOCAL t,x,y FOR t = 1 to 360 X=15*SIN(t)+x1 y=5*COS(t)+y1 2D_POINT x,y NEXT t 2D_FLOOD x1,y1,2,2,2 END_SUB ' ------------------------------------------------------------------------------ SUB Finish_door() SPRITE 22 SPRITE_IMAGE_LOAD 22,4 SPRITE_POSITION 22,0,90 SPRITE_SHOW 22 END_SUB ' ------------------------------------------------------------------------------ SUB Sprite_X_Ray_Machine() SPRITE 23 SPRITE_IMAGE_LOAD 23,5 SPRITE_POSITION 23,720,40 SPRITE_SHOW 23 END_SUB ' ------------------------------------------------------------------------------ SUB Sprite_Girl() DIM_LOCAL i% SPRITE_CREATE_HIDE FOR i% = 1 to 20 SPRITE i% SPRITE_FILE_LOAD i%,STR$(i%)+".bmp" SPRITE_Y_POSITION i%,100 NEXT i% END_SUB ' ------------------------------------------------------------------------------ SUB Three_D_X_Ray_Machine() SCENE3D 50 COLOR 50,35,35,35 TOP 50,95 LEFT 50,750 WIDTH 50,210 HEIGHT 50,410 3D_MESH 100 3D_HIDE 100 3D_LOAD_OBJECT 100,"skeleton.3ds" END_SUB ' ------------------------------------------------------------------------------ SUB Animation() PAUSE 2000 Girl_In() PAUSE 1000 skeleton_Animation() PAUSE 800 Girl_out() PAUSE 1000 TERMINATE END_SUB ' ------------------------------------------------------------------------------ SUB Girl_In() DIM_LOCAL i%,j%,s% j%=1 FOR i% = -100 to 750 STEP 30 IF j% > 1 SPRITE_HIDE j%-1 ELSE SPRITE_HIDE 10 END_IF SPRITE_X_POSITION j%,i% SPRITE_SHOW j% PAUSE 175 j%=j%+1 IF j%=11 THEN j%=1 NEXT i% END_SUB ' ------------------------------------------------------------------------------ SUB skeleton_Animation() DIM_LOCAL i,j 3D_SCALE 100,0.3,0.3,0.3 CAM_MOVE -0.8 3D_Y_POSITION 100,0.8 3D_SHOW 100 pause 500 FOR i = 1 to 35 CAM_MOVE 0.1 3D_Y_POSITION 100,0.8-i/20 pause 50 NEXT i PAUSE 200 FOR i = 1 to 270 3D_Y_ROTATE 100,i PAUSE 30 NEXT i FOR i = 269 to 1 STEP -1 3D_Y_ROTATE 100,i PAUSE 20 NEXT i PAUSE 500 FOR i = 1 to 35 CAM_MOVE -0.1 3D_Y_POSITION 100,-0.95+i/20 pause 50 NEXT i PAUSE 500 FOR i = 1 TO -90 STEP -1 3D_Y_ROTATE 100,i PAUSE 20 NEXT i PAUSE 500 3D_HIDE 100 END_SUB ' ------------------------------------------------------------------------------ SUB Girl_Out() DIM_LOCAL i%,j%,s% j%=20 FOR i% = 750 to -100 STEP -30 IF j% > 11 SPRITE_HIDE j%-1 ELSE SPRITE_HIDE 20 END_IF SPRITE_X_POSITION j%,i% SPRITE_SHOW j% PAUSE 175 j%=j%+1 IF j%=21 THEN j%=11 NEXT i% END_SUB
| |
|