Archive for December, 2008

Voxel Play

Sunday, December 28th, 2008

When I was a junior in college I programmed a small 3D engine using math I didn’t understand. At the time, I didn’t know that I had created something like a voxel 3D engine.

When I began working with processing I learned about voxels through the forums - I remember seeing some great voxel perlin noise, metaballs and other fun experiments there…

Anyway, I was trying to think of a good reason to use a triple nested for loop (for actionsnippet.com) and voxels came to mind. I spent the rest of the day playing around and ended up with some interesting results….

continue reading to see the interactive flash version…

Read the rest of this entry »

Atan Texture

Monday, December 22nd, 2008

A recent post on my other blog actionsnippet.com created a black and white texture with arc tangent. The results look like this:

The original was written in actionscript… I then ported it to processing so it would run in realtime… I also optimized the code a bit and created look-up tables for a few things… check it out here.

The source is included there… and here is the original actionsnippet post.

Processing!

Saturday, December 6th, 2008

If you haven't heard yet, Processing is now out of beta. I don't have words to express my admiration for it's creators Ben Fry and Casey Reas. It had been a few years since I messed with it - because after I spent about a year using it on a regular basis... I was able to teach myself Java, C++ and OpenGL. Processing exposed me to lower level pixel manipulation than I had ever done in Flash or Director... and taught me techniques that made understanding the basics of OpenGL easy.

Today I downloaded Processing 1.0 and started playing around. In just a few minutes I was very happy.

JAVA:
  1. import processing.opengl.*;
  2.  
  3. float t = 0;
  4. float c = 0;
  5.  
  6. void setup(){
  7.   size(1400,1000, OPENGL);
  8.   ellipseMode(CENTER);
  9.   noStroke();
  10. }
  11.  
  12. void draw(){
  13.   translate(width / 2, height / 2);
  14.  
  15.   fill(0,0,0,5);
  16.   ellipse(50,50,mouseX, mouseY);
  17.  
  18.   t += 0.01;
  19.   c = abs(255 * sin(t));
  20.   fill(c,c,c,10);
  21.   ellipse(0,0,mouseX, mouseY);
  22. }

I think I'm going to work Processing back into my daily coding routine...