Inigo Quilez   ::     ::  
1402 blog posts, written between 2008 and 2016. These are mostly short observations, funny thoughts and word playing. Some are embarrasingly corny, some more deep. I keep it here mostly a little time capsule for myself, organized by month:



<
May 2013
>
mathimage #16: line integrals
2013-05-30
more doodling while dining. if i go technical with the wording: this is an image is blurring filter with a space varying 1D parabolic kernel, where the path of convolution follows a divergence-free noise driven vector field. if i go non-technical: this is a fun hairy looking thingy.

the chicken or the egg?
2013-05-28
of course. now i was thinking - how much do we build our language around the ideas so we can talk about then, and how much do, in the other hand, the ideas get shaped by the language we use?

this is a bit like the chicken and the egg problem.
on "look forward" and "look backward"
2013-05-26
in all languages i speak (not that these are many) "look forward" and "look backward" are literally said the same way, by using the same words.

seems that more often than not we humans tend to treat time and space as interchangeable concepts. for example, to questions like "how far is your home?", which is a clearly spatial question, we often reply with temporal answer such as "oh, it's just five minutes away". or, "when will you arrive?" gets often a "i'm just a couple of blocks away" as a response, which might sound natural when thinking verbally, but this time it's a spatial reply to a temporal question.

it shouldn't be surprising, then, that when we talk about thinking of the future and the past, which are temporal ideas, we do use spatial expressions as well, such as "look forward" and "look backward".

furthermore, it seems natural to hypothesize that the act of human walking is directly responsible for this connection, for when we move and look forward we arrive to places that we've not been to yet because they belong to the future, while if we took a break on our way and looked backward, we'd be seeing the places we just walked by in the recent past.

and so, while space and time are inherently intertwined for anything that moves on space over time, it seems that the actual walking becomes for humans the most direct responsible for our sense of "direction" for time, to the point that time moves ("walks") forward, and backward. just as we do. yet another psychological artifact and delusional projection of our way of thinking into the nature of the universe.

and i say that this idea of "time moves forward" is a human-centric perception because, for the same reasons just noted, i'm sure that if trees could talk they'd surely say that time moves "upwards" and "downwards" when referring to the future and past respectively.
mathimage #15: orbit traps
2013-05-23
my first conscious contact with fractals was when i was 17, thanks to my philosophy teacher.

one day he handed me a magazine with a mathematical description of the process of complex dynamics, which was also full of beautiful images of spirals. i photocopied the article, run home and spend a couple of days trying to make sense of the articles. writing algorithms, doing maths. thankfully for me complex number were introduced to us by the age of 16, so i could sort of figure out what the maths were about. and indeed after two days of trying algorithms and stuff, i got my first images of the Mandelbrot set fractal ever. these would take hours to compute at full resolution (which was as small as 320x200, something you don't find anymore, not even in the most modest of the mobile gadgets around these days). little i knew that would change my life forever. i'm still grateful to Angel, that teacher of philosophy.

after that, a color screen arrived. after that, a 486 processor. after that, a powerful compiler. and after that, Javier Barrallo, a singular and special guy who happened to be an international expert on fractal rendering algorithms, and a great artist. i didn't met him randomly, i contacted him cause he was the only expert om fractal rendering in the country i could ask for advice and direction. amazingly enough, he happened to live in the same city i was living during weekdays. furthermore, he was living in the same street. and in fact, in the same street number. it was difficult to believe that such serendipity could just happen, that the only one person in the whole country that i could talk to on advanced fractal rendering techniques, and ask advice to, was living nowhere but two floors above me.

one of the first things he taught me about were the "orbit traps", a new technique just invented back then (mid/late 90s) to bring extra structural details of fractal shapes, which also brought a great variety of new options for artistic expression. that one evening he talked to me about these "orbit traps", i left his apartment and run downstairs to my room for a compulsive long typing session in my 486. i spent all night programming and rendering images. i think that was the no return point, the night i became a night person forever, to this day.

anyway, the first time i ever realized that going beyond mathematically or technically interesting pictures, i could pursuing something aesthetically pleasing as well was thanks to Javier and discovery (and soon invention of extensions to them by myself) of these "orbit traps".

i don't have any of the very first images i produced, but they'd probably look something like the one below, which i made last night during dinner again as a way to both rememorate those good old days (well, "good old nights") of coding and discovery, and as a way to succeed on making, once more, my mathematical image of the week.

(make sure you are reading this blog with Chrome or Firefox if you wanna see the image below. also, make sure hit "play" to see it moving)

1975 and real hot
2013-05-21
i bought a playboy magazine from 1975.

ok, before you ask: no, no pages are stuck to each other.

last week i was in this second-hand clothing store, which also had some vintage articles, this playboy magazine among them. which is 38 years old!

it's a 212 pages long magazine, of which only around 8 do have actual erotic photography (i don't think "pornography" is the right word for this, despite of the nudity), the rest being articles on fashion, politics and erotic stories or jokes.

