diff --git a/House.py b/House.py index 68f4bb7..58b1da9 100644 --- a/House.py +++ b/House.py @@ -1,32 +1,31 @@ - from time import sleep from gdpc import Editor, Block, geometry import numpy as np import math import matplotlib.pyplot as plt + class House: def __init__(self, editor, coordinates_min, coordinates_max, direction, list_block): self.editor = editor self.coordinates_min = coordinates_min self.coordinates_max = coordinates_max self.skeleton = [] - + size = [(coordinates_max[i] - coordinates_min[i]) + 10 for i in range(3)] self.grid3d = np.zeros(size, dtype=[('bool', bool), ('int', int)]) - + self.nbEtage = (coordinates_max[1] - coordinates_min[1]) // 5 - + self.direction = direction - + self.entranceWall = None - + self.blocks = list_block - + self.entranceCo = None - - + self.wall = Block(list_block["wall"]) self.roof = Block(list_block["roof"]) self.roof_slab = Block(list_block["roof_slab"]) @@ -39,82 +38,107 @@ class House: self.celling_slab = Block(list_block["celling_slab"]) self.gardenOutline = Block(list_block["garden_outline"]) self.garden_floor = Block(list_block["garden_floor"]) - - - + def createHouseSkeleton(self): self.delete() x_min, y_min, z_min = self.coordinates_min x_max, y_max, z_max = self.coordinates_max - + perimeter_width = x_max - x_min perimeter_depth = z_max - z_min - + x_min += 1 z_min += 1 x_max -= 1 z_max -= 1 - x = np.random.randint(x_min+1 , x_max-1) - z = np.random.randint(z_min+1 , z_max-1 ) - + if x_min + 1 > x_max - 1: + x = np.random.randint(x_max - 1, x_min + 1) + else : + x = np.random.randint(x_min + 1, x_max - 1) + + if z_min + 1 > z_max - 1: + z = np.random.randint(z_max - 1, z_min + 1) + else: + z = np.random.randint(z_min + 1, z_max - 1) + width = perimeter_width // 2 depth = perimeter_depth // 2 height = y_max - y_min - - if x + width-1 > x_max-1: - x = x_max - width-1 - if z + depth-1 > z_max-1: - z = z_max - depth-1 - + + if x + width - 1 > x_max - 1: + x = x_max - width - 1 + if z + depth - 1 > z_max - 1: + z = z_max - depth - 1 + x_plan3d = x - x_min z_plan3d = z - z_min - - for i in range(0, width-1): - for j in range(0, depth-1): + + for i in range(0, width - 1): + for j in range(0, depth - 1): self.editor.placeBlock((x + i, y_min, z + j), self.floor) - self.grid3d[x_plan3d+i,0,z_plan3d+j] = True,1 - self.skeleton.append((x, z, width-1, depth-1, height)) - print("Coordinates of the corners: ", (x, z), (x, z+depth-1), (x+width-1, z), (x+width-1, z+depth-1)) - - - - + self.grid3d[x_plan3d + i, 0, z_plan3d + j] = True, 1 + self.skeleton.append((x, z, width - 1, depth - 1, height)) + print("Coordinates of the corners: ", (x, z), (x, z + depth - 1), (x + width - 1, z), + (x + width - 1, z + depth - 1)) + x_min -= 1 x_max -= 1 z_min += 1 z_max += 1 - - for _ in range(3): - print("Rectangle n°", _+1, "en cours de création") - - - for a in range(100000): - new_width = np.random.randint(5, width-2) - new_depth = np.random.randint(5, depth-2) - - new_x = np.random.randint(max(x_min+1, x - new_width ), min(x_max-new_width - 1, x + width )) - new_z = np.random.randint(max(z_min+1, z - new_depth), min(z_max-new_depth - 1, z + depth )) - new_x_plan3d = new_x - x_min -1 - new_z_plan3d = new_z - z_min +1 - + for _ in range(3): + print("Rectangle n°", _ + 1, "en cours de création") + + for a in range(100000): + if depth > 7: + new_depth = np.random.randint(5, depth - 2) + elif depth == 7: + new_depth = 5 + else: + new_depth = np.random.randint(depth - 2, 5) + + if width > 7: + new_width = np.random.randint(5, width - 2) + elif width == 7: + new_width = 5 + else: + new_width = np.random.randint(width - 2, 5) + + if max(x_min+1, x-new_width) > min(x_max-new_width-1, x+width): + new_x = np.random.randint(min(x_max - new_width - 1, x + width), max(x_min + 1, x - new_width)) + else: + new_x = np.random.randint(max(x_min + 1, x - new_width), min(x_max - new_width - 1, x + width)) + + if max(z_min+1, z-new_depth) > min(z_max-new_depth-1, z+depth): + new_z = np.random.randint(min(z_max - new_depth - 1, z + depth), max(z_min + 1, z - new_depth)) + else: + new_z = np.random.randint(max(z_min + 1, z - new_depth), min(z_max - new_depth - 1, z + depth)) + + new_x_plan3d = new_x - x_min - 1 + new_z_plan3d = new_z - z_min + 1 + adjacent_blocks = 0 for i in range(new_x_plan3d, new_x_plan3d + new_width): for j in range(new_z_plan3d, new_z_plan3d + new_depth): - if self.grid3d[i-1,0,j]['bool'] and self.grid3d[i-1,0,j]['int']==1 or self.grid3d[i+1,0,j]['bool'] and self.grid3d[i+1,0,j]['int']==1 or self.grid3d[i,0,j-1]['bool'] and self.grid3d[i,0,j-1]['int']==1 or self.grid3d[i,0,j+1]['bool'] and self.grid3d[i,0,j+1]['int']==1: + if self.grid3d[i - 1, 0, j]['bool'] and self.grid3d[i - 1, 0, j]['int'] == 1 or \ + self.grid3d[i + 1, 0, j]['bool'] and self.grid3d[i + 1, 0, j]['int'] == 1 or \ + self.grid3d[i, 0, j - 1]['bool'] and self.grid3d[i, 0, j - 1]['int'] == 1 or \ + self.grid3d[i, 0, j + 1]['bool'] and self.grid3d[i, 0, j + 1]['int'] == 1: adjacent_blocks += 1 if adjacent_blocks < 3: continue - if not np.any(self.grid3d[new_x_plan3d:new_x_plan3d+new_width,0, new_z_plan3d:new_z_plan3d+new_depth]['bool']): + if not np.any( + self.grid3d[new_x_plan3d:new_x_plan3d + new_width, 0, new_z_plan3d:new_z_plan3d + new_depth][ + 'bool']): new_x_plan3d = new_x - x_min new_z_plan3d = new_z - z_min for i in range(0, new_width): for j in range(0, new_depth): - self.grid3d[new_x_plan3d + i,0, new_z_plan3d + j] = True,2 + self.grid3d[new_x_plan3d + i, 0, new_z_plan3d + j] = True, 2 - if i == 0 or i == new_width-1 or j == 0 or j == new_depth-1: + if i == 0 or i == new_width - 1 or j == 0 or j == new_depth - 1: continue else: self.editor.placeBlock((new_x + i, y_min, new_z + j), self.floor) @@ -124,65 +148,64 @@ class House: else: print("Failed to place rectangle after 1000 attempts.") - def delete(self): for x in range(self.coordinates_min[0], self.coordinates_max[0]): - for y in range(self.coordinates_min[1], self.coordinates_max[1]+10): + for y in range(self.coordinates_min[1], self.coordinates_max[1] + 10): for z in range(self.coordinates_min[2], self.coordinates_max[2]): self.editor.placeBlock((x, y, z), Block("air")) - + def putWallOnSkeleton(self): for k in range(len(self.skeleton)): x, z, width, depth, height = self.skeleton[k] - - - if k!= 0: - x+=1 - z+=1 - width-=2 - depth-=2 + + if k != 0: + x += 1 + z += 1 + width -= 2 + depth -= 2 x_plan3d = x - self.coordinates_min[0] z_plan3d = z - self.coordinates_min[2] - for i in range(-1, width+1): - for j in range(-1, depth+1): + for i in range(-1, width + 1): + for j in range(-1, depth + 1): for y in range(0, height): if i == -1 or i == width or j == -1 or j == depth: - if not (self.grid3d[x_plan3d + i,y, z_plan3d + j]['bool']) and not (self.grid3d[x_plan3d + i,y, z_plan3d + j]['int'] == 1) or (self.grid3d[x_plan3d + i,y, z_plan3d + j]['bool'] and self.grid3d[x_plan3d + i,y, z_plan3d + j]['int'] == 2) or y==0: + if not (self.grid3d[x_plan3d + i, y, z_plan3d + j]['bool']) and not ( + self.grid3d[x_plan3d + i, y, z_plan3d + j]['int'] == 1) or ( + self.grid3d[x_plan3d + i, y, z_plan3d + j]['bool'] and + self.grid3d[x_plan3d + i, y, z_plan3d + j]['int'] == 2) or y == 0: self.editor.placeBlock((x + i, self.coordinates_min[1] + y, z + j), self.wall) - self.grid3d[ x_plan3d+i, y, z_plan3d+j] = True - - + self.grid3d[x_plan3d + i, y, z_plan3d + j] = True + def getAdjacentWalls(self): - main_rect = self.skeleton[0] + main_rect = self.skeleton[0] x_main, z_main, width_main, depth_main, heigt_main = main_rect adjacent_walls = [] - width_main-=1 - depth_main-=1 + width_main -= 1 + depth_main -= 1 - for k in range(1, len(self.skeleton)): + for k in range(1, len(self.skeleton)): x, z, width, depth, heigt = self.skeleton[k] - - - walls = [(x, z, x + width-1, z), (x, z, x, z + depth-1), (x, z + depth-1, x + width-1, z + depth-1), (x + width-1, z, x + width-1, z + depth-1)] + + walls = [(x, z, x + width - 1, z), (x, z, x, z + depth - 1), + (x, z + depth - 1, x + width - 1, z + depth - 1), (x + width - 1, z, x + width - 1, z + depth - 1)] for wall in walls: x1, z1, x2, z2 = wall - if (x_main <= x1 <= x_main + width_main or x_main <= x2 <= x_main + width_main) and (z_main - 1 == z1 or z_main + depth_main + 1 == z1): - x1 = max(x1, x_main-1) - x2 = min(x2, x_main + width_main+1) - if abs(x2 - x1) > 1: + if (x_main <= x1 <= x_main + width_main or x_main <= x2 <= x_main + width_main) and ( + z_main - 1 == z1 or z_main + depth_main + 1 == z1): + x1 = max(x1, x_main - 1) + x2 = min(x2, x_main + width_main + 1) + if abs(x2 - x1) > 1: adjacent_walls.append((x1, z1, x2, z2)) - elif (z_main <= z1 <= z_main + depth_main or z_main <= z2 <= z_main + depth_main) and (x_main - 1 == x1 or x_main + width_main + 1 == x1): - z1 = max(z1, z_main-1) - z2 = min(z2, z_main + depth_main+1) - if abs(z2 - z1) > 1: + elif (z_main <= z1 <= z_main + depth_main or z_main <= z2 <= z_main + depth_main) and ( + x_main - 1 == x1 or x_main + width_main + 1 == x1): + z1 = max(z1, z_main - 1) + z2 = min(z2, z_main + depth_main + 1) + if abs(z2 - z1) > 1: adjacent_walls.append((x1, z1, x2, z2)) return adjacent_walls - - - def placeDoor(self): walls = self.getAdjacentWalls() for wall in walls: @@ -192,359 +215,424 @@ class House: width = z_max - z_min if width % 2 != 0: door_pos = width // 2 - for y in range(self.coordinates_min[1]+1+i*4, self.coordinates_min[1]+3+i*4): + for y in range(self.coordinates_min[1] + 1 + i * 4, self.coordinates_min[1] + 3 + i * 4): self.editor.placeBlock((x_min, y, z_min + door_pos), Block("air")) - self.editor.placeBlock((x_min, y, z_min + door_pos+1), Block("air")) + self.editor.placeBlock((x_min, y, z_min + door_pos + 1), Block("air")) else: - door_pos = width // 2 - for y in range(self.coordinates_min[1]+1+i*4 , self.coordinates_min[1]+3+i*4): + door_pos = width // 2 + for y in range(self.coordinates_min[1] + 1 + i * 4, self.coordinates_min[1] + 3 + i * 4): self.editor.placeBlock((x_min, y, z_min + door_pos), Block("air")) else: width = x_max - x_min if width % 2 != 0: door_pos = width // 2 - for y in range(self.coordinates_min[1]+1+i*4, self.coordinates_min[1]+3+i*4): + for y in range(self.coordinates_min[1] + 1 + i * 4, self.coordinates_min[1] + 3 + i * 4): self.editor.placeBlock((x_min + door_pos, y, z_min), Block("air")) - self.editor.placeBlock((x_min + door_pos+1, y, z_min), Block("air")) + self.editor.placeBlock((x_min + door_pos + 1, y, z_min), Block("air")) else: - door_pos = width // 2 - for y in range(self.coordinates_min[1]+1+i*4, self.coordinates_min[1]+3+i*4): + door_pos = width // 2 + for y in range(self.coordinates_min[1] + 1 + i * 4, self.coordinates_min[1] + 3 + i * 4): self.editor.placeBlock((x_min + door_pos, y, z_min), Block("air")) - + def placeRoof(self): - for k in range(len(self.skeleton)-1, -1, -1): + for k in range(len(self.skeleton) - 1, -1, -1): x, z, width, depth, height = self.skeleton[k] - - - - if k!= 0: - x+=1 - z+=1 - width-=2 - depth-=2 + + if k != 0: + x += 1 + z += 1 + width -= 2 + depth -= 2 if width < depth: - if width <=5: + if width <= 5: n = 1 - elif width <=10: + elif width <= 10: n = 2 else: n = 3 else: - if depth <=5: + if depth <= 5: n = 1 - elif depth <=10: + elif depth <= 10: n = 2 else: n = 3 else: - + if width < depth: n = width // 4 else: n = depth // 4 - - + x_plan3d = x - self.coordinates_min[0] z_plan3d = z - self.coordinates_min[2] - + print(width, depth, n) - + if width < depth: - - - if n>1: - for k in range(n-1): - for i in range(-1, depth+1): - for y in range(-1, width//2+1): - self.editor.placeBlock((x + i, self.coordinates_max[1]+k, z+y+k+3), self.roof) - self.editor.placeBlock((x + i, self.coordinates_max[1]+k, z+depth-y-4-k), self.roof) - if width%2 == 0: - for i in range(-1, depth+1): - self.editor.placeBlock((x+width//2+1, self.coordinates_max[1]+n-1, z+i), self.roof) - for i in range(-1,depth+1): - self.editor.placeBlock((x+width//2, self.coordinates_max[1]+n-1, z+i), self.roof) - + + if n > 1: + for k in range(n - 1): + for i in range(-1, depth + 1): + for y in range(-1, width // 2 + 1): + self.editor.placeBlock((x + i, self.coordinates_max[1] + k, z + y + k + 3), self.roof) + self.editor.placeBlock((x + i, self.coordinates_max[1] + k, z + depth - y - 4 - k), + self.roof) + if width % 2 == 0: + for i in range(-1, depth + 1): + self.editor.placeBlock((x + width // 2 + 1, self.coordinates_max[1] + n - 1, z + i), + self.roof) + for i in range(-1, depth + 1): + self.editor.placeBlock((x + width // 2, self.coordinates_max[1] + n - 1, z + i), self.roof) + else: - if n>1: - for k in range(n-1): - for i in range(-1, width+1): - for y in range(-1, depth//2+1): - self.editor.placeBlock((x + i, self.coordinates_max[1]+k, z+y+k+2), self.roof) - self.editor.placeBlock((x + i, self.coordinates_max[1]+k, z+depth-y-3-k), self.roof) - if depth%2 == 0: - for i in range(-1, width+1): - self.editor.placeBlock((x+i, self.coordinates_max[1]+n-1, z+depth//2+1), self.roof) - for i in range(-1,width+1): - self.editor.placeBlock((x+i, self.coordinates_max[1]+n-1, z+depth//2), self.roof) - + if n > 1: + for k in range(n - 1): + for i in range(-1, width + 1): + for y in range(-1, depth // 2 + 1): + self.editor.placeBlock((x + i, self.coordinates_max[1] + k, z + y + k + 2), self.roof) + self.editor.placeBlock((x + i, self.coordinates_max[1] + k, z + depth - y - 3 - k), + self.roof) + if depth % 2 == 0: + for i in range(-1, width + 1): + self.editor.placeBlock((x + i, self.coordinates_max[1] + n - 1, z + depth // 2 + 1), self.roof) + for i in range(-1, width + 1): + self.editor.placeBlock((x + i, self.coordinates_max[1] + n - 1, z + depth // 2), self.roof) + print('-----------------------------------') - - for i in range(-1, width+1): - for j in range(-1, depth+1): - if width 1: - house.placeStairs() - - + self.createHouseSkeleton() + self.putWallOnSkeleton() + self.placeDoor() + self.placeRoof() + self.putCelling() + self.placeWindow() + self.placeEntrance() + self.placeGardenOutline() + if self.nbEtage > 1: + self.placeStairs() + + if __name__ == "__main__": editor = Editor(buffering=True) - buildArea = editor.getBuildArea() + buildArea = editor.getBuildArea() coordinates_min = [min(buildArea.begin[i], buildArea.last[i]) for i in range(3)] - coordinates_max = [max(buildArea.begin[i], buildArea.last[i]) for i in range(3)] + coordinates_max = [max(buildArea.begin[i], buildArea.last[i]) for i in range(3)] blocks = { "wall": "blackstone", @@ -906,20 +1112,16 @@ if __name__ == "__main__": "garden_outline": "oak_leaves", "garden_floor": "grass_block" } - + for i in range(1): - house = House(editor, coordinates_min, coordinates_max,"W", blocks) - + house = House(editor, coordinates_min, coordinates_max, "W", blocks) + house.build() - - new_coordinates_min =(coordinates_max[0] + 10, coordinates_min[1], coordinates_min[2]) - new_coordinates_max = (coordinates_max[0] + 10 +24, coordinates_max[1], coordinates_max[2]) + + new_coordinates_min = (coordinates_max[0] + 10, coordinates_min[1], coordinates_min[2]) + new_coordinates_max = (coordinates_max[0] + 10 + 24, coordinates_max[1], coordinates_max[2]) coordinates_min = new_coordinates_min coordinates_max = new_coordinates_max - # delete(editor, coordinates_min, coordinates_max) + # delete(editor, coordinates_min, coordinates_max) editor.flushBuffer() - - - - \ No newline at end of file diff --git a/main.py b/main.py index 57cb66e..b8ca3c9 100644 --- a/main.py +++ b/main.py @@ -1,11 +1,18 @@ import random + +import gdpc.exceptions + from world_maker.world_maker import * from House import * def main(): + rectangle_house_mountain, rectangle_building, skeleton_highway, skeleton_mountain = world_maker() - - editor = Editor() + + + editor = Editor(buffering=True) + buildArea = editor.getBuildArea() + blocks = { "wall": "blackstone", "roof": "blackstone", @@ -23,15 +30,18 @@ def main(): } entranceDirection = ["N", "S", "E", "W"] + for houses in rectangle_house_mountain: - house = House(editor, houses[0], houses[1], entranceDirection[random.randint(0, 3)], blocks) + start = (houses[0][0]+buildArea.begin[0], houses[0][1], houses[0][2]+buildArea.begin[2]) + end = (houses[1][0]+buildArea.begin[0], houses[1][1], houses[1][2]+buildArea.begin[2]) + house = House(editor, start, end, entranceDirection[random.randint(0, 3)], blocks) house.build() if __name__ == '__main__': main() - +""" from gdpc import Editor, Block, geometry, Transform import networks.curve as curve import numpy as np @@ -63,4 +73,5 @@ geometry.placeCuboid(editor, (-5,0,-8), (25,100,25), Block("air")) # create a building at the relative position 0,0 with 20 blocks length and 20 blocks width, with a normal shape and 10 floors building = Building(random_data["buildings"], [(0,0,0), (20,30,20)], baseShape, DIRECTION.EAST) # build it with your custom materials -building.build(editor, ["stone_bricks","glass_pane","glass","cobblestone_wall","stone_brick_stairs","oak_planks","white_concrete","cobblestone","stone_brick_slab","iron_bars"]) \ No newline at end of file +building.build(editor, ["stone_bricks","glass_pane","glass","cobblestone_wall","stone_brick_stairs","oak_planks","white_concrete","cobblestone","stone_brick_slab","iron_bars"]) +""" \ No newline at end of file diff --git a/world_maker/data/building.png b/world_maker/data/building.png index 2d26e98..75c058c 100644 Binary files a/world_maker/data/building.png and b/world_maker/data/building.png differ diff --git a/world_maker/data/city_map.png b/world_maker/data/city_map.png index c7a0dc1..6de4e5c 100644 Binary files a/world_maker/data/city_map.png and b/world_maker/data/city_map.png differ diff --git a/world_maker/data/district.png b/world_maker/data/district.png index 0fa7716..bcf8455 100644 Binary files a/world_maker/data/district.png and b/world_maker/data/district.png differ diff --git a/world_maker/data/heightmap.png b/world_maker/data/heightmap.png index fc75ff3..0803705 100644 Binary files a/world_maker/data/heightmap.png and b/world_maker/data/heightmap.png differ diff --git a/world_maker/data/highwaymap.png b/world_maker/data/highwaymap.png index 7c4d178..011cb83 100644 Binary files a/world_maker/data/highwaymap.png and b/world_maker/data/highwaymap.png differ diff --git a/world_maker/data/mountain_map.png b/world_maker/data/mountain_map.png index 03ec375..17e06aa 100644 Binary files a/world_maker/data/mountain_map.png and b/world_maker/data/mountain_map.png differ diff --git a/world_maker/data/roadmap.png b/world_maker/data/roadmap.png index f277263..f907fbf 100644 Binary files a/world_maker/data/roadmap.png and b/world_maker/data/roadmap.png differ diff --git a/world_maker/data/skeleton_highway.png b/world_maker/data/skeleton_highway.png index e69f2eb..98de997 100644 Binary files a/world_maker/data/skeleton_highway.png and b/world_maker/data/skeleton_highway.png differ diff --git a/world_maker/data/skeleton_highway_area.png b/world_maker/data/skeleton_highway_area.png index 4bffcc6..51a1476 100644 Binary files a/world_maker/data/skeleton_highway_area.png and b/world_maker/data/skeleton_highway_area.png differ diff --git a/world_maker/data/skeleton_mountain.png b/world_maker/data/skeleton_mountain.png index 3a2af61..6168d74 100644 Binary files a/world_maker/data/skeleton_mountain.png and b/world_maker/data/skeleton_mountain.png differ diff --git a/world_maker/data/skeleton_mountain_area.png b/world_maker/data/skeleton_mountain_area.png index 3bfc866..8e1c2a5 100644 Binary files a/world_maker/data/skeleton_mountain_area.png and b/world_maker/data/skeleton_mountain_area.png differ diff --git a/world_maker/data/smooth_sobel_watermap.png b/world_maker/data/smooth_sobel_watermap.png index a2c350d..c54ac73 100644 Binary files a/world_maker/data/smooth_sobel_watermap.png and b/world_maker/data/smooth_sobel_watermap.png differ diff --git a/world_maker/data/sobelmap.png b/world_maker/data/sobelmap.png index e587909..2ac900f 100644 Binary files a/world_maker/data/sobelmap.png and b/world_maker/data/sobelmap.png differ diff --git a/world_maker/data/treemap.png b/world_maker/data/treemap.png index 83a187a..ccc4a60 100644 Binary files a/world_maker/data/treemap.png and b/world_maker/data/treemap.png differ diff --git a/world_maker/data/watermap.png b/world_maker/data/watermap.png index 36cfd74..40ee940 100644 Binary files a/world_maker/data/watermap.png and b/world_maker/data/watermap.png differ diff --git a/world_maker/data_analysis.py b/world_maker/data_analysis.py index 5b94e8d..9793cb9 100644 --- a/world_maker/data_analysis.py +++ b/world_maker/data_analysis.py @@ -286,7 +286,7 @@ def rectangle_2D_to_3D(rectangle: list[tuple[tuple[int, int], tuple[int, int]]], for x in range(start[0], end[0]): for y in range(start[1], end[1]): avg_height += image.getpixel((x, y)) - avg_height = int(avg_height / ((end[0] - start[0]) * (end[1] - start[1]))) + avg_height = int(avg_height / ((end[0] - start[0]) * (end[1] - start[1]))) + 1 new_rectangle.append( ((start[0], avg_height, start[1]), (end[0], avg_height + randint(height_min, height_max), end[1]))) return new_rectangle diff --git a/world_maker/world_maker.py b/world_maker/world_maker.py index 8455aba..1402244 100644 --- a/world_maker/world_maker.py +++ b/world_maker/world_maker.py @@ -31,4 +31,5 @@ def world_maker(): subtract_map('./world_maker/data/mountain_map.png', './world_maker/data/skeleton_mountain_area.png').save('./world_maker/data/mountain_map.png') subtract_map(smooth_sobel_water_map, filter_negative('./world_maker/data/mountain_map.png')).save('./world_maker/data/mountain_map.png') rectangle_mountain = generate_building('./world_maker/data/mountain_map.png') - return rectangle_building, rectangle_mountain, skeleton_highway, skeleton_mountain + rectangle_mountain = rectangle_2D_to_3D(rectangle_mountain) + return rectangle_mountain, rectangle_building, skeleton_highway, skeleton_mountain