Created
September 21, 2020 02:22
-
-
Save gretaf007/bf913fbe6f9ce03c8f6825b30c5ee6a1 to your computer and use it in GitHub Desktop.
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
""" | |
Greta Villani | |
9/16/2020 | |
Homework 1 | |
""" | |
c = color(255,150,150) | |
fishTailLine = 60 | |
bodyLength = 180 | |
bodyHeight = 80 | |
eyeX = 285 | |
fish2FinPointx = 227 | |
fish2FinPointy = 273 | |
def setup(): | |
size(640*2,350*2) | |
#RasterImage | |
img = loadImage("sea copy.jpg") | |
image(img, 0, 0) | |
strokeWeight(10) | |
stroke(155,155,255,50) | |
frameRate(4) | |
def draw(): | |
size(640*2,350*2) | |
#RasterImage | |
img = loadImage("sea copy.jpg") | |
image(img, 0, 0) | |
strokeWeight(10) | |
stroke(155,155,255,50) | |
#TailTriangle | |
fill(100,200,210) | |
triangle(490,95, 425,145, 490,195) | |
#EllipseFrontBody | |
fill(100,170,255) | |
ellipse(340,145, bodyLength,bodyHeight) | |
#eye | |
fill(150,100,215) | |
circle(eyeX, 135, 10) | |
#FinLine1 | |
stroke(204, 102, 0) | |
strokeWeight(5) | |
line(325,150, 350,175) | |
#FinLine2 | |
stroke(204, 102, 0) | |
strokeWeight(5) | |
line(370,150, 350,175) | |
#TailTriangle 2 | |
fill(100,200,210) | |
triangle(fishTailLine,195, 145,245, fishTailLine,295 ) | |
#EllipseFrontBody 2 | |
fill(100,170,255) | |
ellipse(225,245, bodyLength,bodyHeight) | |
#eye 2 | |
fill(150,100,215) | |
circle(eyeX, 235, 10) | |
#FinLine1 2 | |
stroke(204, 102, 0) | |
strokeWeight(5) | |
line(205,250, fish2FinPointx,fish2FinPointy) | |
#FinLine2 2 | |
stroke(204, 102, 0) | |
strokeWeight(5) | |
line(250,250, fish2FinPointx,fish2FinPointy) |
You can do that and I don't think it would be too hard for you to understand & work on. I'll create a fork and make some changes to show you.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@rors
Hey, so I am wondering if it is possible to make all the elements of the fish one symbol, does that make sense? In theory I would like for the one fish to move on the x axis and one on the y axis. Should I simplify?
Hope the code is legible...
Thanks! Greta