Skip to contents

Shape analysis deals with curve fitting, whether \(x(t)\) and \(y(t)\) positions along the curvilinear abscissa and/or radius/tangent angle variation. These functions are mainly intended for (self-)teaching of Fourier-based methods.

Usage

coo_oscillo(
  coo,
  method = c("efourier", "rfourier", "tfourier", "all")[4],
  shape = TRUE,
  nb.pts = 12
)

Arguments

coo

A list or a matrix of coordinates.

method

character among c('efourier', 'rfourier', 'tfourier', 'all'). 'all' by default

shape

logical whether to plot the original shape

nb.pts

integer. The number or reference points, sampled equidistantly along the curvilinear abscissa and added on the oscillo curves.

Value

the plotted values

See also

exemplifying functions

Examples

coo_oscillo(shapes[4])

#>   [1] 0.00000000 4.70353942 3.90929170 3.90044215 3.89159259 4.66814120
#>   [7] 3.87389348 3.07964576 6.21238885 6.20353930 6.19468974 6.18584018
#>  [13] 6.17699063 5.38274291 6.15929151 6.15044196 6.14159240 5.34734468
#>  [19] 6.12389329 5.32964557 5.32079601 4.52654829 5.30309689 4.50884917
#>  [25] 4.49999962 4.49115006 3.69690234 4.47345095 3.67920323 2.88495551
#>  [31] 3.66150411 2.86725639 2.85840684 2.84955728 2.84070772 2.83185817
#>  [37] 2.82300861 2.81415905 2.80530950 3.58185810 2.78761038 2.77876083
#>  [43] 2.76991127 2.76106171 2.75221216 2.74336260 2.73451304 2.72566349
#>  [49] 2.71681393 2.70796437 2.69911482 2.69026526 2.68141570 2.67256614
#>  [55] 2.66371659 2.65486703 2.64601747 1.85176975 3.41371652 1.83407064
#>  [61] 2.61061925 2.60176969 2.59292013 2.58407058 2.57522102 2.56637146
#>  [67] 2.55752191 2.54867235 2.53982279 2.53097324 2.52212368 2.51327412
#>  [73] 2.50442457 2.49557501 2.48672545 2.47787590 2.46902634 2.46017678
#>  [79] 2.45132723 2.44247767 2.43362811 2.42477856 2.41592900 2.40707944
#>  [85] 2.39822988 2.38938033 2.38053077 2.37168121 2.36283166 1.56858394
#>  [91] 2.34513254 2.33628299 2.32743343 3.88938020 3.88053064 3.87168109
#>  [97] 3.07743337 3.85398197 3.84513242 3.83628286 3.82743330 3.81858375
#> [103] 4.59513235 3.80088463 3.79203508 4.56858368 4.55973413 3.76548641
#> [109] 4.54203501 4.53318546 5.30973406 4.51548634 4.50663679 5.28318539
#> [115] 4.48893767 5.26548628 4.47123856 5.24778717 5.23893761 4.44468989
#> [121] 5.22123849 5.21238894 4.41814122 5.19468982 5.18584027 5.17699071
#> [127] 5.16814115 4.37389343 5.15044204 5.14159248 5.13274293 5.12389337
#> [133] 5.11504381 5.10619426 5.09734470 5.08849514 4.29424742 5.07079603
#> [139] 5.06194647 5.05309692 5.04424736 5.03539780 5.02654825 5.80309685
#> [145] 5.00884913 4.99999958 4.99115002 4.98230046 4.97345091 4.96460135
#> [151] 4.95575179 5.73230040 4.93805268 4.92920312 4.92035356 4.91150401
#> [157] 4.90265445 5.67920306 4.88495534 4.87610578 4.86725622 4.85840667
#> [163] 4.84955711 4.84070755 4.83185800 4.82300844 4.81415888 4.80530933
#> [169] 4.79645977 4.00221205 3.99336249 3.19911477 2.40486705 2.39601750
#> [175] 1.60176978 2.37831838 1.58407066 2.36061927 1.56637155 2.34292016
#> [181] 1.54867243 1.53982288 2.31637148 1.52212376 1.51327421 2.28982281
#> [187] 1.49557509 1.48672554 2.26327414 1.46902642 1.46017687 1.45132731
#> [193] 2.22787592 1.43362820 1.42477864 1.41592908 2.19247769 1.39822997
#> [199] 0.60398225 2.16592902 1.37168130 1.36283174 1.35398219 1.34513263
#> [205] 1.33628307 1.32743352 1.31858396 1.30973440 1.30088485 1.29203529
#> [211] 1.28318573 1.27433617 1.26548662 1.25663706 1.24778750 1.23893795
#> [217] 1.23008839 1.22123883 1.21238928 0.41814156 1.19469016 1.18584061
#> [223] 1.17699105 1.16814149 0.37389377 1.15044238 1.14159282 0.34734510
#> [229] 1.12389371 1.11504415 0.32079643 1.09734504 0.30309732 1.07964593
#> [235] 0.28539821 1.06194681 0.26769909 0.25884954 1.03539814 0.24115042
#> [241] 0.23230087 0.22345131 0.21460175 0.20575219 0.19690264 0.18805308
#> [247] 5.67699067 0.17035397 5.65929155 0.15265485 5.64159244 0.13495574
#> [253] 5.62389333 5.61504377 0.10840707 5.59734466 5.58849510 5.57964554
#> [259] 5.57079599 5.56194643 5.55309687 5.54424732 5.53539776 5.52654820
#> [265] 5.51769865 5.50884909 5.49999953 4.70575181 5.48230042 5.47345086
#> [271] 4.67920314 5.45575175 5.44690219 4.65265447 5.42920308 5.42035352
#> [277] 4.62610580 4.61725625 5.39380485 5.38495529 5.37610574 4.58185802
#> [283] 5.35840662 6.13495523 4.55530935 5.33185795 5.32300840 5.31415884
#> [289] 5.30530928 6.08185789 4.50221201 6.06415878 5.26991106 5.26106150
#> [295] 5.25221194 5.24336239 6.01991099 4.44026511 6.00221188 5.20796416
#> [301] 5.19911460 5.19026505 5.18141549 5.17256593 5.16371638 5.94026498
#> [307] 5.14601726 4.35176954 5.12831815 5.11946859 5.89601720 5.10176948
#> [313] 5.09291992 5.08407036 5.07522081 5.06637125 5.05752169 5.04867214
#> [319] 5.03982258 5.03097302 5.02212347 5.01327391 5.00442435 4.99557480
#> [325] 4.98672524 4.97787568 4.96902613 4.96017657 4.95132701 4.94247746
#> [331] 4.93362790 4.13938018 4.91592879 5.69247739 4.11283151 4.88938012
#> [337] 4.88053056 4.87168100 4.86283145 4.06858373 4.84513233 4.83628278
#> [343] 4.04203506 4.81858366 4.80973410 4.01548638 4.79203499 3.99778727
#> [349] 4.77433588 3.98008816 4.75663676 3.96238904 4.73893765 3.94468993
#> [355] 4.72123854 3.92699082 4.70353942 3.90929170 4.68584031 3.89159259
#> [361] 4.66814120 3.87389348 4.65044208 3.85619436 3.84734481 3.83849525
#> [367] 4.61504386 3.82079614 3.81194658 4.58849519 3.79424747 3.78539791
#> [373] 3.77654835 3.76769880 3.75884924 3.74999968 3.74115012 3.73230057
#> [379] 3.72345101 3.71460145 2.92035373 3.69690234 2.90265462 3.67920323
#> [385] 2.88495551 2.87610595 3.65265456 2.85840684 2.84955728 3.62610589
#> [391] 2.83185817 2.82300861 3.59955722 3.59070766 2.79645994 3.57300855
#> [397] 2.77876083 3.55530943 3.54645988 2.75221216 3.52876076 3.51991121
#> [403] 3.51106165 3.50221209 3.49336254 3.48451298 3.47566342 4.25221203
#> [409] 3.45796431 3.44911475 4.22566336 3.43141564 4.20796424 3.41371652
#> [415] 4.19026513 4.18141557 4.17256602 4.16371646 4.15486690 4.14601735
#> [421] 4.92256595 3.34292007 4.11946868 4.11061912 4.10176956 3.30752184
#> [427] 4.08407045 4.07522089 3.28097317 4.05752178 3.26327406 4.03982267
#> [433] 4.03097311 3.23672539 3.22787583 4.00442444 3.21017672 3.98672533
#> [439] 3.19247761 3.18362805 3.17477849 3.16592893 3.15707938 2.36283166
#> [445] 3.13938026 3.13053071 2.33628299 3.11283159 2.31858387 3.09513248
#> [451] 3.08628292 3.07743337 3.85398197 3.84513242 3.05088470 3.82743330
#> [457] 3.03318558 3.80973419 3.01548647 3.00663691 3.78318552 2.98893780
#> [463] 2.98008824 3.75663685 2.96238913 2.95353957 2.15929185 2.93584046
#> [469] 2.14159274 1.34734502 1.33849546 1.32964590 0.53539818 0.52654863
#> [475] 0.51769907 1.29424768 5.99778710 0.49115040 0.48230084 1.25884945
#> [481] 0.46460173 0.45575217 0.44690262 0.43805306 0.42920350 0.42035395
#> [487] 0.41150439 0.40265483 0.39380528 1.95575205 1.94690249 1.15265477
#> [493] 1.92920338 1.92035382 1.12610610 1.90265471 1.10840699 1.88495559
#> [499] 1.09070787 1.86725648 1.07300876 0.27876104 1.05530964 1.04646009
#> [505] 0.25221237 1.02876097 1.01991142 1.01106186 1.78761047 1.77876091
#> [511] 0.98451319 1.76106180 0.96681408 0.95796452 0.16371680 0.94026541
#> [517] 0.14601769 5.63495527 0.12831857 0.11946902 5.60840660 0.10176990
#> [523] 0.09292035 5.58185793 5.57300838 5.56415882 5.55530926 5.54645971
#> [529] 5.53761015 5.52876059 4.73451287 5.51106148 5.50221192 4.70796420
#> [535] 5.48451281 5.47566325 6.25221186 6.24336230 6.23451274 6.22566319
#> [541] 6.21681363 6.20796407 6.19911452 0.69247782 5.39601724 0.67477870
#> [547] 6.16371629 6.15486673 6.14601718 6.13716762 0.63053092 5.33407034
#> [553] 0.61283181 6.10176939 6.09291984 6.08407028 6.07522072 6.06637117
#> [559] 6.05752161 0.55088491 5.25442433 6.03097294 6.02212338 6.01327383
#> [565] 6.00442427 0.49778757 5.20132699 5.97787560 5.96902604 5.96017649
#> [571] 5.95132693 5.94247737 5.93362781 5.92477826 5.13053054 5.90707914
#> [577] 5.89822959 5.10398187 5.88053047 5.87168092 5.07743320 5.85398180
#> [583] 5.05973408 5.05088453 5.82743313 5.03318541 5.02433586 5.80088446
#> [589] 5.00663674 4.99778719 5.77433579 4.98008807 4.97123852 5.74778712
#> [595] 5.73893757 4.94468985 4.93584029 5.71238890 5.70353934 4.90929162
#> [601] 5.68584023 5.67699067 5.66814111 4.87389339 5.65044200 5.64159244
#> [607] 5.63274288 5.62389333 4.82964561 5.60619421 5.59734466 5.58849510
#> [613] 5.57964554 5.57079599 5.56194643 5.55309687 5.54424732 5.53539776
#> [619] 5.52654820 5.51769865 5.50884909 5.49999953 5.49114998 5.48230042
#> [625] 5.47345086 5.46460131 5.45575175 5.44690219 5.43805264 5.42920308
#> [631] 5.42035352 5.41150397 5.40265441 5.39380485 5.38495529 5.37610574
#> [637] 5.36725618 5.35840662 5.34955707 5.34070751 5.33185795 5.32300840
#> [643] 6.09955700 5.30530928 5.29645973 5.28761017 5.27876061 5.26991106
#> [649] 5.26106150 6.03761011 0.53097341 6.01991099 0.51327429 0.50442474
#> [655] 0.49557518 5.98451277 0.47787607 0.46902651 5.95796410 5.16371638
#> [661] 5.94026498 4.36061910 5.13716771 4.34291999 4.33407043 4.32522087
#> [667] 5.88716764 4.30752176 5.86946853 4.28982264 4.28097309 4.27212353
#> [673] 3.47787581 4.25442442 3.46017670 3.45132714 3.44247758 3.43362803
#> [679] 3.42477847 3.41592891 3.40707936 3.39822980 3.38938024 2.59513252
#> [685] 3.37168113 2.57743341 2.56858385 2.55973430 2.55088474 2.54203518
#> [691] 2.53318563 1.73893791 2.51548651 2.50663696 1.71238924 2.48893784
#> [697] 1.69469012 2.47123873 1.67699101 2.45353961 1.65929189 1.65044234
#> [703] 2.42699094 1.63274322 1.62389367 3.18584044 4.74778721 4.73893765
#> [709] 4.73008809 3.93584037
coo_oscillo(shapes[4], 'efourier')

