Simple python drawing small example

import turtle as t
t.goto(100,0)
for i in range(100):
    t.left(80)
    t.fd(100)
    t.left(135)
    t.fd(165)
    t.left(125)
    t.fd(115)

Effect map:
write picture description here
infer three from one case:

import turtle as t
t.goto(100,0)
for i in range(8):
    t.left(80)
    t.fd(100)

Effect picture:
write picture description here

import turtle as t
t.goto(100,0)
for i in range(20):
    t.left(80)
    t.fd(100)
    t.left(135)
    t.fd(105)
    t.left(125)
    t.fd(115)

Effect picture:
write picture description here

import turtle as t
t.goto(100,0)
for i in range(50):
    t.left(80)
    t.fd(100)
    t.left(135)
    t.fd(105)

Effect picture:
write picture description here

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324853468&siteId=291194637