Drawing Cardioid With Python ││ Turtle Graphics

Опубликовано: 25 Сентябрь 2026
на канале: Kağan Özer
527
24

Cardioid With Python Turtle Graphics
.
.
To Learn More About Cardioid :    • Times Tables, Mandelbrot and the Heart of ...  
.
.
Codes :

from turtle import *

points = []
origin_2 = 00.00, -400.00
hideturtle()
width(1)
speed(1000000000)
modulo_ = 200
table = int(numinput("TimesTables", "Table : "))
modulo_ = int(numinput("Modulo", "Modulo : "))
table = 2


def draw(modulo):
for x in range(modulo):
points.append(pos())
circle(400, 360 / modulo)


penup()
goto(origin_2)
pendown()
draw(modulo_)
for i in points:
goto(i)
goto(points[(points.index(i) * table) % modulo_])
goto(i)

exitonclick()