3 ms·
I built this visualization while taking a signal processing course. The goal is to demonstrate the duality between transformations in the time and spectral doma
by laszlokorte 5y ago
I built this visualization while taking a signal processing course. The goal is to demonstrate the duality between transformations in the time and spectral domain.
For example shifting the signal along the time axis results in a linear phase twist in the spectral domain.
In most textbooks I came across the phase and magnitute are plotted separately and even in digital 3d plots often only one domain at a time is plotted.
Inspired by graphics like this [1] my idea was to plot both time and spectral domains at once onto the sides of a rotating cuboid. So each 90deg rotation of the cuboid represents one fourier transform (... -> s(t) -> S(f) -> s(-t) -> S(-f) -> ...).
[1]: https://mri-q.com/uploads/3/4/5/7/34572113/3311485_orig.gif https://mri-q.com/uploads/3/4/5/7/34572113/3311485_orig.gif
- amir734jj 5y agoIt's very awesome and provides educational value. Thanks for sharing.
- iamcreasy 5y agoThanks for making it. I am having trouble connect the gif with the Cuboid. When you say 'signal and spectral domain' - do you mean 'time and spectral domain'? Also, what does the 'Slices' checkbox do?
- laszlokorte 5y agoYes, I mean 'time and spectral domain'. The idea of the gif is to represent the two domains orthogonal to each other graphically. The signal in the time domain is a complex function (time->(magnitude,phase)) so it can be plotted in 3 dimensions. The same is true for the spectral domain. So really there are only 2 3d plots. But moving from the time to the signal domain can also be thought of as a 90 degree rotation. In the gif you can see two blue planes are orthogonal to each other. But the gif shows only the 2d magnitude plots of the time domain and spectral domain. The cuboid embeds a 3d plot of each domain on each of it's side in order to plot the imaginary values as well. The slicing allows you to select up to two frequencies from the frequency domain and plot the corresponding basis function on the top side of the cuboid. The top side of the cube corresponds to the 3d coordinate system in the gif. In hope this helps to clarify.
- duped 5y agoIs the "time domain" function a complex function of time, and "spectral" domain the F.T. of that function? I ask because it's rather unusual to look at the F.T. of complex functions, since most useful F.T.s only deal with real-valued functions of time and it might be extra confusing as the F.T. is no longer symmetric as a result It may also be nice to use different syntax, like `x(t)` and X(\omega)` since "s" can be a bit overloaded in the context of Fourier theory
- quietbritishjim 5y agoOn the contrary, it's most normal to consider the time domain function [1] as a complex valued function, even if it happens to take only real values. And the reason for that is exactly for symmetry with its transform! The transform is certainly complex valued, thanks to the e^ix\xi factor (unless you take the sine and cosine transforms separately, but of course those are just the real and imaginary components). For example, you can see the first definition on Wikipedia [2] starts with a function f:R->C. Edit: Oh, by "symmetric" you meant the Fourier transform being symmetric about 0. I thought you meant the natural symmetry of the forms of f and \hat{f}. Still, it seems natural to me to treat the two functions similarly, including use of complex values. But I'm a (very) pure mathematician, at least in this area. [1] Or whatever function you want to take the transform of, it doesn't have to be the time domain and is in fact often spatial. This is probably why OP used the phrase "signal domain". [2] https://en.m.wikipedia.org/wiki/Fourier_transform https://en.m.wikipedia.org/wiki/Fourier_transform
- deleted 5y ago[deleted]
- enriquto 5y agoI love this visualization! Especially the metaphor that two sides of the cuboid give different "views" of the same ideal object that is inside the cube. What would one show in the upper face? Some comments on this awesome program: 1. A beautiful feature is that you can see the projection of the whole function into the complex plane. However, this visualization is difficult to see for both the frequency and time domains at the same time. 2. After some time playing with the curves, I'd like to see both sides on a flat surface. This would break the metaphor, but maybe consider an option for "unfolding" the cube to see all these visualizations at the sime time? 3. Could you add new functions? at least the Dirichlet and Fejer kernels, or even some fractal-like stuff (lacunary series, random phase noise, dubois raymond examples, etc).
- laszlokorte 5y agoI now added and x-ray view option to show all sides of the cube at the same time (by hiding the cube itself)
- enriquto 5y agoThat's great! (but it removes the projections!?)
- laszlokorte 5y agoI am not sure yet where to put them exaclty.