#8 Amazing Morphing Asymptotic Sine Graphs
August 14, 2024. Rendering at 1920x1080, which makes the lines rather hard to see, even with the upscaling to 4K. Next time, I'll stick with larger pixels, or try rendering thicker lines (which is non trivial to look "right" in all directions).
I was in the middle of creating a bunch of interesting sine wave graphs along with other trigonometric functions, and found a video:
"Sine graphs but they get increasingly more AMAZING" by The Math Wizard
I noticed a comment:
@mrlordsaif5708 -- "I wish these could be rendered with full detail".
Well, let's do it -- I can render these graphs in full detail, in real-time! :)
I further noticed another comment:
@erin1569 -- "A lot of these graphs look like that because of the limitations put on how precise they are to the real thing (since points are infinite therefore not every single can be rendered). It can be seen with the small missing pieces that should be there but aren't rendered."
I have had similar thoughts on many graph videos using graphing programs that compute very few points, and then attempt to make sense of the data. My program doesn't do that -- it renders only what it knows, and nothing more. You can still see artifacts from hitting Nyquist frequencies, however.
But it got me thinking about how the asymptotes are always rendered as solutions when they really are not. Let's see if I can compute these, and color them differently. You'll see them as green in my video.
Showcases:
---------------------
asymptote calculation (rendered as green)
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)
Equations:
-------------------
every equation from: "Sine graphs but they get increasingly more AMAZING" by The Math Wizard
y = sin(x)
x = sin(y)
y = sin(9*x)
y = 9 * sin(x)
y = sin(x*x)
y = sin(x*x*x)
y = pow(sin(x) 3)
y = sin(x+y)
y = sin(x*x+y*y)
y = sin(x*y)
y = (sin(2*x) + sin(x))
y = (sin(9*x) + sin(x))
y = (sin(x) + sin(y))
y = sin(x) / sin(y)
y = 2 * sin(x) / sin(y)
y = sin(9*x) / sin(y)
y = sin(9*x) / sin(9*y)
y = (sin(x) / sin(y) + sin(3*x))
y = (sin(9*x) / sin(y) + sin(x))
y = (sin(x) / sin(y) + sin(y) / sin(x))
y = (2 * sin(x) / sin(y) + sin(y) / sin(x))
y = (5 * sin(2*x) / sin(y) + x * sin(y) / sin(x))
y = (2 * sin(3*x) / sin(y) + sin(3*y) / sin(x) + y)
y = (sin(x) / sin(y) + sin(y) / sin(x) - x)
y = y * sin(x) / sin(y)
y = x * sin(x) / sin(y)
y = (sin(x) / sin(y) - pow(2 sin(2*x)))
y = (sin(x) / sin(2*y) - pow(2 sin(5*x)))
y = (sin(x) / sin(5*y) - pow(2 sin(5*x)))
y = (sin(3*x) / sin(5*y) - pow(2 sin(5*x)))
y = (sin(x) / sin(y) - pow(2 9*sin(x*y)))
y = x * sin(x*x+y*y)
y = x*y*sin(x*x+y*y)
y = (2*x*y * sin(x*x - y*y) + sin(3*x) / sin(3*y))
y = (9*x*y * sin(x*x + y*y) + sin(x*x) / sin(y*y) * x)
my classic 3D grid running equations at the end, for a nice finale! :)
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: Devlog #9 - Enemies,...
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/