in english there are the words yesterday, today and tomorrow. talking about any other day needs to be done through a combination of words. in spanish the day before yesterday has also a special word for it, although oddly enough the day after tomorrow doesn’t (not officially, although there’s slang for it, so chances are some day we will have one). seems linguistic awareness of time never spans more than a handful of days.

in other (but similar) news, today i really missed a to refer to “this week”. basically, in the same way we have “today”, i want to have the word “toweek”.

a very, very quickly made image (25 minutes) that looks pretty disgusting, but i enjoyed a lot improvising.

in this case i played again with line integrals over a (divergence free) noise field, and did toyed with the different parameters in order to create the feeling of volume, lighting and translucency. needles to say there’s nothing 3d here, it’s all massaging math expressions.

as usual, click the play button to see it in movement, and follow the link i the title to jump to the code/maths that generated the image.

that awkward moment when a graphics programmer has no choice but admit that his/her only plan of attack left is to systematically try all permutations of the following operations:

* multiply the whole thing by -1 (especially if “the thing” is a cross product or a determinant)

* transpose the matrices involved (especially if you like writing maths the standard way but you work with a strange API, ahem…)

* change the order of the matrix multiplications (just because you never know)

* replace Y with Z (especially when swimming between camera and world spaces – because some people got traumatized at an early age by the Y-up thing at school or something)

this shouldn’t be happening, this shouldn’t be happening

speaking of sliced bread, what’s up with all this idiom thing about “the greatest thing since sliced bread”?

was it really such a huge thing at the time, did it have that big of an impact in americans live in the 40s? like, if you ask elders about it, do they go like “yeah yeah yeah, we invented cars, and television, and stuff, no big deal. well, okey, those were great and all, whatever… but when the sliced bread arrived, OH BOY, that was so rad! son, there’s never truly been anything like the sliced bread

toasters. machines designed to toast sliced bread. easy job, you’d think.

however, in a world where humans are about to start exploring other planets like Mars, in a world where we can talk to people in the other side of the planet and instantly send them live pictures of our happy vacations, the task of “toasting a slice of bread” proves to be challenging for our scientists and engineers. especially the “without burning the toast” bit of it. what i’m saying is that for some reason you’ll always burn half the slices you bought.

so yes, apparently there’s something with the toasting technology that we keep failing at, still in 2013. that, or companies producing sliced bread have secret agreements with the toaster manufacturers!

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.

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.

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.

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 320×200, 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)

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. 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!)?

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

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.

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??”

yes i have fear to bombs, war, murder and violence.

but i do have deeper fear to the ideas that motivate those bombs, wars, murders and violence.

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.

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”

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!

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

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

- some people thing i’m supposed to be a fierce defender of my homeland above everything just because i’m basque
- some people think i’m supposed to be a great “latino stuff” dancer just because i come from spain (er… there’s some serious intercontinental cultural confusion regarding this)
- some people think i’m supposed to be an entrepreneur just because i live in The Valley and i happen to work on my own projects
- some people think i’m supposed to be a politically blind socialist with liberal ideals just because i am european

it’s interesting (or alarming) realizing how i get to be labelled so differently depending who i’m being analyzed by. needles to say that, despite i’m in love with the place i was born, despite i like dancing, despite i like developing and sharing my ideas, and despite i was educated in a society that naturally cares about one another, those people presuming those identities of mine are all wrong!

i wonder how much of that same thing i do regarding other people when i meet them for the first time. i believe not much, but i’m obviously not the best person to tell.

they are about to open a new store in the neighborhood. i walk by it almost every night. it’s still unfinished, you can see they are still working on it because there’s nothing in it yet, but a couple of items in the windows. one of them is a fantastic chocolate cake with some platform high heel shoes on it. so sweeeeeeet! and the cake is probably delicious too.

now, i’ve no idea what the store will be about once it’s complete. but i can already tell i’m gonna like it!

sometimes (i mean, very often), somebody weird-looking comes in the train car. i love it when that happens.

my first reaction is thinking “good for them”. then, i like looking and inspecting the much weirder faces people put while staring at the newcomer. it’s really entertaining to analyze their reactions: surprise, unease, curiosity, disapproval, envy.

so next time somebody weird looking joins in a public place, don’t stare at him/her, but look at the people around. it is priceless.

i wonder why people keep asking themselves “how is it to be dead” when we all have already been dead; before we were born.

i ask to them, “how was it to not be born yet?”

no, but seriously. why would it be any different? well…

they say there’s nothing like drinking a glass of milk before going to bed.

i don’t drink milk anymore, it’s being 6 years since last time, but making a fractal before going to bed feels almost as pleasant and sweet.

somtimes, you don’t need a reason to make a fractal

a man gets in the Bart car in an electric chair. he asks the old man who was standing in the area reserved for wheelchairs to make some room for him. the old man politely quickly offers him all the space indeed, and moves out of the area despite there’s no seats or room left anywhere else. hence a young man sitting right in front of the wheelchair area stands up and offers his seat to the old man. so the old man proceeds to sit but the train resumes its trip and both of them almost fall. thankfully a woman next to them catches the old man, but she has to give two steps back herself in order to avoid falling down while holding his weight. in doing so she steps over my left foot.

then there is a succession of thankyous and sorrys, don’t worrys and launghts between the five persons involved in this long chain of domino events.

I met my neighbor, who is an man in his 60s or 70s (I can never tell), when I was leaving my apartment this morning. He told me “That was beautiful”.

