recovered from image

I probably forgot to save and commit :(
at least I had the image this time :)
main
Alexandre B A Villares 2021-01-25 21:33:29 -03:00 zatwierdzone przez GitHub
rodzic 72575f4a16
commit 23cdd58faa
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 7 dodań i 3 usunięć

Wyświetl plik

@ -3,12 +3,16 @@ def setup():
def draw():
background(200)
r = 200
r = 100
p1 = PVector(200, 250)
p2 = PVector(mouseX, mouseY)
ellipse(p1.x, p1.y, r, r)
p2 = PVector(mouseX, 250)
ellipse(p1.x, p1.y, r * 2, r * 2)
line(p1.x, p1.y, p2.x, p2.y)
d = dist(p1.x, p1.y, p2.x, p2.y)
theta = asin(r / d)
beta = TWO_PI - HALF_PI - theta
print(degrees(theta))
x = cos(beta) * r
y = sin(beta) * r
line(p1.x, p1.y, p1.x - x, p1.y - y)
line(p2.x, p2.y, p1.x - x, p1.y - y)