lehrkraefte:snr:informatik:rgbwuerfel-und-sierpinski-farbig

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
lehrkraefte:snr:informatik:rgbwuerfel-und-sierpinski-farbig [2022/03/23 13:13]
Olaf Schnürer [Einige Lösungsvorschläge]
lehrkraefte:snr:informatik:rgbwuerfel-und-sierpinski-farbig [2022/03/27 20:44] (current)
Olaf Schnürer [Einige Lösungsvorschläge]
Line 145: Line 145:
 from gpanel import * from gpanel import *
  
-MAX_TIEFE = 6+MAX_TIEFE = 3
 # Tiefe 12 schafft Inkscape noch mit Mühe, ab 13 weigert es sich # Tiefe 12 schafft Inkscape noch mit Mühe, ab 13 weigert es sich
 # Tiefe 8 für dokuwiki svg # Tiefe 8 für dokuwiki svg
Line 160: Line 160:
          
     return int(rot), int(blau), int(gruen)     return int(rot), int(blau), int(gruen)
- 
-def hexadezimalZweistellig(zahl): 
-    s = hex(zahl)[2:] 
-    if len(s) < 2: 
-        s = "0" + s 
-    return s 
                          
 def sierpinskiDreieck(x1, y1, x2, y2, x3, y3, tiefe): def sierpinskiDreieck(x1, y1, x2, y2, x3, y3, tiefe):
Line 349: Line 343:
 </hidden> </hidden>
  
-<hidden Farbiges Sierpinski-Dreieck, Ausgabe auch als SVG-Datei>+<hidden Farbiges Sierpinski-Dreieck, Ausgabe auch als SVG-Datei; ACHTUNG, DAS GEHT EINFACHER MIT FORMATIERTER AUSGABE: %02x für hexadezimal mit führenden Nullen und mindestens zweistellig; STATT FUNKTION hexadezimalZweistellig>
 <code python> <code python>
 from gpanel import * from gpanel import *
  • lehrkraefte/snr/informatik/rgbwuerfel-und-sierpinski-farbig.1648037587.txt.gz
  • Last modified: 2022/03/23 13:13
  • by Olaf Schnürer