The "Turtles" simulation Pack
Prev |  | Next

# 4. Gravity

## 4.1. Synopsis

Figure 7. Turtle are a part of the universe

In this simulation we have computed two kinds of turtle with different behaviors. One class called `BlackHole` and another one called `Star`. The starts turn around the nearest black hole. If a star is too near from two black holes, it is just no longer under influence. Here, the simulation of the gravity is far from having relation with real physic.

## 4.2. About the code

The turltes' code is based on the usage of the following turtle commands: `towards`, `distance`, `xcor` and `ycor`.

Prev | Home | Next
Virus |  | Gas simulation