I had just played the piano a few seconds before, as I do every morning right before leaving for the office. I always count with most neighbors being off at work by then, but seems some unfortunate soul like this mans must have been suffering those three daily minutes.

Still, I’m glad that we talked about other stuff than the music on our way out together. Once outside, when about to jump in my bike, I asked him his name. “Bill”, he said. Before I could tell him my name and introduce myself he told me: “You know, there’s only one more Inigo that I know of”.

At this point I realized that I must have been annoying the shit out of this poor man a lot lately with my piano thing, if he already knew my name by now. Then I expected to be told about “The Princess Bride”, but instead the man proceeded with “There was an Inigo living in Great Britain in the times of Shakespeare, who was a designer and architect working for the royalty, and founder of the classical British architecture”.

We talked a little bit more, and then I finally started pedaling uphill California St thinking about what could have possibly been the adventurous story of a Basque name ending up serving a British man.

this time’s mathematical image for my weekly commitment was an experiment on simple locomotion – i wanted to see how it would be to make a mathematical creature move, mathematically as well.

as usual in these weekly experiments time was a limiting factor in development. sure enough with more time i’d have made a better formulanimation (and i’d have iterated in improving the shape of the creature and its colors/textures). but then again, the essence of these weekly images is to prevent me from getting stuck in a single idea for a long time, and go to something new the coming week. that way i can explore lots of stuff without getting lost in the endless refining of the final product. the more i try, the clearer it is in my mind what i’m doing next. it’s an exciting process, and i’m very glad i decided to undertake. in the meanwhile i do have other projects where i can put or my attention to detail anyway.

so yeah, this was a couple of three hours sessions. quite an investment, i must say, i don’t think i’ll spend this much time in a single image anytime soon. i must say however that during these six hours i spent most of the time fighting the technical difficulties set by the web browsing technology on which the maths run, not on making the actual images. sad, somehow wasted time. i guess that’s the prize you pay for accessibility and ease of distribution (as opposed to an installable demo application). as result of this lack of actual production time, the sky is flat, the shape of the insect way too simple, the textures are broken, the terrain has random black dots, and the movement of the creature is too simple and lineal.

BUT, despite all of these, the result is goo enough as to stop here, call it a new successful image for my exercise, and move on. i think i’ll do another creature/character this time, i have enjoyed doing something that is alive.

for the curious, the body of the insect is an ellipsoid plus some cosinuses, the legs some thick conical line segments plus a cosinus, and their smooth attachment to the body some exponential.log based function. if you want to see it moving in your own computer, or to explore more the mathematical details of the making, just follow this link: https://www.shadertoy.com/view/Mss3zM

i also rendered this video below over night, which higher quality than what the web browser can give you out of the box. hopefully you’ll find yourself saying “creeeeeepie!”. that means the math is doing its thing :)

i’m sorry, but “cocktail” still feels like two words to me. i cannot avoid it. to my hears, “lets drink a cocktail” doesn’t sound exactly glamorous.

A woman stopped me and my friend last night in Bush and Hyde, while we were walking to downtown and talking about how many thousands of times we’ve walked these streets already. The woman followed us for half a block, running trying to talk to us, until we finally noticed her and stopped. She was tired, and she looked a bit weird (well, everybody does look weird in this city anyway, which defeats the meaning of weirdness anyway, and which I celebrate). Then, she talked to us in a clearly nervous voice: “Hi guys, sorry, I don’t want anything from you, don’t worry. Just wanna say that you bring energy and happiness to the neighborhood. I was drinking a cocktail and say you pass by, and.. my life is weird, my brother and I are from different mums, and… Well, I’m happy you passed by me, you have a fantastic energy and… Hm, I think that we don’t say these sort of things often enough, so I though I’d do it. So.. thanks for being here”.

This is the second such bizarre (but gratifying) interaction in less than a week, and I’m not used to it (but I like it). It is the spring that makes people happier and keen to talk to strangers?

I found this fossil in my code, which indisputably proves that, if anything, this is painting rather than actual programming – you can clearly see the evolution of the local brush-strokes, piling one after the other, exploring/iterating til the final result was reached. From actual code:

w[i] = s*(1.0f-s) * slen * 0.04f * 0.66f * 2.0f * 1.5f * 1.5f * 0.5f;

Code-wise this is horrifying. But then again, this is not programming

i love that glass. but unfortunately it’s gonna fall and break. it’s unavoidable.

unless i move it in a bit, as soon as i finish cleaning these dishes, i just have to finish with this few plates, then i’ll do it. yet, i know that that glass will somehow manage to fall and break eventually.

still, it would be great if i moved it right now cause then i’d had more room to let this dishes i’m cleaning dry. i’ll do it now, in a moment. in fact, you know what, it’s decided already – two more plates, and i’ll move it. cause, oh boy, i can totally see it falling and breaking, it’s gonna happen for sure.

in the other hand, now that i think about it, it’s being there for a while… so wouldn’t it be really bad luck if it fell and broke now that i have only one plate left? the pile seems to be pretty stable after all. yet… i know the glass is gonna fall and break. which is a pity cause i really like this particular glass.

well, never mind, i have just finished washing the last plate and it’s all fine, nothing broke. but i’ll move the glass anyway just in case. i just have to put this last plate here… and now take the glass and…

too late. the glass starts sliding as soon as leave the plate and, finally, falls. and breaks.

just as expected