August 2024
I worked in a laser lab for three summers in college. Not only did I learn a lot about lasers (don't point them at your 👀) but I also gained an appreciation for all things optical: lenses, shutters, camera sensors, etc. So this was basically me:
For this piece, I was inspired by light rays coming out of lenses. Concave lenses bend light outward, while convex lenses bend it inward. You can remember the difference by thinking that a concave lens looks hollow, kind of like a cave, and that a convex lens is just the opposite of that.
The algorithm I used to generate these pieces is pretty simple. I drew a bunch of lines (rays) all starting at the same x-coordinate in a row, and ending at some point on the screen varying the y-coordinate each time. Then from each ending point, I drew another line to another point a certain width away, and varied the height. I called each batch of these rays a "ray group". Between each ray group I draw a perpendicular line, the same color as the background, to obscure where the ray groups collided with each other. Some parameters I played around with were the number of rays in each group, whether each ray group was symmetrical, and whether the rays could go off-screen, i.e. out of the bounds of the canvas.
When I made each ray slightly transparent and increased the width enough, the rays would overlap with each other and made a nice stained glass effect, which you can see in the first, third, and sixth renderings.