Waves in three-dimensional spaces
All principles that i've put into the previous chapters can be converted into 3D easily but creating an additional z-variable.
void draw() {
translate(width/2, height/2);
float x = sin(radians(a))*cos(radians(a*3))*1.4*width/5;
float y = cos(radians(a))*width/5;
float z = sin(radians(a)*8)*2*width/5;
translate(x, y, z);
ellipse(0, 0, 5, 5);
a = a + 2;
gif(90, 2);
}