#> # A tibble: 710 × 2
#>       dx    dy
#>    <dbl> <dbl>
#>  1     0     0
#>  2     0    -1
#>  3    -1    -2
#>  4    -2    -3
#>  5    -3    -4
#>  6    -3    -5
#>  7    -4    -6
#>  8    -5    -6
#>  9    -4    -6
#> 10    -3    -6
#> # ℹ 700 more rows
coo_oscillo(shapes[4], 'rfourier')

#>   [1]  34.28884  35.22856  35.85539  36.52625  37.23875  38.21062  38.96933
#>   [8]  38.77938  38.96933  39.18390  39.42267  39.68521  39.97105  41.22840
#>  [15]  41.55177  41.89653  42.26213  43.56815  43.96536  45.28850  46.61700
#>  [22]  47.52337  48.85250  49.75835  50.66774  51.58049  52.10667  53.03236
#>  [29]  53.60027  53.25618  53.87744  53.57247  53.28452  53.01388  52.76080
#>  [36]  52.52555  52.30835  52.10945  51.92905  52.75589  52.61573  52.49424
#>  [43]  52.39157  52.30782  52.24307  52.19741  52.17088  52.16351  52.17531
#>  [50]  52.20626  52.25633  52.32548  52.41361  52.52064  52.64645  52.79090
#>  [57]  52.95385  52.15376  53.33453  52.57829  52.81768  53.07484  53.34950
#>  [64]  53.64141  53.95027  54.27580  54.61770  54.97567  55.34939  55.73855
#>  [71]  56.14283  56.56190  56.99543  57.44311  57.90459  58.37955  58.86768
#>  [78]  59.36863  59.88210  60.40775  60.94528  61.49438  62.05473  62.62604
#>  [85]  63.20800  63.80033  64.40274  65.01495  65.63669  65.49870  66.14613
#>  [92]  66.80226  67.46682  68.21363  68.96685  69.72627  71.13586  71.90019
#>  [99]  72.67024  73.44584  74.22680  75.01296  75.20000  76.00241  76.80946
#> [106]  77.04407  77.30385  78.13586  78.43027  78.74899  78.23153  78.58924
#> [113]  78.97065  78.49288  78.91279  78.46017  78.91827  78.49116  78.07453
#> [120]  78.58580  78.19525  77.81559  78.37960  78.02647  77.68461  77.35417
#> [127]  77.03530  77.68226  77.39058  77.11077  76.84296  76.58726  76.34381
#> [134]  76.11273  75.89411  75.68808  76.47732  76.29908  76.13356  75.98084
#> [141]  75.84100  75.71411  75.60023  74.50394  74.41509  74.33959  74.27748
#> [148]  74.22879  74.19355  74.17177  74.16347  73.16873  73.18765  73.22022
#> [155]  73.26643  73.32625  73.39964  72.49103  72.59283  72.70824  72.83719
#> [162]  72.97963  73.13546  73.30460  73.48696  73.68244  73.89094  74.11235
#> [169]  74.34655  75.56127  76.78281  77.74913  78.46964  79.20886  78.98907
#> [176]  79.76109  79.56797  80.37176  80.20506  81.03955  80.89895  80.77048
#> [183]  81.64820  81.54545  81.45484  82.37383  82.30844  82.25515  83.21339
#> [190]  83.18473  83.16808  83.16346  84.17077  84.18996  84.22102  84.26394
#> [197]  85.31688  85.38267  84.46363  85.54918  85.64983  85.76202  85.88571
#> [204]  86.02085  86.16738  86.32525  86.49439  86.67474  86.86623  87.06878
#> [211]  87.28232  87.50677  87.74204  87.98805  88.24470  88.51191  88.78958
#> [218]  89.07761  89.37590  88.73531  89.05721  89.38914  89.73098  90.08263
#> [225]  89.51415  89.88890  90.27317  89.75049  90.15753  90.57379  90.09726
#> [232]  90.53589  90.09246  90.55320  90.14314  90.62570  90.24922  89.89341
#> [239]  90.41049  90.08863  89.78789  89.50849  89.25062  89.01448  88.80024
#> [246]  88.60805  87.81833  87.65822  86.88289  86.75564  85.99543  85.90180
#> [253]  85.15746  84.41839  84.37043  83.64833  82.93200  82.22159  81.51725
#> [260]  80.81915  80.12746  79.44232  78.76392  78.09244  77.42804  76.77093
#> [267]  76.12127  74.71205  74.07134  73.43866  72.03249  71.40975  70.79566
#> [274]  69.39357  68.79056  68.19688  66.80013  65.40412  64.82571  64.25765
#> [281]  63.70023  62.31502  61.77244  62.09459  60.72216  60.21507  59.72041
#> [288]  59.23851  58.76967  59.20961  57.87245  58.35344  57.94651  57.55407
#> [295]  57.17643  56.81388  57.40838  56.13523  56.77207  56.47780  56.19977
#> [302]  55.93825  55.69346  55.46561  55.25493  56.04473  55.87204  54.72776
#> [309]  54.58755  54.46535  55.35682  55.27252  55.20620  55.15793  55.12777
#> [316]  55.11574  55.12184  55.14609  55.18844  55.24887  55.32730  55.42367
#> [323]  55.53789  55.66983  55.81938  55.98640  56.17072  56.37218  56.59060
#> [330]  56.82578  57.07752  56.38515  56.67414  57.92981  57.30013  57.63660
#> [337]  57.98837  58.35516  58.73668  58.21890  58.63543  59.06595  58.61935
#> [344]  59.08386  59.56152  59.18629  59.69666  59.37283  59.91499  59.64267
#> [351]  60.21563  59.99470  60.59734  60.42747  61.05860  60.93927  61.59763
#> [358]  61.52813  62.21241  62.19185  62.90071  62.92807  63.66015  63.73427
#> [365]  63.83964  63.97610  64.75812  64.93887  65.14982  65.96342  66.21642
#> [372]  66.49855  66.80942  67.14865  67.51580  67.91043  68.33204  68.78016
#> [379]  69.25426  69.75382  69.35679  69.89854  69.53111  70.11432  69.77669
#> [386]  69.45182  70.09278  69.79804  69.51644  70.21380  69.96247  69.72457
#> [393]  70.47665  71.24886  71.05751  71.86523  71.70342  72.54532  73.40480
#> [400]  73.28734  74.17868  75.08608  76.00895  76.94676  77.89895  78.86500
#> [407]  79.84441  80.84432  81.83670  82.84134  83.84129  84.85755  85.85730
#> [414]  86.88451  87.88397  88.88344  89.88292  90.88241  91.88191  92.88142
#> [421]  93.85554  94.88048  95.88002  96.87957  97.87913  98.91293  99.91216
#> [428] 100.91141 101.95369 102.95256 104.00323 105.00164 106.00008 107.05821
#> [435] 108.12447 109.12184 110.19536 111.19213 112.27258 113.36038 114.45531
#> [442] 115.55717 116.66577 116.78900 117.91146 119.04014 119.18609 120.32775
#> [449] 120.48874 121.64283 122.80236 123.96718 124.95013 125.93335 127.10095
#> [456] 128.08327 129.25466 130.23609 131.41112 132.59082 133.57020 134.75326
#> [463] 135.94073 136.91806 138.10864 139.30341 139.52852 140.73255 140.96957
#> [470] 140.24449 139.52997 138.82618 137.86237 136.89909 135.93634 135.25082
#> [477] 134.01247 133.05137 132.09086 131.41572 130.45849 129.50191 128.54599
#> [484] 127.59074 126.63619 125.68234 124.72922 123.77683 122.82521 123.13732
#> [491] 123.45675 122.84000 123.17644 123.52005 122.93616 123.29667 122.73616
#> [498] 123.11350 122.57662 122.97072 122.45772 121.54514 121.05088 120.57119
#> [505] 119.66929 119.20920 118.76418 118.33438 118.80149 119.27516 118.88086
#> [512] 119.37097 119.00220 118.64915 117.79197 117.46081 116.61205 115.23423
#> [519] 114.38642 113.54110 112.16122 111.31696 110.47530 109.09331 107.71215
#> [526] 106.33186 104.95248 103.57404 102.19657 100.82012 100.29919  98.92667
#> [533]  97.55533  97.04779  95.68088  94.31537  93.44900  92.58533  91.72442
#> [540]  90.86637  90.01124  89.15913  88.31012  88.00439  86.62177  86.33323
#> [547]  85.50294  84.67632  83.85348  83.03453  82.80597  81.40876  81.20026
#> [554]  80.40404  79.61241  78.82552  78.04351  77.26653  76.49472  76.37761
#> [561]  74.96730  74.21201  73.46257  72.71916  71.98197  71.94094  70.52699
#> [568]  69.80962  69.09928  68.39618  67.70055  67.01262  66.33263  65.66083
#> [575]  64.24875  63.58639  62.93294  61.52327  60.88054  60.24755  58.84152
#> [582]  58.22071  56.81733  55.41450  54.80961  53.41022  52.01162  51.42505
#> [589]  50.03093  48.63796  48.07263  46.68550  45.30004  44.75958  44.23513
#> [596]  42.86379  41.49533  41.00231  40.52797  39.18002  38.73500  38.31093
#> [603]  37.90850  36.60071  36.23449  35.89241  35.57516  35.28341  34.05109
#> [610]  33.80538  33.58765  33.39846  33.23829  33.10756  33.00662  32.93576
#> [617]  32.89515  32.88491  32.90508  32.95559  33.03631  33.14701  33.28740
#> [624]  33.45711  33.65568  33.88261  34.13735  34.41925  34.72768  35.06193
#> [631]  35.42126  35.80492  36.21214  36.64213  37.09410  37.56726  38.06082
#> [638]  38.57399  39.10600  39.65610  40.22354  40.80759  42.20611  42.80984
#> [645]  43.42821  44.06059  44.70640  45.36507  46.03603  47.44904  48.18901
#> [652]  49.60118  50.34924  51.10592  51.87084  53.27926  54.05043  54.82898
#> [659]  56.23445  56.86510  58.27294  58.15749  58.81854  58.75524  58.72594
#> [666]  58.73069  60.14474  60.18261  61.59580  61.66523  61.76697  61.90086
#> [673]  61.27762  61.46141  60.86654  60.28239  59.70928  59.14752  58.59744
#> [680]  58.05937  57.53366  57.02063  56.52065  55.15875  54.67832  53.32563
#> [687]  51.97622  50.63034  49.28829  47.95039  46.61700  45.71452  44.38155
#> [694]  43.05376  42.14616  40.81915  39.91086  38.58472  37.67564  36.35049
#> [701]  35.44054  34.53556  33.20556  32.29988  31.39993  30.97074  31.88281
#> [708]  32.80000  33.72190  34.28884
coo_oscillo(shapes[4], 'tfourier')

