diff --git a/README.md b/README.md index 61d6c49..591d807 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Developed for the **Biological Computation** class at the _Open University of Is > **Update:** The project is now available as an online executable on [itch.io](https://dor-sketch.itch.io/simulation-earth) for easy access and exploration.

- +

--- @@ -44,7 +44,7 @@ This project is a simulation of Earth's ecosystem using cellular automata. The s ## ๐ŸŒŸ Key Features

- +

- ๐ŸŒ **Dynamic World Modeling:** Explore complex cause-effect relationships as each cell's behavior evolves based on its environment and neighboring cells. @@ -85,9 +85,9 @@ This project is a simulation of Earth's ecosystem using cellular automata. The s

Example Rule Exploration: - - - + + +

--- @@ -185,75 +185,34 @@ These advanced techniques not only demonstrate robust programming practices but

The 3D effect is achieved by using a 2D grid with a color gradient. - +

*Delve into Detailed Statistical Analysis Over Time*

- +

*Uncover the Correlation Between Pollution and Temperature*

- +

- - + +

--- ## ๐Ÿ“œ License -This project is open-sourced under the MIT License - see the [LICENSE](LICENSE) file for details. +This project is open-sourced under the MIT License - see the [LICENSE](docs/LICENSE) file for details. --- ## ๐Ÿ“ซ Contact For inquiries, collaborations, or more information, feel free to connect with me on [LinkedIn](https://www.linkedin.com/in/dor-pascal/). - - -def draw_3d_cells(screen, rect, color_hex): - color = hex_to_rgb(color_hex) - darker_color = [max(0, c - 100) for c in color] # Increase the difference for a stronger 3D effect - lighter_color = [min(255, c + 100) for c in color] # Increase the difference for a stronger 3D effect - - gradient_name = f"{color_hex}_gradient.png" - gradient_path = os.path.join("gradient_images", gradient_name) - - if not os.path.exists(gradient_path): - # Create a gradient surface - gradient_surface = pygame.Surface((rect.width, rect.height), pygame.SRCALPHA) - # color it with the darker color - gradient_surface.fill(darker_color) - - for y in range(rect.height): - for x in range(rect.width): - # Calculate distance to the edges of the rectangle - dist_x = min(x / rect.width, 1 - x / rect.width) - dist_y = min(y / rect.height, 1 - y / rect.height) - dist = 1 - min(dist_x, dist_y) - - # Define a threshold where the gradient stops - threshold = 0.7 - - if dist < threshold: - # If the distance is less than the threshold, use the lighter color - continue - else: - # If the distance is greater than the threshold, interpolate between the darker and lighter color - dist = (dist - threshold) / (1 - threshold) # Normalize dist to the range [0, 1] - color = [int(dark * (1 - dist) + light * dist) for light, dark in zip(lighter_color, darker_color)] - - gradient_surface.set_at((x, y), color) # Set the pixel color on the gradient surface - # Save the gradient surface as an image - pygame.image.save(gradient_surface, gradient_path) - - # Load the gradient image and draw it onto the screen - gradient_image = pygame.image.load(gradient_path) - screen.blit(gradient_image, rect) diff --git a/LICENSE b/docs/LICENSE similarity index 100% rename from LICENSE rename to docs/LICENSE diff --git a/docs/favicon.png b/docs/favicon.png index 3d7e716..f074a1b 100644 Binary files a/docs/favicon.png and b/docs/favicon.png differ diff --git a/docs/game.html b/docs/game.html new file mode 100644 index 0000000..678d657 --- /dev/null +++ b/docs/game.html @@ -0,0 +1,501 @@ + + + src + + + + + + + + + + + + + + + + + + + + + + + +
+ +
Downloading...
+
+ +
+
+ + + + + +
+ +
+ + + + + +
+ + + + +
+
+
+ + + + + diff --git a/images/close1.png b/docs/images/close1.png similarity index 100% rename from images/close1.png rename to docs/images/close1.png diff --git a/images/close2.png b/docs/images/close2.png similarity index 100% rename from images/close2.png rename to docs/images/close2.png diff --git a/images/cover.png b/docs/images/cover.png similarity index 100% rename from images/cover.png rename to docs/images/cover.png diff --git a/images/gui.png b/docs/images/gui.png similarity index 100% rename from images/gui.png rename to docs/images/gui.png diff --git a/images/new_gui1.png b/docs/images/new_gui1.png similarity index 100% rename from images/new_gui1.png rename to docs/images/new_gui1.png diff --git a/images/new_gui2.png b/docs/images/new_gui2.png similarity index 100% rename from images/new_gui2.png rename to docs/images/new_gui2.png diff --git a/images/new_gui3.png b/docs/images/new_gui3.png similarity index 100% rename from images/new_gui3.png rename to docs/images/new_gui3.png diff --git a/images/new_gui4.png b/docs/images/new_gui4.png similarity index 100% rename from images/new_gui4.png rename to docs/images/new_gui4.png diff --git a/images/output.gif b/docs/images/output.gif similarity index 100% rename from images/output.gif rename to docs/images/output.gif diff --git a/images/output_big.gif b/docs/images/output_big.gif similarity index 100% rename from images/output_big.gif rename to docs/images/output_big.gif diff --git a/images/pollution_temp_connection.png b/docs/images/pollution_temp_connection.png similarity index 100% rename from images/pollution_temp_connection.png rename to docs/images/pollution_temp_connection.png diff --git a/images/rule1.png b/docs/images/rule1.png similarity index 100% rename from images/rule1.png rename to docs/images/rule1.png diff --git a/images/rule2.png b/docs/images/rule2.png similarity index 100% rename from images/rule2.png rename to docs/images/rule2.png diff --git a/images/rule3.png b/docs/images/rule3.png similarity index 100% rename from images/rule3.png rename to docs/images/rule3.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.47.28.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.47.28.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.47.28.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.47.28.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.47.35.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.47.35.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.47.35.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.47.35.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.47.39.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.47.39.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.47.39.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.47.39.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.12.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.12.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.12.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.12.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.16.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.16.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.16.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.16.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.35.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.35.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.35.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.35.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.39.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.39.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.39.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.39.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.44.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.44.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.44.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.44.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.49.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.49.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.49.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.49.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.48.57.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.48.57.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.48.57.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.48.57.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.49.01.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.49.01.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.49.01.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.49.01.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.49.04.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.49.04.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.49.04.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.49.04.png diff --git a/images/screenshot/Screenshot 2024-04-01 at 5.49.08.png b/docs/images/screenshot/Screenshot 2024-04-01 at 5.49.08.png similarity index 100% rename from images/screenshot/Screenshot 2024-04-01 at 5.49.08.png rename to docs/images/screenshot/Screenshot 2024-04-01 at 5.49.08.png diff --git a/images/stats.png b/docs/images/stats.png similarity index 100% rename from images/stats.png rename to docs/images/stats.png diff --git a/images/usage.gif b/docs/images/usage.gif similarity index 100% rename from images/usage.gif rename to docs/images/usage.gif diff --git a/docs/index.html b/docs/index.html index df86581..1462427 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,489 +1,337 @@ - + + + + + + - src - - - - - - - - - - - - - + Simulation Earth - Cellular Automata + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + - - -
- -
Downloading...
-
- -
-
- - - - - -
- -
- -