Posts

Cloth Simulated on iPhone

Image
I have always wanted to make a cloth simulation program. The idea of a grid of points controlled by a bunch of springs just seems so simple to implement with such interesting results. Thanks to people much smarter than me, like Thomas Jakobsen , there is a de facto algorithm for it and plenty of tutorials. I've pretty much completed the graphics part of this exercise, which means I have a variable grid that I can draw... now I just need to put in all those equations and algorithms to make it move around. Here's a screenshot of the progress. One interesting thing in this picture are the colored parts of the grid. I allocate an array for the vertex colors but have not yet initialized it, so its just random data. The colors change a little when I make touch events. Update: Cloth is pretty much finished now, more pictures and a short video on flickr.

OpenGL ES - Procedurally Generated Cylinder

Image
I'm just getting started with OpenGL on the iPhone and the first object I need is a cylinder. I created a small C++ program to generate the structures needed. The resulting cylinder looks like this: Here is the code:

Xcode 3.2.1, Interface Builder and Outlets

First day of iPhone development and I've already hit a problem.  Using the Stanford iPhone Application Development course as a crash course the first lecture had a demo application  using a program called "Interface Builder" to hook together a bunch of pieces for a basic UI.  Well the most important part, hooking the pieces together, changed with version 3.2.  Rather than creating the outlets from the interface they must be added explicitly to the header file. For completeness, here is the code which needs to be added (it was difficult to read from the video) MyConenctor.h @interface MyController : NSObject { IBOutlet UILabel *label; IBOutlet UISlider *slider; } -(IBAction)changeLabelText:(id)sender; MyConnector.m -(IBAction)changeLabelText:(id)sender{ int value = slider.value; label.text = [NSString stringWithFormat: @"%d", value]; }

Taking Stuff Apart: Bell & Howell 2143 XL Video Camera

Image
I came across a Bell & Howell 2143 XL, a quick search on ebay showed that this thing had little to no value. Its from the 1978-1980 's and is an impressive mess of electronics and machinery. This particular device is video only. Here it is:

Taking Stuff Apart: Oster Battery Charger

Image
I came across a battery charger for some heavy duty animal shears.  The thing had a nice heft to it.  Inside there were a couple relays, a barrel jack, some big caps and a bunch of ICs which I haven't looked up the part numbers for. After opening it up it was apparent the failure was a diode that somehow cracked in half.  There were magic smoke stains on the underside and everything. Here it is, as always click the pictures for higher resolution and additional pictures:

SparkFun's Free Day

Image
Today was Free Day at SparkFun and like many geeks around the world I had a shopping cart prepared in advanced (last night to be specific). At 11AM EST the floodgates were opened and the SparkFun servers ground to a halt as thousands of people attempted to claim a $100 prize.

DIY Oscilloscope

Image
WARNING POTENTIALLY HIGH VOLTAGE INVOLVED EVEN WHEN DISCONNECTED, DO NOT ATTEMPT IF YOU ARE UNSURE WHAT PARTS ARE DANGEROUS Using the portable TV in my last post I did a simple hack to convert the tube into a really really crummy oscilloscope. Most likely all it will be able to do is tell me whether the voltage is positive or negative, but thats all I really want it to do.