def outsidewindownight( x, y, scale): t.begin_fill() t.color('Dark Blue') bsl.buildingblock(x+150*scale, y-75*scale, 250*scale, 100*scale) t.end_fill() t.begin_fill() t.color('Black') bsl.buildingblock(x+150*scale, y+25*scale, 250*scale, 150*scale) t.end_fill() bsl.star(x+350*scale, y+125*scale, .10*scale, 'True', 'yellow') bsl.star(x+250*scale, y+75*scale, .10*scale, 'True', 'yellow') bsl.star(x+275*scale, y+100*scale, .10*scale, 'True', 'yellow') bsl.star(x+300*scale, y+125*scale, .10*scale, 'True', 'yellow') bsl.star(x+250*scale, y+125*scale, .10*scale, 'True', 'white') bsl.star(x+350*scale, y+65*scale, .10*scale, 'True', 'white') bsl.star(x+300*scale, y+75*scale, .10*scale, 'True', 'yellow') t.begin_fill() t.color('Gray') bsl.goto(x+200*scale, y+75*scale) t.circle(40) t.end_fill()
def outsidewindownight(x, y, scale): t.begin_fill() t.color('Dark Blue') bsl.buildingblock(x + 150 * scale, y - 75 * scale, 250 * scale, 100 * scale) t.end_fill() t.begin_fill() t.color('Black') bsl.buildingblock(x + 150 * scale, y + 25 * scale, 250 * scale, 150 * scale) t.end_fill() bsl.star(x + 350 * scale, y + 125 * scale, .10 * scale, 'True', 'yellow') bsl.star(x + 250 * scale, y + 75 * scale, .10 * scale, 'True', 'yellow') bsl.star(x + 275 * scale, y + 100 * scale, .10 * scale, 'True', 'yellow') bsl.star(x + 300 * scale, y + 125 * scale, .10 * scale, 'True', 'yellow') bsl.star(x + 250 * scale, y + 125 * scale, .10 * scale, 'True', 'white') bsl.star(x + 350 * scale, y + 65 * scale, .10 * scale, 'True', 'white') bsl.star(x + 300 * scale, y + 75 * scale, .10 * scale, 'True', 'yellow') t.begin_fill() t.color('Gray') bsl.goto(x + 200 * scale, y + 75 * scale) t.circle(40) t.end_fill()
def museum(t, scale, x_offset = 0, y_offset = 0): ''' Function calling various painting scenes within museum scenes ''' space_painting(t, x_offset = -200, y_offset = 0, scale = 1/8) mondrian_painting(t, 1/4) t.pensize(6) t.pencolor('gold4') bsl.rectangle(t, 230, 25, 220, 220) bsl.goto(t,350,120) ex2.star_painting(t,1) t.pensize(6) t.pencolor('peru') t.fillcolor('peru') t.begin_fill() bsl.rectangle(t, x_offset-500, y_offset-250, 1000, 50) t.end_fill() bsl.circle(t,x_offset-400, y_offset-300, 1/2, 'SandyBrown') bsl.circle(t,x_offset-250, y_offset-300, 1/2, 'SandyBrown') bsl.circle(t,x_offset-100, y_offset-300, 1/2, 'SandyBrown') bsl.circle(t,x_offset+50, y_offset-300, 1/2, 'SandyBrown') bsl.circle(t,x_offset+200, y_offset-300, 1/2, 'SandyBrown') bsl.circle(t,x_offset+350, y_offset-300, 1/2, 'SandyBrown')
def invasion(x, y, scale): t.begin_fill() t.color('Purple') bsl.buildingblock(x + 150 * scale, y - 75 * scale, 250 * scale, 100 * scale) t.end_fill() t.begin_fill() t.color('Red') bsl.buildingblock(x + 150 * scale, y + 25 * scale, 250 * scale, 150 * scale) t.end_fill() bsl.star(x + 350 * scale, y + 125 * scale, .25 * scale, 'True', 'Black') bsl.goto(200 * scale, 100 * scale) t.begin_fill() t.color("Yellow") t.circle(25) t.end_fill() bsl.goto(200 * scale, 110 * scale) t.begin_fill() t.color("White") t.circle(15) t.end_fill() bsl.goto(200 * scale, 120 * scale) t.begin_fill() t.color("Orange") t.circle(5) t.end_fill() t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x + 200 * scale, y + 95 * scale, 20 * scale, 5 * scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x + 225 * scale, y + 75 * scale, 20 * scale, 5 * scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x + 230 * scale, y + 110 * scale, 20 * scale, 5 * scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x + 250 * scale, y + 100 * scale, 20 * scale, 5 * scale) t.end_fill() t.setheading(0)
def invasion( x, y, scale ): t.begin_fill() t.color('Purple') bsl.buildingblock(x+150*scale, y-75*scale, 250*scale, 100*scale) t.end_fill() t.begin_fill() t.color('Red') bsl.buildingblock(x+150*scale, y+25*scale, 250*scale, 150*scale) t.end_fill() bsl.star(x+350*scale, y+125*scale, .25*scale, 'True', 'Black') bsl.goto(200*scale, 100*scale) t.begin_fill() t.color("Yellow") t.circle(25) t.end_fill() bsl.goto(200*scale, 110*scale) t.begin_fill() t.color("White") t.circle(15) t.end_fill() bsl.goto(200*scale, 120*scale) t.begin_fill() t.color("Orange") t.circle(5) t.end_fill() t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x+200*scale, y+95*scale, 20*scale, 5*scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x+225*scale, y+75*scale, 20*scale, 5*scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x+230*scale, y+110*scale, 20*scale, 5*scale) t.end_fill() t.setheading(0) t.setheading(-30) t.begin_fill() t.color('Green') bsl.buildingblock(x+250*scale, y+100*scale, 20*scale, 5*scale) t.end_fill() t.setheading(0)
#==================================================================== # import different modules import turtle as t import random import better_shapelib as bsl #------------------------------- # Task 5 # Position and Scale three separate myscene() images '''For Task 5 I have decided to use myscene2() which is the second Maine outdoors scene from my project2''' if __name__ == '__main__': bsl.myscene2(400,200,.10) bsl.goto(0, 0) t.setheading(0) bsl.myscene2(-450, 200, .15) bsl.goto(0, 0) t.setheading(0) bsl.myscene2( 0, -100, .25) bsl.goto(0, 0) t.setheading(0) # used goto() and setheading() to bring turtle cursor back to start point t.update() raw_input('Press enter to continue')
#==================================================================== # import different modules import turtle as t import random import better_shapelib as bsl #------------------------------- # Task 5 # Position and Scale three separate myscene() images '''For Task 5 I have decided to use myscene2() which is the second Maine outdoors scene from my project2''' if __name__ == '__main__': bsl.myscene2(400, 200, .10) bsl.goto(0, 0) t.setheading(0) bsl.myscene2(-450, 200, .15) bsl.goto(0, 0) t.setheading(0) bsl.myscene2(0, -100, .25) bsl.goto(0, 0) t.setheading(0) # used goto() and setheading() to bring turtle cursor back to start point t.update() raw_input('Press enter to continue')