Skip to content

KornelSzyszka/PlanetGenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Planet Generator

The program is written in Python and is designed to generate procedural 2D planets in the form of images. It utilizes the Tkinter library to create a simple user interface and the PIL (Pillow) library for image manipulation and generation.

Main features of the program:

  • User Interface: The program has a simple user interface built with Tkinter. Users can choose various parameters for the generated planet, such as resolution, average temperature, and star type.
  • Procedural Planet Generation: The program uses noise generation algorithms from the "noise_gen" library. Noise is used to generate the planet's terrain height and shape, giving it a natural and random appearance.
  • Biome Creation: Based on the generated noise and the average temperature and star type parameters, the program creates different biomes such as land, water, and clouds. Each biome is assigned appropriate colors, which are used to color the planet.
  • Image Display and Saving: After generating the planet, the program displays the planet's image in the main application window. Users have the option to save the generated image in PNG format.

How the program works: Upon launching the program, the user sees the application interface with various controls. They can change the planet's parameters, such as resolution, average temperature, and star type, using sliders and radio buttons. After clicking the "Generate Planet" button, the program procedurally generates a planet with the selected parameters. It then displays the generated planet's image in the main application window. The planet is divided into different biomes with corresponding colors. Users can save the generated image by clicking the "Save Planet" button. After choosing a location and file name, the image will be saved in PNG format.


G-type 22°C G22

M-Type 16°C M16

G-Type 10°C G10

M-Type -15°C M-15

K-Type 22°C K22

M-Type 12°C M12

G-Type -10°C G-10

K-Type 3°C K3