{
  "name": "colapso_gravitacional",
  "savedAt": "2026-07-15T00:40:57.676884",
  "blocks": [
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "g",
        "800"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "suavizado",
        "100"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "dt",
        "0.3"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "numParticulas",
        "14"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "particulas",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "vx",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "{0} = {1}",
        "category": "variables",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": false,
        "isReporter": false
      },
      "values": [
        "vy",
        "[]"
      ],
      "children": []
    },
    {
      "def": {
        "template": "for {0} in range({1}):",
        "category": "control",
        "slots": [
          {
            "options": []
          },
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "i",
        "numParticulas"
      ],
      "children": [
        {
          "def": {
            "template": "{0} = Turtle()",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "p"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.shape({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "p",
            "\"point\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.pensize({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "p",
            "6"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.color({1})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "p",
            "\"white\""
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.goto({1}, {2})",
            "category": "tortuga",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "p",
            "randint(-100, 100)",
            "randint(-100, 100)"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "particulas",
            "p"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "vx",
            "0"
          ],
          "children": []
        },
        {
          "def": {
            "template": "{0}.append({1})",
            "category": "variables",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": false,
            "isReporter": false
          },
          "values": [
            "vy",
            "0"
          ],
          "children": []
        }
      ]
    },
    {
      "def": {
        "template": "while {0}:",
        "category": "control",
        "slots": [
          {
            "options": []
          }
        ],
        "isContainer": true,
        "isReporter": false
      },
      "values": [
        "True"
      ],
      "children": [
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "i",
            "numParticulas"
          ],
          "children": [
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "p1",
                "particulas[i]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "axi",
                "0"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "ayi",
                "0"
              ],
              "children": []
            },
            {
              "def": {
                "template": "for {0} in range({1}):",
                "category": "control",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": true,
                "isReporter": false
              },
              "values": [
                "k",
                "numParticulas"
              ],
              "children": [
                {
                  "def": {
                    "template": "if {0}:",
                    "category": "control",
                    "slots": [
                      {
                        "options": []
                      }
                    ],
                    "isContainer": true,
                    "isReporter": false
                  },
                  "values": [
                    "k != i"
                  ],
                  "children": [
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "p2",
                        "particulas[k]"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "angulo",
                        "p1.towards(p2)"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "r",
                        "p1.distance(p2)"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "a",
                        "g / (r * r + suavizado)"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "axi",
                        "axi + a * sin(angulo * pi / 180)"
                      ],
                      "children": []
                    },
                    {
                      "def": {
                        "template": "{0} = {1}",
                        "category": "variables",
                        "slots": [
                          {
                            "options": []
                          },
                          {
                            "options": []
                          }
                        ],
                        "isContainer": false,
                        "isReporter": false
                      },
                      "values": [
                        "ayi",
                        "ayi + a * cos(angulo * pi / 180)"
                      ],
                      "children": []
                    }
                  ]
                }
              ]
            },
            {
              "def": {
                "template": "{0}[{1}] = {2}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "vx",
                "i",
                "vx[i] + axi * dt"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}[{1}] = {2}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "vy",
                "i",
                "vy[i] + ayi * dt"
              ],
              "children": []
            }
          ]
        },
        {
          "def": {
            "template": "for {0} in range({1}):",
            "category": "control",
            "slots": [
              {
                "options": []
              },
              {
                "options": []
              }
            ],
            "isContainer": true,
            "isReporter": false
          },
          "values": [
            "i",
            "numParticulas"
          ],
          "children": [
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "p1",
                "particulas[i]"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "nuevaX",
                "p1.xcor() + vx[i] * dt"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0} = {1}",
                "category": "variables",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "nuevaY",
                "p1.ycor() + vy[i] * dt"
              ],
              "children": []
            },
            {
              "def": {
                "template": "{0}.goto({1}, {2})",
                "category": "tortuga",
                "slots": [
                  {
                    "options": []
                  },
                  {
                    "options": []
                  },
                  {
                    "options": []
                  }
                ],
                "isContainer": false,
                "isReporter": false
              },
              "values": [
                "p1",
                "nuevaX",
                "nuevaY"
              ],
              "children": []
            }
          ]
        }
      ]
    }
  ]
}
