-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reformatted scripts and updated indentation
- Loading branch information
Showing
209 changed files
with
2,787 additions
and
1,990 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,42 @@ | ||
import arcade # pip install arcade | ||
import arcade # pip install arcade | ||
|
||
# Setting size for main window | ||
Window_width = 700 | ||
Window_height = 700 | ||
|
||
# Creating and opening the window | ||
arcade.open_window(Window_width,Window_height,"Smiley") | ||
arcade.open_window(Window_width, Window_height, "Smiley") | ||
arcade.set_background_color(arcade.color.BLACK) | ||
arcade.start_render() # Always use this before starting | ||
arcade.start_render() # Always use this before starting | ||
|
||
# Base Structure | ||
x = 350; y = 350; radius = 200 | ||
arcade.draw_circle_filled(x,y,radius,arcade.color.YELLOW) | ||
x = 350 | ||
y = 350 | ||
radius = 200 | ||
arcade.draw_circle_filled(x, y, radius, arcade.color.YELLOW) | ||
|
||
#Right Eye | ||
x = 420; y = 420; radius = 25 | ||
arcade.draw_circle_filled(x,y,radius,arcade.color.BLACK) | ||
# Right Eye | ||
x = 420 | ||
y = 420 | ||
radius = 25 | ||
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK) | ||
|
||
#Left Eye | ||
x = 280; y = 420; radius = 25 | ||
arcade.draw_circle_filled(x,y,radius,arcade.color.BLACK) | ||
# Left Eye | ||
x = 280 | ||
y = 420 | ||
radius = 25 | ||
arcade.draw_circle_filled(x, y, radius, arcade.color.BLACK) | ||
|
||
#Curve | ||
x = 340; y= 310; width = 120; height = 100; start_angle = 180; end_angle = 360 | ||
arcade.draw_arc_outline(x,y,width,height,arcade.color.BLACK,start_angle,end_angle,10) | ||
# Curve | ||
x = 340 | ||
y = 310 | ||
width = 120 | ||
height = 100 | ||
start_angle = 180 | ||
end_angle = 360 | ||
arcade.draw_arc_outline( | ||
x, y, width, height, arcade.color.BLACK, start_angle, end_angle, 10 | ||
) | ||
|
||
arcade.finish_render() # Ends the arcade | ||
arcade.run() # Keeps the window running until closed | ||
arcade.finish_render() # Ends the arcade | ||
arcade.run() # Keeps the window running until closed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,63 @@ | ||
import arcade | ||
import arcade | ||
import random | ||
|
||
win_width = 800 | ||
win_height = 600 | ||
win_height = 600 | ||
|
||
# Drawing the background Screen : | ||
def screen(): | ||
arcade.draw_rectangle_filled(win_width/2, win_height*2/3, win_width-1, win_height*2/3, arcade.color.SKY_BLUE) | ||
arcade.draw_rectangle_filled(win_width/2, win_height/6, win_width-1, win_height/3, arcade.color.LIGHT_GREEN) | ||
|
||
def birds(x,y): | ||
arcade.draw_rectangle_filled( | ||
win_width / 2, | ||
win_height * 2 / 3, | ||
win_width - 1, | ||
win_height * 2 / 3, | ||
arcade.color.SKY_BLUE, | ||
) | ||
arcade.draw_rectangle_filled( | ||
win_width / 2, | ||
win_height / 6, | ||
win_width - 1, | ||
win_height / 3, | ||
arcade.color.LIGHT_GREEN, | ||
) | ||
|
||
|
||
def birds(x, y): | ||
# Left Curve : | ||
arcade.draw_arc_outline(x, y, 40, 40, arcade.color.BLACK, 0, 90,3) | ||
arcade.draw_arc_outline(x, y, 40, 40, arcade.color.BLACK, 0, 90, 3) | ||
# Right Curve : | ||
arcade.draw_arc_outline(x+40, y, 40, 40, arcade.color.BLACK, 90, 180,3) | ||
arcade.draw_arc_outline(x + 40, y, 40, 40, arcade.color.BLACK, 90, 180, 3) | ||
|
||
|
||
def trees(a, b): | ||
# The Bark of the Tree : | ||
arcade.draw_rectangle_filled(a, b, 20, 40, arcade.color.BROWN) | ||
# Drawing the Top of the Tree : | ||
line = b + 20 | ||
list = ((a - 40, line), (a, line + 100), (a + 40, line)) | ||
arcade.draw_polygon_filled(list, arcade.color.DARK_GREEN) | ||
|
||
def trees(a,b): | ||
# The Bark of the Tree : | ||
arcade.draw_rectangle_filled(a,b,20,40,arcade.color.BROWN) | ||
# Drawing the Top of the Tree : | ||
line = b+20 | ||
list = ((a-40,line),(a,line+100),(a+40,line)) | ||
arcade.draw_polygon_filled(list,arcade.color.DARK_GREEN) | ||
|
||
def sun(): | ||
arcade.draw_circle_filled(600,500,50,arcade.color.SUNGLOW) | ||
arcade.draw_circle_filled(600, 500, 50, arcade.color.SUNGLOW) | ||
|
||
if __name__=="__main__": | ||
arcade.open_window(win_width,win_height,"Still Imaging") | ||
|
||
if __name__ == "__main__": | ||
arcade.open_window(win_width, win_height, "Still Imaging") | ||
arcade.start_render() | ||
screen() | ||
sun() | ||
|
||
for i in range (10): | ||
x = random.randrange(0,win_width) | ||
y = random.randrange(win_height/2,win_height-20) | ||
birds(x,y) | ||
for i in range(10): | ||
x = random.randrange(0, win_width) | ||
y = random.randrange(win_height / 2, win_height - 20) | ||
birds(x, y) | ||
|
||
for a in range (45,win_width,90): | ||
trees(a,win_height/3) | ||
for a in range(45, win_width, 90): | ||
trees(a, win_height / 3) | ||
|
||
for a in range (65, win_width,90): | ||
trees(a,(win_height/3)-120) | ||
for a in range(65, win_width, 90): | ||
trees(a, (win_height / 3) - 120) | ||
|
||
arcade.finish_render() | ||
arcade.run() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.