Daily Archives: 2/27/2011

Pixels Past Circuit Boards

I’ve done a couple of Atari 2600 projects in the past: my Pong clock and my Enigma Machine simulator. To make physical realizations of these projects, I relied on some boards that I bought a few years ago from AtariAge, but when I checked a few months ago, it appeared that they had stopped selling them in their store. It wasn’t a big deal, but I did consider the fact that at some point I might want to have some more PCBs for future projects.

Luckily, the guys at Grand Idea Studio did all the heavy lifting, and have PCBs not just for the Atari 2600, but also many other classic video games systems, including schematics and Gerber plot files. Archived for a future project.

Pixels Past Circuit Boards | Grand Idea Studio.

Animated Vector Graphics on an Oscilloscope

I lost the original edit to this post. Recreated.

So, while watching the Oscars, I decided to hack together a simple little graphics program that would allow me to generate more sophisticated graphics for the oscilloscope. I ended up with 263 lines of code that implemented a simple matrix-based set of graphics commands. Eventually, I’ll add some line clipping and some other graphics primitives, but for now, it seems to be working just fine.

YouTube – Animated Vector Graphics on an Oscilloscope



To give you a taste of what the library lets you do, here is the set of commands that I used to generate the animated dial you see in the film.

[sourcecode lang=”C”]
void
Dial(double seconds)
{
int i ;
TransformPush() ;
fprintf(stderr, "… angle %lf\n", seconds*6.) ;
Rotate(seconds*6.) ;
Line(0.0, 1., -0.05, -0.05) ;
Line(-0.05, -0.05, 0.05, -0.05) ;
Line(0.05, -0.05, 0., 1.0) ;
TransformPop() ;

for (i=0; i<360; i+= 6) {
TransformPush() ;
Rotate((double) i) ;
if ((i % 30) == 0)
Line(1.0, 0., 0.90, 0.) ;
else
Line(1.0, 0., 0.95, 0.) ;
TransformPop() ;
}
}
[/sourcecode]

Addendum: Congrats to Lee and all the Toy Story 3 crew, and to Randy for winning his second Oscar (with twenty nominations, incredible). He definitely has had the best speech of the night so far.