Date: prev next · Thread: first prev next last
2021 Archives by date, by thread · List index


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 mis en commentaire, cela n'empêche pas le programme de tourner mais explique sans doute la raison d'un défaut récurent
------------------------------------------------------------------------
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]
                ;HEADING  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

--
Envoyez un mail à users+unsubscribe@fr.libreoffice.org pour vous désinscrire
Les archives de la liste sont disponibles à https://listarchives.libreoffice.org/fr/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Context


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.