aBe PaZoS SoLaTie

March 2014

Mon Mar 31, 2014

This is a semi-automated backup of my old Tumblr account.

ColorJoy

03/17/2014

See it live

Asteroid Field - Creative Code Jam

03/16/2014

A bunch of people get together one day per month and spend the day coding for the fun and the beauty.

This is what came out of the collaboration with two fellow creative coders.

Source code

Bezier Fish

03/14/2014

Brave new blur

03/14/2014

  1. Kids sitting on the roof of a building in Phnom Penh.
  2. Kid removing water from his boat somewhere in the Mekong river.

The images were processed with a filter I wrote in Processing, which applies more or less blur depending on the characteristics of each pixel. In this case, dark means less blur, bright means more blur, but it can also be applied depending on saturation or hue.

I shot the photos in April 2011. More photos here.

Warming

03/13/2014

The effect of global warming in far away planets

Algorithm

03/13/2014

  1. Increase the rotation of a light around a sphere
  2. Draw the sphere
  3. Blur
  4. Map all pixel colors to the colors of another image
  5. Repeat

Twenty four point fifty five seconds

03/13/2014

Attempt to make a long gif animation with just 39 frames by adjusting the delays. 13 key frames (white color, longer pauses) and two interpolated frames between each key frame (short delays, saturated colors).

The program outputs the animation using the gifAnimation Processing library, and also the gifsicle command to set the right delays. Why not setting the delays on gifAnimation? As far as I know, the library does not allow reducing the number of colors. If I reduce the number of colors in gifsicle, the delays previously set by gifAnimation are lost, so I have to do both things with gifsicle: set the amount of colors and the delays.

This is the command printed by the program I wrote (source here):

gifsicle noDelays.gif -d4 "#0" -d129 "#1" -d4 "#2" -d4 "#3" 
-d112 "#4" -d4 "#5" -d4 "#6" -d139 "#7" -d4 "#8" -d4 "#9" -d66 "#10" 
-d4 "#11" -d4 "#12" -d67 "#13" -d4 "#14" -d4 "#15" -d262 "#16" -d4 "#17" 
-d4 "#18" -d251 "#19" -d4 "#20" -d4 "#21" -d288 "#22" -d4 "#23" -d4 "#24"
-d262 "#25" -d4 "#26" -d4 "#27" -d245 "#28" -d4 "#29" -d4 "#30" -d223 "#31"
-d4 "#32" -d4 "#33" -d104 "#34" -d4 "#35" -d4 "#36" -d203 "#37" -d4 "#38"
--colors 128 >withDelays.gif

Tom & Jerry - Night Before Christmas - 1941

03/12/2014

Optical flow study

Collaborative creative coding

03/08/2014

Rules:

  1. Two or more participants.
  2. Each participant writes a program in 15 minutes.
  3. The program must generate 10 seconds of live graphics.
  4. The participants pass their programs to the one on the right.
  5. If the participant has not yet contributed to each program, go to step 2.
  6. Watch the results.

In the end, there should be as many programs as participants, and each program should generate graphics with a duration of 10 seconds per participant (2 people = 20 seconds, 3 people = seconds, etc.). Each contributes one beginning, one end, and maybe some middle sections if there were more than two participants.

In this case we were two, and this is one of the results. It was a good challenge to have something working in such a short time.

This is one of a number of collaborative coding exercises we are experimenting with in our regular creative coding meetings.

Glow

03/05/2014

filter(BLUR) + blendMode(ADD) = glow

code

Snake Torus

03/05/2014

Combination of the last sketch and my first animgif.

Motion that gets you nowhere.

Background by letmelive4sh0.

Intertwined

03/05/2014

I ask myself if sharing the code to programs like this one would be useful to anyone. It’s written so fast, with so many one letter variables, and so few comments that it’s probably not so helpful. But here it is anyway.

I think the concept is more interesting than the code. One idea made me write this program. I thought that in many sketches it’s clear what is in front and what is behind. This happens because things just get added to the screen, on top of everything else. But what if I wanted to have objects that could be in front and behind other objects?

So I thought of making tubes that revolve around each other. The tubes are actually made of spheres, but they look flat because I did not call lights(). I wanted to have this flat look.

Drawing actual tubes would be much more efficient than drawing spheres. But since no one is paying me to write efficient code… :)

The whole shape must be drawn in one frame for depth sorting to work.  If you would add new shapes on new frames, the new shapes would always cover previously drawn graphics, even if they were supposed to be behind other objects. Depth sorting takes care of making objects which are closer to you cover objects which are further away from you.

The alternating colors make the motion more interesting. Without them, it looks like the shape is just spinning around its center. With the alternating colors some confusion is added: the stripes try to be still, but the waves keep waving and rotating.

The glow is just a simple filter(BLUR, 6) call. I made one of the tubes black to avoid the blur to spreading all over the screen. This way I keep the glow under control.

For creating the animated gif I used this command:

gifsicle --delay=4 --loop --dither 
--rotate-270 --colors 24 *.gif > /tmp/anim.gif

About blend mode ADD and depth

03/03/2014

I like the lack of smoothness of the previous animation, but I wanted to understand why was it happening. Why are there dark lines on top of bright lines, when using blenderMode(ADD)? I assumed the more lines I added, the brighter the image should be.

The reason is depth sorting. I’m drawing in 3D. If I draw something on top of existing shapes (that means drawing closer to the camera than previous shapes), the ADD mode works. But if I draw behind previous shapes (farther away from the camera), there is nothing to ADD to, so the stroke color is calculated (ADDED) to the background color, and the resulting color is slightly brighter than the background, but darker than part of the existing image. The funny thing is that the shape is drawn on top of previous lines (not behind), and so I get a dark line on top of bright ones.

By deactivating depth sorting, color calculations are always done with whatever pixels are on the screen, independently from the distance to the camera. The animation is smoother, but in my opinion some depth is lost. To deactivate depth sorting I use hint(DISABLE_DEPTH_TEST).

Far away

03/03/2014

When you look at our planet from far enough, it’s not even visible. Problems of all sizes are suddenly gone.

Tags: processing. tumblr.