def draw_nose_mouth(x, y): """Draw the nose and mouth of the cat""" # Nose arcade.draw_triangle_filled(140 + x, 150 + y, 160 + x, 150 + y, 150 + x, 130 + y, arcade.csscolor.LIGHT_PINK) # Mouth arcade.draw_line(150 + x, 130 + y, 150 + x, 115 + y, arcade.csscolor.LIGHT_PINK) arcade.draw_parabola_outline(125 + x, 130 + y, 150 + x, -15, arcade.csscolor.LIGHT_PINK) arcade.draw_parabola_outline(175 + x, 130 + y, 150 + x, -15, arcade.csscolor.LIGHT_PINK)
def on_draw(self): # Começando a renderizar as formas arcade.start_render() # Realizando as formas # Circulo arcade.draw_circle_filled(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, 50, arcade.color.BRIGHT_CERULEAN) # Linha arcade.draw_line(200, 400, 400, 400, arcade.color.BLUE_GRAY, 6) # Retângulo arcade.draw_lrtb_rectangle_filled(200, 500, 700, 500, arcade.color.BOSTON_UNIVERSITY_RED) # Parábola arcade.draw_parabola_outline(700, 200, 900, 100, arcade.color.BRONZE, 10) # Arco arcade.draw_arc_filled(800, 600, 100, 50, arcade.color.BYZANTIUM, 180, 380) # Elipse arcade.draw_ellipse_filled(300, 200, 300, 200, arcade.color.COFFEE) # Quadrado? arcade.draw_point(900, 200, arcade.color.BUD_GREEN, 100) # Retângulos arcade.draw_lrtb_rectangle_filled(200, 500, 700, 500, arcade.color.BOSTON_UNIVERSITY_RED) arcade.draw_rectangle_filled(700, 700, 200, 100, arcade.color.COLUMBIA_BLUE) arcade.draw_xywh_rectangle_filled(900, 600, 200, 150, arcade.color.DARK_SEA_GREEN) """Não necessita escrever
def draw_koffing(x, y): # Draw KoffingBody arcade.draw_circle_filled(450, y, 85, arcade.color.PURPLE) # Draw KoffingEye1 arcade.draw_parabola_filled(410, 20 + y, 430, 15, arcade.color.WHITE) # Draw KoffingEye2 arcade.draw_parabola_filled(470, 20 + y, 490, 15, arcade.color.WHITE) # Draw KoffingEyeLine1 arcade.draw_parabola_outline(410, 20 + y, 430, 15, arcade.color.BLACK, 2) # Draw KoffingEyeLine2 arcade.draw_parabola_outline(470, 20 + y, 490, 15, arcade.color.BLACK, 2) # Draw KoffingPupil1 arcade.draw_circle_filled(420, 42 + y, 4, arcade.color.BLACK) # Draw KoffingPupil2 arcade.draw_circle_filled(480, 42 + y, 4, arcade.color.BLACK) # Draw KoffingMouth arcade.draw_parabola_filled(420, 50 + y, 480, -35, arcade.color.PINK) # Draw KoffingFang1 arcade.draw_triangle_filled(400, 15 + y, 420, y + 15, 410, y - 5, arcade.color.WHITE) # Draw KoffingFang2 arcade.draw_triangle_filled(480, 15 + y, 500, y + 15, 490, y - 5, arcade.color.WHITE) # Draw KoffingCircle arcade.draw_ellipse_outline(450, y - 40, 25, 15, arcade.color.WHITE, 5) # Draw KoffingX1 arcade.draw_line(440, y - 75, 460, y - 55, arcade.color.WHITE, 3) # Draw KoffingX2 arcade.draw_line(460, y - 75, 440, y - 55, arcade.color.WHITE, 3)
def draw_parasite(x, y): arcade.draw_parabola_outline(x, y, x + 20, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(x + 20, y, x + 50, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_parabola_outline(x + 90, y, x + 120, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(x + 120, y, x + 140, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_circle_filled(x + 70, y, 30, arcade.color.FOREST_GREEN) arcade.draw_parabola_outline(x, y - 20, x + 20, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(x + 20, y - 20, x + 40, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_parabola_outline(x + 100, y - 20, x + 120, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(x + 120, y - 20, x + 140, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_circle_filled(x + 70, y, 10, arcade.color.BLACK)
When you are finished Pull Request your file to your instructor. ''' import arcade import random random.randint(420, 480) arcade.open_window(500, 500, "Zach Cobb") arcade.set_background_color(arcade.color.STAR_COMMAND_BLUE) arcade.start_render() #alien arcade.draw_ellipse_filled(250, 250, 150, 220, arcade.color.GREEN) arcade.draw_ellipse_filled(320, 320, 40, 60, arcade.color.BLACK, -35) arcade.draw_ellipse_filled(180, 320, 40, 60, arcade.color.BLACK, 35) arcade.draw_parabola_outline(200, 50, 300, 50, arcade.color.BLACK, 2) #nose arcade.draw_ellipse_filled(270, 240, 5, 10, arcade.color.BLACK, -25) arcade.draw_ellipse_filled(230, 240, 5, 10, arcade.color.BLACK, 25) #antennas arcade.draw_rectangle_filled(180, 460, 15, 45, arcade.color.GREEN, 25) arcade.draw_rectangle_filled(320, 460, 15, 45, arcade.color.GREEN, -25) arcade.draw_circle_filled(170, 480, 10, arcade.color.RED) arcade.draw_circle_filled(330, 480, 10, arcade.color.RED) # stars n = 0 for i in range(5): arcade.draw_circle_filled(random.randint(20, 60), random.randint(20, 480), random.randint(2, 10), arcade.color.WHITE) arcade.draw_circle_filled(random.randint(420,
y = 300 radius = 200 arcade.draw_circle_filled(x,y,radius, arcade.color.BANANA_YELLOW) #draw left eyes x = 375 y = 350 radius = 50 width = 35 height = 60 s_num = 300 arcade.arcade.draw_ellipse_filled(x,y,width, height, arcade.color.BLACK ,0,s_num) #draw right eyes x = 225 y = 350 radius = 50 width = 35 height = 60 s_num = 300 arcade.arcade.draw_ellipse_filled(x,y,width, height, arcade.color.BLACK ,0,s_num) #draw mouth start_x = 220 start_y = 220 end_y = 380 arcade.draw_parabola_outline(start_x, start_y, end_y, 3, arcade.color.BLACK, 7, 180 ) arcade.finish_render() arcade.run()
arcade.draw_parabola_filled(400, 300, 420, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(400, 315, 420, 315, 410, 335, arcade.color.BLACK_OLIVE) # Seed 4 arcade.draw_parabola_filled(470, 105, 490, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(470, 120, 490, 120, 480, 140, arcade.color.BLACK_OLIVE) # Finally, seed 5 arcade.draw_parabola_filled(700, 475, 720, 15, arcade.color.BLACK_OLIVE, 180) arcade.draw_triangle_filled(700, 490, 720, 490, 710, 510, arcade.color.BLACK_OLIVE) # Alien parasite arcade.draw_parabola_outline(600, 200, 620, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(620, 200, 650, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_parabola_outline(690, 200, 720, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(720, 200, 740, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_circle_filled(670, 200, 30, arcade.color.FOREST_GREEN) arcade.draw_parabola_outline(600, 180, 620, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(620, 180, 640, 20, arcade.color.FOREST_GREEN, 6, 180) arcade.draw_parabola_outline(700, 180, 720, 20, arcade.color.FOREST_GREEN, 6, 0) arcade.draw_parabola_outline(720, 180, 740, 20, arcade.color.FOREST_GREEN, 6, 180)
def draw_bird(x, y, z): """Draws a bird""" arcade.draw_parabola_outline(x + z, y, x, z * .5, arcade.csscolor.BLACK, 4) arcade.draw_parabola_outline(x, y, x - z, z * .5, arcade.csscolor.BLACK, 4)