February 11, 2025
Description
Weird whirlies using hull, copied them with some maths from wolfram and here is a demo of the hull trick for maths.
// Function to calculate points for exotic Lissajous curves
function lissajous_curve(t, type) =
type == 1 ? [200 * sin(3 * t), 150 * cos(2 * t), 100 * sin(5 * t)] : // 1. Basic Exotic Lissajous
type == 2 ? [150 * sin(4 * t + 1), 200 * cos(3 * t), 100 * sin(2 * t)] : // 2. Offset Lissajous
type == 3 ? [200 * sin(7 * t), 150 * cos(3 * t), 100 * sin(7 * t)] : // 3. High-Frequency Lissajous
type == 4 ? [150 * cos(5.9 * t), 200 * sin(13.5 * t + 1), 100 * sin(4 * t)] : // 4. Rotated Lissajous
type == 5 ? [100 * sin(3 * t), 200 * sin(4 * t), 150 * cos(5 * t)] : // 5. Nested Lissajous
type == 6 ? [150 * sin(8 * t + 1), 200 * cos(5 * t), 100 * sin(7 * t)] : // 6. Asymmetric Lissajous
type == 7 ? [200 * cos(4 * t), 150 * sin(3 * t), 100 * sin(6 * t)] : // 7. Mirrored Lissajous
type == 8 ? [200 * sin(3 * t + 1), 150 * sin(4 * t), 100 * cos(5 * t)] : // 8. Complex Frequency Lissajous
type == 9 ? [200 * cos(6 * t), 150 * sin(5 * t), 100 * cos(3 * t)] : // 9. Phase-Shifted Lissajous
[200 * sin(5 * t), 150 * cos(7 * t), 100 * sin(9 * t)]; // 10. High-Dimensional Lissajous
// Function to calculate points for exotic Lorenz-like attractors
function lorenz_curve(t, type) =
type == 1 ? [10 * (cos(t) - sin(t)), 28 * sin(t), t % 200] : // 1. Simplified Lorenz
type == 2 ? [15 * sin(t / 10), 25 * cos(t / 20), 35 * sin(t / 30)] : // 2. Modified Lorenz
type == 3 ? [25 * sin(t / 10) * cos(t / 20), 35 * cos(t / 15), t % 200 - 100] : // 3. Rotating Lorenz
type == 4 ? [35 * sin(t / 30), 45 * cos(t / 20), 55 * sin(t / 40)] : // 4. Expanded Lorenz
type == 5 ? [40 * sin(t / 25), 50 * cos(t / 30), 60 * sin(t / 35)] : // 5. Layered Lorenz
type == 6 ? [50 * cos(t / 15) * sin(t / 25), 60 * sin(t / 20), t % 200 - 50] : // 6. Twisting Lorenz
type == 7 ? [200 * cos(t / 20), 150 * sin(t / 15), 100 * cos(t / 25)] : // 7. Spherical Lorenz
type == 8 ? [35 * sin(t / 10), 25 * cos(t / 15), 45 * sin(t / 20)] : // 8. Rhythmic Lorenz
type == 9 ? [200 * sin(t / 20), 100 * cos(t / 30), t % 200 - 100] : // 9. Chaotic Loop
[50 * cos(t / 15), 100 * sin(t / 25), 150 * cos(t / 35)]; // 10. Complex Frequency Lorenz
License:
Creative Commons - Attribution - Share Alike