Math art #6: Converting number sequences to animations with piano music

in #mathematics6 years ago (edited)

A while back I created animations with music generated by mathematical number sequence. I had not explained the method yet. So it is a perfect topic for another post :D

A number sequence is just an ordered set of numbers. For example, { 1 , 2 , 3 , 4 , 5 , 6 } is a sequence. These sequence can also have infinite elements. For example, you can convert π to a sequence by ordering its decimals in the natural way, so like this { 3 , 1 , 4 , 1 , 5 , 9 , ... }. You can also use a function to generate a sequence. For example, the sequence generated by n2 for n=1 to n=3 is given by {1 , 4 , 9}.

Here are two videos I generated using number sequences:





There is the animation and there is the piano music. The main idea is that the sequence is converted to animation frames and the animation frames are then converted to piano music. So I will kick off with explaining how the animation is generated.

Animation

Let me explain the animation method by example. Consider the sequence { 1 , 2 , 3 , 4 , 5 , 6 } . This sequence will act like a list of sequential commands which describe a road/path. We need to start by selecting a point on a white sheet of paper, see the black dot in the image on the right. The first number of the sequence indicates the distance we need to move in a west-ward direction. For the considered sequence the distance is 1. Then we make a 90 degrees angle towards the left and go forward in a distance equal to the second number, which in this case is 2. Then we make a left 90 degrees angle and go forward in a distance equal to the third number, which in this case is 3. Then we make... you get the idea, we just repeat the process. The path traced will then be given by the image on the right.

Music

I will continue with the same example, the sequence { 1 , 2 , 3 , 4 , 5 , 6 } . The position of each 90 degrees corner on this winding figure, the red dots in the image, can we represented in the plane by an x- and y-coordinate. The x- and y-coordinate can then be mapped onto the keys of a piano. More specifically, I will let (x,y) correspond to a musical interval using the method of one of my previous posts. When the program draws an edge it will simultaneously play that interval.

Back to the videos

Now that we know how the videos were generated we can have a look at what kind of information we can derive from the videos. For the first video we see that it seems to converge to a square so this means that all edge have the same length so the final numbers of the sequence are all the same. The second video, the decimals of √2, described an irratic pattern. This makes sense because √2 is an irrational number, so when you write the decimals as a sequence the sequence never repeats itself. That is why you get the strange pattern. :D


Sources: All images made using inkscape it is free!


Merchandise :D


2018-06-07 (2).png
There is a MathOwl shop which sells my artsy fartsy stuff. If you got some spare money head over there. You can learn about the colors of pi over here here. I also have really cheap stuff available like these stickers They are an absolute hoot.



Join #steemSTEM

#steemSTEM is a community project with the goal to promote and support Science, Technology, Engineering and Mathematics related content and activities on the STEEM blockchain. If you wish to support the #steemSTEM project you can: Contribute STEM content using the #steemstem tag | Support steemstem authors | Join our curation trail | Join our Discord community | Delegate SP to steemstem

Convenient Delegation Links:

50 SP | 100SP | 500SP | 1000SP | 5000SP | 10000SP | 50000SP

Image courtesy: Me ;)
Sort:  

Ah! You have given me new stuff to kill time on MATLAB. Guess what I will be doing this weekend. Last time I was obsessed with creating rgb images using z = f(z) + c on different permutations and combination of conplex plains. Guess this time it will is going to be music. May time have mercy on me!

As a follower of @followforupvotes this post has been randomly selected and upvoted! Enjoy your upvote and have a great day!

Congratulations! This post has been upvoted from the communal account, @minnowsupport, by mathowl from the Minnow Support Project. It's a witness project run by aggroed, ausbitbank, teamsteem, someguy123, neoxian, followbtcnews, and netuoso. The goal is to help Steemit grow by supporting Minnows. Please find us at the Peace, Abundance, and Liberty Network (PALnet) Discord Channel. It's a completely public and open space to all members of the Steemit community who voluntarily choose to be there.

If you would like to delegate to the Minnow Support Project you can do so by clicking on the following links: 50SP, 100SP, 250SP, 500SP, 1000SP, 5000SP.
Be sure to leave at least 50SP undelegated on your account.

Congratulations @mathowl! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

Award for the number of upvotes received

Click on the badge to view your Board of Honor.
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do you like SteemitBoard's project? Then Vote for its witness and get one more award!

maybe you can choose the Fibonacci sequence, it always work when we step from science into any kind of art.



This post has been voted on by the steemstem curation team and voting trail.

There is more to SteemSTEM than just writing posts, check here for some more tips on being a community member. You can also join our discord here to get to know the rest of the community!

Coin Marketplace

STEEM 0.25
TRX 0.11
JST 0.032
BTC 61986.23
ETH 3026.15
USDT 1.00
SBD 3.75