Stephen De Gabrielle announced this a few days ago on racket-dev, so I
spent my weekend embracing my inner Star Wars nerd and made
lightsabers in Racket. I had never used the pict library before, so it
was also an interesting learning experience.
I created a lightsaber function that produces a pict of a lightsaber.
The only required argument is a color, which can be either a color
name or a color% object. A length can be provided as an optional
argument, as well as a style for the lightsaber hilt. The default hilt
is Luke Skywalker's (#:style 'luke), but you can also select Darth
Vader's (#:style 'vader), Kylo Ren's (#:style 'kylo), or Darth Maul's
(#:style 'maul). See the attached picture for examples of each.
The code is available at
https://github.com/zamora/lightsaber
Thanks to Stephen De Gabrielle for providing the incentive to learn
about pict and have some fun!
Justin