Skip to content

Instantly share code, notes, and snippets.

@joshuachris2001
Created February 23, 2025 23:56
Show Gist options
  • Save joshuachris2001/5fa9aff81c1897466af16dd69c98a6e8 to your computer and use it in GitHub Desktop.
Save joshuachris2001/5fa9aff81c1897466af16dd69c98a6e8 to your computer and use it in GitHub Desktop.

Revisions

  1. joshuachris2001 revised this gist Feb 23, 2025. 1 changed file with 90 additions and 1 deletion.
    91 changes: 90 additions & 1 deletion trigonwheel.py
    Original file line number Diff line number Diff line change
    @@ -1 +1,90 @@
    from math import *
    from math import*
    from turtle import*

    speed(10)
    hideturtle()

    width(2)
    up()
    goto(0,-90)
    down()
    circle(90)

    liste_angl=(0,30,45,60,90,120,135,150,180,210,225,240,270,300,315,330)
    liste_str=("0 2π","π/6","π/4","π/3","π/2","2π/3","3π/4","5π/6","π -π","7π/6","5π/4","4π/3","3π/2","5π/3","7π/4","11π/6")

    x=0
    width(1)
    color("grey")
    down()

    while x<=15:

    goto(0,0)
    setheading(liste_angl[x])
    forward(90)
    x=x+1

    y=0
    x=0
    color("black")
    up()

    while x<=4:
    y=-2
    goto(0,0)
    setheading(liste_angl[x])
    forward(90+y)
    write((liste_str[x]))
    x=x+1

    while 4<x<8:
    y=17
    goto(0,0)
    setheading(liste_angl[x]+12)
    forward(90+y)
    write((liste_str[x]))
    x=x+1

    while 8<=x<=12:
    y=23
    goto(0,0)
    setheading(liste_angl[x])
    if x==8:
    y=y+13
    forward(90+y)
    write((liste_str[x]))
    x=x+1

    while 12<x<=15:
    y=14
    goto(0,0)
    setheading(liste_angl[x])
    forward(90+y)
    write((liste_str[x]))
    x=x+1

    up()
    goto(0,0)
    down()
    write("0")

    up()
    goto(22,42)
    down()
    write("x")

    up()
    goto(22,-42)
    down()
    write("-x")

    up()
    goto(-42,42)
    down()
    write("x-π")

    up()
    goto(-42,-42)
    down()
    write("π-x")
  2. joshuachris2001 created this gist Feb 23, 2025.
    1 change: 1 addition & 0 deletions trigonwheel.py
    Original file line number Diff line number Diff line change
    @@ -0,0 +1 @@
    from math import *