#>   [1] 0.00000000 4.70353942 3.90929170 3.90044215 3.89159259 4.66814120
#>   [7] 3.87389348 3.07964576 6.21238885 6.20353930 6.19468974 6.18584018
#>  [13] 6.17699063 5.38274291 6.15929151 6.15044196 6.14159240 5.34734468
#>  [19] 6.12389329 5.32964557 5.32079601 4.52654829 5.30309689 4.50884917
#>  [25] 4.49999962 4.49115006 3.69690234 4.47345095 3.67920323 2.88495551
#>  [31] 3.66150411 2.86725639 2.85840684 2.84955728 2.84070772 2.83185817
#>  [37] 2.82300861 2.81415905 2.80530950 3.58185810 2.78761038 2.77876083
#>  [43] 2.76991127 2.76106171 2.75221216 2.74336260 2.73451304 2.72566349
#>  [49] 2.71681393 2.70796437 2.69911482 2.69026526 2.68141570 2.67256614
#>  [55] 2.66371659 2.65486703 2.64601747 1.85176975 3.41371652 1.83407064
#>  [61] 2.61061925 2.60176969 2.59292013 2.58407058 2.57522102 2.56637146
#>  [67] 2.55752191 2.54867235 2.53982279 2.53097324 2.52212368 2.51327412
#>  [73] 2.50442457 2.49557501 2.48672545 2.47787590 2.46902634 2.46017678
#>  [79] 2.45132723 2.44247767 2.43362811 2.42477856 2.41592900 2.40707944
#>  [85] 2.39822988 2.38938033 2.38053077 2.37168121 2.36283166 1.56858394
#>  [91] 2.34513254 2.33628299 2.32743343 3.88938020 3.88053064 3.87168109
#>  [97] 3.07743337 3.85398197 3.84513242 3.83628286 3.82743330 3.81858375
#> [103] 4.59513235 3.80088463 3.79203508 4.56858368 4.55973413 3.76548641
#> [109] 4.54203501 4.53318546 5.30973406 4.51548634 4.50663679 5.28318539
#> [115] 4.48893767 5.26548628 4.47123856 5.24778717 5.23893761 4.44468989
#> [121] 5.22123849 5.21238894 4.41814122 5.19468982 5.18584027 5.17699071
#> [127] 5.16814115 4.37389343 5.15044204 5.14159248 5.13274293 5.12389337
#> [133] 5.11504381 5.10619426 5.09734470 5.08849514 4.29424742 5.07079603
#> [139] 5.06194647 5.05309692 5.04424736 5.03539780 5.02654825 5.80309685
#> [145] 5.00884913 4.99999958 4.99115002 4.98230046 4.97345091 4.96460135
#> [151] 4.95575179 5.73230040 4.93805268 4.92920312 4.92035356 4.91150401
#> [157] 4.90265445 5.67920306 4.88495534 4.87610578 4.86725622 4.85840667
#> [163] 4.84955711 4.84070755 4.83185800 4.82300844 4.81415888 4.80530933
#> [169] 4.79645977 4.00221205 3.99336249 3.19911477 2.40486705 2.39601750
#> [175] 1.60176978 2.37831838 1.58407066 2.36061927 1.56637155 2.34292016
#> [181] 1.54867243 1.53982288 2.31637148 1.52212376 1.51327421 2.28982281
#> [187] 1.49557509 1.48672554 2.26327414 1.46902642 1.46017687 1.45132731
#> [193] 2.22787592 1.43362820 1.42477864 1.41592908 2.19247769 1.39822997
#> [199] 0.60398225 2.16592902 1.37168130 1.36283174 1.35398219 1.34513263
#> [205] 1.33628307 1.32743352 1.31858396 1.30973440 1.30088485 1.29203529
#> [211] 1.28318573 1.27433617 1.26548662 1.25663706 1.24778750 1.23893795
#> [217] 1.23008839 1.22123883 1.21238928 0.41814156 1.19469016 1.18584061
#> [223] 1.17699105 1.16814149 0.37389377 1.15044238 1.14159282 0.34734510
#> [229] 1.12389371 1.11504415 0.32079643 1.09734504 0.30309732 1.07964593
#> [235] 0.28539821 1.06194681 0.26769909 0.25884954 1.03539814 0.24115042
#> [241] 0.23230087 0.22345131 0.21460175 0.20575219 0.19690264 0.18805308
#> [247] 5.67699067 0.17035397 5.65929155 0.15265485 5.64159244 0.13495574
#> [253] 5.62389333 5.61504377 0.10840707 5.59734466 5.58849510 5.57964554
#> [259] 5.57079599 5.56194643 5.55309687 5.54424732 5.53539776 5.52654820
#> [265] 5.51769865 5.50884909 5.49999953 4.70575181 5.48230042 5.47345086
#> [271] 4.67920314 5.45575175 5.44690219 4.65265447 5.42920308 5.42035352
#> [277] 4.62610580 4.61725625 5.39380485 5.38495529 5.37610574 4.58185802
#> [283] 5.35840662 6.13495523 4.55530935 5.33185795 5.32300840 5.31415884
#> [289] 5.30530928 6.08185789 4.50221201 6.06415878 5.26991106 5.26106150
#> [295] 5.25221194 5.24336239 6.01991099 4.44026511 6.00221188 5.20796416
#> [301] 5.19911460 5.19026505 5.18141549 5.17256593 5.16371638 5.94026498
#> [307] 5.14601726 4.35176954 5.12831815 5.11946859 5.89601720 5.10176948
#> [313] 5.09291992 5.08407036 5.07522081 5.06637125 5.05752169 5.04867214
#> [319] 5.03982258 5.03097302 5.02212347 5.01327391 5.00442435 4.99557480
#> [325] 4.98672524 4.97787568 4.96902613 4.96017657 4.95132701 4.94247746
#> [331] 4.93362790 4.13938018 4.91592879 5.69247739 4.11283151 4.88938012
#> [337] 4.88053056 4.87168100 4.86283145 4.06858373 4.84513233 4.83628278
#> [343] 4.04203506 4.81858366 4.80973410 4.01548638 4.79203499 3.99778727
#> [349] 4.77433588 3.98008816 4.75663676 3.96238904 4.73893765 3.94468993
#> [355] 4.72123854 3.92699082 4.70353942 3.90929170 4.68584031 3.89159259
#> [361] 4.66814120 3.87389348 4.65044208 3.85619436 3.84734481 3.83849525
#> [367] 4.61504386 3.82079614 3.81194658 4.58849519 3.79424747 3.78539791
#> [373] 3.77654835 3.76769880 3.75884924 3.74999968 3.74115012 3.73230057
#> [379] 3.72345101 3.71460145 2.92035373 3.69690234 2.90265462 3.67920323
#> [385] 2.88495551 2.87610595 3.65265456 2.85840684 2.84955728 3.62610589
#> [391] 2.83185817 2.82300861 3.59955722 3.59070766 2.79645994 3.57300855
#> [397] 2.77876083 3.55530943 3.54645988 2.75221216 3.52876076 3.51991121
#> [403] 3.51106165 3.50221209 3.49336254 3.48451298 3.47566342 4.25221203
#> [409] 3.45796431 3.44911475 4.22566336 3.43141564 4.20796424 3.41371652
#> [415] 4.19026513 4.18141557 4.17256602 4.16371646 4.15486690 4.14601735
#> [421] 4.92256595 3.34292007 4.11946868 4.11061912 4.10176956 3.30752184
#> [427] 4.08407045 4.07522089 3.28097317 4.05752178 3.26327406 4.03982267
#> [433] 4.03097311 3.23672539 3.22787583 4.00442444 3.21017672 3.98672533
#> [439] 3.19247761 3.18362805 3.17477849 3.16592893 3.15707938 2.36283166
#> [445] 3.13938026 3.13053071 2.33628299 3.11283159 2.31858387 3.09513248
#> [451] 3.08628292 3.07743337 3.85398197 3.84513242 3.05088470 3.82743330
#> [457] 3.03318558 3.80973419 3.01548647 3.00663691 3.78318552 2.98893780
#> [463] 2.98008824 3.75663685 2.96238913 2.95353957 2.15929185 2.93584046
#> [469] 2.14159274 1.34734502 1.33849546 1.32964590 0.53539818 0.52654863
#> [475] 0.51769907 1.29424768 5.99778710 0.49115040 0.48230084 1.25884945
#> [481] 0.46460173 0.45575217 0.44690262 0.43805306 0.42920350 0.42035395
#> [487] 0.41150439 0.40265483 0.39380528 1.95575205 1.94690249 1.15265477
#> [493] 1.92920338 1.92035382 1.12610610 1.90265471 1.10840699 1.88495559
#> [499] 1.09070787 1.86725648 1.07300876 0.27876104 1.05530964 1.04646009
#> [505] 0.25221237 1.02876097 1.01991142 1.01106186 1.78761047 1.77876091
#> [511] 0.98451319 1.76106180 0.96681408 0.95796452 0.16371680 0.94026541
#> [517] 0.14601769 5.63495527 0.12831857 0.11946902 5.60840660 0.10176990
#> [523] 0.09292035 5.58185793 5.57300838 5.56415882 5.55530926 5.54645971
#> [529] 5.53761015 5.52876059 4.73451287 5.51106148 5.50221192 4.70796420
#> [535] 5.48451281 5.47566325 6.25221186 6.24336230 6.23451274 6.22566319
#> [541] 6.21681363 6.20796407 6.19911452 0.69247782 5.39601724 0.67477870
#> [547] 6.16371629 6.15486673 6.14601718 6.13716762 0.63053092 5.33407034
#> [553] 0.61283181 6.10176939 6.09291984 6.08407028 6.07522072 6.06637117
#> [559] 6.05752161 0.55088491 5.25442433 6.03097294 6.02212338 6.01327383
#> [565] 6.00442427 0.49778757 5.20132699 5.97787560 5.96902604 5.96017649
#> [571] 5.95132693 5.94247737 5.93362781 5.92477826 5.13053054 5.90707914
#> [577] 5.89822959 5.10398187 5.88053047 5.87168092 5.07743320 5.85398180
#> [583] 5.05973408 5.05088453 5.82743313 5.03318541 5.02433586 5.80088446
#> [589] 5.00663674 4.99778719 5.77433579 4.98008807 4.97123852 5.74778712
#> [595] 5.73893757 4.94468985 4.93584029 5.71238890 5.70353934 4.90929162
#> [601] 5.68584023 5.67699067 5.66814111 4.87389339 5.65044200 5.64159244
#> [607] 5.63274288 5.62389333 4.82964561 5.60619421 5.59734466 5.58849510
#> [613] 5.57964554 5.57079599 5.56194643 5.55309687 5.54424732 5.53539776
#> [619] 5.52654820 5.51769865 5.50884909 5.49999953 5.49114998 5.48230042
#> [625] 5.47345086 5.46460131 5.45575175 5.44690219 5.43805264 5.42920308
#> [631] 5.42035352 5.41150397 5.40265441 5.39380485 5.38495529 5.37610574
#> [637] 5.36725618 5.35840662 5.34955707 5.34070751 5.33185795 5.32300840
#> [643] 6.09955700 5.30530928 5.29645973 5.28761017 5.27876061 5.26991106
#> [649] 5.26106150 6.03761011 0.53097341 6.01991099 0.51327429 0.50442474
#> [655] 0.49557518 5.98451277 0.47787607 0.46902651 5.95796410 5.16371638
#> [661] 5.94026498 4.36061910 5.13716771 4.34291999 4.33407043 4.32522087
#> [667] 5.88716764 4.30752176 5.86946853 4.28982264 4.28097309 4.27212353
#> [673] 3.47787581 4.25442442 3.46017670 3.45132714 3.44247758 3.43362803
#> [679] 3.42477847 3.41592891 3.40707936 3.39822980 3.38938024 2.59513252
#> [685] 3.37168113 2.57743341 2.56858385 2.55973430 2.55088474 2.54203518
#> [691] 2.53318563 1.73893791 2.51548651 2.50663696 1.71238924 2.48893784
#> [697] 1.69469012 2.47123873 1.67699101 2.45353961 1.65929189 1.65044234
#> [703] 2.42699094 1.63274322 1.62389367 3.18584044 4.74778721 4.73893765
#> [709] 4.73008809 3.93584037
#tfourier is prone to high-frequency noise but smoothing can help
coo_oscillo(coo_smooth(shapes[4], 10), 'tfourier')

