Learn creative coding writing simple programs

5. Light speed effect, change line colors

Learn how to change line colors and make some kind of disco laser effect and a very simple light speed effect. We also show the option to auto-format the source code, which adds and removes spaces to make it all beautifully aligned.

Tags: line, animation, stroke, autoformat

Code editor

You can make changes to the code below. Then

Questions and comments

Try to stay close to the topic of this episode. Use the Processing forums for help with unrelated Processing projects (or hire me for help ;-)

To indicate that a word in your comment is code, use the `backtick`. Example
  Do `float` and `int` smell similar?
To highlight code blocks, use ```processing and ``` like this:
  ```processing
  void setup() {
    size(600, 600);
  }
  ```