O'Reilly logo

Making Things See by Greg Borenstein

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Project 4: A Wireless Tape Measure

The code in this section is going to introduce a new programming concept that I haven’t mentioned before and that might not be completely familiar to you from your previous work in Processing: accessing arrays of pixels. Specifically, we’ll be learning how to translate between a one-dimensional array of pixels and the two-dimensional image that it represents. I’ll explain how to do all of the calculations necessary to access the entry in the array that corresponds to any location in the image. And, more important, I’ll explain how to think about the relationship between the image and the array so that these calculations are intuitive and easy to remember.

At first, this discussion of pixels and arrays may feel ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required