Le 05/05/2021 à 21:57, Landron Gérard a écrit :
bonsoir,
j'ai presque réussi à convertir le code de
http://www.valcon.it/librelogo/triangolo-di-sierpinski-1/
il n'y a qu'un mot que je n'ai pas trouvé : HEADING
je l'ai trouvé en regardant l'aide en anglais, c'est CAP
------------------------------------------------------------------------
GLOBAL r3
r3=RACINE(3)
À tria n x y d; n=livello, x=colonna, y=riga, d=dimensione
     GLOBAL r3
     SI n == 1 [
         LEVECRAYON
         POSITION [x,y]
         CAP 30
         BAISSECRAYON
         RÉPÈTE 3 [
             AVANCE d
             DROITE 120
         ]
         REMPLIR
      ][
         d2=d/2
         d4=d/4
         h2=r3*d4
         tria(n-1, x, y, d2)
         tria(n-1, x+d4, y-h2, d2)
         tria(n-1, x+d2, y, d2)
      ]
FIN
EFFACEÉCRAN
ORIGINE
CACHETORTUE
IMAGE [
      tria(7, POSITION[0], POSITION[1], 600)
]
-------------------------------------------------------------------------- 
Gérard
  Privacy Policy |
  
Impressum (Legal Info) |
  
Copyright information: Unless otherwise specified, all text and images
  on this website are licensed under the
  
Creative Commons Attribution-Share Alike 3.0 License.
  This does not include the source code of LibreOffice, which is
  licensed under the Mozilla Public License (
MPLv2).
  "LibreOffice" and "The Document Foundation" are
  registered trademarks of their corresponding registered owners or are
  in actual use as trademarks in one or more countries. Their respective
  logos and icons are also subject to international copyright laws. Use
  thereof is explained in our 
trademark policy.