def createPyramid(apex, base, height):
    canvas_width = 400
    canvas_height = 400
    canvas = Canvas(root, width=canvas_width, height=canvas_height)
    canvas.grid(row=5, column=0, columnspan=2, sticky=E)
    canvas.configure(background='white')
    grid = GridLines(canvas, canvas_width, canvas_height, 20)
    GridLines.create_grid(grid)
    x_center = apex[0]
    y_top = apex[1]
    y_bottom = (y_top + height)
    y_middle = (y_top + (height / 1.6))
    half_base = (base / 2)
    x_left = (x_center - half_base)
    x_right = (x_center + half_base)
    right_offset = ((base * 0.6) - base)
    x_right_rear = (x_right + right_offset)
    left_offset = ((base * 1.1) - half_base)
    x_left_rear = (x_center - left_offset)
    points = [[x_left, y_bottom], [x_right, y_bottom], apex]
    canvas.create_polygon(points, outline='black', fill='Gray95')
    points3 = [apex, [x_left_rear, y_middle], [x_left, y_bottom]]
    canvas.create_polygon(points3, outline='black', fill='Gray85')
    canvas.create_line(x_center, y_top, x_right_rear, y_middle, fill='thistle3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_left_rear, y_middle, fill='CadetBlue3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_left, y_bottom, fill='PaleGreen3', dash=(4, 4))
    canvas.create_line(x_left_rear, y_middle, x_right, y_bottom, fill='PaleGreen3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_right, y_bottom, fill='CadetBlue3', dash=(4, 4))
def createPyramid(apex, base, height):
    canvas_width = 400
    canvas_height = 400
    canvas = Canvas(root, width=canvas_width, height=canvas_height)
    canvas.grid(row=5, column=0, columnspan=2, sticky=E)
    canvas.configure(background='white')
    grid = GridLines(canvas, canvas_width, canvas_height, 20)
    GridLines.create_grid(grid)
    x_center = apex[0]
    y_top = apex[1]
    y_bottom = (y_top + height)
    y_middle = (y_top + (height / 1.6))
    half_base = (base / 2)
    x_left = (x_center - half_base)
    x_right = (x_center + half_base)
    right_offset = ((base * 0.6) - base)
    x_right_rear = (x_right + right_offset)
    left_offset = ((base * 1.1) - half_base)
    x_left_rear = (x_center - left_offset)
    points = [[x_left, y_bottom], [x_right, y_bottom], apex]
    canvas.create_polygon(points, outline='black', fill='Gray95')
    points3 = [apex, [x_left_rear, y_middle], [x_left, y_bottom]]
    canvas.create_polygon(points3, outline='black', fill='Gray85')
    canvas.create_line(x_center, y_top, x_right_rear, y_middle, fill='thistle3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_left_rear, y_middle, fill='CadetBlue3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_left, y_bottom, fill='PaleGreen3', dash=(4, 4))
    canvas.create_line(x_left_rear, y_middle, x_right, y_bottom, fill='PaleGreen3', dash=(4, 4))
    canvas.create_line(x_right_rear, y_middle, x_right, y_bottom, fill='CadetBlue3', dash=(4, 4))