A love poem that mix visualization art and code poetry. Probably the first poem written in git commits.
- See the Visualization (and interact with it)
- Read the Code (in its readable poetic form)
- Read the Poem (in the commit history)
Inspired and based on Jason Davies work
The poem is about preparing a field to grow flowers and making sure that each flower has a beautiful color. These flowers will shine when seen by the beloved and turn gray when touched. They keep asking to be touched again.
Since in a computer virtual world everything is possible and nothing is real, the lover will handcraft flowers from maths and lines.
It is possible to read the poem in the commit history in the poem branch.
$ git fetch origin poem
$ git checkout poem
$ git log --format="%s"
or
$ git log --format="%C(yellow)%h%Creset %Cgreen%s%Creset%n%b"
ea814f4 POEM: 9*19 flowers
02d0dc0 Handcraft flowers from maths and lines,
aa14064 Choose the colors to make them shine,
ad4e12c Till the soil to plant the seeds.
700b967 .
7cea9e1 See me to make me glow
93c57f8 Touch me to give you more
e023bd0 Touch me you'll never stop
e146d2c Please touch me again.
Every commit has a meaningful code attached to it.
e023bd0 Touch me you'll never stop
+ function stop_touching(d, i) {
+ }
- Colors are randomly generated. The function
beautiful_color()
makes sure that the lover handcrafts the most beautiful flowers. - When flowers are touched they get colourful. When a single one is touched, it changes shape.
The flowers are generated mathematically. The first grid that appears is a matrix, where flowers are generated using the value of their column and row positions.
The mathematical formula is very simple. I define curves to be
r = cos(kt)
where r = cos(kt)
As soon as we land in the visualisation there is a diagonal line towards the matrix. When the column and row number are the same, k = 1
and therefore we get the identity flower, considered in the code to be the ugly flower that the lover deletes. It looks like this:
Where as soon as we play with k
, for example k = 2/1
we get the second flower.
Clone the repo and install dependencies.
$ cd poem
$ bower install