Try something new. Everyday.

Wednesday, 10 February 2016

Mind-blowing optical Illusions explained: What is anamorphism?

Given that you've made it this far, first have a look at what this article is all about.

Anamorphosis is a way of projecting an image in a distorted manner so as to convey the actual image by making the viewer take a specific vantage point or in some cases with special optical devices (like a mirror).


The word "anamorphosis" is derived from the Greek prefix ana-, meaning back or again, and the word morphe, meaning shape or form.

There are two main types of anamorphosis:
1.Perspective (oblique)
2.Mirror (catoptric)

Perspectival anamorphosis date to the early Renaissance and are now a major part of various industries, especially advertisement. Mirror anamorphosis were first created in the later. A mirror is placed in proximity of the painting or illustration and if viewed from specific angles it transforms the distortion into an image.

This occurs mainly due to the difference in perspective we get from viewing it from a vantage point compared to a normal place.

The main calculations are done by adjusting the perspective of the image in various software. Various techniques of projection are used to estimate the position and the size of the actual graphic ( illustration). The the angle and the distance from the viewing point are some of the things taken into consideration.

The system of anamorphic projection can be seen quite commonly on text written at a very flat angle on roadways, such as "Bus Lane" or "Children Crossing", which is easily read by drivers who otherwise would have difficulty reading as the vehicle approaches the text; when the vehicle is nearly above the text, its true abnormally elongated shape can be seen.





Also a lot of sports have their fields painted or a printed mat is used instead. It is used to promote brands and when viewed from a specific angle i.e. usually the point-of-view of the camera the image is seen in its undistorted form.

Much writing on shop windows is in origin anamorphic, as it was written mirror-reversed on the inside of the window glass. Ambulances with AMBULANCE written as a mirror image is one of the most common forms of anamorphism.



An anamorphic fresco by Andrea Pozzo at the Church of St.Ignazio.

We like to think of viewing as perception or reality. Our eyes provide continuous raw input to the brain. Since we are accustomed to viewing objects as normal entities and quickly search for familiar patterns like rectangles, squares, circles and try to make something out of what we see. These distortions force our brain to interpret the way we see the actual world and hence the illusion.

We possess something called the "binocular vision" and it's unlike a camera. We fundamentally receive information from a pair of eyes and this creates a alternated view of reality which helps in analysing depth and distance and also anamorphic illusions. The "Ames Room" illusion brilliantly exposes the kind of expectations that we automatically apply to what we see.

Monday, 8 February 2016

Algorithms and Computer Science

Why is computer science a science?

What is the difference between say Physics or Biology and Computer Science? Is there a difference at all?

Well for starters science constitutes of experimentation which makes if fundamentally difference from other subjects that may seem similar at first glance. The field of computer science is a machine science. It deals with a particular type of machine that we colloquially refer to as a PC or a personal computer. So why don't we have something like a tube-light science or a pressure cooker science?

That is something debatable but computers unlike a tube-light or a pressure cooker doesn't inherently have a singular purpose such as glowing or boiling your favourite veggies. If you can encode your thoughts in a precise and particular manner, the personal computer can function based on that. These may vary from solving problems that occur while studying particle physics and trying to make sense of the humongous amount of variegated data or as inconsequential as calculating the amount you spent on groceries at the market.

Alan Turing, the father of theoretical computer science wrote a scientific paper in which he described "computers" as people (mostly women at that time, primarily due to their patience while performing arduous calculations) who did math on pen and paper according to the whims of a set of sequential instructions also known as an algorithm.

Let's go back to the pressure cooker. 
Could there be a microwave oven science, since we already have one that caters to a pressure cooker? What cooks faster in a pressure cooker: a chicken or some potatoes? Potatoes or rice? Rice or wood? Wood or Iron? That escalated quickly.

On closer observation, there seems to be some sort of classification. Things that cook slow, other food items that cook quicker and some others, even quicker. And then there's this class of items that are so stubborn that they won't boil in a pressure cooker, like a piece of metal. Every science begins with classification and so does the one that deals with theoretical computer science.

