This project lets you manipulate a four-dimensional matrix. Each dot in the cube has a unique x, y, and z value, and a unique rgba value (the fourth dimension). Use the sliders to specify a range of elements you want to change in x, y, and z (1 to 16); then set new rgba values for the target elements (0 to 255). With repeated manipulations, you can make some interesting 4D objects. Click "Process" to see an expression combining all the variables. Click "Apply" to apply your changes. Press 1, 2, or 3 to see some pre-loaded shapes. Press H to hide or show the variables and buttons.
This was inspired by and entirely built upon @selim_tezel's amazing RGB Color Cube. Watching the cube spin, I got to wondering if there would be any way to let the user address each dot in the matrix. Thanks to @griffpatch for the text engine. This project runs much more smoothly here: https://phosphorus.github.io/#195055655