Created
March 29, 2020 17:10
-
-
Save adekau/007e669b09ceb0081782ec1c21cb4ac2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
coeffs = Import["/Users/alexanderdekau/coeffs.json"]; | |
pts = Import["/Users/alexanderdekau/pts.json"]; | |
L = pts // Length; | |
toComplex[z_] := z[[All, 1]] + I z[[All, 2]]; | |
Cpts = toComplex@pts; | |
\[Omega][k_, n_] := -2 Pi I k n / L; | |
Coeff[k_] := 1/L Sum[Cpts[[j]] Exp[\[Omega][k, j - 1]], {j, 1, L}]; | |
mcoeffs = Table[Coeff[k - 1], {k, 1, L}]; | |
coeffs = toComplex@coeffs; | |
idxed = MapIndexed[{First[#2], #1} &, coeffs]; | |
Parameterize[z_] := Sum[Last[z[[k]]] Exp[I (First[z[[k]]] - 1) t], {k, 1, Length@z}]; | |
ParametricPlot[{Re@#, Im@#} &@Parameterize@idxed, {t, 0, 2 Pi}] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment