Skip to content

KJStrand/DFT_3D

Repository files navigation

Visualizing Frequency Components of a 3D Curve with Discrete Fourier Transform

View on desktop, mobile, or VR: DFT.Glitch.me

WASD to move.

Explanation: The 3D curve was originally drawn in Tilt Brush (rough tracing of a dune buggy). The curve was then exported from Tilt Brush as a series of X, Y, Z coordinates over time.

I run a DFT over each coordinate time-series to produce frequency components for each dimension. These frequency components are visualized directly as a series of rotating vectors added tip to tail, inspired by 3blue1brown. Summing the results of all vectors for each dimension produces 3D coordinates over time, which reconstructs the original 3D curve.

It is interesting to play with the number and filtering of the frequency components to see the visual effects (3D smoothing, sharpening) and rendering performance impact.

Developed in Three.js / A-Frame

Credit Daniel Shiffman for DFT code starting point: link

Releases

No releases published

Packages

No packages published

Languages