Absurd as it may sound, in this context, we are dealing with the contents or what we can actually come up with, rather than the tool itself. We are worried about the chicken or the rice or perhaps the potatoes in the cooker rather than the humble pressure cooker itself. Similarly theoretical computer science at it's heart doesn't believe in discriminating based on the tool we use, whether it's a microwave oven or an old school pressure cooker, all we are worried about is getting nice boiled potatoes in the end. It doesn't really matter whether you have a super computer of this generation or a quantum technology powered device of the next era. This is what is computational complexity.

Things cooking at various speeds can be compared analogously to the various complexity classes in computer science, that instead of rating food items classify algorithms on their efficiency for easy comparison and deciding what maybe difficult for a computer to solve.

Difficulty is relative. Someone may find talking to a girl really difficult while another one may deem waking up early in the morning a difficult task. Many may also find it laborious to prove the Pigeon-hole principle. Computer science calls problems difficult that require at least exponential number of steps in the size of an input to an algorithm. But a database scientist may treat anything worse than a logN or a linear algorithm as inefficient. Depending on the context the definition of hardness may vary. The algorithms are compared in terms of the number of instructions required, space occupied (as a scratchpad), etc. These metrics are technology independent and that's where the universality lies. You'd compare them in the next century as you would in this. Doesn't matter what kind of specification the system has. The tool is just a means, it's the method that we bother about.

While mathematics has this puzzle kind of perspective to it. If you have solved a jigsaw puzzle or say a Rubik's cube, which you most certainly have, for the first time it may seem more of a challenge. But once you know how a jigsaw puzzle works and understand the concept behind it, you can solve any puzzle with the same technique. If you know how to computer 33+12, you can surely compute 132144+39427438 with little difficulty. Once a mathematical problem is solved, it is like you've become aware of the great magician's secret. Any local fair you visit and you see a person performing the trick you'll be aware of how it's done, irrespective of whether it's happening.

A solution for the travelling salesman problem for the cities in Germany.

On the other hand, computer science deals with skewing the problem. Let's say that now you take a 4x4 Rubik's cube to solve. What happens to your step-wise procedure? Does it work as expected or fails miserably? What happens to the number of steps when you consider a cube of an arbitrary size NxN? How much space does the computer need as a scratch pad to find a conclusive solution? Here, as soon as you fish out an algorithm it is then that you have even more questions to answer than you had to begin with in the first place.

P.S.: I attended a talk on algorithms and this is what it was all about. Really simple stuff but made a lot of sense. I thought I'd share it with my readers. :)

Saturday, 6 February 2016

Mind-blowing facts about India: Mizoram and the shops without attendants

Mizoram, one of the seven sister states in North-eastern India maybe known for the scenic beauty. But there is another beautiful thing that many people don't know about. The nature of the citizens of the state.



One of the many shops on the highway

Groceries and flowers collected by the shopkeepers from nearby forests are kept on display with the rates and a money box. The astonishing thing being that there is no shopkeeper around the shop.
If you want to buy some vegetable, it's as simple as weighing it and paying the amount according to the rate, and that's it. Pick up the balance from the money box and continue with your daily routine.
'Nghah lou dawr' shop, which means shops without attendants are common along the highway, approximately 65 kilometers from Aizawl. The shop owners leave their shops open for their customers passing the highway to pick up their requirement.

"We trust them, they have never failed us," say the shop owners. "We often buy from such shops. We feel great that Mizoram has such kind of vendors. We believe this should be the real practice" says a customer. Sometimes the shopkeepers don't earn much but feel happy about the trust in their customers.

Hats off to the culture and people of Mizoram for such integrity and trust. Who could have imagined such strength of character in people in the dog-eat-dog world we live in? But maybe what they say is true: the best things are where you least expect them to be.

Monday, 13 July 2015

Reading Cyrillic, one of the most used writing systems

Disclaimer: The characters listed below are non-exhaustive and the whole Cyrillic alphabet can be found here.


