Tag: programming
-
…little help (oh, malloc)?
i’m having a time of it tracking down a resource allocation bloat culprit in an iPhone app i’m working on. i’ve narrowed it down to when i’m rapidly updating the center property of a UIImageView. a snippet from the Instruments application is below: there are hundreds (if not thousands) of these messages, and the object […]
-
(overly simplistic) saving state in oF for iPhone
There was a recent comment about saving / restoring application state when using openFrameworks for iPhone which got me to thinking about how to do it. Apple’s frameworks provide a fairly thorough way to save state to the disk and restore later. There seem to be three primary ways to do this: simple plist files […]
-
ofxiPhoneAlertView
Here is a (really) basic wrapper for the UIAlertView in openFrameworks of iPhone. Not all of the necessary delegate methods have been implemented yet, but this is enough for me to get the proof of concept rolling in an app I’m building. Feel free to let me know how I can do things better, or […]
-
Toy Design: Talking Blocks sketches
Alex and I have been developing the plans for the blocks in preparation for building the prototypes in the next week. For this, I built the community edition of QCad (open source FTW!) and have been teaching myself how to draw with it. There was a bit of a learning curve to the interface and […]
-
counting change
As an in-class exercise for Spatial Media we were asked to develop a program which would identify coins in a series of supplied images and tally up their total value. In one hour. Since time was limited, I decided to use pixel count as a rough estimate of each coin’s size. This works very reliably […]
-
openFrameworks + iPhone
I’ve heard about openFrameworks 0.6 (as of yet unreleased) and specifically efforts to support building apps using oF for the iPhone. There are a few developers who have published videos of their efforts and even several apps in the AppStore. Memo Atken has a very informative article about setting up the prerelease 0.6 version for […]
-
Spatial Media: TrafficFlow update
Simple updates on the project. The previz applet has mouse control for each of the emitters. It’s interesting to see how the glowing packets influence each other when in close proximity. Here’s the applet. Camera vision. Started working with openFrameworks to do the visual tracking of objects on the table. Unexposed portions of developed film […]
-
Simple things feel so good. (warning: geekery)
Toggle an integer variable between 0 and 1. Useful for a flag to control program flow in C without boolean types. toggleVar = 1>>toggleVar; What this is doing is right shifting the integer 1 either zero or one place, depending on the current value of toggleVar. An 8-bit (unsigned – positive values only) integer has […]
-
Using Arduino in Xcode
While the Arduino IDE (Integrated Development Environment) is relatively simple way to program the Arduino hardware, I found myself getting frustrated by it’s limited features after spending time using Xcode and Eclipse. There are some simple tutorials available online which demonstrate how to set up Xcode for programming the Arduino, however these didn’t “just work” […]