Fractals I've Made

I have recently learnt how to make some simple fractals by python at university.
let’s take a look are my works and their codes:

  • Square
  • Triangle
  • Star

Square

import turtle

def square(d):
    if d<3:
        return
    turtle.tracer()
    turtle.speed(0)
    for i in range(4):
        square(d/3)
        turtle.forward(d)
        turtle.left(90)
    turtle.update()

square(300)
turtle.mainloop()

Triangle

import turtle
turtle.speed(0)
turtle.hideturtle()

def triangle(d):
    if d<5:
        return
    for _ in range(3):
        triangle(d/2)
        turtle.forward(d)
        turtle.left(120)

turtle.tracer(0)
triangle(300)
turtle.update()
turtle.mainloop()

Star

import turtle

def star(d):
    if d<7:
        return
    for i in range(5):
        star(d/3)
        turtle.forward(d)
        turtle.left(144)

turtle.tracer(0)
star(500)
turtle.update()
turtle.mainloop()

FRACTAL

2023

Bing, Create!

less than 1 minute read

I’ve recently found a useful and entertaining AI named Bing and in this post what I’m going to share is my 1st attempts of creating some pictures with it.

My Life Line

less than 1 minute read

You should be able to make a life line of yours like this one bellow so that you know whats going on in your life:

My Jungle

less than 1 minute read

Check out the jungle I’ve made by Python!

Fractals I’ve Made

less than 1 minute read

I have recently learnt how to make some simple fractals by python at university. let’s take a look are my works and their codes: Square Triangle ...

Back to top ↑