Clear[NgonCos, NgonSin]; NgonCos[t_, nn_] := (1 - (t - Floor[t])) Cos[(2/nn) \[Pi] Floor[t]] + (t - Floor[t]) Cos[(2/nn) \[Pi] (1 + Floor[t])]; NgonSin[t_, nn_] := (1 - (t - Floor[t])) Sin[(2/nn) \[Pi] Floor[t]] + (t - Floor[t]) Sin[(2/nn) \[Pi] (1 + Floor[t])];
To appreciate the Beauty of Trigonometry, it is essential to understand the key feature of the trigonometric functions Cos[t] and Sin[t]:
The trigonometric functions Cos[t] and Sin[t] provide a parametrization of the unit circle. But that is just the beginning—most importantly, a deep understanding of the sphere and torus is impossible without Cos[t] and Sin[t].
The animation below is my attempt to illustrate how the parametrization of the unit circle works.
Place the cursor over the image to start the animation.
Today in class, a student ask about the difference between the commands Graphics[ ] on one side and Plot[ ]; ParametricPlot[ ] on the other side. The answer that I gave in class is in the notebook 20250214_More_plots.nb in our shared Dropbox directory Dropbox\307_Files\2025.
While answering this question, I started playing with the graph of the sine function. I moved it around, placed it climbing along the \(y\)-axis, coloring each point differently. After the class, I continued playing with this idea and I made two animations that are shown below.
The code for the animations is in the same file. The code is not documented, so it might be cryptic. I might documented, time permitting. You can try asking LLM models whether they understand my code.
Place the cursor over the image to start the animation.
Place the cursor over the image to start the animation.
Place the cursor over the image to start the animation.
On Tuesday, we emphasised the important role played by brackets in Mathematica. Pay attention to the parenthesis ( ), the square brackets [ ], the curly brackets, or braces: { }, the double square brackets [[ ]], and finally, the stared parenthasis (* *). To illustrate the double square brackets [[ ]], I talked about the Hall of Fame of Numbers. The Hall of Fame of Numbers is the set consisting from the five numbers: the number one, \(1\), the number zero, \(0\), the number pi, \(\pi\), the number \(e\), and the imaginary unit \(i\). In Mathematica notation, I write this set as a list and name it HFM:
HFN = {1, 0, Pi, E, I}
With this notation, I illustrate the use of the double square brackets. To extract the third entry in the preceding list I write:
HFN[[3]]
Next, I will write Mathematica code for a famous mathematical equation and invite you to recognize it:
HFN[[4]]^(HFN[[5]]*HFN[[3]]) + HFN[[1]] == HFN[[2]]Which famous equality is hidden in Mathematica code above?
I have enjoyed the interaction between my mind and computers since I first started using them in the early 1990s. Recently, I came across a powerful metaphor for this relationship, expressed by Steve Jobs. In an old interview, he illustrated the usefulness of computers with a compelling analogy: "For me, a computer has always been a bicycle for the mind." That perfectly describes Mathematica and other modern tools like ChatGPT. Isn't that wonderful?
I recently encountered a fascinating geometric fact online: Imagine two squares where a vertex of the larger square is positioned at the center of the smaller square. Regardless of how these two squares are positioned, the area of their intersection remains constant. My description might not fully capture the beauty of this fact — indeed, an animation is worth a thousand words. How am I to make an animation? I must use technology. Here is an animation created in Mathematica.
Place the cursor over the image to start the animation.
Place the cursor over the image to start the animation.