Mai 2024 | Lun | Mar | Mer | Jeu | Ven | Sam | Dim |
---|
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | | | Calendrier |
|
| | Graphisme inédit | |
| | Auteur | Message |
---|
papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Graphisme inédit Jeu 26 Avr 2012 - 16:25 | |
| Panoramiciens de tout pays, je vous salue. Comme sergeauze, moi aussi j’aime bien le graphisme. Voici donc quelques lignes de code pour tracer des superbes graphes. Essayez les différentes fonctions qui se trouvent justement dans le sous-programme FONCTION : en déplaçant l’apostrophe du REM. - Code:
-
' ****************************************************************************** ' ' GRAPHISME INEDIT ' par PAPYDALL ' ' ****************************************************************************** dim x,y,t,p,pi,r,i,a$ label fonction pi = 4*atn(1) : p = pi/360 a$ = " GRAPHISME INEDIT <CLICK> pour arrêter" caption 0,a$ color 0,0,0,0 : width 0,1000 : height 0,700 : 2d_pen_color 255,255,0
for r = 9 to 60 step 3 for i = 1 to 9 step 2 for t = 0 to 2*pi step p gosub fonction ' 2d_pen_color rnd(255),rnd(255),rnd(255) 2d_point 60 + r * x , 60 * i + r * y : 2d_point 180 + r * x , 60 * i + r * y 2d_point 300 + r * x , 60 * i + r * y : 2d_point 420 + r * x , 60 * i + r * y 2d_point 540 + r * x , 60 * i + r * y : 2d_point 660 + r * x , 60 * i + r * y 2d_point 780 + r * x , 60 * i + r * y : 2d_point 900 + r * x , 60 * i + r * y next t next i if scancode <> 0 then terminate next r caption 0, a$ +" Fin" end ' ****************************************************************************** ' *** Essayez ces différentes formules fonction: x = sin(t)*sin(t)*sin(t)*hcos(t) : y = cos(t)*cos(t)*cos(t) ' x = sin(t)*sin(t)*sin(t) : y = cos(t)*cos(t)*cos(t) ' x = hsin(t) : y = hcos(t)*hcos(t) ' x = hsin(t)*htan(t)*sin(t) : y = hcos(t)*hcos(t)*cos(t) ' x = sin(hsin(t)*hsin(t)*hsin(t)) : y = cos(hcos(t)*hcos(t)*hcos(t)) ' x = htan(hsin(t)*hsin(t)*hsin(t)) : y = log(hcos(t)*hcos(t)*hcos(t)) ' x = log(abs(hsin(t)*hsin(t)*hsin(t))+1) : y = cos(hcos(t)*hcos(t)*hcos(t)) ' x = log(abs(hcos(t)+pi)) : y = exp(sin(t)) ' x = sin(t)*sin(t)*sin(t)*hcos(t) : y = cos(t)*cos(t)*cos(t)*hsin(t) ' x = hsin(t)*sin(t)*sin(t)*hcos(t) : y = hcos(t)*cos(t)*cos(t) ' x = hsin(t)*sin(t)*cos(t)*cos(hcos(t)) : y = sin(hcos(t))*cos(t)*hsin(t) ' x = hsin(t)*sin(t/2)*tan(sin(t/3)*hcos(t/4)):y = sin(hcos(t)*cos(t)*cos(t/7)) ' x = log(abs(hcos(t)+pi)) : y = exp(sin(t))*hsin(exp(cos(t))) ' x = hsin(log(abs(hcos(t)+pi))): y = exp(sin(t*3))*hsin(exp(cos(t*5)))*htan(t*7) return
| |
| | | sergeauze
Nombre de messages : 391 Age : 71 Localisation : Hautes Alpes France Date d'inscription : 09/01/2010
| Sujet: re:Graphisme inédit Jeu 26 Avr 2012 - 18:10 | |
| Salut c'est du plus bel effet! L'utilisation du balayage sur la ligne des x et du mouvement d'avance sur la ligne des y renforcent bien la presentation . J'ai rajoute un " display" ligne 23 ,avant next t cà bloquait un peu chez moi et ça a resolu le pb. Je suis dans l'attente de ca qui va suivre | |
| | | sergeauze
Nombre de messages : 391 Age : 71 Localisation : Hautes Alpes France Date d'inscription : 09/01/2010
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 19:02 | |
| Je reste fidele à sin et cos ! Vu le calme sur le forun : je me met s à la broderie. - Code:
-
dim x0,y0,r,x1,y1,x,beta,x2,y2,r1 ,beta1 ,beta2 dim x3,y3,r2 dim beta3 ,y4,x4,r3 width 0,1000 height 0,1000 x0=500 y0=500 r=400 r1=40 r2=15 r3=5 color 0,0,0,0 2d_circle x0,y0,1 beta=0.1/52.29 for x=1 to 150000 step 9
r=r-0.02 beta =beta+(0.1/52.29) y1=y0+sin(beta)*r x1=x0+cos(beta)*r ' 2d_pen_color 255,0,0 ' 2d_fill_color 255,0,0 ' 2d_circle y1,x1,1
beta1=beta1+(0.8/52.29) y2=y1+(sin (beta1)*r1) x2=x1+(cos(beta1)*r1) 2d_fill_color 0,255,0 2d_pen_color 0,255,0 2d_circle y2 ,x2,1
beta2=beta2+(2.4/52.29) y3=y2-(sin(beta2)*r2) x3=x2-(cos(beta2)*r2) 2d_fill_color 0,0,255 2d_pen_color 0,0,255 2d_circle y3,x3,8
beta3=beta3+(12.7/52.29) y4=y3-(sin(beta3)*r3) x4=x3-(cos(beta3)*r3) 2d_fill_color 0,0,255 2d_pen_color 255,0,0 2d_circle y4,x4,5 display
if key_down_code=27 then terminate next x | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 19:03 | |
| Salut sergeauze. Chez moi (sous Windows XP), le DISPLAY, ne change rien ! Avec ou sans DISPLAY, le tracé est correct. A+ | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 19:39 | |
| Je me suis permis de modifier ton code. Voici le résultat. - Code:
-
dim x0,y0,r,x1,y1,x,beta,x2,y2,r1,beta1,beta2 dim x3,y3,r2,beta3,y4,x4,r3 width 0,1000 : height 0,1000 x0=500 : y0 = 500 : r = 400 : r1 = 40 : r2 = 15 : r3 = 5 color 0,0,0,0 : 2d_circle x0,y0,1
beta = 0.1/52.29 for x = 1 to 150000 step 9 r = r - 0.02 : beta = beta +(0.1 / 52.29) y1 = y0 + sin(beta)* r * cos(beta) : x1 = x0 + cos(beta)* r beta1 = beta1 + (0.8 / 52.29) y2 = y1 +(sin(beta1)* r1)*cos(beta) : x2 = x1 +(cos(beta1)* r1) 2d_fill_color 0,255,0 : 2d_pen_color 0,255,0 : 2d_circle y2,x2 - 60,1 beta2 = beta2 +(2.4 / 52.29) y3 = y2 -(sin(beta2)*r2)*htan(beta1/beta2) : x3 = x2-(cos(beta2)*r2)*htan(beta) 2d_fill_color 0,0,255 : 2d_pen_color 0,0,255 : 2d_circle y3,x3,8
beta3 = beta3 +(12.7 / 52.29) y4 = y3-(sin(beta3)*r3) : x4 = x3-(cos(beta3)* r3) 2d_fill_color 0,0,255 : 2d_pen_color 255,0,0 : 2d_circle y4,x4,5 display if key_down_code = 27 then terminate next x
| |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 23:17 | |
| Bon, je sais, je teste tard ... Bon, une petite variante mineure sur le programme de papydall - Code:
-
' ****************************************************************************** ' ' GRAPHISME INEDIT ' par PAPYDALL ' ' ******************************************************************************
dim x,y,t,p,pi,r,i,c,a$ label fonction, fin pi = 4*atn(1) : p = pi/360 : c= 40 : a$ = " GRAPHISME INEDIT <CLICK> pour arrêter" caption 0,a$ : color 0,0,0,0 : width 0,1000 : height 0,700
for r = 9 to 70 step 3 for i = 1 to 10 step 2 for t = 0 to 2*pi step p gosub fonction 2d_pen_color 3*r+c,2*r+c, i*c/2 2d_point 60 + r * x , 60 * i + r * y : 2d_point 180 + r * x , 60 * i + r * y 2d_point 300 + r * x , 60 * i + r * y : 2d_point 420 + r * x , 60 * i + r * y 2d_point 540 + r * x , 60 * i + r * y : 2d_point 660 + r * x , 60 * i + r * y 2d_point 780 + r * x , 60 * i + r * y : 2d_point 900 + r * x , 60 * i + r * y if scancode <> 0 then goto fin display next t next i next r
fin: caption 0, a$ +" - Programme terminé" end
' ****************************************************************************** ' *** Essayez ces différentes formules fonction: ' x = sin(t)*sin(t)*sin(t)*hcos(t) : y = cos(t)*cos(t)*cos(t) ' x = sin(t)*sin(t)*sin(t) : y = cos(t)*cos(t)*cos(t) ' x = hsin(t) : y = hcos(t)*hcos(t) ' x = hsin(t)*htan(t)*sin(t) : y = hcos(t)*hcos(t)*cos(t) ' x = sin(hsin(t)*hsin(t)*hsin(t)) : y = cos(hcos(t)*hcos(t)*hcos(t)) ' x = htan(hsin(t)*hsin(t)*hsin(t)) : y = log(hcos(t)*hcos(t)*hcos(t)) ' x = log(abs(hsin(t)*hsin(t)*hsin(t))+1) : y = cos(hcos(t)*hcos(t)*hcos(t)) ' x = log(abs(hcos(t)+pi)) : y = exp(sin(t)) ' x = sin(t)*sin(t)*sin(t)*hcos(t) : y = cos(t)*cos(t)*cos(t)*hsin(t) ' x = hsin(t)*sin(t)*sin(t)*hcos(t) : y = hcos(t)*cos(t)*cos(t) ' x = hsin(t)*sin(t)*cos(t)*cos(hcos(t)) : y = sin(hcos(t))*cos(t)*hsin(t) ' x = hsin(t)*sin(t/2)*tan(sin(t/3)*hcos(t/4)):y = sin(hcos(t)*cos(t)*cos(t/7)) ' x = log(abs(hcos(t)+pi)) : y = exp(sin(t))*hsin(exp(cos(t))) x = hsin(log(abs(hcos(t)+pi))): y = exp(sin(t*3))*hsin(exp(cos(t*5)))*htan(t*7) return | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 23:39 | |
| Salut coloriste du Forum! Voici Ma fractale à moi! - Code:
-
' ****************************************************************************** ' ' MA FRACTALE A MOI ' PAR PAPYDALL ' ' ****************************************************************************** DIM point(6,2),rndpoint,tempo,i,x,y point(1,1) = 0 : point(1,2) = 350 : point(2,1) = 250 : point(2,2) = 0 point(3,1) = 750 : point(3,2) = 0 : point(4,1) = 1000 : point(4,2) = 350 point(5,1) = 750 : point(5,2) = 700 : point(6,1) = 250 : point(6,2) = 700 width 0,1000 : height 0,900 : color 0,0,0,0 : font_color 0,255,255,0 caption 0,"VEUILLEZ PATIENTER <CLICK> POUR ARRETER" 2d_pen_color 0,255,0 : 2d_clear : font_bold 0 : font_size 0,20 while scancode = 0 for i = 1000 to -350 step -1 : ' Pour accélérer print_locate i,10 : print "=== MA FRACTALE ===" : ' le tracé print_locate i,670 : print "=== PAR PAPYDALL ===" : ' mettez ces 5 for tempo = 1 to 500 : next tempo : ' lignes rndpoint = int(6*rnd(1)+1) x = (x + point(rndpoint,1))/2.9 : y = (y + point(rndpoint,2))/2.6 2d_point x + 200,y + 120 next i : ' en REM end_while terminate
Ce programme a été édité une fois
Dernière édition par papydall le Jeu 26 Avr 2012 - 23:59, édité 1 fois | |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Jeu 26 Avr 2012 - 23:56 | |
| Et une variante du programme de Sergauze aussi avant de tester le dernier programme de Papydall - Code:
-
dim x0,y0,r,r1,r2,r3,x1,y1,x,beta,x2,y2,beta1,beta2,x3,y3,beta3,y4,x4 x0=400 : y0 = 400 : beta = 0.1/52.29 r = 400 : r1 = 40 : r2 = 15 : r3 = 5
width 0,800 : height 0,800 : color 0,0,0,0
for x = 1 to 150000 step 9 r = r - 0.02 : beta = beta +(0.1 / 52.29) y1 = y0 + sin(beta)* r * cos(beta) : x1 = x0 + cos(beta)* r beta1 = beta1 + (0.8 / 52.29) : y2 = y1 +(sin(beta1)* r1)*cos(beta) : x2 = x1 +(cos(beta1)* r1) if x2 <= 500 then 2d_fill_color 0,x2/2,0 : 2d_pen_color 0,x2/2,0 if x2 > 500 then 2d_fill_color y2/3,(800-x2)/2+20,0 : 2d_pen_color y2/3,(800-x2)/2+20,0 2d_circle y2,x2,2 : 2d_circle x2,y2,2 beta2 = beta2 +(2.4 / 52.29) : y3 = y2 -(sin(beta2)*r2)*htan(beta1/beta2) : x3 = x2-(cos(beta2)*r2)*htan(beta) caption 0,x3 2d_fill_color 0,abs(400 - y3)/2,x3/3.7 + 20 : 2d_pen_color 0,abs(400 - y3)/2,x3/3.7 + 20 : 2d_circle y3,x3,4 : 2d_circle x3,y3,4
beta3 = beta3 +(12.7 / 52.29) y4 = y3-(sin(beta3)*r3) : x4 = x3-(cos(beta3)* r3) 2d_fill_color 0,0,255 : 2d_pen_color 255,0,0 : 2d_circle y4,x4,3 : 2d_circle x4,y4,3 display : if key_down_code = 27 then terminate next x | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Ven 27 Avr 2012 - 0:09 | |
| C’est magnifique ce que tu fais, Jicehel ! Sergeauze va être ravi de voir son code devenu un chef d’œuvre ! | |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Ven 27 Avr 2012 - 0:21 | |
| Merci Papydall ^^ Bon, je n'ai pas modifié grand chose au tient non plus, j'ai essayé de faire un effet, mais on peut désactiver le deuxième 2d_point si on n'aime pas et que l'on préfère la figure seule... - Code:
-
' ****************************************************************************** ' ' MA FRACTALE A MOI ' PAR PAPYDALL ' ' ****************************************************************************** DIM point(6,2),rndpoint,tempo,i,j,x,y,a$ point(1,1) = 0 : point(1,2) = 350 : point(2,1) = 250 : point(2,2) = 0 point(3,1) = 750 : point(3,2) = 0 : point(4,1) = 1000 : point(4,2) = 350 point(5,1) = 750 : point(5,2) = 700 : point(6,1) = 250 : point(6,2) = 700 width 0,1000 : height 0,900 : color 0,0,0,0 : font_color 0,255,255,0 a$ = "VEUILLEZ PATIENTER <CLICK> POUR ARRETER" caption 0, a$ 2d_clear : font_bold 0 : font_size 0,20 for i = 1000 to -350 step -1 : ' Pour accélérer print_locate i,10 : print "=== MA FRACTALE ===" : ' le tracé, mettre print_locate i,670 : print "=== PAR PAPYDALL ===" : ' ces 4 lignes en for j = 1 to 40 2d_pen_color x/5 + j*2,abs(i-150)/6 + j*2,y/5 + j*2 : ' commmentaires rndpoint = int(6*rnd(1)+1) : x = (x + point(rndpoint,1))/2.9 : y = (y + point(rndpoint,2))/2.6 2d_point x + 100 ,y + 80 2d_point x + 100 + j*8,y + 80 if scancode <> 0 then exit_for next j if scancode <> 0 then exit_for next i caption 0, a$ + " - Programme terminé" end | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Ven 27 Avr 2012 - 1:38 | |
| Jicehel, what do you do is very good ! Mais, moi, je préfère ceci : (simple question de goût!) - Code:
-
' ****************************************************************************** ' ' MA FRACTALE A MOI ' PAR PAPYDALL ' ' ****************************************************************************** DIM point(6,2),rndpoint,tempo,i,j,x,y,a$ point(1,1) = 0 : point(1,2) = 350 : point(2,1) = 250 : point(2,2) = 0 point(3,1) = 750 : point(3,2) = 0 : point(4,1) = 1000 : point(4,2) = 350 point(5,1) = 750 : point(5,2) = 700 : point(6,1) = 250 : point(6,2) = 700 width 0,1000 : height 0,900 : color 0,0,0,0 : font_color 0,255,255,0 a$ = "VEUILLEZ PATIENTER <CLICK> POUR ARRETER" caption 0, a$ 2d_clear : font_bold 0 : font_size 0,20 while scancode = 0 for i = 1000 to -350 step -1 print_locate i,10 : print "=== MA FRACTALE ===" : ' Pour accélérer mettre print_locate i,670 : print "=== PAR PAPYDALL ===" : ' ces 2 lignes en REM for j = 1 to 10 2d_pen_color x/5 + j*10,abs(i-150)/6 + j*10,y/5 + j*10 : ' commmentaires rndpoint = int(6*rnd(1)+1) x = (x + point(rndpoint,1))/2.9 : y = (y + point(rndpoint,2))/2.6 2d_point x + 200 ,y + 120 next j if scancode <> 0 then exit_for next i end_while caption 0, a$ + " - Programme terminé" end
| |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Ven 27 Avr 2012 - 8:07 | |
| Je m'en doutais C'est vrai que c'est plus "propre" comme ça | |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Ven 27 Avr 2012 - 23:02 | |
| Bon j'essaye de nouveau de vous convaincre de passer à la 3D (je peux toujours essayer ...) Bon moi, les courbes, pour avoir les équations, ce n'est pas mon truc, celle là est regardable, mais je compte sur vous pour trouver des fonctions plus sympas. Je suis sûr que les matheux trouveront facilement comment l'adapter, le code est assez simple (normal pour tracer des courbes, pas besoin d'une usine à gaz). La seconde partie du programme sert juste à visualiser la scène sous différents angles. - Code:
-
' **************************************************** ' * Courbes en 3D v1.0 - Ecrit en Basic Panoramic * ' **************************************************** ' label fin
dim titre$ : titre$ = "Courbes 3D" dim X,Y,Z,k,A,B : A=50 : B=3.2 : ' Paramètres des fonctions à modifier
' Définition de Pi Dim Pi : Pi = 4*ATN(1)
width 0,1000 : height 0,700 : caption 0,titre$
scene3d 1 : full_space 1 : color 1,170, 170, 255 : ' le monde 3D avec fond bleu clair cam_x_position 10 : cam_y_position 10 : cam_z_position 32 : ' positionne la camera point_x_position 12.5 : point_y_position -10: point_z_position -10 : ' objectif dirigé vers le centre light_x_position -50 : light_y_position 0: light_z_position 500 : ' positionne la lumiere
k=1 for X = 1 to 25 step 0.5 for Y = 1 to 25 step 0.25 z = (cos(A*x) * sin (B*y)+3) 3d_line k,0,0,0 : 3d_line k,0,z,0 if scancode<>0 or key_down_code = 27 then goto fin 3d_color k,50+X*5,155-z*5,155-y*5:3d_position k,x,0,y: 3d_line_width k,5 : k=k+1 next Y if scancode<>0 or key_down_code = 27 then goto fin next X
' Affichage des objets en changeant d'angle de point de vue for x= 10 to 30 cam_x_position 2*X - 10 : cam_y_position 20+0.5*x : cam_z_position 32 display if scancode<>0 or key_down_code = 27 then goto fin next x for x= 30 to 10 step -0.5 cam_x_position 2*X - 10 : cam_y_position 20+0.5*x : cam_z_position 62-x display if scancode<>0 or key_down_code = 27 then goto fin next x
'Fin du programme fin: caption 0,titre$ + " - Programme arrêté" end | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 2:20 | |
| Alors, on s’est mis à l’école des maths ? Pour quelqu’un que les équations ne sont pas son truc, c’est bravo ! Tout en restant dans l’esprit de ton programme, j’ai seulement bricolé (!!!) quelques équations regardables comme tu l’as si bien dit. Même si on n’est pas doué, on peut toujours essayer avec SIN, COS, HSIN, HCOS, etc. Ce n’est vraiment pas sorcier ! - Code:
-
' **************************************************** ' * Courbes en 3D v1.0 - Ecrit en Basic Panoramic * ' **************************************************** ' label fin
dim titre$ : titre$ = "Courbes 3D" dim X,Y,Z,k,A,B : A=50 : B=3.2 : ' Paramètres des fonctions à modifier
' Définition de Pi Dim Pi : Pi = 4*ATN(1)
width 0,1000 : height 0,700 : caption 0,titre$
scene3d 1 : full_space 1 : color 1,170, 170, 255 : ' le monde 3D avec fond bleu clair cam_x_position 10 : cam_y_position 10 : cam_z_position 32 : ' positionne la camera point_x_position 12.5 : point_y_position -10: point_z_position -10 : ' objectif dirigé vers le centre light_x_position -50 : light_y_position 0: light_z_position 500 : ' positionne la lumiere
k=1 for X = 1 to 25 step 0.5 for Y = 1 to 25 step 0.25 ' z = cos(A*x) * sin (B*y)+3 z = hcos((cos(A*x) * sin (B*y)+3)) ' z = 1.834*(cos(A*x) * sin (B*y)+10)*cos(x) ' z = hcos((cos(A*x/3) * sin (B*y/7)+3)) ' z = hcos(cos(A*x/7) * sin (B*y/17)+3) ' z = (cos(A*x) * sin (B*y)+10)*sin(x)*cos(y)+20 ' z = (cos(A*x) * sin (B*y)+10)*cos(a*x) ' z = log((cos(A*x) * sin (B*y)+10)*cos(a*x)+100)/(hsin(x*y)-1) ' z = 25*htan(cos(A*x) * sin (B*y)+3)+2*cos(x*y/99) 3d_line k,0,0,0 : 3d_line k,0,z,0 if scancode<>0 or key_down_code = 27 then goto fin 3d_color k,50+X*5,155-z*5,155-y*5 3d_position k,x,0,y: 3d_line_width k,5 : k=k+1 next Y if scancode<>0 or key_down_code = 27 then goto fin next X
' Affichage des objets en changeant d'angle de point de vue for x= 10 to 30 cam_x_position 2*X - 10 : cam_y_position 20+0.5*x : cam_z_position 32 display if scancode<>0 or key_down_code = 27 then goto fin next x for x= 30 to 10 step -0.5 cam_x_position 2*X - 10 : cam_y_position 20+0.5*x : cam_z_position 62-x display if scancode<>0 or key_down_code = 27 then goto fin next x
' Fin du programme fin: caption 0,titre$ + " - Programme arrêté" end
| |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 6:37 | |
| Merci Papydall pour les équations, ça le fait bien | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 13:30 | |
| Bonjour Jicehel ! J’ai repris l’idée de ton programme pour réaliser le mien ! Voici ce que cela donne. - Code:
-
' ****************************************************************************** ' * PAPYDALL EXPERIMENTE LA 3D ' ******************************************************************************
dim titre$,x,y,z,k,a,pi,u,v,x1 titre$ = "PAPYDALL EXPERIMENTE LA 3D" + string$(80," ")+ "Veuillez patienter"
pi = 4*atn(1): a = 10 : k=1 width 0,1020 : height 0,800 : caption 0,titre$
scene3d 1 : full_space 1 : color 1,170,170,255 cam_x_position 20 : cam_y_position 10 : cam_z_position 32 point_x_position 12.5 : point_y_position -10 : point_z_position -10 light_x_position -50 : light_y_position 0 : light_z_position 500
for u = 0 to 2*pi step 0.1 for v = 0 to 2*pi step 0.1 : ' Essayez ces différentes fonctions x = a*cos(u/3) : y = a*cos(v/5) : z = a*(sin(u) + sin(v/11)) ' x = 5+a*cos(u) : y = 3+a*cos(v) : z = 2+a*(sin(u)+sin(v)) ' x = 6+a*cos(u)*cos(v) : y = a/2*cos(v)*sin(u) : z = a*(sin(u)+sin(v)) ' x = a/2+u*cos(v) : y = a/2+u*sin(v) : z = a+u*v*sin(v)*cos(v) ' x = 6+a*sin(10*u) : y = 5 + a*tan(v/10) : z = hsin(u/10)+a/2*sin(v) ' x =5+a*sin(cos(u)*cos(v)) : y=a+sqr(int(a+5*x/a)) : z=5+a*sin(u)+a/2*sin(v) ' x = 6+a*cos(2*u) : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(7*v) ' x = hcos(2*u)/3000 : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(v)
3d_line k,0,0,0 : 3d_line k,x,y,z : 3d_color k,5*(x+10),5*(31-z),5*(31-y) 3d_position k,x,0,y : 3d_line_width k,1 : k=k+1 next v next u
for x1 = 10 to 300 step 3 cam_x_position X1 - 5 : cam_y_position 20+0.5*x1 : cam_z_position 1-x1 display next x1
for x1 = 300 to 10 step -3 cam_x_position X1 - 5 : cam_y_position 20-0.5*x1 : cam_z_position 35-x1 display next x1 caption 0,titre$ + string$(80," ")+"TERMINE" end
| |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 15:48 | |
| Cool Papydall, j'ai modifié un peu "l'animation" de la figure obtenue dans la version ci dessous, mais bon si les pros (ou presque) de la 3D étaient là au lei de faire leur généalogie (oui, je sais, c'est un coup bas, mais bon, ils manques les affreux ...), ils feraient sans doute beaucoup mieux au niveau animation de la caméra ... - Code:
-
' ****************************************************************************** ' * PAPYDALL EXPERIMENTE LA 3D ' ****************************************************************************** label fin
dim titre$,x,y,z,k,a,pi,u,v,x1 titre$ = "PAPYDALL EXPERIMENTE LA 3D" + string$(80," ")+ "Veuillez patienter"
pi = 4*atn(1): a = 10 : k=1 width 0,1020 : height 0,800 : caption 0,titre$
scene3d 1 : full_space 1 : color 1,170,170,255 cam_x_position 20 : cam_y_position 10 : cam_z_position 32 point_x_position 12.5 : point_y_position -10 : point_z_position -10 light_x_position -50 : light_y_position 0 : light_z_position 500
for u = 0 to 2*pi step 0.1 for v = 0 to 2*pi step 0.1 : ' Essayez ces différentes fonctions x = a*cos(u/3) : y = a*cos(v/5) : z = a*(sin(u) + sin(v/11)) ' x = 5+a*cos(u) : y = 3+a*cos(v) : z = 2+a*(sin(u)+sin(v)) ' x = 6+a*cos(u)*cos(v) : y = a/2*cos(v)*sin(u) : z = a*(sin(u)+sin(v)) ' x = a/2+u*cos(v) : y = a/2+u*sin(v) : z = a+u*v*sin(v)*cos(v) ' x = 6+a*sin(10*u) : y = 5 + a*tan(v/10) : z = hsin(u/10)+a/2*sin(v) ' x =5+a*sin(cos(u)*cos(v)) : y=a+sqr(int(a+5*x/a)) : z=5+a*sin(u)+a/2*sin(v) ' x = 6+a*cos(2*u) : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(7*v) ' x = hcos(2*u)/3000 : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(v)
3d_line k,0,0,0 : 3d_line k,x,y,z : 3d_color k,5*(x+10),5*(31-z),5*(31-y) 3d_position k,x,0,y : 3d_line_width k,1 : k=k+1 if scancode<>0 or key_down_code = 27 then goto fin next v next u
for x1 = 300 to -300 step -3 cam_x_position 0.2*abs(X1)+20 : cam_y_position 0.2*x1 : cam_z_position abs(x1)/1.5 - 80 if scancode<>0 or key_down_code = 27 then goto fin display next x1
fin: caption 0,titre$ + string$(80," ")+"TERMINE" end | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 18:54 | |
| Salut Jicehel ! Dois-je comprendre que tu parles du BIG (pour ne pas le nommer !) ? Il est peut-être sur une branche assez touffue de son arbre généalogique ! En fait, il n’a pas donné un signe de vie depuis un bon moment. Il a dit qu’il sera absent du Forum pour un moment. | |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Sam 28 Avr 2012 - 19:58 | |
| Exact Mais bon, je suis sûr qu'il jette un oeil de temps à autre, alors j'essaye de le titiller pour qu'il remette un peu son nez dans les codes.... Il est complémentaire dans "l'équipe de Panoramic" est j'aime bien aussi les sujets qu'il soulève. En plus il est un peu fou (un peu comme Klaus dans un autre domaine) et s'attaque à de gros trucs (même pas peur tous les deux ...). Bon on verra bien s'il mord à l’hameçon ... | |
| | | bignono
Nombre de messages : 1127 Age : 66 Localisation : Val de Marne Date d'inscription : 13/11/2011
| Sujet: Re: Graphisme inédit Dim 29 Avr 2012 - 17:50 | |
| Bonjour à tous, amis panoramiciens! Jicehel, tu es le "titilleur" officiel de panoramic! Et moi, un vieux fou qui s'attaque à des gros trucs! Tu verras mon prochain programme, Jicehel, c'est exactement ça! Vraiment par moment, je suis un peu ! Je ne croyais pas réussir à m'en sortir... mais patience! Bon j'ai quand même regardé vos programmes, mais vos équations, je trouve que ça s'adapte mieux à des graphismes en 2d qu'en 3d! Enfin, c'est mon point de vue personnel! Alors, j'ai juste extrait de mon programme 3d world la partie qui permet de se déplacer dans l'univers 3d et je l'ai adaptée au programme de papydall. Toutes les commandes sont affichées à gauche. Je vous conseille de mettre les vitesses de déplacement au maximum, car vu le nombre d'objets 3d_line que vous avez créé, panoramic rame un peu. Mon écran est en 1600x900 donc Jicehel, tu seras obligé de t"adapter. Tu as la place pour recaler les édit, les combo et les textes. Je te fais confiance. - Code:
-
' ****************************************************************************** ' * PAPYDALL EXPERIMENTE LA 3D ' ****************************************************************************** label fin,evolue,ascenseur,bouge,vision dim j,w,rot,ptz,pty,ptx,bh,hy,vhy,vd,vrot dim titre$,x,y,z,k,a,pi,u,v,x1 titre$ = "PAPYDALL EXPERIMENTE LA 3D" pi = 4*atn(1): a = 10 : k=100
full_space 0:color 0,120,140,160:display:caption 0,titre$ scene3d 1:width 1,screen_x-150:height 1,screen_y-98:left 1,134
color 1,170,170,255
' cam_x_position 20 : cam_y_position 10 : cam_z_position 32 ' point_x_position 12.5 : point_y_position -10 : point_z_position -10 light_x_position -50 : light_y_position 0 : light_z_position 500
3d_cube 1,1:3d_hide 1:3d_cube 2,1:3d_hide 2 vrot=1:rot=180:vd=.2:vhy=0.01:hy=1.7:bh=0 3d_position 1,0,0,10:3d_y_rotate 1,rot
edit 61:hide 61:left 61,1:top 61,70:width 61,129:height 61,25 edit 70:hide 70:left 70,1:top 70,210:width 70,129:height 70,25 edit 79:hide 79:left 79,1:top 79,350:width 79,129:height 79,25 combo 94:hide 94:left 94,1:top 94,415:width 94,129:height 94,25: ' sert à règler la vitesse de déplacement combo 95:hide 95:left 95,1:top 95,455:width 95,129:height 95,25: ' sert à règler la vitesse ascensionnelle combo 96:hide 96:left 96,1:top 96,495:width 96,129:height 96,25: ' sert à règler la vitesse de rotation for j=0.25 to 10 step 0.25:item_add 94,str$(j/10):item_add 96,str$(j):next j for j=0.1 to 5 step 0.1:item_add 95,str$(j/10):next j timer 99:timer_interval 99,1:timer_off 99:on_timer 99,bouge gosub evolue end
evolue: for u = 0 to 2*pi step 0.1 for v = 0 to 2*pi step 0.1 : ' Essayez ces différentes fonctions ' x = a*cos(u/3) : y = a*cos(v/5) : z = a*(sin(u) + sin(v/11)) ' x = 5+a*cos(u) : y = 3+a*cos(v) : z = 2+a*(sin(u)+sin(v)) ' x = 6+a*cos(u)*cos(v) : y = a/2*cos(v)*sin(u) : z = a*(sin(u)+sin(v)) ' x = a/2+u*cos(v) : y = a/2+u*sin(v) : z = a+u*v*sin(v)*cos(v) ' x = 6+a*sin(10*u) : y = 5 + a*tan(v/10) : z = hsin(u/10)+a/2*sin(v) ' x =5+a*sin(cos(u)*cos(v)) : y=a+sqr(int(a+5*x/a)) : z=5+a*sin(u)+a/2*sin(v) ' x = 6+a*cos(2*u) : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(7*v) x = hcos(2*u)/3000 : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(v)
3d_line k,0,0,0 : 3d_line k,x,y,z : 3d_color k,5*(x+10),5*(31-z),5*(31-y) 3d_position k,x,0,y : k=k+1 ' 3d_sphere k,0.1:3d_scale k,abs(x+0.01),abs(y+0.01),abs(z+0.01) ' 3d_color k,5*(x+10),5*(31-z),5*(31-y) ' 3d_position k,x,0,y : k=k+1 next v next u:display
font_color 0,0,0,0:font_name 0,"Consolas":font_bold 0:font_size 0,8 show 61:show 70:show 79:show 94:show 95:show 96 print_locate 0,732:print "______________________" print_locate 0,730:print "Espace|Vue aérienne" print_locate 0,718:print "______________________" print_locate 0,716:print " O |Point Origine" print_locate 0,704:print "______________________" print_locate 0,702:print " B |Voir en bas" print_locate 0,690:print "______________________" print_locate 0,688:print " H |Voir en haut" print_locate 0,676:print "______________________" print_locate 0,674:print " - |Descends" print_locate 0,662:print "______________________" print_locate 0,660:print " + |Monte" print_locate 0,648:print "______________________" print_locate 0,646:print " > |Pivote à droite" print_locate 0,634:print "______________________" print_locate 0,632:print " < |Pivote à gauche" print_locate 0,620:print "______________________" print_locate 0,618:print " v |Recule" print_locate 0,606:print "______________________" print_locate 0,604:print " ^ |Avance" print_locate 0,592:print "______________________" print_locate 0,590:print " 6 |Va à droite" print_locate 0,578:print "______________________" print_locate 0,576:print " 4 |Va à gauche" print_locate 0,564:print "______________________" print_locate 0,562:print " COMMANDES CLAVIER" print_locate 0,549:print "______________________" print_locate 0,547:print "______________________" print_locate 0,515:print "______________________" print_locate 0,513:print "______________________" print_locate 0,480:print " Rotation" print_locate 0,440:print " Ascensionnelle" print_locate 0,400:print " Déplacement" print_locate 0,385:print "______________________" print_locate 0,383:print " VITESSES" print_locate 0,370:print "______________________" print_locate 0,368:print "______________________" print_locate 25, 56:print "POSITION X" print_locate 25,196:print "ALTITUDE" print_locate 25,336:print "POSITION Z"
timer_on 99 return
bouge: timer_off 99 if clicked(94)=1 then vd=val(item_read$(94,item_index(94))):set_focus 0 if clicked(95)=1 then vhy=val(item_read$(95,item_index(95))):set_focus 0 if clicked(96)=1 then vrot=val(item_read$(96,item_index(96))):set_focus 0 print_locate 0,535:print " " print_locate 0,535:print "Angle: "+str$(wrap_value(rot))+"°" select scancode case 27:gosub fin case 32:w=hy:gosub ascenseur: ' Barre d'espace case 37:rot=rot+vrot:3d_y_rotate 1,rot: ' Flèche gauche case 39:rot=rot-vrot:3d_y_rotate 1,rot: ' Flèche droite case 38:3d_move 1,vd: ' Flèche haute case 40:3d_move 1,vd-(2*vd): ' Flèche basse ' touche 4 case 52:3d_x_position 1,o3d_x_position(1)+(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)-(sin(rot*3.1415/180)*vd) ' touche 6 case 54:3d_x_position 1,o3d_x_position(1)-(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)+(sin(rot*3.1415/180)*vd) case 98:3d_move 1,vd-(2*vd): ' touche 2 pavé numérique ' touche 4 pavé numérique case 100:3d_x_position 1,o3d_x_position(1)+(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)-(sin(rot*3.1415/180)*vd) ' touche 6 pavé numérique case 102:3d_x_position 1,o3d_x_position(1)-(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)+(sin(rot*3.1415/180)*vd) case 104:3d_move 1,vd: ' touche 8 pavé numérique case 107:hy=hy+vhy: ' touche "+" case 109:hy=hy-vhy: ' touche "-" case 72:bh=bh-.2:if bh<-11 then bh=-11: ' touche "H" case 66:bh=bh+.2:if bh>11 then bh=11: ' touche "B" case 79: ' touche "O" bh=0:hy=1.7:rot=180 3d_position 1,0,0,10:3d_y_rotate 1,rot end_select gosub vision timer_on 99 return
vision: ptx=o3d_x_position(1):pty=o3d_y_position(1)+hy:ptz=o3d_z_position(1) 3d_position 2,ptx,pty,ptz 3d_rotate 2,o3d_x_rotate(1),o3d_y_rotate(1),o3d_z_rotate(1) 3d_move 2,1:cam_position o3d_x_position(1),sin(bh/6.28)+hy,o3d_z_position(1) point_position o3d_x_position(2),hy,o3d_z_position(2) ptx=int(ptx*1000)/1000:pty=int(pty*1000)/1000:ptz=int(ptz*1000)/1000 text 61,str$(ptx):text 70,str$(pty):text 79,str$(ptz) return ' Vision ascensionnelle ascenseur: repeat w=w+5:cam_position o3d_x_position(1),w,o3d_z_position(1):display:text 70,str$(w) until w>=300 repeat if scancode=37 rot=rot+vrot:3d_y_rotate 1,rot:gosub vision cam_position o3d_x_position(1),o3d_y_position(1)+w,o3d_z_position(1) end_if if scancode=39 rot=rot-vrot:3d_y_rotate 1,rot:gosub vision cam_position o3d_x_position(1),o3d_y_position(1)+w,o3d_z_position(1) end_if until scancode=32 repeat w=w-5:cam_position o3d_x_position(1),w,o3d_z_position(1):display:text 70,str$(w) until w<=hy return
fin: terminate J'ai voulu essayer voir ce que cela donnait avec des sphères, donc j'ai laissé les 3 lignes en rem(apostrophe). Je n'ai pas essayé avec des cubes ou cones ou autres. Il me reste à vous souhaiter à tous une bonne soirée et à bientôt! | |
| | | JL35
Nombre de messages : 7095 Localisation : 77 Date d'inscription : 29/11/2007
| Sujet: Re: Graphisme inédit Dim 29 Avr 2012 - 18:33 | |
| bravo bignono, ça n'a ni queue ni tête, mais c'est bien joli ! | |
| | | papydall
Nombre de messages : 7009 Age : 73 Localisation : Moknine (Tunisie) Entre la chaise et le clavier Date d'inscription : 03/03/2012
| Sujet: Re: Graphisme inédit Dim 29 Avr 2012 - 18:54 | |
| Salut Bignono ! Je suis très ravi de ton intervention. Je trouve que les apports à mon programme sont géniaux : le résultat est M-A-G-N-I-F-I-Q-U-E. Pour tout dire tu es BIG. Et Jicehel a dit vrai en ce qui te conserne (le fait que tu es le pro de la 3D ; quant à la folie… heu ! ça se discute ! Une chose est sûre : en plus d’être le « coloriste officiel du Forum », Jicehel est également le « titilleur officiel » ! Et je dirai même plus : il est aussi le « jeteur officiel de l’hameçon », ne trouves-tu pas ? | |
| | | Jicehel
Nombre de messages : 5947 Age : 51 Localisation : 77500 Date d'inscription : 18/04/2011
| Sujet: Re: Graphisme inédit Dim 29 Avr 2012 - 19:15 | |
| Cool, j'ai fais sortir Bignono de ses arbres Au fait, il était tard quand j'avais fait mon source et le fait de le voir avec le programme carrément plus convivial pour l'exploration m'a fait sauter l'erreur aux yeux (la ligne devait aller de 0,0,0 à 0,z,0 mais j'avais mis x,y,z ... n'importe quoi. J'ai donc corrigé et j'ai mis l'interface de Bignono à la taille de mon écran. Ca donne ça: - Code:
-
' ****************************************************************************** ' * PAPYDALL EXPERIMENTE LA 3D ' ****************************************************************************** label fin,evolue,ascenseur,bouge,vision dim j,w,rot,ptz,pty,ptx,bh,hy,vhy,vd,vrot dim titre$,x,y,z,k,a,pi,u,v,x1 titre$ = "PAPYDALL EXPERIMENTE LA 3D" pi = 4*atn(1): a = 10 : k=100
full_space 0:color 0,120,140,160:display:caption 0,titre$ scene3d 1:width 1,screen_x-150:height 1,screen_y-98:left 1,134
color 1,170,170,255
' cam_x_position 20 : cam_y_position 10 : cam_z_position 32 ' point_x_position 12.5 : point_y_position -10 : point_z_position -10 light_x_position 60 : light_y_position 60 : light_z_position -60
3d_cube 1,1:3d_hide 1:3d_cube 2,1:3d_hide 2 vrot=1:rot=180:vd=.2:vhy=0.01:hy=1.7:bh=0 3d_position 1,0,30,30:3d_y_rotate 1,rot
edit 61:hide 61:left 61,1:top 61,55 :width 61,129:height 61,25 edit 70:hide 70:left 70,1:top 70,105:width 70,129:height 70,25 edit 79:hide 79:left 79,1:top 79,155:width 79,129:height 79,25 combo 94:hide 94:left 94,1:top 94,315:width 94,129:height 94,25: ' sert à règler la vitesse de déplacement combo 95:hide 95:left 95,1:top 95,355:width 95,129:height 95,25: ' sert à règler la vitesse ascensionnelle combo 96:hide 96:left 96,1:top 96,395:width 96,129:height 96,25: ' sert à règler la vitesse de rotation for j=0.25 to 10 step 0.25:item_add 94,str$(j/10):item_add 96,str$(j):next j for j=0.1 to 5 step 0.1:item_add 95,str$(j/10):next j timer 99:timer_interval 99,1:timer_off 99:on_timer 99,bouge gosub evolue end
evolue: for u = 0 to 2*pi step 0.1 for v = 0 to 2*pi step 0.1 : ' Essayez ces différentes fonctions ' x = a*cos(u/3) : y = a*cos(v/5) : z = a*(sin(u) + sin(v/11)) ' x = 5+a*cos(u) : y = 3+a*cos(v) : z = 2+a*(sin(u)+sin(v)) x = 6+a*cos(u)*cos(v) : y = a/2*cos(v)*sin(u) : z = a*(sin(u)+sin(v)) ' x = a/2+u*cos(v) : y = a/2+u*sin(v) : z = a+u*v*sin(v)*cos(v) ' x = 6+a*sin(10*u) : y = 5 + a*tan(v/10) : z = hsin(u/10)+a/2*sin(v) ' x =5+a*sin(cos(u)*cos(v)) : y=a+sqr(int(a+5*x/a)) : z=5+a*sin(u)+a/2*sin(v) ' x = 6+a*cos(2*u) : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(7*v) ' x = hcos(2*u)/3000 : y = a*cos(3*v) : z = a*sin(5*u)+a*sin(v) if z=0 then z=0.01 3d_cylinder k,abs(z),1,1 : 3d_color k,abs(5*(x+10)),abs(5*(31-z)),abs(5*(31-y)) 3d_position k,x,0,y : k=k+1 ' 3d_sphere k,0.1:3d_scale k,abs(x+0.01),abs(y+0.01),abs(z+0.01) ' 3d_color k,5*(x+10),5*(31-z),5*(31-y) ' 3d_position k,x,0,y : k=k+1 next v next u:display
font_color 0,0,0,0:font_name 0,"Consolas":font_bold 0:font_size 0,8 show 61:show 70:show 79:show 94:show 95:show 96 print_locate 0,632:print "______________________" print_locate 0,630:print "Espace |Vue aérienne" print_locate 0,618:print "______________________" print_locate 0,616:print " O |Point Origine" print_locate 0,604:print "______________________" print_locate 0,602:print " B |Voir en bas" print_locate 0,590:print "______________________" print_locate 0,588:print " H |Voir en haut" print_locate 0,576:print "______________________" print_locate 0,574:print " - |Descends" print_locate 0,562:print "______________________" print_locate 0,560:print " + |Monte" print_locate 0,548:print "______________________" print_locate 0,546:print " > |Pivote à droite" print_locate 0,534:print "______________________" print_locate 0,532:print " < |Pivote à gauche" print_locate 0,520:print "______________________" print_locate 0,518:print " v |Recule" print_locate 0,506:print "______________________" print_locate 0,504:print " ^ |Avance" print_locate 0,492:print "______________________" print_locate 0,490:print " 6 |Va à droite" print_locate 0,478:print "______________________" print_locate 0,476:print " 4 |Va à gauche" print_locate 0,464:print "______________________" print_locate 0,462:print " COMMANDES CLAVIER" print_locate 0,449:print "______________________" print_locate 0,447:print "______________________" print_locate 0,415:print "______________________" print_locate 0,413:print "______________________" print_locate 0,380:print " Rotation" print_locate 0,340:print " Ascensionnelle" print_locate 0,300:print " Déplacement" print_locate 0,285:print "______________________" print_locate 0,283:print " VITESSES" print_locate 0,270:print "______________________" print_locate 0,268:print "______________________" print_locate 25,36:print "POSITION X" print_locate 25,86:print "ALTITUDE" print_locate 25,136:print "POSITION Z"
timer_on 99 return
bouge: timer_off 99 if clicked(94)=1 then vd=val(item_read$(94,item_index(94))):set_focus 0 if clicked(95)=1 then vhy=val(item_read$(95,item_index(95))):set_focus 0 if clicked(96)=1 then vrot=val(item_read$(96,item_index(96))):set_focus 0 print_locate 0,435:print " " print_locate 0,435:print "Angle: "+str$(wrap_value(rot))+"°" select scancode case 27:gosub fin case 32:w=hy:gosub ascenseur: ' Barre d'espace case 37:rot=rot+vrot:3d_y_rotate 1,rot: ' Flèche gauche case 39:rot=rot-vrot:3d_y_rotate 1,rot: ' Flèche droite case 38:3d_move 1,vd: ' Flèche haute case 40:3d_move 1,vd-(2*vd): ' Flèche basse ' touche 4 case 52:3d_x_position 1,o3d_x_position(1)+(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)-(sin(rot*3.1415/180)*vd) ' touche 6 case 54:3d_x_position 1,o3d_x_position(1)-(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)+(sin(rot*3.1415/180)*vd) case 98:3d_move 1,vd-(2*vd): ' touche 2 pavé numérique ' touche 4 pavé numérique case 100:3d_x_position 1,o3d_x_position(1)+(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)-(sin(rot*3.1415/180)*vd) ' touche 6 pavé numérique case 102:3d_x_position 1,o3d_x_position(1)-(cos(rot*3.1415/180)*vd):3d_z_position 1,o3d_z_position(1)+(sin(rot*3.1415/180)*vd) case 104:3d_move 1,vd: ' touche 8 pavé numérique case 107:hy=hy+vhy: ' touche "+" case 109:hy=hy-vhy: ' touche "-" case 72:bh=bh-.2:if bh<-11 then bh=-11: ' touche "H" case 66:bh=bh+.2:if bh>11 then bh=11: ' touche "B" case 79: ' touche "O" bh=0:hy=1.7:rot=180 3d_position 1,0,0,10:3d_y_rotate 1,rot end_select gosub vision timer_on 99 return
vision: ptx=o3d_x_position(1):pty=o3d_y_position(1)+hy:ptz=o3d_z_position(1) 3d_position 2,ptx,pty,ptz 3d_rotate 2,o3d_x_rotate(1),o3d_y_rotate(1),o3d_z_rotate(1) 3d_move 2,1:cam_position o3d_x_position(1),sin(bh/6.28)+hy,o3d_z_position(1) point_position o3d_x_position(2),hy,o3d_z_position(2) ptx=int(ptx*1000)/1000:pty=int(pty*1000)/1000:ptz=int(ptz*1000)/1000 text 61,str$(ptx):text 70,str$(pty):text 79,str$(ptz) return ' Vision ascensionnelle ascenseur: repeat w=w+5:cam_position o3d_x_position(1),w,o3d_z_position(1):display:text 70,str$(w) until w>=300 repeat if scancode=37 rot=rot+vrot:3d_y_rotate 1,rot:gosub vision cam_position o3d_x_position(1),o3d_y_position(1)+w,o3d_z_position(1) end_if if scancode=39 rot=rot-vrot:3d_y_rotate 1,rot:gosub vision cam_position o3d_x_position(1),o3d_y_position(1)+w,o3d_z_position(1) end_if until scancode=32 repeat w=w-5:cam_position o3d_x_position(1),w,o3d_z_position(1):display:text 70,str$(w) until w<=hy return
fin: terminate | |
| | | Contenu sponsorisé
| Sujet: Re: Graphisme inédit | |
| |
| | | | Graphisme inédit | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |