generated from mwc/lab_turtle
I figured out how to fill out in the cardioid
This commit is contained in:
@@ -2,7 +2,9 @@ from turtle import (
|
|||||||
right,
|
right,
|
||||||
color,
|
color,
|
||||||
goto,
|
goto,
|
||||||
pensize
|
pensize,
|
||||||
|
begin_fill,
|
||||||
|
end_fill
|
||||||
)
|
)
|
||||||
from math import sin, cos, tau, pi
|
from math import sin, cos, tau, pi
|
||||||
|
|
||||||
@@ -22,7 +24,9 @@ segments = 50
|
|||||||
coords = get_segmented_cardioid(segments)
|
coords = get_segmented_cardioid(segments)
|
||||||
color(1, 0, 0)
|
color(1, 0, 0)
|
||||||
pensize(5)
|
pensize(5)
|
||||||
|
begin_fill()
|
||||||
for i in range(segments + 1):
|
for i in range(segments + 1):
|
||||||
goto(coords[i])
|
goto(coords[i])
|
||||||
right(90)
|
right(90)
|
||||||
|
end_fill()
|
||||||
input()
|
input()
|
||||||
|
|||||||
Reference in New Issue
Block a user