Skip to content

Instantly share code, notes, and snippets.

@EllaY44
Created February 14, 2023 21:10
Show Gist options
  • Save EllaY44/565fc5a4a86524e586e109251ccbfe49 to your computer and use it in GitHub Desktop.
Save EllaY44/565fc5a4a86524e586e109251ccbfe49 to your computer and use it in GitHub Desktop.
Week 3 homework question
def setup():
size(800, 700);
stroke(100, 100, 255, 80)
background(255)
frameRate(30)
def draw():
fill(245, 242, 195)
rect(0, 0, 800, 700)
fill(40, 49, 48)
rect(0, 0, 800, 70)
fill(40, 49, 48)
rect(0,130,800,2)
rect(0,180,800,2)
rect(0,230,800,2)
rect(0,280,800,2)
rect(0,330,800,2)
rect(0,380,800,2)
rect(0,430,800,2)
rect(0,480,800,2)
rect(0,530,800,2)
rect(0,580,800,2)
rect(0,630,800,2)
rect(0,680,800,2)
rect(0,730,800,2)
stroke(150, 150, 250, 90)
distance = dist(pmouseX, pmouseY, mouseX, mouseY)
mappedDistance = map(distance, 0,200, 40,1)
d = dist(pmouseX, pmouseY, mouseX, mouseY)
line(pmouseX, pmouseY, mouseX, mouseY)
@rors
Copy link

rors commented Feb 21, 2023

Great 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment