Saturday, November 30, 2019

100 Days of Github. Take 2, Day 36.

Day 36

Interactive web diagram for logistic map. The interactive bit in my notebook isn't rendering properly. I'll figure that out later 🙈
---
Uploads remaining: 64
Days remaining: 32

Ideal rate of uploads: 1 upload per 0.5 days. Or, 2 uploads/day.

100 Days of Github. Take 2, Day 35.

Day 35

Playing around with fractals continues. But, this is only initial playing around with the Mandelbrot set, and will lead to a little more in-depth playing around 😛

---
Uploads remaining: 65
Days remaining: 32

Ideal rate of uploads: 1 upload per 0.49 days. Or, 2.03 uploads/day.

Wednesday, November 20, 2019

What I Read/Saw Today

Don’t demonise farmers
I found this article on my Twitter feed, and it ties in well with Shekhar Gupta's decluttering and nuanced analysis (video link below) of North India's smog problem that I saw a while back.
Behind India’s winter smog: not stubble-burning, but free water, power & mostly STUPIDITY
I do hope that something is done about this, and soon. Because Delhi is a place I call home, and wouldn't want to be in a situation where I can no longer go back without a mask.


100 Days of Github. Take 2, Day 34.

Day 34

Sierpinksi carpet...


My notebook.
---
Uploads remaining: 66
Days remaining: 41

Ideal rate of uploads: 1 upload per 0.62 days. Or, 1.61 uploads/day.

100 Days of Github. Take 2, Day 33.

Day 33


Notebook here.
---
Uploads remaining: 67
Days remaining: 41

Ideal rate of uploads: 1 upload per 0.61 days. Or, 1.63 uploads/day.

Tuesday, November 19, 2019

100 Days of Github. Take 2, Day 32.

Day 32

The chaos games on a square continue.

The rules are:
Take a square with vertices labelled 1, 2, 3, and 4.
Start with a random point inside the square.
Toss a 4-sided coin with sides corresponding to vertices of the square.
Based on the coin toss, move halfway closer to the chosen vertex.
Repeat, making sure that the subsequent coin toss must not correspond to the vertex directly opposite the previously chosen vertex.

And voila:




The notebook is here.

---
Uploads remaining: 68
Days remaining: 42

Ideal rate of uploads: 1 upload per 0.62 days. Or, 1.62 uploads/day.

100 Days of Github. Take 2, Day 31.

Day 31

Aaaaand, another chaos game.

The rules are as follows:
Take a square with vertices labelled 1, 2, 3, and 4.
Start with a random point inside the square.
Toss a 4-sided coin with sides corresponding to vertices of the square.
Based on the coin toss, move halfway closer to the chosen vertex.
Repeat, making sure that the subsequent coin toss must not be the next one in anti-clockwise direction.

Take a look:


And, the notebook is here.

---
Uploads remaining: 69
Days remaining: 42

Ideal rate of uploads: 1 upload per 0.61 days. Or, 1.64 uploads/day.

100 Days of Github. Take 2, Day 30.

Day 30

This is yet another chaos game.

The rules:
Take a square with vertices labelled 1, 2, 3, and 4.
Start with a random point inside the square.
Toss a 4-sided coin with sides corresponding to vertices of the square.
Based on the coin toss, move halfway closer to the chosen vertex.
Repeat, making sure that the subsequent coin toss must not be the same as the one in the previous iteration.

And we get:



Here's the notebook.


---
Uploads remaining: 70
Days remaining: 42

Ideal rate of uploads: 1 upload per 0.6 days. Or, 1.67 uploads/day.

100 Days of Github. Take 2, Day 29.

Day 29

I am still playing the chaos game, but a little differently.

Now, I am starting with a square. Its vertices are labelled 1, 2, 3, and 4. Its center is labelled 5. I start with an initial point p somewhere inside the square. Now, I have a five-faced coin. I toss the coin, and get vertex v. The next point will be 2/3 times closer to v from p. As before, repeat repeat repeat!

We get, what is called, the Vicsek fractal.



Here is my notebook.

---
Uploads remaining: 71
Days remaining: 42

Ideal rate of uploads: 1 upload per 0.59 days. Or, 1.69 uploads/day.



100 Days of Github. Take 2, Day 28.

Day 28
I first came across the "chaos game" in a tiny book on fractals I read many years ago. I had coded it up at that time, but forgot about it subsequently. Later, in one of my Numberphile video watching binges, I came across Brady Haran talking to Ben Sparks about it.

So, what is it, and how does it work?

Well, in this version of the "chaos game", you start with an equilateral triangle (although Sparks says any old triangle will do). Label the vertices 1, 2, and 3. Pick any point within this triangle as the initial point. Get a three sided coin from somewhere (with options 1, 2, and 3, corresponding to the three vertices of the triangle). Toss the coin to choose a vertex. Plot the next point halfway between the current point and the chosen vertex. Repeat many many many times. And... drum roll... you get the Sierpinski triangle!


As Ben explains in the Numberphile video, this structure (i.e. the Sierpinski triangle) is the attractor of the given system, which is defined by the evolution I just described above.

By the way, do check out Ben Sparks' rendition of the chaos game here.

I have a question for future me or anyone else who is reading this: is this system really chaotic? This is clearly not a deterministic system, because of the coin toss step. Even Ben says that this is random behaviour producing something structured, So, is the term "chaos game" a misnomer?

Anyway, here is my notebook.

---
Uploads remaining: 72
Days remaining: 42
Ideal rate of uploads: 1 upload per 0.58 days. Or, 1.71 uploads/day.

Sunday, November 17, 2019

100 Days of Github. Take 2, Day 27.

Day 27

Notes on generating random graphs using networkx. I made these notes from chapter 15 of Hiroki Sayama's book on complex systems, which by the way is freely available online, and also brilliant!
Here is my notebook. Needs a little updating, though.

---
Uploads remaining: 73
Days remaining: 45 (Oh shit!)
Ideal rate of uploads: 1 upload per 0.62 days. Or, 1.62 uploads/day.

Sunday, November 3, 2019

100 Days of Github. Take 2, Day 26.

Day 26

Logistic map Lyapunov exponent. Here.

---
Uploads remaining: 74
Days remaining: 58
Ideal rate of uploads: 1 upload per 0.78 days. Or, 1.27 uploads/day.

Saturday, November 2, 2019

What I Read/Saw Today

Geology Of India TV Series- Coral Islands Episode
I got excited reading the title and first few lines of this blog post. The thought that DD was showing something so exciting was, well, rather exciting! But the article illustrates how the makers of the show got geological facts wrong. I'm not so excited anymore. And slightly sad.

How Kubrick, Spielberg, and Inarritu Stage their Scenes
I need to learn more about film making. "Why?" you ask. Why will it be useful in my current pursuit of getting a PhD? I don't know. It probably won't. But isn't it brilliant how someone lets you inside their head through a visual medium? And isn't it brilliant how details are placed very carefully all over the screen, waiting for your eyes to pick them up?