#>   [1] 0.000000000 6.210281146 6.150339598 6.110870956 6.093957661 6.111051488
#>   [7] 6.210841936 0.294826636 1.163080415 1.662325460 1.784906858 1.788459018
#>  [13] 1.754364939 1.713694996 1.673686879 1.624391221 1.550688278 1.445544249
#>  [19] 1.313650160 1.165054644 1.007403085 0.842241873 0.665533492 0.472501809
#>  [25] 0.264958204 0.052746323 6.128257112 5.926985109 5.730762152 5.541624953
#>  [31] 5.365867883 5.211467073 5.086389730 4.997097511 4.946510695 4.933000642
#>  [37] 4.949742414 4.982955751 5.012460904 5.019029243 4.994585130 4.946466089
#>  [43] 4.891849750 4.846153200 4.815140738 4.796127011 4.783744124 4.773987623
#>  [49] 4.764958775 4.755946140 4.746333644 4.734694607 4.718307666 4.693917249
#>  [55] 4.660156421 4.620031964 4.580677444 4.549991613 4.533287434 4.532292499
#>  [61] 4.545279217 4.566934623 4.589359967 4.605421681 4.612112985 4.610800812
#>  [67] 4.604740736 4.596653165 4.587948567 4.579116176 4.570267573 4.561418016
#>  [73] 4.552568459 4.543718902 4.534869346 4.526019789 4.517170232 4.508320675
#>  [79] 4.499471119 4.490620608 4.481752932 4.472741250 4.462985703 4.450603765
#>  [85] 4.431608816 4.400770190 4.356068458 4.305424656 4.269520989 4.277135048
#>  [91] 4.360538895 4.555194318 4.871254402 5.215038283 5.459664874 5.595213464
#>  [97] 5.672103286 5.734294873 5.805171782 5.888871809 5.977816468 6.062603219
#> [103] 6.138686968 6.207147740 6.271367481 0.051070155 0.115529390 0.185002608
#> [109] 0.260266970 0.335648438 0.401580810 0.452499558 0.490752929 0.523002507
#> [115] 0.554570991 0.586753235 0.617247615 0.642073315 0.658350204 0.667047287
#> [121] 0.673606828 0.685132162 0.705052388 0.728633438 0.744734811 0.745801344
#> [127] 0.737404131 0.735346616 0.751874045 0.784845872 0.819132998 0.837128874
#> [133] 0.828297388 0.792765360 0.741689130 0.694623805 0.671233403 0.681431950
#> [139] 0.721943628 0.781107907 0.846153540 0.905318763 0.945847189 0.956185340
#> [145] 0.933520844 0.889053044 0.844590615 0.821054584 0.826911372 0.853852015
#> [151] 0.881659563 0.890921047 0.876241385 0.849987814 0.832106250 0.832287770
#> [157] 0.840824651 0.837648250 0.809803659 0.760803413 0.706008449 0.660112883
#> [163] 0.628012512 0.604377441 0.577183265 0.530156087 0.444950680 0.304766283
#> [169] 0.096072698 6.087754031 5.700461201 5.247258666 4.831451596 4.527523880
#> [175] 4.329498082 4.206491595 4.131062373 4.081089105 4.040449748 4.001478231
#> [181] 3.964579062 3.933656583 3.910945742 3.895211705 3.883184677 3.871266154
#> [187] 3.856146033 3.835553787 3.810038382 3.783889856 3.762402266 3.746921155
#> [193] 3.733416217 3.716285917 3.692075007 3.659767668 3.620829826 3.580502872
#> [199] 3.545836696 3.519458457 3.496862828 3.471910466 3.443688053 3.416538164
#> [205] 3.394773009 3.379129831 3.367634796 3.358040420 3.349046858 3.340179182
#> [211] 3.331310551 3.322298870 3.312543323 3.300160435 3.281145755 3.250115199
#> [217] 3.204257486 3.148748834 3.097182990 3.062798448 3.047139365 3.037836547
#> [223] 3.019070901 2.985270415 2.943990251 2.906371786 2.877162870 2.853033116
#> [229] 2.827294741 2.795605917 2.758775379 2.721017676 2.685491706 2.651638374
#> [235] 2.616756113 2.579249488 2.539266926 2.496642604 2.450285176 2.400599692
#> [241] 2.350909726 2.304563353 2.260820580 2.214420252 2.159471987 2.094718182
#> [247] 2.026085459 1.963248210 1.911995985 1.870137442 1.831022284 1.789478413
#> [253] 1.743510198 1.691608789 1.631150303 1.561569503 1.488650289 1.423172645
#> [259] 1.373787829 1.341690659 1.321606928 1.305654435 1.285571657 1.253491627
#> [265] 1.204250793 1.139519444 1.069263427 1.006648871 0.960120128 0.930025733
#> [271] 0.911026560 0.895946158 0.877978420 0.852313020 0.819389902 0.787791876
#> [277] 0.771357046 0.780349343 0.814054366 0.861526357 0.910083692 0.952417749
#> [283] 0.985608592 1.008800661 1.025873144 1.046448905 1.078707071 1.120695586
#> [289] 1.160889837 1.187477232 1.195902397 1.189182194 1.174564489 1.160112567
#> [295] 1.151279870 1.148175732 1.145840851 1.137610074 1.119048880 1.090947700
#> [301] 1.060659306 1.039140171 1.032285551 1.032745212 1.022979818 0.991476068
#> [307] 0.948086298 0.920008639 0.927148777 0.961284686 0.992101349 0.993873732
#> [313] 0.963915071 0.918406903 0.876060289 0.845934321 0.827081727 0.814716958
#> [319] 0.804962365 0.795950684 0.787083007 0.778231543 0.769363866 0.760353139
#> [325] 0.750614758 0.738375872 0.720105828 0.691716549 0.652608187 0.609790908
#> [331] 0.575970900 0.560292070 0.560253479 0.563707517 0.558656949 0.539780722
#> [337] 0.506825021 0.461757288 0.409794503 0.359637805 0.318856196 0.288830724
#> [343] 0.264555711 0.238816280 0.207252588 0.171067996 0.135611940 0.106165474
#> [349] 0.084689231 0.069773360 0.058688066 0.049228656 0.040263124 0.031399834
#> [355] 0.022548751 0.013684699 0.004705453 6.278316778 6.266646228 6.249714189
#> [361] 6.223378486 6.185711060 6.140814149 6.098429160 6.068030924 6.052616099
#> [367] 6.047041546 6.041070135 6.024843229 5.993927011 5.951419573 5.905757611
#> [373] 5.865459482 5.834682028 5.812125954 5.792458593 5.768502704 5.733457862
#> [379] 5.683206435 5.618467189 5.545329001 5.472432994 5.406413214 5.350205499
#> [385] 5.304888721 5.271062496 5.248378331 5.235801685 5.233541784 5.243796693
#> [391] 5.267701445 5.300728508 5.332712334 5.354453431 5.364377855 5.368534497
#> [397] 5.374741784 5.387390003 5.407383871 5.434201642 5.465689493 5.497519401
#> [403] 5.525769644 5.550355985 5.574942842 5.603203498 5.635133193 5.667217292
#> [409] 5.696503292 5.724011803 5.754170455 5.792492400 5.844118816 5.911952780
#> [415] 5.993258931 6.078066848 6.152989261 6.206858374 6.232226877 6.224754148
#> [421] 6.185255417 6.122244570 6.049372258 5.978525675 5.915552103 5.861307526
#> [427] 5.814628320 5.774712015 5.742004258 5.716275508 5.693379276 5.666055366
#> [433] 5.630481863 5.590829982 5.554144579 5.520973706 5.483347333 5.432738889
#> [439] 5.368764431 5.298373235 5.228480361 5.162317644 5.101305142 5.047172969
#> [445] 5.001770639 4.967325726 4.949028929 4.955822231 4.995559376 5.068649008
#> [451] 5.166128839 5.271169312 5.361943901 5.418816242 5.434261089 5.415787999
#> [457] 5.378749340 5.337253926 5.300066779 5.270326801 5.245798899 5.219095373
#> [463] 5.178948961 5.113005498 5.010509821 4.861906973 4.655872417 4.383607566
#> [469] 4.061035875 3.739006861 3.460013884 3.228975398 3.035724811 2.875726521
#> [475] 2.751418620 2.667347672 2.626605417 2.625083548 2.645200476 2.660136888
#> [481] 2.649921973 2.613646664 2.566698627 2.528381069 2.513356521 2.534150830
#> [487] 2.608723363 2.760815486 2.995303110 3.253844542 3.450019278 3.556829435
#> [493] 3.594254480 3.588553531 3.560325237 3.523018039 3.480988947 3.429095667
#> [499] 3.357730619 3.262973502 3.155419447 3.057566270 2.990178713 2.963327724
#> [505] 2.978269071 3.031263380 3.113254441 3.206490718 3.283579186 3.315652213
#> [511] 3.286439739 3.198490398 3.065780988 2.901072469 2.710327869 2.499825577
#> [517] 2.288736611 2.106853050 1.972716007 1.880608795 1.808217671 1.732016385
#> [523] 1.641441083 1.543848642 1.454766713 1.383471012 1.328109195 1.280445960
#> [529] 1.233298003 1.186051865 1.145835795 1.124395250 1.133998381 1.185203040
#> [535] 1.284655334 1.429095439 1.597639355 1.755997591 1.877909670 1.959627909
#> [541] 2.012852441 2.050062384 2.076448107 2.091254469 2.093166224 2.083874267
#> [547] 2.068528701 2.053935597 2.045086040 2.041980966 2.039645151 2.031397576
#> [553] 2.012695022 1.983859410 1.950961917 1.922825350 1.903874767 1.888886160
#> [559] 1.867115865 1.834104119 1.799091522 1.778085405 1.777842081 1.787473253
#> [565] 1.787246136 1.766366858 1.731953827 1.700820006 1.683021524 1.673232227
#> [571] 1.656126033 1.618934077 1.560828846 1.493152222 1.431106120 1.383899161
#> [577] 1.350760265 1.323321861 1.290847550 1.246070449 1.189727078 1.130361772
#> [583] 1.078468381 1.040047045 1.014823673 0.998771530 0.987568410 0.978706955
#> [589] 0.972097548 0.969825211 0.974911598 0.988572657 1.007325669 1.023813218
#> [595] 1.033242798 1.039315778 1.051423155 1.075752154 1.109940476 1.145106149
#> [601] 1.172013529 1.186848625 1.193363408 1.198926850 1.206369621 1.210402157
#> [607] 1.204972412 1.194030025 1.191273604 1.207820260 1.241670290 1.279478888
#> [613] 1.307637488 1.320968930 1.322284497 1.316968271 1.309024705 1.300337273
#> [619] 1.291505836 1.282657232 1.273807676 1.264958119 1.256108562 1.247259005
#> [625] 1.238409449 1.229559892 1.220710335 1.211860778 1.203011222 1.194161665
#> [631] 1.185312108 1.176462551 1.167613948 1.158782511 1.150095079 1.142151512
#> [637] 1.136835287 1.138149900 1.151463248 1.179461633 1.216397766 1.246996075
#> [643] 1.254805029 1.235032721 1.201996315 1.185517450 1.218031010 1.321091442
#> [649] 1.494393247 1.707858148 1.913968285 2.077528885 2.185390609 2.236504708
#> [655] 2.234154703 2.181616267 2.077397918 1.913965611 1.684446939 1.396172930
#> [661] 1.083379564 0.801165397 0.594838371 0.479858466 0.448502322 0.476558403
#> [667] 0.519940898 0.523261974 0.451098963 0.310029503 0.136270603 6.245725890
#> [673] 6.083883304 5.933308298 5.794794776 5.675631097 5.583900424 5.519806626
#> [679] 5.472922363 5.426039551 5.361978088 5.270595236 5.153649901 5.024269044
#> [685] 4.899718114 4.792550346 4.706581487 4.638154755 4.579941168 4.525357287
#> [691] 4.471842191 4.420780288 4.374056983 4.331365078 4.291374762 4.253868124
#> [697] 4.218994007 4.185218958 4.150165899 4.114424239 4.084166694 4.070249157
#> [703] 4.087829504 4.167359978 4.411768752 5.183594717 6.047475358 0.033827928
#> [709] 0.090954159 0.064865507