Ever felt confused when you saw such signs and they seemed Greek and Latin to you?(Well, it's Cyrillic, actually)



The Cyrillic script is an alphabetic writing system employed across  Eastern Europe, North and Central Asian countries. It is the basis of alphabets used in various languages, in parts of Southeastern Europe and Northern Eurasia, especially those of Slavic origin, and non-Slavic languages influenced by Russian. Cyrillic is one of the most used writing systems in the world.

At first glance it may seem really difficult to read the text in Cyrillic. But there are some really basic rules which can make these obscure looking-symbols really easy to read. Hopefully, within the next 5 minutes you can read sign-boards and basic words in the Cyrillic script.

1. Many of the letters are similar to those in the Roman script (English) . The Cyrillic letters A, K, M, O, and T are close relatives of their English counterparts. The Cyrillic letter Б (which looks like a lowercase “b”)  also makes a “b” sound. The letter “C” always makes the “s” sound, like in the English word “cite.”

2. Others are closely related to Greek. People who have taken math/physics classes already know the letters Г (gamma), P (rho), П (pi),  and Ф (phi), which are the English equivalents of “G”, “R”, “P”, and  “F”, respectively.

Easy so far, right? Check out a few examples:
кафе́ = cafе́
бар = bar
о́пера = opera
ро́бот = robot

3. Some letters are pretty humbug. The letter “H” makes the “N” sound, “y” makes the English “oo”  sound, and “B” sounds like the English “V.” This letter, И, which looks  like a backwards “N”, makes the “short i” sound, as in the English word “pin.” The Russian letter “Я” sounds nothing like it’s mirror image in  English. Instead, it makes a “ya” sound, as in “yacht.”

Here are a few more Russian words you already know.
Интерне́т = internet
CпyTHИK = Sputnik
POCCИЯ = Russia

4. You probably have only seen the rest of the letters in some movies with a Russian back drop or a Russian space shuttle.
Ц = “ts” as in “boots”
Ш = “sh” as in “shore”
Л = “l” as in “lamp”
ж = “zh” as in “pleasure”
Д = “d” as in “door”
З = “z” as in “zoo”
Ю = “oo” or “yu” as in "use"
Ч = “ch” as in "chat"

a. You’re in St. Petersburg and you see a restaurant with this written on it: MAKДOHAЛД’C. Where are you?
b. You’re in a Moscow bar and would like to drink something authentically Russian. Someone suggests Bо́ДKA. What are you having?
c. You’re applying for your Russian visa and a form asks whether you’ve ever criticized the Russian президе́нт. What’s it asking? 

The characters listed above are non-exhaustive and the whole Cyrillic alphabet can be found here.

FYI: The first image in this answer is the logo of Pepsi-Cola and the second one (yeah, you guessed it right) is McDonald's.

Or

Thursday, 9 July 2015

Pixar's success visualized using d3.js


Pixar is one of the most influential CGI animated film makers with 15 Academy Awards won by their films. Not only have their films received critical acclaim but have also gone on to be financially successful.


The ratings of the Pixar Movies according to Metacritic.



Legend: Green = Won the Oscar, Orange = Nominated, Red = Not nominated, Blue = Not applicable.
Pixar's earnings and Academy Award status arranged chronologically.

Out of the 15 movies that Pixar has created Cars 2 was rated the least with 57/100 while Ratatouille scored the highest with 96/100.
Image credit: Disney/ Pixar

It will be the first time in Pixar's history that they will release two movies in the same calendar year. The first being 'Inside Out' followed by 'The Good Dinosaur'.

Image Credits: Dreamworks

A project by the name of 'Newt' was cancelled in 2008. Pixar cited that the plot-line was similar to that of another animated file, 'Rio'.


In 1986, Steve Jobs bought Pixar (then known as Computer Graphics Division from George Lucas) and it was later bought by Disney in 2006.

Image credits: Pixar

Pixar's mascot goes by the name of Luxo Jr.

Tom Hanks was interested to voice Woody as he wondered how toys would be if they were living.

Joss Whedon, the director of The Avengers, co-wrote Toy Story's script. He also came up with Rex, the dinosaur in the franchise.

Image credits: Pixar

The Pizza Planet truck appears in most of Pixar's movies.

Monsters University has an actual admissions website of its own.

Image credits: Pixar, Pixar Wikia

'A-113' is an easter egg in many Pixar films. It is a tribute to a classroom at California Institute of Arts, where many animators had worked.

Wednesday, 8 July 2015

Mendeleev's Periodic table and the Modern Periodic table


Mendeleev's Periodic table
In case you're wondering why is it in German and not Russian? Well, his idea was first published in a German journal.

The Modern Periodic Table

Read about the prophecies and predictions of futurist and inventor, Nikola Tesla and chemist, Mendeleev which turned out to be true in the 21st Century.
Check out Pixar's success visualized using d3.js.


Of Predictions and Prophecies: Visions that will boggle your mind


Mark Twain known for 'The Adventures of Tom Sawyer' and 'The Great American Novel'.

This world has seen oracles come and go. With the likes of Nostradamus who would peek into the future using his water-filled tripod under the moonlight, George Orwell talks about "telescreens [that] received and transmitted simultaneously" and CCTVs in his dystopian sci-fi novel 1984. Mark Twain is known for his writings but he had predicted his own death on the arrival of Halley’s Comet and unfortunately had envisioned the death of his brother. When he arrived at the place his brother lay between two chairs and even the wreath was arranged as he had dreamt.

A Serbian born American scientist, futurist, engineer and inventor, after whom an electric car-company is named is another of the oracles the world heard from. Nikola Tesla worked as an apprentice to Thomas Edison credited for the light bulb, one of many inventions he’s known for.

Nikola Tesla claimed to sleep at most two hours and supposedly possessed an eidetic memory.

Tesla went on to pursue his ideas of wireless lighting and electricity distribution in his dangerous experiments, and made predictions on the possibility of wireless communication. He had registered about 300 patents under his name and the inventions he made still influences modern day life.

Many of his ideas were way ahead of time and technology at that time. It was difficult for the folks to digest his ideas and often invited ridicule from the scientists. Many consider Edison had stolen Tesla’s ideas.


Wireless communication and the internet

"When wireless is perfectly applied the whole earth will be converted into a huge brain, which in fact it is, all things being particles of a real and rhythmic whole. We shall be able to communicate with one another instantly, irrespective of distance. Not only this, but through television and telephony we shall see and hear one another as perfectly as though we were face to face, despite intervening distances of thousands of miles; and the instruments through which we shall be able to do his will be amazingly simple compared with our present telephone. A man will be able to carry one in his vest pocket."

"We shall be able to witness the inauguration of a president, the playing of a World's Series baseball game, the havoc of an earthquake, or a battle just as though we were present."

"It will soon be possible to transmit wireless messages all over the world so simply that any individual can own and operate his own apparatus."

"…the household's daily newspaper will be printed wirelessly in the home during the night."

When Tesla was working on the trans-Atlantic radio, he proposed to his funder, J.P. Morgan. The idea was to create a plan for a "World Telegraphy System”. He planned to provide instant communications between individuals. Such predictions and ideas would prove to be true decades later.


Dream on

Another scientist by the name of Dmitri Mendeleev had predicted something. But this time it wasn’t about smart phones or CCTVs. Mendeleev had designed a periodic table using his scientific prowess so perfectly that even till date his version of the Periodic Table is used with a few minor changes. Mendeleev predicted future elements and where why would be placed with the properties they exhibited.

Dmitri Mendeleev, chemist and inventor.

At that time, in 1863, only 56 elements were discovered but by the ingenious way of arranging elements based on atomic weight that he had apparently seen in his dream helped him predict positions of elements that would be discovered. [Mendeleev's table and the modern periodic table].

"I saw in a dream a table where all elements fell into place as required. Awakening, I immediately wrote it down on a piece of paper, only in one place did a correction later seem necessary."
—Mendeleev, as quoted by Inostrantzev

Inventing the electricity that we use in our homes, pioneering research about the X-rays and the neon lights in your favorite pub, are a small fraction of the contributions these men made. With such remarkable visions and spot-on predictions, these men contributed to the science and technology, paving way for the luxuries we enjoy today. 



Did you know that Toy Story 2 was almost deleted? Read the whole story here.