The Fourier Drawing Machine to Any Visual - In Pure Geometry Nodes
The Fourier Drawing Machine computes a stateless 2D Complex Discrete Fourier Transform (DFT) directly inside Geometry Nodes. Every frame evaluates from scratch - no Simulation Zone, no cache baking, and full timeline scrubbing support. Both the Realistic Shader (EEVEE) and Math Visualization files share the exact same node architecture.
Quick Start
-
Play the Timeline: At Frame 1, the tip of the final arrow sits directly at the start of the contour (with no starting trail stub). Press
Spacebarto watch the epicycles trace the full loop over 240 frames. -
Edit or Draw Your Own Curve: Expand
My_Curvesin the Outliner, selectDemo_Curve, pressTabto enter Edit Mode, and adjust or draw freely. You can also replaceDemo_Curvewith any curve of your own (keep a single curve inside the active target collection for a clean continuous path). -
Import an SVG: Go to File → Import → Scalable Vector Graphics (.svg), move the imported curve into
Imported_SVG(or pointTarget Collectiondirectly to the newly created SVG collection), and disable render visibility on the raw curve in the Outliner so it doesn't render over the machine. -
Frame Your Camera:
Cameralives independently in theScenecollection (completely decoupled from the Geometry Nodes tree), so you can position, animate, or switch focal length/orthographic scale freely.
Modifier Controls (on Fourier_Machine)
-
Target Collection: Collection containing the curve or imported SVG to trace (evaluated 1:1 in world space). -
Epicycles: Total number of rotating harmonics (excluding the stationary DC offsetc_0). Default is60; try40–120for sharp corners and detailed SVGs. -
Draw Frames: Number of frames required to complete one full loop starting from Frame 1 (default:240). -
Original Fade: Background opacity of the original reference contour (stored asorig_opacityfor the faded shader). Set to0.0to skip generating the reference mesh completely.
Outliner Structure
-
Scene: ContainsCameraand lighting/staging (Lightsin Realistic EEVEE;Math_Backdropin Math Visualization). -
My_Curves: Default editable curve collection containingDemo_Curve. -
Imported_SVG: Ready-made collection for imported.svgcontours (viewport- and render-hidden by default). -
Machine_Assets: Holds the unit-scale instanced meshesAsset_Circle(1 m radius) andAsset_Arrow(1 m length). Unhide via the Eye icon to edit their geometry or materials directly, then hide again when done. -
Fourier_Drawing_Machine: Contains theFourier_Machineobject holding the Geometry Nodes modifier.
Node Tree Architecture
The logic is split into one main modifier tree and three compact sub-groups, using local yellow-framed Group Input nodes in every stage and 17 in-graph InfoNodes:
-
A)
Fourier_Drawing_Machine(Main Modifier Tree):-
Frame 1 - Collection Input:
Collection InforeadsTarget Collection, realizes instances, and isolates curves viaSeparate Componentsin 1:1 world space. -
Frame 2 - Auto-Resample and DFT: Sums total spline length (
Spline Length→Attribute Statistic) and resamples evenly by distance tomax(256, Epicycles * 4)points before passing the curve intoGN_Fourier_DFT. -
Frame 3 - Single-Pass Timeline Phase: A clamped
Map RangeconvertsScene Time (Frame)from1 .. Draw Framesinto normalizedPhase t (0.0 .. 1.0). -
Frame 4 - Epicycles, Trail and Faded Original: Calls
GN_Fourier_EpicyclesandGN_Fourier_Trail, optionally builds the faded reference contour atZ = -0.02whenOriginal Fade > 0, and joins all layers together.
-
Frame 1 - Collection Input:
-
B)
GN_Fourier_DFT(Complex Discrete Fourier Transform):-
Frame 1 - DC Offset and Center Curve: Averages all curve positions to find the stationary center
c_0(DC Offset), subtracts it, flattens onto XY (Z = 0), and measures sample countN. -
Frame 2 - Alternating Frequencies (
+1, -1, +2, -2...): Creates one point per epicycle and assigns integer frequencyn = (floor(i / 2) + 1) * (1 - 2 * (i mod 2)), stored asfreq. -
Frame 3 - Complex DFT Integral: A parallel
For Each Elementzone spins every centered samplekbackward around Z by-2π · n · k / Nand averages all samples (Attribute Statistic → Mean) to output exactc_n. -
Frame 4 - Store Coeff & Radius: Stores
coeff(c_n) andradius(|c_n|) on each epicycle point.
-
Frame 1 - DC Offset and Center Curve: Averages all curve positions to find the stationary center
-
C)
GN_Fourier_Epicycles(Tip-to-Tail Chain & Instancing):-
Frame 1 - Rotate And Chain Epicycles: Rotates each
coeffforward by+2π · n · tto getv_j(t), then computes every base jointP_jin one loop-free pass using trailingAccumulate Field+DC Offset. -
Frame 2 - Instance Circles & Unified Arrows: Filters out near-zero harmonics (
radius > 0.0005), alignsAsset_Arrowalongv_j(t)(X axis, pivot Z), scales circles and arrows uniformly byradius, and lifts arrows toZ = +0.02so layers stack cleanly without Z-fighting.
-
Frame 1 - Rotate And Chain Epicycles: Rotates each
-
D)
GN_Fourier_Trail(Stateless Trail & Spearhead Taper):-
Frame 1 - Time-Sampled Base Curve: Resamples a line to
ceil(t * 360) + 1points stacked atDC Offset, storingtau (0 .. t),trail_factor (0 .. 1), andUV (X = trail_factor)for the shader. -
Frame 2 - Sum Harmonics (Repeat Zone): Iterates once per epicycle, rotating
coeffby+2π · n · tauand adding the offset onto every trail point. -
Frame 3 - Taper and Trail Mesh: Feeds
trail_factorthrough theSpearhead TaperFloat CurveintoCurve to Mesh (Scale)with aCurve Circleprofile, lifts the mesh toZ = +0.01, assigns the trail material, and outputs empty geometry on Frame 1 (Has Trailswitch) so there is no starting stub.
-
Frame 1 - Time-Sampled Base Curve: Resamples a line to
Customization Tips
-
Trail Tip & Thickness: Open
GN_Fourier_Trail→ Frame 3 and edit theSpearhead TaperFloat Curve(to change the spearhead tip sharpness or tail falloff) or theCurve Circleradius right beneath it. -
Circles & Arrows: Unhide
Machine_Assetsin the Outliner and editAsset_CircleorAsset_Arrowdirectly (keep them unit-sized: 1 m radius for the circle, 1 m length along+Xfrom origin for the arrow). -
Materials: Edit the shaders directly in the Shader Editor, or swap them on the
Set Materialnodes insideGN_Fourier_TrailandFourier_Drawing_Machine.
Discover more products like this
geometry nodes epicycles educational drawing with circles SVG fourier series 3blue1brown fourier math motion graphics procedural math visualization