I figured out how to fill out in the cardioid

This commit is contained in:
tgaeta
2025-09-03 10:09:10 -04:00
parent ab15c33de7
commit 72bc8777d0

View File

@@ -2,7 +2,9 @@ from turtle import (
right,
color,
goto,
pensize
pensize,
begin_fill,
end_fill
)
from math import sin, cos, tau, pi
@@ -22,7 +24,9 @@ segments = 50
coords = get_segmented_cardioid(segments)
color(1, 0, 0)
pensize(5)
begin_fill()
for i in range(segments + 1):
goto(coords[i])
right(90)
end_fill()
input()