-
Notifications
You must be signed in to change notification settings - Fork 0
/
PCM20210912_SICP_2.4.1_RepresentationsForComplexNumbers.jl
1940 lines (1589 loc) · 63.9 KB
/
PCM20210912_SICP_2.4.1_RepresentationsForComplexNumbers.jl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
### A Pluto.jl notebook ###
# v0.19.12
using Markdown
using InteractiveUtils
# ╔═╡ 90aa1e17-89f8-4884-9a3b-e58acf87bc7a
using Plots
# ╔═╡ e39aed1d-58a3-40e6-8a73-27204b742f42
md"
=====================================================================================
#### SICP\_2.4.1\_RepresentationsForComplexNumbers.jl
###### file: PCM20210912\_SICP\_2.4.1\_RepresentationsForComplexNumbers.jl
###### code: Julia/Pluto.jl (1.8.2/0.19.14) by PCM *** 2022/12/09 ***
=====================================================================================
"
# ╔═╡ d87312c3-36cc-4d5d-9d3f-fd9da02bdadb
md"
#### 2.4.1.1 Definition of complex numbers
"
# ╔═╡ b4ce58d8-c130-4c4f-904d-deccef8940cf
let
title = "Representation of z = Re(z) + Im(z) = x + yi in C"
xlim = (-0.5, 2.5); ylim = (-0.5, 1.2)
z = 2 + 1im
ϕ = atan(imag(z)/real(z))
radius = 0.8
circleArray = Plots.partialcircle(0, ϕ, 30, radius)
plot([(0, 0), (2, 1)], line=:arrow, linecolor=:red, linewidth=4, title=title, xlim=xlim, ylim=ylim, legend=false)
plot!([(2, 0), (2, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(0, 0), (2, 0)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(0, 1), (2, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(0, 0), (0, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:red, linewidth=1)
annotate!(2.3, 1.04, ("z = x + yi", 12, :red))
annotate!(2.25, 0.5, ("y=Im(z)", 12))
annotate!(1.0, -0.1, ("x=Re(z)", 12))
annotate!(1.15, 0.2, ("ϕ=arctan(y/x)", 12, :red))
annotate!(0.85, 0.6, ("|z|=ρ=r", :red, 12))
end # let
# ╔═╡ 576d32a1-4aa4-414d-84a5-99a1f5bc3208
md"
**Fig. 2.4.1.1** Complex numbers as *points* (or *vectors*) in $$\mathbb C$$ (cf. Fig. 2.20 in SICP)
---
"
# ╔═╡ 24a94004-d2f6-40f2-9596-0d2467fe8f4b
md"
$$z = x + yi = r \cdot cos \, \phi + r \cdot i\, sin \, \phi = r \cdot (cos \, \phi + i\, sin \, \phi) = r \cdot e^{i \, \phi}$$
where:
$$x = Re(z) = r \cdot cos \, \phi$$
$$yi = Im(z) = r \cdot i\, sin \, \phi$$
$$ϕ = arctan(Im(z)/Re(z)) = arctan(y/x)$$
$$ρ = r = |z| = \sqrt{x^2+y^2}$$
"
# ╔═╡ c2bfc649-b5b1-4e75-83f4-76d2aa57bc5b
md"
---
##### [Euler's formula](https://en.wikipedia.org/wiki/Euler%27s_formula) for complex analysis
The expression
$$e^{i \, \phi} = (cos \, \phi + i\, sin \, \phi)$$
is known as *Euler's formula*. Several different [proofs](https://en.wikipedia.org/wiki/Euler%27s_formula#Proofs) are known. One of the first was using the *power series expansion* of all terms in the formula.
"
# ╔═╡ eb2b46af-1eda-4b19-988d-ab8b2f7c3525
md"
##### [Euler's identity](https://en.wikipedia.org/wiki/Euler%27s_identity)
If we substitute $$\phi = \pi = \frac{2\pi}{2r} = \frac{circumference}{diameter}$$ *of circle* in Euler's formula:
$$e^{i \, \phi} = (cos \, \phi + i\, sin \, \phi)$$
the result is called *Euler's identity* :
$$e^{i \, \pi} = (cos \, \pi + i\, sin \, \pi) = -1 + 0i = -1$$
and rearranging terms
$$e^{i \, \pi} + 1 = 0.$$
This is known as '*our jewel*' and '*the most remarkable formula in mathematics*' [https://en.wikipedia.org/wiki/Mathematical_beauty](https://en.wikipedia.org/wiki/Mathematical_beauty) because it connects several fundamental concepts in *one* formula.
"
# ╔═╡ 46638e2b-704f-43df-9b61-a387762f78c9
let
title = "Representation by Euler's formula in C"
xlim = (-1.5, 3.5); ylim = (-1.5, 1.5)
ϕ = atan(1/2)
radius = 1.0
r = sqrt(2^2 + 1^2)
z = r*exp(im*ϕ)
circleArray = Plots.partialcircle(0, 2π, 240, radius)
plot([(0, 0), (real(z), imag(z))], line=:arrow, linecolor=:red, linewidth=4, title=title, xlim=xlim, ylim=ylim, legend=false)
plot!([(0, 0), (real(z)/r, imag(z)/r)], line=:arrow, linecolor=:blue, linewidth=4)
plot!([(2, 0), (2, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(0,-1.3), (0, 1.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([(0, 0), (2, 0)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(-1.3, 0),(3, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([(0, 1), (2, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(0, 0), (0, 1)], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
annotate!(2.6, 1.05, ("z = |z|⋅exp(iϕ)", 12, :red))
annotate!(1.3, 0.3, ("exp(iϕ)", 12, :blue))
annotate!(2.14, 0.5, ("y", 12))
annotate!(1.2,-0.1, ("x", 12))
annotate!(0.6, 0.15, ("ϕ", 12, :blue))
annotate!(1.2, 0.8, ("|z|", 12, :red))
end # let
# ╔═╡ 724ba211-8069-43b8-99b1-55d755ed3c68
md"
**Fig. 2.4.1.2** Complex numbers as *points* (or *vectors*) in $$\mathbb C$$ using *Euler's formula*
---
"
# ╔═╡ d0ed924a-378d-48d3-b0f9-ffd98ef98208
function eulersFormula(z::Complex)
(abs(z), angle(z), abs(z)*exp(im*angle(z)))
end # function eulersFormula
# ╔═╡ 0af14617-878d-445f-a230-fdfc04d0d5fb
md"
[Complex(2, 1)](https://www.intmath.com/complex-numbers/convert-polar-rectangular-interactive.php) ==> 2.00 + 1.00i = 2.24 ∠ 0.46 radians
"
# ╔═╡ 1aa0467e-da7c-4253-b2dd-8e41931337b6
eulersFormula(Complex(2, 1))
# ╔═╡ afd5a931-b8ad-46f8-b0f2-894d59d53959
let
title = "Representation of Euler's identity in C"
xlim = (-2.5, 3.5); ylim = (-1.5, 1.5)
ϕ = π
radius = 1.0
r = 1
z = r*exp(im*π)
circleArray = Plots.partialcircle(0, 2π, 240, radius)
plot([(0, 0), (real(z), imag(z))], line=:arrow, linecolor=:red, linewidth=4, title=title, xlim=xlim, ylim=ylim, legend=false, aspect_ratio=:equal)
plot!([(0,-1.3), (0, 1.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([(-1.3, 0),(3, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
annotate!(-1.0, 0.15, ("z = exp(iπ)", 12, :red))
annotate!(-1.0,-0.15, ("= -1+0i", 12, :red))
end # let
# ╔═╡ e791db57-a399-47fe-ac45-f4a61c493473
md"
**Fig. 2.4.1.3** Complex number as *point* (or *vector*) in $$\mathbb C$$ using *Euler's identity*
"
# ╔═╡ 262fb6be-d103-4407-b30b-ff5293ce2bea
md"
---
#### 2.4.1.2 Scheme-like Julia
"
# ╔═╡ 6d2eea9e-fd56-43c6-95a7-3d565dd0836a
md"
$$\begin{array}{|c|c|}
\hline \\
layer & \text{Operations or Functions} \\
& \\
\hline \\
top & \text{representation independent} \\
& \text{------------------------------------} \\
(domain) & addComplex \\
& subComplex \\
& mulComplex \\
& divComplex \\
\hline \\
middle & \text{representation dependent} \\
(interface) & \text{------------------------------------} \\
& \begin{array}{cc} \\
& realPartOfZRect & realPartOfZPolar \\
& imagPartOfZRect & imagPartOfZPolar \\
& magnitudeOfZRect & magnitudeOfZPolar \\
& angleFromOfZRect & angleOfZPolar \\
& makeZRectFromRealImag & makeZPolarFromRealImag \\
& makeZRectFromMagAng & makeZPolarFromMagAng \\
& \end{array} \\
\hline \\
ground & cons \\
(Scheme-like) & car \\
& cdr \\
& \\
\hline
\end{array}$$
"
# ╔═╡ 1e2aa2f3-81a8-4252-be4f-aa575918a67b
md"
**Fig. 2.4.1.4** *Abstraction barriers* in the complex number system (cf. to SICP, Fig. 2.19)
---
"
# ╔═╡ 4dc1459c-070f-4970-9e67-c9facdc15cef
md"
---
##### *Methods* of Scheme-like *constructor* $$cons$$
"
# ╔═╡ 82578c79-a6f3-4374-8ee2-aa8a585f4b4a
struct Cons
car
cdr
end
# ╔═╡ 8a06336c-044c-4091-b7ae-f4ea60b97afa
cons(car::Any, cdr::Any)::Cons = Cons(car, cdr)::Cons
# ╔═╡ ed5d2b26-d30a-4d13-8eef-6e1175699f57
function cons(car::Any, list2::Vector)::Vector
conslist = list2
pushfirst!(conslist, car)
conslist
end
# ╔═╡ f1181c0f-0127-4761-a471-757f71dddb97
function cons(list1::Vector, list2::Vector)::Vector
conslist = push!([], list1)
for xi in list2
push!(conslist, xi)
end
conslist
end
# ╔═╡ 2e5ccb79-6d54-4b84-9a78-633ed533c1dc
md"
##### *Methods* of Scheme-like *selectors* $$car, cdr$$
"
# ╔═╡ 43b5159b-40b1-41fb-8547-a889b8e9e729
car(cell::Cons) = cell.car
# ╔═╡ 5a5a7926-7733-40cd-8ab9-583a15e534ba
car(x::Vector) = x[1]
# ╔═╡ 04532459-8d67-4ea2-9b32-f010e3100932
cdr(cell::Cons)::Any = cell.cdr
# ╔═╡ 7cde6bad-2ff7-4fec-bed6-b5d00adfb0ba
cdr(x::Vector) = x[2:end]
# ╔═╡ c02043ce-730e-42e1-ae7d-96963bdb4a75
md"
---
##### *Rectangular*-dependent functions
(Ben's representation)
"
# ╔═╡ ad27ac18-e0f8-4b63-942d-e5a24efbd168
md"
###### Selectors
$$realPartOfZRect, imagPartOfZRect$$
$$magnitudeOfZRect, angleOfZRect$$
###### Constructors
$$makeZRectFromRealImag, makeZRectFromMagAng$$
---
"
# ╔═╡ ace9faf1-33cf-4086-b6aa-9b1fad9ddd82
realPartOfZRect(z) = car(z)
# ╔═╡ 0bb28e73-6374-4b59-8070-d6964a53c20c
imagPartOfZRect(z) = cdr(z)
# ╔═╡ 6f3732d7-f9e6-4c6b-8a18-47e128337531
magnitudeOfZRect(z) = sqrt(realPartOfZRect(z)^2 + imagPartOfZRect(z)^2)
# ╔═╡ 4775c4b5-c6e0-45da-8a1c-33070e5348ed
angleOfZRect(z) = atan(imagPartOfZRect(z)/realPartOfZRect(z))
# ╔═╡ 9c4e42b6-a630-4263-95b0-40c072763410
makeZRectFromRealImag(x, y) = cons(x, y)
# ╔═╡ fe8c3cae-b495-4670-983f-fcef9d72e98f
makeZRectFromMagAng(r, a) = cons(r * cos(a), r * sin(a))
# ╔═╡ 420220d7-586f-4f26-b107-e68677d10b5b
md"
---
##### *Polar*-dependent functions
(Alyssa's representation)
###### Selectors
$$realPartOfZPolar, imagPartOfZPolar$$
$$magnitudeOfZPolar, anglePartOfZPolar$$
###### Constructors
$$makeZPolarFromRealImag, makeZPolarFromMagAng$$
---
"
# ╔═╡ e48844ca-fa46-4c8f-9bb8-f2d33ad7fdad
magnitudeOfZPolar(z) = car(z)
# ╔═╡ 42b1742d-da96-4ea7-b5a8-288ea45d035c
angleOfZPolar(z) = cdr(z)
# ╔═╡ fd0dcca8-dd8a-416d-91d2-469f81dba264
realPartOfZPolar(z) = magnitudeOfZPolar(z) * cos(angleOfZPolar(z))
# ╔═╡ 55535d43-7c35-4ac1-9bf8-22881647651d
imagPartOfZPolar(z) = magnitudeOfZPolar(z) * sin(angleOfZPolar(z))
# ╔═╡ 60dead94-fe17-412a-8574-e7ba010090ca
makeZPolarFromRealImag(x, y) = cons(sqrt(x^2+y^2), atan(y/x))
# ╔═╡ 93dc4413-e5f8-4df8-9798-f1189962e4e7
makeZPolarFromMagAng(r, a) = cons(r, a)
# ╔═╡ 74fd815e-34fa-4f89-aa06-d19ed3ca382f
md"
---
##### Domain (representation *in*dependent) operations
$$addComplex, subComplex, mulComplex divComplex$$
"
# ╔═╡ 64035b6c-2596-4977-bafb-96b2a0a0d90b
md"
---
###### Complex addition
"
# ╔═╡ ff97e2e0-d581-470d-bdfb-92c4822e7970
md"
**Fig. 1.4.1.5** Complex *addition* as vector addition in $$\mathbb C$$
---
"
# ╔═╡ 27d313ff-84f8-44bb-ae90-9e71fed9d106
md"
###### [Addition](https://en.wikipedia.org/wiki/Complex_number#Addition_and_subtraction) in $$\mathbb C$$
$$addComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$addComplex: (z_1, z_2)=((x_1+y_1i), (x_2+y_2i) \mapsto ((x_1+x_2),(y_1+y_2)i)$$
"
# ╔═╡ 43a53b2a-0a0d-41a5-8e7c-b3106d999272
function addComplex(z1, z2)
makeZRectFromRealImag(
realPartOfZRect(z1) + realPartOfZRect(z2),
imagPartOfZRect(z1) + imagPartOfZRect(z2))
end # function addComplex
# ╔═╡ 37766cb9-6453-47a5-b127-a87fb100f868
let
z1 = makeZRectFromRealImag(2, 1)
r1 = magnitudeOfZRect(z1)
z2 = makeZRectFromRealImag(realPartOfZRect(z1)/r1, -2*imagPartOfZRect(z1)/r1)
z3 = addComplex(z1, z2)
end # let
# ╔═╡ f4ee47dc-6059-4980-86a5-15b122b56751
md"
---
###### Complex subtraction
"
# ╔═╡ 4db3fda8-63e9-48ab-ba9d-431f2ac7e061
md"
**Fig. 1.4.1.6** Complex *subtraction* as vector subtraction in $$\mathbb C$$
---
"
# ╔═╡ c635a131-54c0-4530-9735-07fc558240fb
md"
###### [Subtraction](https://en.wikipedia.org/wiki/Complex_number#Addition_and_subtraction) in $$\mathbb C$$
$$subComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$subComplex: (z_1, z_2)=((x_1+y_1i), (x_2+y_2i) \mapsto ((x_1-x_2),(y_1-y_2)i)$$
"
# ╔═╡ 6c151933-886d-4774-a380-1ba185a1070d
function subComplex(z1, z2)
makeZRectFromRealImag(
realPartOfZRect(z1) - realPartOfZRect(z2),
imagPartOfZRect(z1) - imagPartOfZRect(z2))
end # function subComplex
# ╔═╡ e3cb6006-4bf0-497c-8420-55637737a981
let
z1 = makeZRectFromRealImag(2, 1)
r1 = magnitudeOfZRect(z1)
z2 = makeZRectFromRealImag(realPartOfZRect(z1)/r1, -2*imagPartOfZRect(z1)/r1)
z3 = subComplex(z1, z2)
end # let
# ╔═╡ ceed4c01-d4ca-47a7-add3-b14c775d95d8
md"
---
###### Complex multiplication
"
# ╔═╡ 46f29c21-f7c6-416f-8915-a957abf74186
let
xlim = (-1.5, 8.5); ylim = (-1.5, 3.0)
z1 = 2 - 1im
ϕ1 = atan(imag(z1)/real(z1))
r1 = abs(z1)
z2 = 2 + 2im
r2 = abs(z2)
ϕ2 = atan(imag(z2)/real(z2))
z3 = z1 * z2
r3 = r1 * r2
ϕ3 = ϕ1 + ϕ2
circleArray = Plots.partialcircle(0, 2π, 240, 1)
circleArray1 = Plots.partialcircle(0, ϕ1, 30, r1)
circleArray2 = Plots.partialcircle(0, ϕ2, 30, r2)
circleArray3 = Plots.partialcircle(0, ϕ3, 30, r3)
plot([(0, 0), (real(z1), imag(z1))], line=:arrow, linecolor=:green, linewidth=4, xlim=xlim, ylim=ylim, legend=false, aspect_ratio=:equal)
plot!([(0, 0), (real(z2), imag(z2))], line=:arrow, linecolor=:blue, linewidth=4)
plot!([(0, 0), (real(z3), imag(z3))], line=:arrow, linecolor=:red, linewidth=4)
plot!([(0,-1.3), (0, 2.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([(-1.3, 0),(6.5, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
plot!(circleArray1, linestyle=:dot, linecolor=:green, linewidth=1)
plot!(circleArray2, linestyle=:dot, linecolor=:blue, linewidth=1)
plot!(circleArray3, linestyle=:dot, linecolor=:red, linewidth=1)
annotate!(2.3, -1.0, ("z1", 12, :green))
annotate!(1.0, -0.8, ("|z1|", 12, :green))
annotate!(2.3, 2.1, ("z2", 12, :blue))
annotate!(1.0, 1.5, ("|z2|", 12, :blue))
annotate!(7.0, 2.1, ("z3=z1*z2", 12, :red))
annotate!(4.0, 2.15,("|z1|*|z2|", 12, :red))
annotate!(4.0, 1.7, ("=|z3|", 12, :red))
annotate!(1.9, -0.4, ("ϕ1", 12, :green) )
annotate!(2.2, 1.2, ("ϕ2", 12, :blue))
annotate!(5.2, 0.8, ("ϕ1+ϕ2=ϕ3", 12, :red))
end # let
# ╔═╡ 36cf2a48-6f57-4a78-a55d-cab8199eba97
md"
**Fig. 1.4.1.5** Complex *multiplication* as vector operation in $$\mathbb C$$
---
"
# ╔═╡ a064adda-624f-4dd6-9521-1dcfb2840189
md"
###### [Multiplication](https://en.wikipedia.org/wiki/Complex_number#Addition_and_subtraction) in $$\mathbb C$$
###### in *rectangular* coordinates
$$mulComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$mulComplex: (z_1, z_2) := ((x_1+y_1i), (x_2+y_2i) \mapsto (x_1x_2 + x_1y_2i + y_1ix_2 + y_1i\cdot y_2i)$$
$$=(x_1x_2 + x_1y_2i + y_1ix_2 - y_1y_2)=(x_1x_2 - y_1y_2)+(x_1y_2 + y_1x_2)i$$
###### and in *polar* coordinates
$$mulComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$mulComplex: (z_1, z_2) := ((\rho(z_1), \phi(z_1)), (\rho(z_2), \phi(z_2))) \mapsto (\rho(z_1) \cdot \rho(z_2), \phi(z_1) + \phi(z_2))$$
"
# ╔═╡ f179ef07-e391-4894-a5f2-6cef7659e592
function mulComplex(z1, z2)
makeZRectFromMagAng(
magnitudeOfZRect(z1) * magnitudeOfZRect(z2),
angleOfZRect(z1) + angleOfZRect(z2))
end # function mulComplex
# ╔═╡ 25151974-8b0b-4e33-ac6c-927e695789d0
let
z1 = makeZRectFromRealImag(2, -1)
z2 = makeZRectFromRealImag(2, 2)
z3 = mulComplex(z1, z2)
end # let
# ╔═╡ 1fb809a4-7218-41c3-a54d-b524ab8192f9
md"
---
###### Complex division
"
# ╔═╡ 72e9c6eb-6404-4fc8-bafa-996d335734fe
let
xlim = (-2.5, 4.5); ylim = (-2.5, 3.0)
z1 = 3 - 1im
ϕ1 = atan(imag(z1)/real(z1))
r1 = abs(z1)
z2 = 1.0 + 2im
r2 = abs(z2)
ϕ2 = atan(imag(z2)/real(z2))
z3 = z1 / z2
r3 = r1 / r2
ϕ3 = ϕ1 - ϕ2
circleArray = Plots.partialcircle(0, 2π, 240, 1)
circleArray1 = Plots.partialcircle(0, ϕ1, 30, r1)
circleArray2 = Plots.partialcircle(0, ϕ2, 30, r2)
circleArray3 = Plots.partialcircle(0, ϕ3, 30, r3)
plot([(0, 0), (real(z1), imag(z1))], line=:arrow, linecolor=:green, linewidth=4, xlim=xlim, ylim=ylim, legend=false, aspect_ratio=:equal)
plot!([(0, 0), (real(z2), imag(z2))], line=:arrow, linecolor=:blue, linewidth=4)
plot!([(0, 0), (real(z3), imag(z3))], line=:arrow, linecolor=:red, linewidth=4)
plot!([(0,-1.3), (0, 2.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([(-2.0, 0),(6.5, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
plot!(circleArray1, linestyle=:dot, linecolor=:green, linewidth=1)
plot!(circleArray2, linestyle=:dot, linecolor=:blue, linewidth=1)
plot!(circleArray3, linestyle=:dot, linecolor=:red, linewidth=1)
annotate!(3.2, -1.0, ("z1", 12, :green))
annotate!(1.9, -0.4, ("|z1|", 12, :green))
annotate!(1.0, 2.2, ("z2", 12, :blue))
annotate!(0.4, 1.5, ("|z2|", 12, :blue))
annotate!(-.4, -1.6, ("z1/z2=z3", 12, :red))
annotate!(-1.0, -.7, ("|z1|/|z2|=|z3|", 12, :red))
annotate!(2.9, -0.4, ("ϕ1", 12, :green))
annotate!(1.7, 1.0, ("ϕ2", 12, :blue))
annotate!(1.6, -1.1, ("ϕ3=ϕ1-ϕ2", 12, :red))
end # let
# ╔═╡ f799d74f-5629-4171-86f1-d1ef772a617b
md"
###### [Division](https://en.wikipedia.org/wiki/Complex_number#Addition_and_subtraction) in $$\mathbb C$$
###### in *rectangular* coordinates
$$divComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$divComplex: (z_1, z_2) := \frac{z_1}{z_2} = \frac{z_1}{z_2}\times\frac{\overline{z_2}}{\overline{z_2}}=\frac{z_1\overline{z_2}}{z_2\overline{z_2}}=\frac{Re(z_1\overline{z_2})}{|z_2|^2}+\frac{Im(z_1\overline{z_2})}{|z_2|^2}i$$
or more explicit:
$$\frac{x_1 + y_1i}{x_2 + y_2i} = \frac{x_1 + y_1i}{x_2 + y_2i} \times \frac{x_2 - y_2i}{x_2 - y_2i}=\frac{(x_1 + y_1i)(x_2 - y_2i)}{(x_2 + y_2i)(x_2 - y_2i)}$$
$$=\frac{(x_1 x_2 + y_1 y_2) + (x_2 y_1 - x_1 y_2)i}{x_2^2 + y_2^2}=\frac{x_1 x_2 + y_1 y_2}{x_2^2 + y_2^2} + \frac{x_2 y_1 - x_1 y_2}{x_2^2 + y_2^2}i.$$
###### and in *polar* coordinates
$$mulComplex: \mathbb C \times \mathbb C \rightarrow \mathbb C$$
$$mulComplex: (z_1, z_2) := ((\rho(z_1), \phi(z_1)), (\rho(z_2), \phi(z_2))) \mapsto (\rho(z_1) / \rho(z_2), \phi(z_1) - \phi(z_2))$$
"
# ╔═╡ 0c54eddf-4cd1-4428-9d01-77742cc46796
function divComplex(z1, z2)
makeZRectFromMagAng(
magnitudeOfZRect(z1) / magnitudeOfZRect(z2),
angleOfZRect(z1) - angleOfZRect(z2))
end # function divComplex
# ╔═╡ e86b123d-5658-4caa-9826-f400beda75ef
let
z1 = makeZRectFromRealImag(3, -1)
z2 = makeZRectFromRealImag(1, 2)
z3 = divComplex(z1, z2)
end # let
# ╔═╡ a4a8db4c-f63f-49f5-8ded-753d55a9d8ad
md"
---
###### Inverse of complex number
$$z^{-1} = \frac{1}{z} = \frac{1}{z}\times\frac{\overline{z}}{\overline{z}} = \frac{\overline{z}}{z\overline{z}} = \frac{Re(\overline{z})}{|z|^2} + \frac{Im(\overline{z})}{|z|^2}$$
or more explicit:
$$\frac{1}{x+yi}=\frac{1}{x+yi} \times \frac{x-yi}{x-yi}=\frac{x-yi}{x^2+y^2}$$
$$=\frac{x}{x^2+y^2}-\frac{y}{x^2+y^2}i.$$
"
# ╔═╡ 47de4dbc-7f48-42cd-a4ed-0ef524262fd8
let
z1 = makeZRectFromRealImag(1, 0) # 1 + 0i = 1
z2 = makeZRectFromRealImag(1, 2) # 1 + 2i
z3 = divComplex(z1, z2) # 1/(1 + 2i) = 1/5 + 2/5i = 0.2 + 0.4i
end # let
# ╔═╡ 78c508b3-40e1-45fd-80b3-70174ea7b5b3
md"
---
#### 2.3.1.3 idiographic Julia
"
# ╔═╡ 8d659f59-ba30-4960-a755-866b08f270a0
md"
##### Example
"
# ╔═╡ 795ca456-6ca6-4d11-b2fc-8a9014a653ad
md"
###### Definition of $$z$$
"
# ╔═╡ ed0dd90d-253b-45ab-a6c1-3bc25c5aeac9
md"
$$z = x + yi = 2 + 1i$$
"
# ╔═╡ 2c6136a7-aaea-4f34-8cf0-e6c59051c669
z = 2 + 1im
# ╔═╡ b818345b-d79b-41a4-8b6c-1e88248a2089
let
xlim = (-1.5, 4.5); ylim = (-1.5, 1.5)
ϕ = atan(1/2)
radius = 1.0
r = sqrt(2^2 + 1^2)
z1 = r*exp(im*ϕ)
z2 = real(z)/r + -2*imag(z)/r*im
z3 = z1 + z2
circleArray = Plots.partialcircle(0, 2π, 240, radius)
plot([(0, 0), (real(z1), imag(z1))], line=:arrow, linecolor=:green, linewidth=4, xlim=xlim, ylim=ylim, legend=false, aspect_ratio=:equal)
plot!([(0, 0), (real(z2), imag(z2))], line=:arrow, linecolor=:blue, linewidth=4)
plot!([(0, 0), (real(z3), imag(z3))], line=:arrow, linecolor=:red, linewidth=4)
plot!([(0,-1.3), (0, 1.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([z1, z3], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(-1.3, 0),(3, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([z2, z3], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
annotate!(2.2, 1.05, ("z1", 12, :green))
annotate!(1.0,-1.0, ("z2", 12, :blue))
annotate!(3.5, 0.12, ("z3=z1+z2", 12, :red))
end # let
# ╔═╡ d1666436-a476-4ef1-a0e9-b9ad44300a09
let
xlim = (-1.5, 4.5); ylim = (-1.5, 2.5)
ϕ = atan(1/2)
radius = 1.0
r = sqrt(2^2 + 1^2)
z1 = r*exp(im*ϕ)
z2 = real(z)/r + -2*imag(z)/r*im
z3 = z1 - z2
circleArray = Plots.partialcircle(0, 2π, 240, radius)
plot([(0, 0), (real(z1), imag(z1))], line=:arrow, linecolor=:green, linewidth=4, xlim=xlim, ylim=ylim, legend=false, aspect_ratio=:equal)
plot!([(0, 0), (real(z2), imag(z2))], line=:arrow, linecolor=:blue, linewidth=4)
plot!([(0, 0), (-real(z2), -imag(z2))], line=:arrow, linecolor=:lightblue, linewidth=4)
plot!([(0, 0), (real(z3), imag(z3))], line=:arrow, linecolor=:red, linewidth=4)
plot!([(0,-1.3), (0, 1.5)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([z1, z3], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!([(-1.3, 0),(3, 0)], linestyle=:dash, linecolor=:black, linewidth=1)
plot!([-z2, z3], linestyle=:dash, linecolor=:blue, linewidth=1)
plot!(circleArray, linestyle=:dot, linecolor=:blue, linewidth=1)
annotate!( 2.2, 1.05, ("z1", 12, :green))
annotate!( 1.0, -1.0, ("z2", 12, :blue))
annotate!(-1.0, 1.1, ("-z2", 12, :blue))
annotate!( 2.2, 2.0, ("z3=z1-z2=z1+(-z2)", 12, :red))
end # let
# ╔═╡ 69628aaf-2678-45ea-a142-64dd22b8b378
md"
$$x = Re(z) = 2$$
"
# ╔═╡ 6c6004db-cbca-4a03-800d-15593556baff
x = real(z)
# ╔═╡ 97ada40a-2491-4351-a061-88f6393d6ebe
md"
$$y = Im(z) = 1$$
"
# ╔═╡ 74e65c0f-470d-4a7f-ac67-174f6489b8fb
y = imag(z)
# ╔═╡ 28d542a3-6a16-4c65-a0a1-02e5d8b48439
md"
$$|z| = r = \rho = \sqrt{Re(z)^2+Im(z)^2} = \sqrt{2^2+1^2}=\sqrt{5}$$
"
# ╔═╡ 35ccdb87-274f-40e3-a40e-28e441d85655
r = abs(z)
# ╔═╡ 84f33549-7f10-451b-843f-a877a4d6c6b7
md"
$$\overline{z} = Re(z) - Im(z)$$
"
# ╔═╡ eafa2a8d-b1f4-4775-97d4-9d8f028a5324
zConj = conj(z)
# ╔═╡ 79e50aad-169b-4f7f-99d9-22d612616c06
md"
*Magnitude* or *norm* of complex vector $$z$$ is :
$$r = \rho = |z| = <z, z>^{1/2}$$
$$<z, z> = z^T \overline{z} = (Re(z) + Im(z)) \cdot (Re(z) - Im(z)) = x^2 + y^2$$
"
# ╔═╡ 3e9f674f-eb16-4f07-9a0f-65fbd4c93e54
zzConj = z * zConj
# ╔═╡ 90455237-27dc-4a4e-bbd5-c6d9931c60be
sqrt(real(z * zConj))
# ╔═╡ c03a9225-e65e-4a5f-aa44-50220d4376fa
abs(z) == sqrt(2^2 + 1^2) == sqrt(5) == sqrt(real(z * zConj))
# ╔═╡ d1b38ce9-a820-4344-9aa5-41b627f8eeb3
md"
$$\angle{z} = \phi = arctan(Im(z)/Re(z)) = arctan(1/2)$$
"
# ╔═╡ 21df5a65-3128-42b5-9f00-09dd686ced91
ϕ = angle(z)
# ╔═╡ 1fd749ff-a089-4e07-8598-80e95b964842
angle(z) == atan(imag(z)/real(z)) == atan(1/2)
# ╔═╡ e6a8e690-ea92-4657-a69e-a8d58b63b661
md"
###### Euler's formula
$$r \cdot e^{i\cdot \phi}$$
"
# ╔═╡ a5e1439e-571d-4705-895d-8ca72cd0c82c
r*exp(im*ϕ) # (red) point on circle with radius r <> 1
# ╔═╡ 34250530-f803-44db-8f84-9828acf99d77
md"
$$e^{i\cdot \phi}$$
"
# ╔═╡ c7500900-5f03-4187-b496-d680d943454d
exp(im*ϕ) # (blue) point on circle with radius r == 1
# ╔═╡ b28ec3ec-3a21-4ac5-a934-1573f00f5ebf
md"
$$e^{i\cdot \phi} == e^{\phi \cdot i}$$
"
# ╔═╡ ae49dcc4-4648-41a4-9bed-ef200bb66588
exp(im*ϕ) == exp(ϕ*im) # '*' should be placed between variable name and 'im'
# ╔═╡ 0fb878b7-1e8d-4190-a0d7-96f9bceeb606
md"
###### Euler's identity
"
# ╔═╡ 8cc23ffa-6134-4e73-88da-5fefb6ff69b8
π
# ╔═╡ 5b432ada-6370-4ff0-ad6c-2879cbb351f6
π*im
# ╔═╡ e1cf1510-9c18-43fe-ba9e-e90e2cfc6c08
exp(π*im)
# ╔═╡ 35ab6cc8-651a-4f40-89a0-deef8670cb15
abs(exp(π*im) - (-1 + 0im)) < 10.0E-10
# ╔═╡ 75c52cf4-9308-42a4-a26d-2c878fbc42d3
abs(exp(π*im) + 1 - 0im) < 10.0E-10
# ╔═╡ a5464136-3ac2-4225-b838-ec070e24b7b1
md"
###### Addition in $$\mathbb C$$
"
# ╔═╡ 21e54832-cc62-4662-94f6-7ed5399ef609
let
z1 = Complex(2, 1)
r1 = abs(z1)
z2 = Complex(real(z1)/r1, -2*imag(z1)/r1)
z3 = z1 + z2
end # let
# ╔═╡ 611e4d99-9efd-41b2-8b9c-39c76c4e7255
md"
###### Subtraction in $$\mathbb C$$
"
# ╔═╡ 8ef6ff4c-d780-4909-93f3-9fb88f89aefb
let
z1 = Complex(2, 1)
r1 = abs(z1)
z2 = Complex(real(z1)/r1, -2*imag(z1)/r1)
z3 = z1 - z2
end # let
# ╔═╡ 13fba1b1-ff87-41fe-bf30-b11ae89c072c
md"
###### Multiplication in $$\mathbb C$$
"
# ╔═╡ 21b3eb3f-023d-465e-937c-712272b5ec56
let
z1 = Complex(2, -1)
z2 = Complex(2, 2)
z3 = z1 * z2
end # let
# ╔═╡ 85a7d6ba-609c-4c72-83cf-652a74f358b2
md"
---
###### *Division* in $$\mathbb C$$
[Result](https://www.intmath.com/complex-numbers/convert-polar-rectangular-interactive.php) is a complex number in *rectangular* coordinates
The formula can be found [here](https://www.cuemath.com/numbers/division-of-complex-numbers/).
$$\frac{x_1 + y_1i}{x_2 + y_2i} = \frac{x_1 + y_1i}{x_2 + y_2i} \times \frac{x_2 - y_2i}{x_2 - y_2i}=\frac{(x_1 + y_1i)(x_2 - y_2i)}{(x_2 + y_2i)(x_2 - y_2i)}$$
$$=\frac{(x_1 x_2 + y_1 y_2) + (x_2 y_1 - x_1 y_2)i}{x_2^2 + y_2^2}.$$
Example:
$$\frac{3-1i}{1+2i}=\frac{3-1i}{1+2i}\times\frac{1-2i}{1-2i}=\frac{(3-1i)(1-2i)}{(1+2i)(1-2i)}$$
$$= \frac{(3\cdot1-1\cdot2)+(1\cdot-1-3\cdot2)i}{1^2+2^2}$$
$$=\frac{1-7i}{5}=\frac{1}{5}-\frac{7}{5}i=0.2-1.4i.$$
"
# ╔═╡ 6c3a4af2-841c-4318-a4ff-9d3118bb26fd
let
z1 = Complex(3, -1)
z2 = Complex(1, 2)
z3 = z1 / z2
end # let
# ╔═╡ cd2c4c81-34fc-4402-a31f-500b944b6ee6
md"
---
###### Inverse of complex number
$$z^{-1} = \frac{1}{z} = \frac{1\overline{z}}{z\overline{z}} = \frac{\overline{z}}{|z|^2}.$$
or more explicit:
$$(x+yi)^{-1} = \frac{1}{x+yi}=\frac{1}{x+yi} \times \frac{x-yi}{x-yi}=\frac{x-yi}{x^2+y^2} = \frac{x}{x^2+y^2}-\frac{yi}{x^2+y^2}.$$
Example:
$$(1+2i)^{-1}=\frac{1}{1+2i}=\frac{1+0i}{1+2i}\times\frac{1-2i}{1-2i}=\frac{1-2i}{1^2+2^2}=\frac{1-2i}{5}$$
$$=\frac{1}{5}-\frac{2}{5}i = 0.2-0.4i.$$
"
# ╔═╡ a7d52bed-d5b0-4f74-b1df-3b7acb00f8e0
let
z1 = Complex(1, 0)
z2 = Complex(1, 2)
z3 = z1 / z2
end # let
# ╔═╡ c898ef69-ff89-4846-88ed-c39245c62256
md"
---
"
# ╔═╡ b0270d5f-d6b0-4a05-80f7-0b8d86ecdf84
md"
---
##### References
- **Abelson, H., Sussman, G.J. & Sussman, J.**; Structure and Interpretation of Computer Programs, Cambridge, Mass.: MIT Press, (2/e), 1996, https://sarabander.github.io/sicp/, last visit 2022/09/23
- **Feynman, R.P.**; The Feynman Lectures on Physics. Vol. I. Addison-Wesley, 1977.
- **Wikipedia**, Euler's formula, https://en.wikipedia.org/wiki/Euler%27s_formula, last visit 2022/10/09
- **Wikipedia**, Euler's identity, https://en.wikipedia.org/wiki/Euler%27s_identity, last visit 2022/10/06
"
# ╔═╡ b9e5ea98-ce2d-4594-965e-e8003a5d86ef
md"
---
##### end of ch 2.3.4
"
# ╔═╡ 0f6da3d6-bcc7-49d8-a347-c7c68b2526e9
md"
---
This is a **draft** under the Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) license. Comments, suggestions for improvement and bug reports are welcome: **claus.moebus(@)uol.de**
---
"
# ╔═╡ 00000000-0000-0000-0000-000000000001
PLUTO_PROJECT_TOML_CONTENTS = """
[deps]
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
[compat]
Plots = "~1.35.3"
"""
# ╔═╡ 00000000-0000-0000-0000-000000000002
PLUTO_MANIFEST_TOML_CONTENTS = """
# This file is machine-generated - editing it directly is not advised
julia_version = "1.8.2"
manifest_format = "2.0"
project_hash = "0534ab805c6602c4a71fb94d38bee348c94d5259"
[[deps.ArgTools]]
uuid = "0dad84c5-d112-42e6-8d28-ef12dabb789f"
version = "1.1.1"
[[deps.Artifacts]]
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
[[deps.Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
[[deps.BitFlags]]
git-tree-sha1 = "84259bb6172806304b9101094a7cc4bc6f56dbc6"
uuid = "d1d4a3ce-64b1-5f1a-9ba4-7e7e69966f35"
version = "0.1.5"
[[deps.Bzip2_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "19a35467a82e236ff51bc17a3a44b69ef35185a2"
uuid = "6e34b625-4abd-537c-b88f-471c36dfa7a0"
version = "1.0.8+0"
[[deps.Cairo_jll]]
deps = ["Artifacts", "Bzip2_jll", "Fontconfig_jll", "FreeType2_jll", "Glib_jll", "JLLWrappers", "LZO_jll", "Libdl", "Pixman_jll", "Pkg", "Xorg_libXext_jll", "Xorg_libXrender_jll", "Zlib_jll", "libpng_jll"]
git-tree-sha1 = "4b859a208b2397a7a623a03449e4636bdb17bcf2"
uuid = "83423d85-b0ee-5818-9007-b63ccbeb887a"
version = "1.16.1+1"
[[deps.ChainRulesCore]]
deps = ["Compat", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "e7ff6cadf743c098e08fca25c91103ee4303c9bb"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "1.15.6"
[[deps.ChangesOfVariables]]
deps = ["ChainRulesCore", "LinearAlgebra", "Test"]
git-tree-sha1 = "38f7a08f19d8810338d4f5085211c7dfa5d5bdd8"
uuid = "9e997f8a-9a97-42d5-a9f1-ce6bfc15e2c0"
version = "0.1.4"
[[deps.CodecZlib]]
deps = ["TranscodingStreams", "Zlib_jll"]
git-tree-sha1 = "ded953804d019afa9a3f98981d99b33e3db7b6da"
uuid = "944b1d66-785c-5afd-91f1-9de20f533193"
version = "0.7.0"
[[deps.ColorSchemes]]
deps = ["ColorTypes", "ColorVectorSpace", "Colors", "FixedPointNumbers", "Random"]
git-tree-sha1 = "1fd869cc3875b57347f7027521f561cf46d1fcd8"
uuid = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
version = "3.19.0"
[[deps.ColorTypes]]
deps = ["FixedPointNumbers", "Random"]
git-tree-sha1 = "eb7f0f8307f71fac7c606984ea5fb2817275d6e4"
uuid = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
version = "0.11.4"
[[deps.ColorVectorSpace]]
deps = ["ColorTypes", "FixedPointNumbers", "LinearAlgebra", "SpecialFunctions", "Statistics", "TensorCore"]
git-tree-sha1 = "d08c20eef1f2cbc6e60fd3612ac4340b89fea322"
uuid = "c3611d14-8923-5661-9e6a-0046d554d3a4"
version = "0.9.9"
[[deps.Colors]]
deps = ["ColorTypes", "FixedPointNumbers", "Reexport"]
git-tree-sha1 = "417b0ed7b8b838aa6ca0a87aadf1bb9eb111ce40"
uuid = "5ae59095-9a9b-59fe-a467-6f913c188581"
version = "0.12.8"
[[deps.Compat]]
deps = ["Dates", "LinearAlgebra", "UUIDs"]
git-tree-sha1 = "3ca828fe1b75fa84b021a7860bd039eaea84d2f2"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "4.3.0"
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "0.5.2+0"
[[deps.Contour]]
git-tree-sha1 = "d05d9e7b7aedff4e5b51a029dced05cfb6125781"
uuid = "d38c429a-6771-53c6-b99e-75d170b6e991"
version = "0.6.2"
[[deps.DataAPI]]
git-tree-sha1 = "46d2680e618f8abd007bce0c3026cb0c4a8f2032"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
version = "1.12.0"
[[deps.DataStructures]]
deps = ["Compat", "InteractiveUtils", "OrderedCollections"]
git-tree-sha1 = "d1fff3a548102f48987a52a2e0d114fa97d730f0"
uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
version = "0.18.13"