Learn creative coding writing simple programs

83. Circular gradients can look like spheres

There are many ways to do gradients. In episode 82 we created a linear gradient. In this one we create a circular gradient. The idea is simple: draw a shape multiple times while slightly changing the color and some other property, for example the position or the size. For the linear gradient we keep changing the position of the lines we draw. For the circular gradient we keep changing the size of the circles we draw.

Tags: circular, gradient

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, surround it with ``` code-fences ``` like this:
``` void setup() { size(600, 600); } ```