the thing that has caught my attention the most is that the standard of beauty hasn't changed at all after nearly 40 years! miss april of 1975 (Victoria Cunningham) was hot as the hottest dream woman you might seen photographed in april 2013, if not hotter. now, to make things more impressive, this miss april of 1975 was surely not the product of any photoshop magic.
labels in cloth and other things - why still around?
2013-05-19
labels in cloth. you know, "100% polyester, can iron, can't do warm water". well, you never know what they actually say, unless you ask your mum or, in her absence, Google. because, from what i've seen with all the people that i know including myself, nobody else but mums and Google seem to be able to decrypt these hieroglyphics in the cloth labels.

now, if nobody were actually reading them, then why do we still have them? what are they for? are they, perhaps, one of those weird cultural artifacts? something from the past that is irrelevant enough that we forgot to pay attention to and get rid of? like, stamps? or like the "NO SMOKING" light signs in the planes (of which we have one per seat!)?
one R behind
2013-05-17
at my age most people go fancy and sophisticated with their hobbies. the trend right now seems to be buying expensive equipment and start diving.

in the meanwhile in my own universe, instead, the big thing is to start dRiving.

i never cared about trends
mathimage #13: two tweets
2013-05-15
i love doing mathematical images. once in a while they turn to be beautiful, but often they aren't. and that's fine, i'm still learning. once upon i time all my images were ugly without exception, though, so clearly progress is being made. i started from a purely technical background, so things are going slow.

now, there are times when i do things which are a clear reminder of that technical heritage, which in the context of mathematical painting make no sense nor prove any point nor serve any purpose nor have any aesthetical or other type of value, but that are mere artifacts of the technological framework i grow up in. these come often in forms of challenges. like in "make a mathematical image (not necessarily beautiful, that's irrelevant) with as little code as possible. i've discussed already the benefits of such artificial limitations before in this blog, but basically, one gets to think different and explore and learn new things when under sever constrains.

today, i felt nostalgic i guess, and did one such oldschool technical exercise. how much of an interesting image would i be able to create with no more than 280 characters of code/math. the number 280 is arbitrary of course, but has the nice psychological effect of crystallizing the intuition of its real measure and sense of size for those who use Twitter, for 280 characters is exactly the amount of text you can write in two tweets.

i'll make an exception and through some code here. the first long line defines the shapes in the image. the second long one makes sure the computer can actually create pixels that reflect that shape. and the third one is responsible for the coloring and lighting of the shape.

float f(vec3 p)
{
p.z+=iGlobalTime;return length(.05*cos(9.*p.y*p.x)+cos(p)-.1*cos(9.*(p.z+.3*p.x-p.y)))-1.;
}
void main()
{
vec3 d=.5-gl_FragCoord.xyz/iResolution.x,o=d;for(int i=0;i<99;i++)o+=f(o)*d;
gl_FragColor=vec4(abs(f(o-d)*vec3(.0,.1,.2)+f(o-.6)*vec3(.2,.12,.01))*(10.-o.z),1.);
}


below is the actual image animated in realtime. click the "play" button to see it in action, and click the name "Two Tweets" to jump to the source code here so you can play live with it.

surrealism and tautologies
2013-05-13
see, this is my problem with certain type of tests:

- question: "what does it mean that a country is french speaking?"

- my answer: "hm, not sure what you mean... probably, that the country was a french colony in the past?"

- expected answer: "it means that its citizens speak french."

