Arcs and Circles

pencilcode.net
await loadscript '/lib/angles.cs', defer()
jumpto 0, -25
label 'lt 90,50',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto -48, 25
plan ->
  css { turtleRotation: '-90deg' }
label '50 pixels',
  fontSize: '80%'
home()
jumpto 25, 0
pen blue, 3
lt 90, 50
r = 100
pen silver, 2
for turn in [rt, lt]
  for d in [30..360] by 30
    turn 30, r
    turn 90; fd 5
    jump 0, 20
    remember = direction()
    turnto 0
    label d
    turnto remember
    jump 0, -20
    bk 5; turn 270
jumpto r, 0
label 'rt',
  fontSize: '200%'
  fontFamily: 'Source Code Pro'
jumpto -r, 0
label 'lt',
  fontSize: '200%'
  fontFamily: 'Source Code Pro'
home()
pen gray, 3
rt 48, r
pen path
fd 2; rt 150
for [1..3]
  fd 10; rt 120
fill gray
home()
pen gray, 3
lt 48, r
pen path
fd 2; rt 150
for [1..3]
  fd 10; rt 120
fill gray
home()
await loadscript '/lib/angles.cs', defer()
jumpto 0, -25
label 'rt 90,50',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto 48, 25
plan ->
  css { turtleRotation: 90 }
label '50 pixels',
  fontSize: '80%'
home()
jumpto -25, 0
pen blue, 3
rt 90, 50
jumpto 0, -25
label 'lt 60,100',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto 30, 0
pen blue, 3
lt 60, 100
jumpto 0, -25
label 'lt 180,30',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto 30, 0
pen blue, 3
lt 180, 30
label 'rt 360,70',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto -70, 0
pen blue, 3
rt 360,70
jumpto 0, -25
label 'rt 180,30',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto -30, 0
pen blue, 3
rt 180, 30
jumpto 0, -25
label 'rt 60,100',
  fontSize: '120%'
  fontFamily: 'Source Code Pro'
jumpto -30, 0
pen blue, 3
rt 60, 100
pen red
lt 60
lt 240,60





# continued ⇒
pen null
rt 30
fd 30
pen red
lt 360,30





pen null
fd 80
pen red
lt 360,30
lt 90,30
fd 60
bk 90


pen null
rt 90
fd 50
pen red
lt 60,30
lt -330,30
lt 90
fd 60