Optional Contest: Scheme Art

The output is art,
But what about its source code?
It's just as abstract.


This contest is completely optional!

The Scheme Art Contest submission deadline has been extended by one day. Entries are now due at 11:59pm on Thursday, 4/29.

Here are the steps to enter the contest:

  1. Download scheme_contest.zip.
  2. From your Scheme project, copy all the Python files to the scheme_contest directory. This should be:

    • buffer.py
    • scheme_builtins.py
    • scheme_reader.py
    • scheme.py
    • ucb.py
    • scheme_tokens.py If you've completed the challenge version of the project, see the additional steps in the next section.
  3. Download the file abstract_turtle.zip from this link. Then, unzip the file into your scheme_contest directory. The unzipped folder should contain files including canvas.py and color_names.py. Alternatively, if you'd prefer to install using the pip command, you can run pip3 install abstract-turtle instead of downloading this zip file.
  4. Complete the contest.scm file (you can render your drawing with python3 scheme.py contest.scm --pillow-turtle --turtle-save-path output). For more information on drawing graphics, you may find the Scheme Built-in Reference to be helpful. Running into errors? Check the Troubleshooting section below.
  5. Upload output.png which was created by the previous command.

In contest.scm, the draw procedure should draw your entry and then exit on click.

Scheme Challenge Version Instructions After step 3 above, complete the following additional steps:

  1. Replace these lines in scheme.py

    import scheme
    scheme.TK_TURTLE = not args.pillow_turtle
    scheme.TURTLE_SAVE_PATH = args.turtle_save_path

    with the following:

    import scheme
    import builtins
    builtins.TK_TURTLE = not args.pillow_turtle
    builtins.TURTLE_SAVE_PATH = args.turtle_save_path
  2. Replace scheme_tokens.py with the latest version of the file in your scheme_contest directory. You can find this file here: scheme_tokens.py.

In contest.scm, the draw procedure should draw your entry and then exit on click.

All entries, including their source code, will be distributed to your fellow students for voting. Please do not include personal info in your submission.

You are allowed to work with one other partner for this contest. You should add your partner on Ok and make a single submission.

Important: when you are ready to submit, follow both these steps:

  • Run python3 ok --submit to submit your contest.scm file to Ok.
  • Fill out the contest form. Make sure the information here is correct, since we'll be using it to generate your entry in the Scheme art gallery.

Troubleshooting: Are you experiencing the error name 'builtins' is not defined when trying to render your artwork? If so, add the following line to the top of scheme_builtins.py: import builtins. You might also be asked to install some dependencies when you try to render your image, and if you do so, it should properly create your visualization. If you don't see this error (it has usually been popping up for select Windows users), you do not need to add the additional import.

Contest Description

Create a visualization of an iterative or recursive process of your choosing, using turtle graphics. Your implementation must be written entirely in Scheme using the interpreter you have built. All computation must be done in Scheme.

We will have two categories of submissions:

  • Featherweight: Fewer than 512 Scheme tokens (including parentheses)
  • Heavyweight: Fewer than 4096 Scheme tokens (including parentheses)

No single token may contain more than 50 characters. If your entry requires more tokens than are allowed in the heavyweight category, please contact the course staff for special permission to submit an even longer entry. Longer entries, if approved, will be displayed in the gallery but will not be eligible for earning extra credit in the art contest.

Extra credit will be awarded as follows:

  • 3 points to 1st place in each category
  • 2 points to 2nd place in each category
  • 1 points to 3rd place in each category

You can check the number of tokens in a Scheme file called contest.scm by running the following command using the latest version of scheme_tokens.py:

python3 scheme_tokens.py contest.scm

Entries (code and images) will be posted online, and winners will be selected by popular vote. The top three entries in each category will be announced on Piazza after voting is closed.

To improve your chance of success, you are welcome to include a title and descriptive haiku in the comments of your entry, which will be included in the voting.

Contest Rules

Before submission, please ensure that your entry abides by these guidelines:

  • Entries must not contain tokens that contain more than 50 characters and must be submitted under the correct category (featherweight/heavyweight).
  • Entries must not contain any political content.
  • Entries must not contain any offensive, sexually explicit, or racially, ethically, or otherwise objectionable content.
  • Entries must not contain any personal information.

We reserve the right to disqualify any entries that do not follow these guidelines.

Past Entries

For inspiration, you can peruse these galleries of past entries. Please note that certain submissions may not follow the current guidelines.