from PIL import Image, ImageDraw, ImageFont import random
width, height = 1920, 1080 # Map dimensions background_color = (240, 230, 220) # Brown color to represent the burned terrain burnt_trees_color = (150, 75, 0) # Dark red-brown color to represent burnt trees new_trees_color = (0, 128, 0) # Green color to represent new growth road_color = (100, 100, 100) # Gray color to represent roads
image = Image.new('RGB', (width, height), background_color)
draw = ImageDraw.Draw(image)
tree_width = 10 tree_height = 20 for i in range(0, width - tree_width * 50, tree_width): for j in range(0, height - tree_height * 30, tree_height): # Randomly decide if the tree is burnt or not if random.random() < 0.5: draw.ellipse([(i + j, i), (i + j + tree_width, i + tree_height)], fill=burnt_trees_color)
tree_width = 10 tree_height = 20 for i in range(0, width - tree_width * 50, tree_width): for j in range(0, height - tree_height * 30, tree_height): # Randomly decide if the tree is new or not if random.random() < 0.3: draw.rectangle([(i + j, i), (i + j + tree_width, i + tree_height)], fill=new_trees_color)
road_width = 20 for i in range(0, width - road_width * 10, road_width): for j in range(0, height - road_width * 30, road_width): draw.line([(i, j), (i + road_width, j)], fill=road_color) draw.line([(0, 0), (width, 0)], fill=road_color) draw.line([(0, height), (width, height)], fill=road_color)
local_road_width = 5 for i in range(0, width - local_road_width * 10, local_road_width): for j in range(0, height - local_road_width * 30, local_road_width): draw.line([(i, j), (i + local_road_width, j)], fill=(100, 100, 50)) # Lighter gray
building_width = 10 building_height = 20 for i in range(0, width - building_width * 30, building_width): for j in range(0, height - building_height * 20, building_height): draw.rectangle([(i + j, i), (i + j + building_width, i + building_height)], fill=(200, 180, 140)) # Brown color
image.save('Julian_destroyed.png')