{
  "name": "triangulo_fractal",
  "savedAt": "2026-07-14T18:50:35.990909",
  "blocks": [
    {
      "def": {
        "template": "def {0}({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "sierpinski",
        "t, orden, tam"
      ],
      "children": [
        {
          "def": {
            "template": "if {0}:",
            "category": "control",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "orden == 0"
          ],
          "children": [
            {
              "def": {
                "template": "{0}.color({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "(randint(0, 255), randint(0, 255), randint(0, 255))"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.fill():",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "t"
              ],
              "children": [
                {
                  "def": {
                    "template": "for {0} in range({1}):",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      },
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "i",
                    "3"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0}.forward({1})",
                        "category": "tortuga",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "t",
                        "tam"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0}.left({1})",
                        "category": "tortuga",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "t",
                        "120"
                      ],
                      "children": []
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "def": {
            "template": "else:",
            "category": "control",
            "slots": [],
            "isContainer": true,
            "isReporter": false
          },
          "values": [],
          "children": [
            {
              "def": {
                "template": "{0}",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "sierpinski(t, orden - 1, tam / 2)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.forward({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "tam / 2"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "sierpinski(t, orden - 1, tam / 2)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.backward({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "tam / 2"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.left({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "60"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.forward({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "tam / 2"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.right({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "60"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "sierpinski(t, orden - 1, tam / 2)"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.left({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "60"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.backward({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "tam / 2"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.right({1})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "t",
                "60"
              ],
              "children": []
            }
          ]
        }
      ]
    },
    {
      "def": {
        "template": "{0} = Turtle()",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "t1"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.penup()",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "t1"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.goto({1}, {2})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "t1",
        "-100.0",
        "-90.0"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.setheading({1})",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "t1",
        "0"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}.pendown()",
        "category": "tortuga",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "t1"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0}",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "sierpinski(t1, 5, 200.0)"
      ],
      "children": []
    }
  ]
}
