#7 Amazing Morphing Wave Functions: Sine, Grid, 3D, Perspective, Rotate
August 3, 2024. This video showcases the same equations as the prior, except the result is not rendered as a graph where the solution is zero. Instead, the actual result is converted into a prismatic color spectrum approximately covering all values from -1 to +1, where it fades to black beyond that range. While it's harder to see the beauty in the equation solutions, it does show a nice color gradient of possible values, and has some nice transitions. Although, if I were to solely showcase the color gamut, I would have chosen different equations. In this case, it's nice to compare against the original video to see the differences and similarities.
I added a few more intro and outro equations in the mix, including the classic y = x equation to showcase the basics of the rainbow optical spectrum, from which to understand the rest.
The color mapping I used is taken from Ken Silverman's EvalDraw program:
R = exp((v - 0.75)^2 * -8)
G = exp((v - 0.50)^2 * -8)
B = exp((v - 0.25)^2 * -8)
It makes for a nice smooth flow of colors since the changes in R, G, and B are not abrupt and linear like they are in the classic color wheel, or when converting HSV to RGB. I have similar examples in a ShaderToy demo: https://shadertoy.com/view/4dVXWW
Showcases:
---------------------
- smooth transition equation morphing
- 3D formulas
- rotation, via the xrot() and yrot() functions, which are simply the 2D rotation matrix:
xrot(x, y, t) = x * sin(t) + y * cos(t)
yrot(x, y, t) = x * cos(t) - y * sin(t)
- T animation speed adjustment
Equations:
-------------------
(In order, and grouped by category / pattern)
- intro
y - x
y - pow(x, 2)
(y*y+x*x - 2)
y - x
- patterns that eventually make a grid
(sin(y * x) * cos(x * y)) - (cos(y - x) * sin(x - y))
(sin(y * x * x) * cos(x * y * y)) - (cos(y - x) * sin(x - y))
(sin(y * x * x + t) * cos(x * y * y - t)) - (cos(y - x + t) * sin(x - y - t))
(sin(y * x / t) * cos(x * y / t)) - (cos(y - x * t) * sin(x - y * t))
- pixelated circle
y*y + x*x - t
(y - sin(y * t)) * (y + sin(y * t)) + (x - sin(x * t)) * (x + sin(x * t)) - t,
- void circles
sin(x + y) + cos(y - x) - sin(x * y)
sin(x + y + t) + cos(y - x + t) - sin(x * y)
(sin(y * t * x) * cos(x * t * y)) - (cos(y - t) * sin(x - t))
- wavy grid
(sin(x + t) + cos(y - t)) - (sin(y - t) * cos(x + t))
(sin(x + t) + cos(y - t)) - (sin(y - t) * cos(x * t))
- bubbly
y - (sin(x * x) + cos(y * y) + sin(x * y) + cos(x * y))
y - (sin(x * x + t) + cos(y * y + t) + sin(x * y + t) + cos(x * y + t))
- funky
(cos(x) * y) - (sin(x + y * x) - y)
(cos(x + t) * y) - (sin(x + y * x - t) - y)
(cos(x+y) * (y-t)) - (sin((x-t) + (y-t) * (x-t)) - (y*t))
- 2D grid
sin(x)
sin(y)
sin(x) * sin(y)
sin(xrot(x,y,t)) * sin(yrot(x,y,t))
- 3D perspective
sin(x * 5.0 / y)
sin(5.0 / y)
sin(x * 5.0 / y) * sin(5.0 / y)
sin(x * 5.0 / y) * sin((5.0 / y) + t * 8.0)
sin(xrot(x,y,t) * 5.0 / yrot(x,y,t)) * sin((5.0 / yrot(x,y,t)) + t * 8.0)
sin(x * 5.0 / abs(y)) * sin((5.0 / abs(y)) + t * 8.0)
sin(xrot(x,y,t) * 5.0 / abs(yrot(x,y,t))) * sin((5.0 / abs(yrot(x,y,t))) + t * 8.0)
- outro
y - x
(y*y+x*x - 2)
y - pow(x, 2)
y - x
Hardware / Processing:
---------------------------------------
Rendering is entirely on the CPU! No GPU used except to upload the already rendered software buffer.
- Alienware m18 R2
- NVIDIA GeForce RTX 4090 16GB GDDR6 (laptop version)
- 14th Gen Intel Core i9 14900HX (24-Core, 36MB L3 Cache, up to 5.8GHz Max Turbo Frequency)
- (16 E-Cores, and 8 P-Cores hyperthreaded = 32 V-Cores total)
- 64 GB: 2 x 32 GB, DDR5, 5200 MT/s, non-ECC, dual-channel
- 18" FHD+ (1920 x 1200) 480Hz, 3ms, ComfortView Plus, NVIDIA G-SYNC + DDS, 100% DCI-P3, FHD IR Camera
- AlienFX RGB backlit Alienware CherryMX ultra low-profile mechanical keyboard
- 4 TB, M.2, PCIe NVMe, SSD
Playlists:
--------------
- Xona System 8: • Game Dev Engine #1. A New Beginning.
- Voxel: • Voxel Engine #8 - Correct Peripheral ...
- Ray Cast: • 3D Ray Casting Engine: #4 (Global Gam...
- Graph-All: • #1 Graph-All Equation Renderer - Mult...
- Scroll Shmup: • The First Pixel: Dev Vlog #9 - Enemie...
- Road: • Pseudo 3D Road #8 - infinite vegetati...
- Arena Shmup: • Arena Shmup Demo #3 - Object Pool Opt...
- Wave Function: • A.I. Texture Generation, High Res (Wa...
- 3D Polygon: • 3D Polygon Engine #9 - Multiple Mater...
- GW-BASIC: • GW-BASIC - Escape From Monster Cavern...
Websites:
---------------
- GitHub: https://github.com/JDoucette
- Blog: http://thefirstpixel.com
- Studio: http://xona.com