generated from mwc/project_drawing
	Compare commits
	
		
			5 Commits
		
	
	
		
			f5118a43fe
			...
			main
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					6e78205c32 | ||
| 
						 | 
					27d744a4f1 | ||
| 
						 | 
					0bb1d73129 | ||
| 
						 | 
					e6cd7fafde | ||
| 
						 | 
					815264a40d | 
							
								
								
									
										
											BIN
										
									
								
								DrawingIdeaGhost.png
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								DrawingIdeaGhost.png
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 79 KiB  | 
							
								
								
									
										21
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								README.md
									
									
									
									
									
								
							@@ -9,13 +9,28 @@ which allows basic formatting.
 | 
			
		||||
 | 
			
		||||
## Description 
 | 
			
		||||
 | 
			
		||||
(Describe your goal for this project. If you want to link to an 
 | 
			
		||||
(For this project, i want to draw 1-2 ghosts that move in a repeated manner as if they are floating.)
 | 
			
		||||
    
 | 
			
		||||
    Describe your goal for this project. If you want to link to an 
 | 
			
		||||
image, move the image to this directory, and then use the following syntax:
 | 
			
		||||
 | 
			
		||||

 | 
			
		||||
([Initial sketch of the ghost, guesstimating the number of turns, circles, and straight paths that will be needed for this drawing.](DrawingIdeaGhost.png)
 | 
			
		||||
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
## Planning
 | 
			
		||||
 | 
			
		||||
(Include your planning here, including your project milestone.)
 | 
			
		||||
(Milestone 1: Function: Ghost-face
 | 
			
		||||
This miletone includes the drawing of the ghost-face as a function so it could be repeated for each ghost. (I do plan on using Ghostface as my inspiration for these! :) But I think I might have to compromise on its fluid design as I don't think I'm equipped well enough to do a color fill in a complex shape just yet. Mine would probably look more triangular for the mouth and more of a whole circle for the eyes, unless I can overlap two colored in circles to create the shape I need. 
 | 
			
		||||
 | 
			
		||||
Milestone 2: Function: Ghost-body
 | 
			
		||||
This milestone function draws the body of the ghosts. I plan on adding only 3 "frills". In total these three frills will include 10 circles of different radii to be drawn to different extents in order to create curves. It seems a little daunting at the moment but I think using curves for my typeface prepared me to take on this challenge. If needed, I can divide this function into three parts to ease the work load of each session I plan on dedicating to this project. In that case this milestone look like:
 | 
			
		||||
Milestone 2.1: Ghost-body F1
 | 
			
		||||
Milestone 2.2: Ghost-body F2
 | 
			
		||||
Milestone 2.3: Ghost-body F3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Milestone 3: Animation
 | 
			
		||||
Using Superturtle I plan on adding a simple animation of left right motion. Maybe I can move them in a circular path as well in a loop. 
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										36
									
								
								README.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								README.py
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
# (Drawing project)
 | 
			
		||||
 | 
			
		||||
(
 | 
			
		||||
This is the README file for your drawing project. 
 | 
			
		||||
Replace all the text in parentheses with your own text.
 | 
			
		||||
It's written in a simple language called Markdown, 
 | 
			
		||||
which allows basic formatting. 
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
## Description 
 | 
			
		||||
 | 
			
		||||
(For this project, i want to draw 1-2 ghosts that move in a repeated manner as if they are floating.)
 | 
			
		||||
    
 | 
			
		||||
    Describe your goal for this project. If you want to link to an 
 | 
			
		||||
image, move the image to this directory, and then use the following syntax:
 | 
			
		||||
 | 
			
		||||
([Initial sketch of the ghost, guesstimating the number of turns, circles, and straight paths that will be needed for this drawing.](DrawingIdeaGhost.png)
 | 
			
		||||
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
## Planning
 | 
			
		||||
 | 
			
		||||
(Milestone 1: Function: Ghost-face
 | 
			
		||||
This miletone includes the drawing of the ghost-face as a function so it could be repeated for each ghost. (I do plan on using Ghostface as my inspiration for these! :) But I think I might have to compromise on its fluid design as I don't think I'm equipped well enough to do a color fill in a complex shape just yet. Mine would probably look more triangular for the mouth and more of a whole circle for the eyes, unless I can overlap two colored in circles to create the shape I need. 
 | 
			
		||||
 | 
			
		||||
Milestone 2: Function: Ghost-body
 | 
			
		||||
This milestone function draws the body of the ghosts. I plan on adding only 3 "frills". In total these three frills will include 10 circles of different radii to be drawn to different extents in order to create curves. It seems a little daunting at the moment but I think using curves for my typeface prepared me to take on this challenge. If needed, I can divide this function into three parts to ease the work load of each session I plan on dedicating to this project. In that case this milestone look like:
 | 
			
		||||
Milestone 2.1: Ghost-body F1
 | 
			
		||||
Milestone 2.2: Ghost-body F2
 | 
			
		||||
Milestone 2.3: Ghost-body F3
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Milestone 3: Animation
 | 
			
		||||
Using Superturtle I plan on adding a simple animation of left right motion. Maybe I can move them in a circular path as well in a loop. 
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										110
									
								
								drawing.py
									
									
									
									
									
								
							
							
						
						
									
										110
									
								
								drawing.py
									
									
									
									
									
								
							@@ -1,7 +1,113 @@
 | 
			
		||||
# drawing.py
 | 
			
		||||
# ----------
 | 
			
		||||
# By ____(you)___________
 | 
			
		||||
# By Challa Zirek
 | 
			
		||||
#
 | 
			
		||||
# (Briefly describe what this program does.)
 | 
			
		||||
# (This project draws two ghosts, in theme of Halloween.)
 | 
			
		||||
 | 
			
		||||
import superturtle
 | 
			
		||||
from superturtle import *
 | 
			
		||||
from superturtle.animation import *
 | 
			
		||||
import turtle
 | 
			
		||||
from turtle import *
 | 
			
		||||
import bezier
 | 
			
		||||
import numpy as np
 | 
			
		||||
 | 
			
		||||
TurtleScreen=turtle.Screen
 | 
			
		||||
turtle.bgcolor("#B04021")
 | 
			
		||||
turtle.pensize(4)
 | 
			
		||||
 | 
			
		||||
def ghostie(length,x,y):
 | 
			
		||||
    turtle.pencolor("#3C025E")
 | 
			
		||||
    turtle.fillcolor("#B8B8B8")
 | 
			
		||||
    penup()
 | 
			
		||||
    turtle.goto(x,y)
 | 
			
		||||
    pendown()
 | 
			
		||||
    #Starts drawing the left side of the outline
 | 
			
		||||
    turtle.begin_fill()
 | 
			
		||||
    left(180)
 | 
			
		||||
    circle(2*length, 90)
 | 
			
		||||
    forward(3*length)
 | 
			
		||||
    circle(-6*length,30)
 | 
			
		||||
    left(170)
 | 
			
		||||
    circle(5*length,30)
 | 
			
		||||
    circle(-0.2*length,180)
 | 
			
		||||
    print(pos())
 | 
			
		||||
 | 
			
		||||
    #Starts drawing the middle frill
 | 
			
		||||
    xpos, ypos = turtle.pos()
 | 
			
		||||
    points=np.array([
 | 
			
		||||
        [xpos, (xpos+30), (xpos-70), (xpos+70), xpos],
 | 
			
		||||
        [ypos, (ypos-48), (ypos-88), (ypos-148), (ypos-218)]
 | 
			
		||||
    ])
 | 
			
		||||
    curve = bezier.Curve(points, 4)  
 | 
			
		||||
    s_vals = np.linspace(0,1,100)
 | 
			
		||||
    bezierpoints= curve.evaluate_multi(s_vals)
 | 
			
		||||
    for n in range(1, bezierpoints.shape[1]):
 | 
			
		||||
        turtle.goto(bezierpoints[0][n], bezierpoints[1][n])
 | 
			
		||||
    left(180)
 | 
			
		||||
    points2=np.array([
 | 
			
		||||
        [xpos, (xpos+90), (xpos+10), (xpos+40), (xpos+50)],
 | 
			
		||||
        [(ypos-218), (ypos-178), (ypos-58), (ypos-28), ypos]
 | 
			
		||||
    ])
 | 
			
		||||
    curve2 = bezier.Curve(points2, 4)
 | 
			
		||||
    s_vals = np.linspace(0,1,100)
 | 
			
		||||
    bezierpoints2= curve2.evaluate_multi(s_vals)
 | 
			
		||||
    for n in range(1, bezierpoints2.shape[1]):
 | 
			
		||||
        turtle.goto(bezierpoints2[0][n], bezierpoints2[1][n])
 | 
			
		||||
    
 | 
			
		||||
    #Starts drawing the right side of the outline
 | 
			
		||||
    circle(-0.2*length,180)
 | 
			
		||||
    left(10)
 | 
			
		||||
    circle(5*length,30)
 | 
			
		||||
    left(171)
 | 
			
		||||
    circle(-6*length,30)
 | 
			
		||||
    forward(3*length)
 | 
			
		||||
    circle(2*length, 90)
 | 
			
		||||
    turtle.end_fill()
 | 
			
		||||
 | 
			
		||||
    #Starts drawing the face
 | 
			
		||||
    def ghostieface(length,x,y):
 | 
			
		||||
        turtle.fillcolor("#161616")
 | 
			
		||||
        penup()
 | 
			
		||||
        turtle.goto(x-20, y-50)
 | 
			
		||||
        pendown()
 | 
			
		||||
        turtle.begin_fill()
 | 
			
		||||
        turtle.shape("circle")
 | 
			
		||||
        turtle.stamp()
 | 
			
		||||
        turtle.end_fill()
 | 
			
		||||
        penup()
 | 
			
		||||
        turtle.goto(x+20, y-50)
 | 
			
		||||
        pendown()
 | 
			
		||||
        turtle.begin_fill()
 | 
			
		||||
        turtle.shape("circle")
 | 
			
		||||
        turtle.stamp()
 | 
			
		||||
        turtle.end_fill()
 | 
			
		||||
        penup()
 | 
			
		||||
        turtle.goto(x-5, y-90)
 | 
			
		||||
        pendown()
 | 
			
		||||
        left(95)
 | 
			
		||||
        turtle.begin_fill()
 | 
			
		||||
        turtle.shape("circle")
 | 
			
		||||
        turtle.shapesize(stretch_len=2)
 | 
			
		||||
        turtle.stamp()
 | 
			
		||||
        turtle.shape("classic")
 | 
			
		||||
        turtle.shapesize(1,1)
 | 
			
		||||
        turtle.end_fill()          
 | 
			
		||||
    ghostieface(length,x,y)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
ghostie(30, -150, 250)
 | 
			
		||||
penup()
 | 
			
		||||
turtle.home()
 | 
			
		||||
pendown()
 | 
			
		||||
ghostie (30, 150, 250)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
turtle.done()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user