Skip to content

We Saw a Chicken …

work as if you live in the early days of a better nation

Tag: ucblogo

detail from a million step random walk

a rectangle made up of many brightly-coloured  line and semicircle sections in a random arrangement
each line can be drawn at 0°, 60°, 120°, …, 300° and can be coloured red, orange, yellow, green, cyan or purple depending on direction. White areas are unfilled sections of the background

This is a tiny detail from an unfeasibly large random walk made in Berkeley Logo. The code looks something like this:

; random dice walk, with colours for each of six directions
; scruss, 2021-07

make "ch {14 6 2 3 13 4}
make "dirs {0 60 120 180 240 300}
make "sides {1 2 3 4 5 6}

to walk
  make "throw pick sides
  setheading item :throw dirs
  setpencolor item :throw ch
  forward 20
end

hideturtle repeat 1000 [walk]
Published 02021-07-27
Categorised as computers suck Tagged dice, logo, random, random_walk, ucblogo

find stuff (or not):

Pages

  • contact me
  • Futile Fonts
  • Portfolio
  • Russell’s Modern Logarithms

Links

  • @scruss
  • Breakfast in Scarborough
  • flickr
  • hub of this git
  • Instagram
  • pinboard bookmarks

ad-free blog

ad free blog logo: simple pen-cartoon of a contented owl with a speech bubble saying "ad-free blog"
We Saw a Chicken …
Proudly powered by WordPress.