The Fourier Drawing Machine to Any Visual - In Pure Geometry Nodes

codesignprojects in Simulations & Effects


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

  1. 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 Spacebar to watch the epicycles trace the full loop over 240 frames.
  2. Edit or Draw Your Own Curve: Expand My_Curves in the Outliner, select Demo_Curve, press Tab to enter Edit Mode, and adjust or draw freely. You can also replace Demo_Curve with any curve of your own (keep a single curve inside the active target collection for a clean continuous path).
  3. Import an SVG: Go to File → Import → Scalable Vector Graphics (.svg), move the imported curve into Imported_SVG (or point Target Collection directly 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.
  4. Frame Your Camera: Camera lives independently in the Scene collection (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 offset c_0). Default is 60; try 40–120 for 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 as orig_opacity for the faded shader). Set to 0.0 to skip generating the reference mesh completely.

Outliner Structure

  • Scene: Contains Camera and lighting/staging (Lights in Realistic EEVEE; Math_Backdrop in Math Visualization).
  • My_Curves: Default editable curve collection containing Demo_Curve.
  • Imported_SVG: Ready-made collection for imported .svg contours (viewport- and render-hidden by default).
  • Machine_Assets: Holds the unit-scale instanced meshes Asset_Circle (1 m radius) and Asset_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 the Fourier_Machine object 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 Info reads Target Collection, realizes instances, and isolates curves via Separate Components in 1:1 world space.
    • Frame 2 - Auto-Resample and DFT: Sums total spline length (Spline Length → Attribute Statistic) and resamples evenly by distance to max(256, Epicycles * 4) points before passing the curve into GN_Fourier_DFT.
    • Frame 3 - Single-Pass Timeline Phase: A clamped Map Range converts Scene Time (Frame) from 1 .. Draw Frames into normalized Phase t (0.0 .. 1.0).
    • Frame 4 - Epicycles, Trail and Faded Original: Calls GN_Fourier_Epicycles and GN_Fourier_Trail, optionally builds the faded reference contour at Z = -0.02 when Original Fade > 0, and joins all layers together.
  • 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 count N.
    • Frame 2 - Alternating Frequencies (+1, -1, +2, -2...): Creates one point per epicycle and assigns integer frequency n = (floor(i / 2) + 1) * (1 - 2 * (i mod 2)), stored as freq.
    • Frame 3 - Complex DFT Integral: A parallel For Each Element zone spins every centered sample k backward around Z by -2π · n · k / N and averages all samples (Attribute Statistic → Mean) to output exact c_n.
    • Frame 4 - Store Coeff & Radius: Stores coeff (c_n) and radius (|c_n|) on each epicycle point.
  • C) GN_Fourier_Epicycles (Tip-to-Tail Chain & Instancing):
    • Frame 1 - Rotate And Chain Epicycles: Rotates each coeff forward by +2π · n · t to get v_j(t), then computes every base joint P_j in one loop-free pass using trailing Accumulate Field + DC Offset.
    • Frame 2 - Instance Circles & Unified Arrows: Filters out near-zero harmonics (radius > 0.0005), aligns Asset_Arrow along v_j(t) (X axis, pivot Z), scales circles and arrows uniformly by radius, and lifts arrows to Z = +0.02 so layers stack cleanly without Z-fighting.
  • D) GN_Fourier_Trail (Stateless Trail & Spearhead Taper):
    • Frame 1 - Time-Sampled Base Curve: Resamples a line to ceil(t * 360) + 1 points stacked at DC Offset, storing tau (0 .. t), trail_factor (0 .. 1), and UV (X = trail_factor) for the shader.
    • Frame 2 - Sum Harmonics (Repeat Zone): Iterates once per epicycle, rotating coeff by +2π · n · tau and adding the offset onto every trail point.
    • Frame 3 - Taper and Trail Mesh: Feeds trail_factor through the Spearhead Taper Float Curve into Curve to Mesh (Scale) with a Curve Circle profile, lifts the mesh to Z = +0.01, assigns the trail material, and outputs empty geometry on Frame 1 (Has Trail switch) so there is no starting stub.

Customization Tips

  • Trail Tip & Thickness: Open GN_Fourier_Trail → Frame 3 and edit the Spearhead Taper Float Curve (to change the spearhead tip sharpness or tail falloff) or the Curve Circle radius right beneath it.
  • Circles & Arrows: Unhide Machine_Assets in the Outliner and edit Asset_Circle or Asset_Arrow directly (keep them unit-sized: 1 m radius for the circle, 1 m length along +X from origin for the arrow).
  • Materials: Edit the shaders directly in the Shader Editor, or swap them on the Set Material nodes inside GN_Fourier_Trail and Fourier_Drawing_Machine.
$4.90

Have questions about this product?
Login to message

Details
Published about 7 hours ago
Blender Version 4.2 - 5.3
Render Engine Used Cycles, Eevee
License Creative Commons