Skip to content

Instantly share code, notes, and snippets.

@honix
Last active July 27, 2017 12:14
Show Gist options
  • Save honix/76a9cffc1b7bf5804ed9d854e33bca55 to your computer and use it in GitHub Desktop.
Save honix/76a9cffc1b7bf5804ed9d854e33bca55 to your computer and use it in GitHub Desktop.
Red [
Needs: 'View
]
dangle: pi / 255
pi2: pi * 2
angle: 0.0
radius: 200
buffer: make image! 500x500
drawer: does [
append copy [line 250x250] (as-pair
(cos angle) * radius
(sin angle) * radius) + 250x250
]
view [
base 0x0 image buffer rate 60
on-time [
if (angle: angle + dangle) < pi2
[draw buffer drawer]
]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment