Categories
Uncategorized

Processing: RGBoxer

RGBoxer

With our latest Processing sketch it’s time to play with the mouse, and the keyboard as well. I mean, we can’t just leave out the keyboard!

See it in action here!

This one is simple, just drawing a box, and using the ‘r’, ‘g’, and ‘b’ keys, you can change the color. You can also hit ‘q’ to blank the canvas and start over.

RGBoxer

We use width/2, height/2 for proper centering of our box. Also, you’ll see that all the real action happens when you click and drag the mouse. Once you start doing that, you can press the r, g, or b key to change the color.

/*
 * 20110513.pde
 */

void setup() {
  size(800, 600);
  noFill();
  strokeWeight(1);
  stroke(255,0,0);
  background(0);
}  
  
void draw() {

  if(keyPressed) {
    if (key == 'r' || key == 'R') {
      stroke(255,0,0);
    }
    if (key == 'g' || key == 'G') {
      stroke(0,255,0);
    }
    if (key == 'b' || key == 'B') {
      stroke(0,0,255);
    }
    if (key == 'q' || key == 'Q') {
      background(0);
    }
  }
  
}

void mouseDragged() {
  rectMode(CENTER);
  rect(width/2, height/2, mouseX, mouseY);
}
Categories
Uncategorized

Ready for Pushing

Ready for Pushing

So I’ve been working on this button, and one of my “in progress” photos got a mention on Make, and that was cool, but I wasn’t quite done. :)

NOTE: Need a button? Now you can buy one! Visit our store or Etsy.

The button was just part of this larger project to build a photo booth, which is mostly done, as you can see by the photo below.

So basically, this button is ready for pushing. I’ve got a number of events I’ll be at in the few weeks, and this thing will accompany me to some of them. Oh, it can also automagically upload the photos to various web sites on the Internets…

Ready for Pushing

I ended up building a stand for it which places it at the correct height for the typical human being, and thanks to the button, the whole thing can be operated by a single press. No keyboard, no mouse, no muss, no fuss.

The first test is tomorrow… we’ll see how it goes!

Categories
Uncategorized

Boba Fett

Boba Fett

Over in the Twittersphere I gained a new follower today: @starwarsart, which has a bio that states “We search the web for the best in Star Wars Art and post it on our site daily!”

Sure, I follow @bonniegrrl, and I enjoy the occasional Star Wars art, but I couldn’t even remember if I had created any in recent times… so I figured I couldn’t let the folks behind starwarsart.org down, so here’s a crummy drawing of Boba Fett I made during lunch.

Of course the fact that they are looking for “the best in Star Wars Art” may mean that this drawing is featured nowhere on the Internet except right here… so enjoy!

Categories
Uncategorized

Processing: Circle Square

Circle Square

I decided to draw a circle, but wanted to use a square to do it. Or at least that’s the explanation I’ll give…

See it in action here!

I really just wanted to play with rotating an object a bit more. Obviously this is 2D rotation… The 3D stuff I still find a bit more complex, but should be able to show something in that arena soon.

/*
 * 20110511.pde
 */

float a = 0;
int s = 255;

void setup() {
  size(800, 600);
  frameRate(30);
  background(0);
  strokeWeight(1);
  noFill();
}

void draw() {

  float c = cos(a);
  translate(width/2, height/2);
  rotate(c);
  rectMode(CENTER);
  stroke(0,s,0);
  rect(0, 0, 350, 350);
  
  a = a + 0.1;
  
  if (s < 1) {
   s = 255; 
  }
  
  s = s - 1;
    
}
Categories
Uncategorized

Processing: WordCram

WordCram

Today in Processing we won’t even show you a sketch, but we will talk about Processing, and sharing, and code.

So part of the fun of doing this “Processing Month” thing has been in sharing my exploration. Make no mistakes, I’m not an expert at Processing, not even close… I’m pretty much a newbie. That’s OK though, because I like to learn as I go.

It seems strange that it’s only been a week since I posted my Overlapping Ovals sketch, because I’ve already learned things since then, and would do it differently today. Lucky for me, a guy named Dan Bernier left a comment. And it was encouraging. And he left a link that pointed me to WordCram.org, which is described as: open-source word clouds for Processing.

So I grabbed WordCram and tested it out. (The results are in the image above.)

After installing the WordCram library, I took a look at the examples, and took the first one (firstnamesUsingWordPresets) and tweaked it just a bit, and fed it my own word list. My list consisted of the tags from this blog, and the number of times they appear. (See the file here.) I did remove any words that were only used once.

If you’re intimidated by Processing, you shouldn’t be… it’s fairly easy to get started, and there are lots of great example sketches out there. If that’s not enough, I hear that some guys in Milwaukee are planning a Processing class to help get other folks up to speed. :)

Stay Tuned!