March 21, 2014 at 11:59

Recently, I needed to create an online tool to edit html and to have the ability to preview the changes at the same tab/window and I decided to create such a tool by myself.

I called this pet project liveHTML and it is online. It is not revolutionary, but I had fun integrating jQuery, FileSaver.js and Ace code editor. The idea is pretty simple: one screen, two main columns: on the left, HTML code, on the right, the HTML rendered.

Processing and livetifact

July 1, 2013 at 08:24


Three weeks ago, I enrolled in a Coursera course called Creative Programming for Digital Media & Mobile Apps. I’m enjoying the course very much despite I find it a bit easy. We were asked to develop a couple of projects, focusing both on the artistic and the programming part. We’re using the Processing framework to accomplish our goal. The IDE is prepared to export code written in Java to Android (Java), web browsers (JavaScript) or as a desktop application (the default behavior). Depending on the architecture chosen, the code may change, so it’s important to develop with some architecture in mind.

At the moment, I’ve been playing in four different mini-projects or sketches, as processing community called them:


It’s a little grass-field simulator. I wanted to play with bezier curves and the wind (simulated when clicking with the mouse on the screen). You can access the sketch here (only works on Chrome): grass.


This sketch is opening a Caffeine molecule from a PDB file and displaying it in 2 dimensions. Here it is a small screencast:

You can download the binary and the code from here.


Same as before, but this time using 3D capabilities:

Download the binary and code from here.


This is my favorite project, I’ll spend much more time on it in the next three weeks. Livetifact names comes from “live” and “artifact”, it’s a kind of cell which breaths (and suffers from some anxiety!). You can feed it clicking on the screen. Livetifact will launch its ciliums to catch the food and will generate some sound (or noise). I’m planning to use it as a platform for developing a “sensing and living” sampler. Access the project here (only fully supported on Chrome browser): livetifact. There’s a lot of job to do on the programming, sound and graphics parts.

Distributing N points on a sphere

February 25, 2013 at 22:55

In one of my PhD projects, I had the need to distribute n points on a sphere of radius r. I found a very interesting post in stackoverflow about how to solve the problem and I tested a few of the solutions they proposed by myself. In my opinion, one of the most elegant solutions consists in using a spiral function to distribute the points uniformly. Below you can find a little snippet in Python which uses the spiral method to calculate a list of n points (thanks to my colleague Iain for sharing his source code with me):

This function is based on the original work “Minimal Discrete Energy on the Sphere” which you can find online here.

An this is how a sphere of radius 10 with 300 points looks.

Points on a sphere using the spiral method

Points on a sphere using the spiral method


December 17, 2012 at 11:16

Zambombator AndroidZambombator is the name of a new Android application I’ve been developing these last weeks with a couple of friends. Zambomba is a typical instrument used in Spain during Christmas time and for those who can’t afford one,  we decided to create a “simulator” for Android devices 🙂

You can download it for free from Google play store. Have fun!


BcnDevCon 2012

December 9, 2012 at 13:09

This year I’ve attended to the Barcelona Developers Conference. It was fun and I really enjoyed a few talks, specially “From pull to push, the road to real-time web” by Aitor Guevara (@aitorciki), Cocos2D workshop and Arduino workshop, where I played for the first time with an Arduino One board.

Comparing this conference to the Madrid Codemotion I also attended, in my opinion BcnDevCon was richer in workshops, but lacking big state-of-the-art topics. But definitely, it was really well organized (kudos to the organizers!) and I’m planning to attend next year’s edition.

Now I feel inspired to start playing with new API’s and technologies and, why not, start a few new pet projects. More posts coming soon!

All images are copyright of BcnDevCon.

Panda3D and rapid prototyping

October 14, 2012 at 12:59

A new project I’m involved in requires a walking skeleton in a few weeks and it consists of a 3D interface where some proteins are displayed. My first idea was to reuse some C++ libraries I coded a couple months ago to read and parse PDB files (proteins) and use what I know from Qt and OpenGL to display them. But wait, what about time constraints? My friend trikitrok recommended me to have a look at the state-of-the-art python 3D engines and I ended in the Python wiki checking the Python Games section. After comparing them, I chose Panda3D. The main reasons why I chose it are:

  1. Panda3D is free and open source. It also includes proprietary parts, but there is always free code to avoid them already encoded in the engine.
  2. It’s being developed by Disney and Carnegie Mellon and it has been tested in real (and commercial) projects.
  3. The core is written in C++, but Python bindings are available. It’s possible to code some parts in C++ and the rest in Python.
  4. Documentation is simply exquisite.
  5. Really good samples included in the engine.

And which is the result? In three days I’ve encoded most of the functionalities required and the application looks sexy!

I even had time to play with pixel shading and cartoon filters 🙂

Despite I didn’t optimize any line of code, the application runs fluid and if the project goes on I could code the critical parts in C++ to gain performance. I’m absolutely in love with Panda3D engine 🙂