Posts

Why does beer taste so good?

Image
A lovely evening I came back from work this evening, and between thoughts of reading about processors and compilers, and writing some pretty visualizations, I decided to do neither and just listen to music. So I played one of my favorite Japanese songs, 夜空ノムコウ (Beyond the night sky), and started singing along. Out came a chilled can of beer, and it tasted so sweet that I remembered something from Patrick Rothfuss' "The Name of the Wind" which I read some years ago. I remembered Kvothe, the protagonist, talking about having a sweet mug of beer. It was a lovely evening. If you want to listen to that beautiful song too, here's the version I was referring to. Enjoy :-)

Symmetry in Chaos

Image
Introduction At first glance, symmetry and chaos would seem to have little to do with each other. Symmetry is order, harmony; while chaos is, well, chaos. But it turns out, the two have a deep connection underneath. Chaos can be harnessed and put in the frame of symmetry to create rich forms, where chaos gives it the pattern, and symmetry gives it the shape. These themes are explored in the beautiful book  Symmetry in Chaos  by Michael Field and Martin Golubitsky, which inspired this post. How it's made The idea behind it is elegantly simple. You take some initial point on the complex plane, and iterate some function on it. (If you are new to these kinda things, iterating means taking a point, applying a function on it to get a new point, applying the function on the new point to get yet another point, and on and on.) The authors suggest the following function with the desired properties of symmetry and chaos: f z = λ + α z

3Blue1Brown's Windmill Problem

In his latest video, math YouTuber  3Blue1Brown  discusses  the windmill problem  (IMO 2011, Problem #2). Like all his videos, this one has great visuals too. Now, I have been playing with JavaScript and friends recently, and after watching the video, I immediately wanted to do it myself. So, after two evenings of coding and debugging, here is the thing! The problem, and its ingenious solution, is discussed by  Grant wonderfully in his video, so I won't repeat it here. Without further ado, enjoy the animation!

Lemniscate in Hyperbola: HTML Canvas Animation

Image
Introduction In this post, we'll look at envelopes of families of curves, and end with an animation! If you can't wait to read it all, jump right to the animation ! Background: String Art You've probably heard of string art, and seen it too. Something like this: You can't help marveling at how these shapes emerge from the strings, each of which, by themselves, are no more than a piece of line. That makes a mathematician think of envelopes, and today I'm going to tell you about them, and look at one cool example. One parameter family of curves To introduce the thing, let's talk about one parameter family of curves. This is a set of curves of the form f x y c = 0 . You get a member of the family, one individual curve, for each value of c . Together they make the family. To make it more concrete, let's illustrate this with one particular family. Consider a string stretched taut against a pos

The Lévy C curve in... C

Image
I've been reading about HTML and other web standards lately, and it eventually led me to SVG, a vector image format I've been meaning to look into for some time. By a fortunate coincidence, I had been reading about PostScript just prior to this, and SVG came naturally after that. So I set out to make my first SVG drawing, and after a while I decided on the Lévy C curve . This: Preparation: SVG Let's get right to it. We're gonna make it using the SVG <path> element. The <path> element is made like this: <!-- draws an equilateral triangle --> <path d="M 0 0 L 100 0 L 50 86 Z"></path> That is, the drawing commands are put in the d attribute. They are more or less similar to their PostScript cousins. The commands consist of an identifying letter followed by a pair of coordinates. Uppercase letters indicate absolute coordinates, whereas lowercase letters indicate relative (to the current point) coordinates. M st