def Kings(): '''kings in the main part of the castle''' d = s.Diamond() d.setWidth(6) d.setColor('Goldenrod') d.draw(-25, 50, 1, 12, zpos = 100) d = s.Diamond() d.setWidth(4) d.setColor('RoyalBlue') d.draw(175, 50, 1, 12, zpos = 100) d = s.Diamond() d.setWidth(4) d.setColor('RoyalBlue') d.draw(-225, 50, 1, 12, zpos = 100)
def house3(): '''this function draws the cube house3 of the castle''' c = s.Cube() c.setWidth(8) c.setColor('SlateGray') c.draw(100, -50, 2, 90) p = s.Pyramid() p.setWidth(6) p.setColor('Goldenrod') p.draw(300, 150, 2, 90) d = s.Diamond() d.setWidth(2) d.setColor('Red') d.draw(190, 340, 0.5, 12, zpos = 115)
def house1(): '''this function draws the cube house1 of the castle''' c = s.Cube() c.setWidth(8) c.setColor('SlateGray') c.draw(-100, -50, 2, 90) p = s.Pyramid() p.setColor('RoyalBlue') p.setWidth(6) p.draw(100, 150, 2, 90) d = s.Diamond() d.setWidth(2) d.setColor('Red') d.draw(-210, 340, 0.5, 12, zpos = 115)
def tile(x, y, scale): # draw the triangle tiles tri = s.Triangle(scale, (0, 0, 0)) tri.setColor("SteelBlue") tri.draw(x, y, 85, 60) tri.setColor("Gold") tri.draw(x + 135, y + 80, 85, 240) #draw stars st = s.Star(scale, (0, 0, 0)) st.setColor("Salmon") st.draw(x + 40, y + 30, 10, 90) #draw diamonds d = s.Diamond(scale, (0, 0, 0)) d.setColor("DodgerBlue") d.draw(x + 85, y + 55, 15, 60)
def painting(): art = s.Square(450, (1, 1, 1)) art.draw(-225, -100, 1, 90) p = s.Pentagon(100, (0, 0, 0)) p.setColor('DarkOrchid') p.draw(-175, 200, 1, 90) st = s.Star(75, (0, 0, 0)) st.setColor('Goldenrod') st.draw(80, 240, 1, 90) c = s.Cross(40, (0, 0, 0)) c.setColor('LightCoral') c.draw(-130, 45, 1, 90) d = s.Diamond(100, (0, 0, 0)) d.setColor('CadetBlue') d.draw(80, -10, 1, 90) t1 = tree.Tree(filename='systemGL.txt') t1.setIterations(9) t1.setColor('LawnGreen') t1.draw(0, -75, 1, 90)
def tile(x, y, scale): # draw the square tiles sq = s.Square(scale, (0, 0, 0)) sq.setColor("Aquamarine") sq.draw(x, y, 90, 90) #draw crosses c = s.Cross(scale, (0, 0, 0)) c.setColor("Red") c.draw(x + 45, y + 45, 7, 90) #draw stars st = s.Star(scale, (0, 0, 0)) st.setColor("Orchid") st.draw(x + 20, y + 70, 10, 90) st.draw(x + 70, y + 20, 10, 90) #draw diamonds d = s.Diamond(scale, (0, 0, 0)) d.setColor("DodgerBlue") d.draw(x + 70, y + 70, 15, 90) d.draw(x + 15, y + 20, 15, 90)
def Miller(): '''rectangle for main body''' r = s.Rectangle() r.setWidth(3) r.setColor('SlateGray') r.draw(-150, -200, 1.75, 90) '''cubes for side of library''' c = s.Cube() c.setWidth(3) c.draw(-330, -200, 1.75, 90) c.draw(380, -200, 1.75, 90) '''trapezoid for middle body''' t = s.Trapezoid() t.setWidth(3) t.setColor('SlateGray') t.draw(-150, -25, 1.75, 90) '''rectangles for top and steps''' r.draw(-35, 128, 1, 90, zpos=40) r.draw(40, 228, 0.5, 90, zpos=60) r.draw(-110, -300, 1.5, 90) '''pyramids for the tops of side buildings''' p = s.Pyramid() p.setWidth(3) p.setColor('Gray') p.draw(-155, -25, 1.75, 90) p.draw(555, -25, 1.75, 90) '''decoration''' d = s.Diamond() d.setWidth(2) d.setColor("LightBlue") d.draw(-263, 195, 1, 12, zpos=110) d.draw(447, 195, 1, 12, zpos=110) '''decoration''' cross = s.Cross() cross.setColor("Blue") cross.setWidth(4) cross.draw(130, 278, 0.35, 90, zpos=70)
def soliders(): '''soldiers in the keep of the castle in formation''' d = s.Diamond() d.setWidth(2) d.setColor('Red') d.draw(-250, -220, 0.25, 12, zpos = 25) d.draw(-250, -220, 0.25, 12, zpos = 50) d.draw(-250, -220, 0.25, 12, zpos = 75) d.draw(-250, -220, 0.25, 12, zpos = 100) d.draw(-250, -220, 0.25, 12, zpos = 125) d.draw(-250, -220, 0.25, 12, zpos = 150) d.draw(-250, -220, 0.25, 12, zpos = 175) d.draw(-250, -220, 0.25, 12, zpos = 200) d.setColor('Purple') d.draw(-200, -220, 0.25, 12, zpos = 25) d.draw(-200, -220, 0.25, 12, zpos = 50) d.draw(-200, -220, 0.25, 12, zpos = 75) d.draw(-200, -220, 0.25, 12, zpos = 100) d.draw(-200, -220, 0.25, 12, zpos = 125) d.draw(-200, -220, 0.25, 12, zpos = 150) d.draw(-200, -220, 0.25, 12, zpos = 175) d.draw(-200, -220, 0.25, 12, zpos = 200) d.setColor('Red') d.draw(-150, -220, 0.25, 12, zpos = 25) d.draw(-150, -220, 0.25, 12, zpos = 50) d.draw(-150, -220, 0.25, 12, zpos = 75) d.draw(-150, -220, 0.25, 12, zpos = 100) d.draw(-150, -220, 0.25, 12, zpos = 125) d.draw(-150, -220, 0.25, 12, zpos = 150) d.draw(-150, -220, 0.25, 12, zpos = 175) d.draw(-150, -220, 0.25, 12, zpos = 200) d.setColor('Purple') d.draw(-100, -220, 0.25, 12, zpos = 25) d.draw(-100, -220, 0.25, 12, zpos = 50) d.draw(-100, -220, 0.25, 12, zpos = 75) d.draw(-100, -220, 0.25, 12, zpos = 100) d.draw(-100, -220, 0.25, 12, zpos = 125) d.draw(-100, -220, 0.25, 12, zpos = 150) d.draw(-100, -220, 0.25, 12, zpos = 175) d.draw(-100, -220, 0.25, 12, zpos = 200) d.setColor('Red') d.draw(-50, -220, 0.25, 12, zpos = 25) d.draw(-50, -220, 0.25, 12, zpos = 50) d.draw(-50, -220, 0.25, 12, zpos = 75) d.draw(-50, -220, 0.25, 12, zpos = 100) d.draw(-50, -220, 0.25, 12, zpos = 125) d.draw(-50, -220, 0.25, 12, zpos = 150) d.draw(-50, -220, 0.25, 12, zpos = 175) d.draw(-50, -220, 0.25, 12, zpos = 200) d.setColor('Purple') d.draw(0, -220, 0.25, 12, zpos = 25) d.draw(0, -220, 0.25, 12, zpos = 50) d.draw(0, -220, 0.25, 12, zpos = 75) d.draw(0, -220, 0.25, 12, zpos = 100) d.draw(0, -220, 0.25, 12, zpos = 125) d.draw(0, -220, 0.25, 12, zpos = 150) d.draw(0, -220, 0.25, 12, zpos = 175) d.draw(0, -220, 0.25, 12, zpos = 200) d.setColor('Red') d.draw(50, -220, 0.25, 12, zpos = 25) d.draw(50, -220, 0.25, 12, zpos = 50) d.draw(50, -220, 0.25, 12, zpos = 75) d.draw(50, -220, 0.25, 12, zpos = 100) d.draw(50, -220, 0.25, 12, zpos = 125) d.draw(50, -220, 0.25, 12, zpos = 150) d.draw(50, -220, 0.25, 12, zpos = 175) d.draw(50, -220, 0.25, 12, zpos = 200) d.setColor('Purple') d.draw(100, -220, 0.25, 12, zpos = 25) d.draw(100, -220, 0.25, 12, zpos = 50) d.draw(100, -220, 0.25, 12, zpos = 75) d.draw(100, -220, 0.25, 12, zpos = 100) d.draw(100, -220, 0.25, 12, zpos = 125) d.draw(100, -220, 0.25, 12, zpos = 150) d.draw(100, -220, 0.25, 12, zpos = 175) d.draw(100, -220, 0.25, 12, zpos = 200) d.setColor('Red') d.draw(150, -220, 0.25, 12, zpos = 25) d.draw(150, -220, 0.25, 12, zpos = 50) d.draw(150, -220, 0.25, 12, zpos = 75) d.draw(150, -220, 0.25, 12, zpos = 100) d.draw(150, -220, 0.25, 12, zpos = 125) d.draw(150, -220, 0.25, 12, zpos = 150) d.draw(150, -220, 0.25, 12, zpos = 175) d.draw(150, -220, 0.25, 12, zpos = 200) d.setColor('Purple') d.draw(200, -220, 0.25, 12, zpos = 25) d.draw(200, -220, 0.25, 12, zpos = 50) d.draw(200, -220, 0.25, 12, zpos = 75) d.draw(200, -220, 0.25, 12, zpos = 100) d.draw(200, -220, 0.25, 12, zpos = 125) d.draw(200, -220, 0.25, 12, zpos = 150) d.draw(200, -220, 0.25, 12, zpos = 175) d.draw(200, -220, 0.25, 12, zpos = 200) d.setColor('Red') d.draw(250, -220, 0.25, 12, zpos = 25) d.draw(250, -220, 0.25, 12, zpos = 50) d.draw(250, -220, 0.25, 12, zpos = 75) d.draw(250, -220, 0.25, 12, zpos = 100) d.draw(250, -220, 0.25, 12, zpos = 125) d.draw(250, -220, 0.25, 12, zpos = 150) d.draw(250, -220, 0.25, 12, zpos = 175) d.draw(250, -220, 0.25, 12, zpos = 200)
def paintings(): # painting number 1 '''hand drawn with jitter style''' art = s.Square(300, ('Black')) art.setStyle('jitter3') art.setJitter(4) art.draw(-600, -100, 1, 90) '''now i will add art to the painting''' #pentagon with jitter3 style p = s.Pentagon(75, (0, 0, 0)) p.setColor('DarkOrchid') p.setStyle('jitter3') p.setJitter(4) p.draw(-100, -50, 1, 90) #normal star st = s.Star(50, (0, 0, 0)) st.setColor('Red') st.draw(50, 120, 1, 90) #normal diamond d = s.Diamond(50, (0, 0, 0)) d.setColor('Blue') d.draw(-100, 125, 1, 90) # painting number 2 '''hand drawn with dotted style''' art1 = s.Square(300, ('Black')) art1.setStyle('dotted') art1.setDotSize(3) art1.draw(-150, -100, 1, 90) '''now i will add art to the painting''' #diamond with jitter style d = s.Diamond(50, (0, 0, 0)) d.setColor('CadetBlue') d.setStyle('jitter') d.setJitter(3) d.draw(-400, 125, 1, 90) #cross with dotted style c = s.Cross(30, (0, 0, 0)) c.setColor('LightCoral') c.setStyle('dotted') c.setDotSize(3) c.draw(-500, 45, 1, 90) # painting number 3 '''hand drawn with jitter3 style''' art2 = s.Square(300, ('Black')) art2.setStyle('jitter3') art2.setJitter(5) art2.draw(300, -100, 1, 90) '''now i will add art to the painting''' #normal cross c = s.Cross(15, (0, 0, 0)) c.setColor('LightCoral') c.draw(350, 110, 1, 90) #pentagon with dotted style p = s.Pentagon(75, (0, 0, 0)) p.setColor('OliveDrab') p.setStyle('dotted') p.setDotSize(3) p.draw(370, -65, 1, 90) #star with jitter3 style st = s.Star(50, (0, 0, 0)) st.setColor('Goldenrod') st.setStyle('jitter3') st.setJitter(4) st.draw(500, 120, 1, 90) #trees for museum decoration t1 = tree.Tree(filename='project10lsystem.txt') t1.setIterations(3) t1.setColor('OliveDrab') t1.draw(-230, -200, 1, 90) t2 = tree.Tree(filename='project10lsystem.txt') t2.setIterations(3) t2.setColor('LawnGreen') t2.draw(215, -200, 1, 90)