[standard-fish] Lightsabers!

71 views
Skip to first unread message

Justin Zamora

unread,
Jul 30, 2019, 4:06:25 PM7/30/19
to Racket Users
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
racket-lightsaber.png

Justin Zamora

unread,
Jul 30, 2019, 4:23:28 PM7/30/19
to Racket Users
[Apologies if this gets sent twice. I accidentally sent the first one
to the googlegroups email address]
racket-lightsaber.png

Stephen De Gabrielle

unread,
Jul 31, 2019, 4:27:45 AM7/31/19
to Justin Zamora, Racket Users
The force is strong with this one!

--
You received this message because you are subscribed to the Google Groups "Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/CA%2B80D0Xhbq8VTvNLL3CsA6zgQEXmj8uWzY_JzzRVZNboMVaYbg%40mail.gmail.com.
--
----

Stephen Foster

unread,
Jul 31, 2019, 12:55:11 PM7/31/19
to Racket Users
Wow!  Nice.  I'll show this to the students taking my "Coding for Star Wars Fans" summer camp :)

Thanks for doing this!
Reply all
Reply to author
Forward
0 new messages