You can control a kig construction by means of a "pykig" python script, that can be executed with the command pykig. py. Here is a nice example (hexagons. kpy) you can try: kigdocument. hideobjects() def hexagons (c, v, n): hexagon = PolygonBCV (c, v, 6) if n & lt; = 0: hexagon. show() for i in range(6): PolygonSide (hexagon, i, True) return cnew = MidPoints (c, v) hexagons (cnew, v, n-1) for k in [2,4]: v1 = PolygonVertex (hexagon, k) cnew = MidPoints (c, v1) hexagons (cnew, v1, n-1) hexagons (Point(0,0), Point(1,0), 5)
Pode controlar as construcións en kig mediante un script de python chamado "pykig", que se pode executar mediante a orde pykig. py. Velaquí un exemplo (hexagonos. kpy) que pode probar: kigdocument. hideobjects () def hexagonos (c, v, n): hexagono = PolygonBCV (c, v, 6) if n & lt; = 0: hexagono. show () for i in range( 6): PolygonSide (hexagono, i, True) return cnew = MidPoints (c, v) hexagonos (cnew, v, n- 1) for k in [2, 4]: v1 = PolygonVertex (hexagono, k) cnew = MidPoints (c, v1) hexagonos (cnew, v1, n- 1) hexagonos (Point( 0, 0), Point( 1, 0), 5)