Skip to content

Tree breakdown

Giorgio Garofalo edited this page Jan 29, 2024 · 3 revisions

Tree

This funny sample prints "A tree!" out of a... tree.
Here you can find the color scheme used. Without it, obtained via the standardize command, it would look like this:

Tree-1

That can be compacted as:

Tree-2

Which is extremely similar to the Hello world example: the red pixel defines a variable whose ID is that desaturated pixel next to it, and value is "A tree!" built by grayscale pixels. The darker magenta pixel calls a function, which happens to be print because of the lighter magenta pixel next, whose argument is the variable we had defined earlier.

Note that this example uses the print function, while since 25/06/2021 it is suggested to use the Print statement.