- my thoughts: "errrr, are you retarded, or fucking kidding with me??"
not losing perspective
2013-05-11
yes i have fear to bombs, war, murder and violence.

but i do have a deeper fear to the ideas that motivate those bombs, wars, murders and violence.
mathimage #12: audrey
2013-05-09
Imagine you wanted to portrait Audrey Hepburn (you might remember her from "Breakfast at Tiffany's"), but could afford only 316 brush strokes. As you can imagine, you would have to pick those strokes very well.

So yes, you guessed, the picture below are 316 points (brush strokes) selected to have the right size, color and position in order to make the portrait. These "points" are little gaussian curves (remember the "Gaussian Bell" thing from school?), and I wrote a program that, given a desired target photograph, it would find the optimal set of such gaussian points that would resemble the photograph the most when drawn all together.

Indeed this is not one of my typical mathematical images. For I didn't "paint" with maths as I usually do, but just wrote an algorithm to "express" the photograph mathematically.

The twist here is that, the fact that this can be done at all shouldn't come with a be surprising to most people, because, believe it or not, ALL of the pictures you see in the internet, and all of the videos, sound and even your voice when you talk on your phone, are being mathematically expressed by the computer/device when it comes to storage, transmission, reception and display.

Yes you heard well, everything we see and hear in all these gadgets around us is a mathematical expression/representation of the actual photographs, music and voice. Usually, it's not done by using tiny little gaussian dots as I did in this experiment, but cosine functions. But the idea is the same: find a mathematical description that approximates the actual data we want to work with.

If you want to see how, indeed, an image cab be just a small formula and a bunch of numbers, simply click here https://www.shadertoy.com/view/4df3D8 and scroll down the code window. Then select lines 200 to 235, and delete them. Then press the little triangle in below the code, and see how the image changes: you just deleted 36 of the gaussian dots. You got less numbers to be stored (that would mean a smaller picture file size), but the image got uglier and further from the true picture.


accomplices in the train
2013-05-07
i've just got in the train smiling (i can't remember why, i must have been thinking about something funny).

i take a seat and lean the bike on my right leg as i usually do, still smiling. i notice an old couple looking at me from the seat in front. they must be in their 70s, i'd say. they are smiling at me so i look and (keep my) smile back to them. then i break the eye contact and get ready for my relaxed contemplative train ride of the morning. however, right before doing so, i look back once more to the elderly couple. they're now staring and smiling at each other, conspiratorially. both's eyes are shimmering with sparkles. and i think, "they are the most charming, cute, lovable, endearing and adorable couple ever"
choco-latex
2013-05-05
i think i have a title for a soft-porn/erotic movie. it's sweet and kinky, it's soft and sexy, it's perfect!


unless...
2013-05-03
the accordion is probably the most awful sounding instrument ever made.

unless it's played by Yann Tiersen (and probably only Yann Tiersen)

then everything changes
cazadebrujas
2013-05-01
esa
mathimage #11: mike
2013-05-01
this is this week's mathematical image. because I want to prove that "mathematical" has nothing to do with "not art-directable", as most people in the movie industry believe.

so yeah, this was a quick but fun one: i painted Mike Wazowski with formulas and mathematics. well, where "painting" means sculpting, shaping, colorizing, texturing and lighting, as usual.

i wanted to have Mike himself pose and model for me, but apparently he was quite busy at the moment preparing the premier of his new movie (in theaters June 21st, folks). so instead of having him just for me for a few hours, i had to resort to the way less glamorous alternative of visiting Google Images, searching for his name and usinig the first picture as reference for my formulas.

the four hours of work were very productive, cause, as you can guess, Mike is in fact relatively easy to describe mathematically. his pretty much a pinched sphere (deform the domain in which you define your sphere, et voilà!). the mouth is what you get when you subtract an ellipsoid form the body's sphere, and the teeth are what you get when you add a periodic (in the x axis) domain application of a small white sphere. its extremities are cones, which get attached to each other and to the body with some quadratic blend magic. eyelids are some radial cubic range distortion of the body. shading is a linearly interpolated noise pattern, and the eye is pretty much a fractal brownian motion indexed in polar coordinates.

as always, the code/formula is live online for free, ready to be played with, used, broken and tortured: https://www.shadertoy.com/view/MsXGWr