4
Introduction to Programming Elective: Class 1 Exercises 1 Activity 1 The processing.org web site has a lot of "exhibition" examples at: http://processing.org/exhibition/ Using a Browser, have at look at some of the following that I've selected. Just pick the ones that look interesting, or in random order. Some of them don't appear to work in Chrome, but may work ok in Firefox or IE? Some are interactive programs, some images, some videos. Run the programs or play the embedded videos if available. Try and work out how Processing programs are being used (sometimes there is a "how does it work" or "description" link) Pick one that you like (and remember which one it was), and be prepared to tell us what you liked about it next week. If you are sharing a PC please take turns Here's the list: Fluid http://cargocollective.com/hnx/fluid Fluid is a concept study of an interacting, changing surface that uses non-newtonian fluid, an Arduino board, a speaker and Processing to allow surface to change from liquid to solid, from plain to three-dimensional symmetric patterns. 3d printed record http://www.instructables.com/id/3D-Printed-Record/ Created using Processing, ModelBuilder Library by Marius Watz and a 3D printer, Amanda Ghassaei at instructables managed to print a 33rpm music record that actually doesn’t sound too bad considering the limitations of currently available 3d printing technologies. stone spray http://www.stonespray.com/ Stone Spray is a construction method which uses soil as the base material and a liquid binder to solidify the soil granules. The device uses an Arduino UNO, Processing application and a custom built jet spray system to deposit the mix of soil and binder, for constructing architectural shapes. city sounds http://markmckeague.com/work/city-symphonies/

Introduction to programming - exercises 1

Embed Size (px)

Citation preview

Page 1: Introduction to programming - exercises 1

Introduction to Programming Elective: Class 1 Exercises

1 Activity 1 The processing.org web site has a lot of "exhibition" examples at: http://processing.org/exhibition/ Using a Browser, have at look at some of the following that I've selected. Just pick the ones that look interesting, or in random order. Some of them don't appear to work in Chrome, but may work ok in Firefox or IE? Some are interactive programs, some images, some videos. Run the programs or play the embedded videos if available. Try and work out how Processing programs are being used (sometimes there is a "how does it work" or "description" link) Pick one that you like (and remember which one it was), and be prepared to tell us what you liked about it next week. If you are sharing a PC please take turns Here's the list: Fluid http://cargocollective.com/hnx/fluid Fluid is a concept study of an interacting, changing surface that uses non-newtonian fluid, an Arduino board, a speaker and Processing to allow surface to change from liquid to solid, from plain to three-dimensional symmetric patterns. 3d printed record http://www.instructables.com/id/3D-Printed-Record/ Created using Processing, ModelBuilder Library by Marius Watz and a 3D printer, Amanda Ghassaei at instructables managed to print a 33rpm music record that actually doesn’t sound too bad considering the limitations of currently available 3d printing technologies. stone spray http://www.stonespray.com/ Stone Spray is a construction method which uses soil as the base material and a liquid binder to solidify the soil granules. The device uses an Arduino UNO, Processing application and a custom built jet spray system to deposit the mix of soil and binder, for constructing architectural shapes. city sounds http://markmckeague.com/work/city-symphonies/

Page 2: Introduction to programming - exercises 1

Mark McKeague explores an alternative of the traffic in the city where the sound that cars generate changes according to their relationship to other road users and the environment. Using Processing in combination with MaxMSP, a traffic simulation is used to power the movement of vehicles through different sections of road networks in London. Soundmachines http://www.the-product.org/soundmachines The Product were commissioned by Volkswagen to develop a set of visuals for an interactive musical performance for the premiere of the New Beetle at the 2011 IAA motor show. What the client got instead was Soundmachines – a custom-built instrument for performing electronic music by DJing visual patterns on record-sized discs. Bags http://nilsvoelker.com/content/onehundredandeight/index.html One Hundred and Eight is an interactive wall-mounted Installation made out of ordinary garbage bags. Controlled by an Arduino and Processing, each of the bags is selectively inflated and deflated in turn by cooling fans. privacy http://www.niklasroy.com/project/88/my-little-piece-of-privacy/ Niklas' workshop is located in an old storefront with a big window facing towards the street. In an attempt to create more privacy inside, Niklas decided to install a small but smart curtain. [This one is my favourite :-)] curious sound objects http://vimeo.com/10173262 Six mundane objects incorporate sensors that trigger feedback to the user as part of a fictional history of the objects. Simulation http://onecm.com/projects/mycelium/ A simulation of fungal hyphae growth using images as food. [look for the face] New years card http://www.flong.com/storage/experience/newyear/newyear02/ For nearly a decade, Golan Levin has used Processing to create his annual interactive holiday cards. Explore this set of modest projects which connect the dots through one artist's process -- and happy holidays! ball drop game http://balldroppings.com/js/ art http://www.firstborn.com/#/our-portfolio/1007/ A generative art exhibition projected onto a seven-story sphere located at New York's South Street Seaport. Click on "launch" Sheep market http://www.aaronkoblin.com/work/thesheepmarket/ The Sheep Market is a collection of 10,000 sheep made by workers on Amazon's Mechanical Turk [Click on the large image at the top and select a Sheep to see if being drawn]

Page 3: Introduction to programming - exercises 1

tube travel http://www.tom-carden.co.uk/p5/tube_map_travel_times/applet/ Reorganizes the London Underground map to visualize travel times from station to station. House http://house.propositions.org.uk/ An environment constructed from thousands of low tech components that can be reconfigured by its occupants. Samsung http://www.suzung.com/body/2006/Kaleido/display.htm Installation for Samsung that turns images from the environment into symmetrical patterns. http://jklabs.net/projects/visualscratch/ Realtime visualization of scratch DJ performance. http://www.aaronkoblin.com/work/flightpatterns/ Flight pattern visualizations from FAA data parsed and plotted in Processing. http://users.design.ucla.edu/~mflux/manifest/ Drawing program where different gestures create varying organisms animated through procedural animation and physics simulations. [Cool - draw in top box] http://www.turbulence.org/spotlight/thinking/ Explores the invisible, elusive nature of thought. Play chess against a transparent intelligence, its evolving thought process visible on the board before you.

2 Activity 2 Check out some example Processing programs and code: http://processing.org/examples/ http://processing.org/examples/creategraphics.html Can you work out what each line in this program does? Have a look at the reference section to see if you are correct: http://processing.org/reference/ Have a look at these basic examples: http://processing.org/examples/statementscomments.html What is a "statement"? A comment?

Page 4: Introduction to programming - exercises 1

http://processing.org/examples/setupdraw.html What does setup do? draw? What are "variables"? http://processing.org/examples/variables.html What are some basic "data types" that variables can have? http://processing.org/examples/integersfloats.html http://processing.org/examples/truefalse.html http://processing.org/examples/charactersstrings.html The full list of primitive data types is under: http://processing.org/reference/ Data, Primitive E.g. http://processing.org/reference/boolean.html

3 Activity 3 Home "play" Try the online tutorial at home: http://processing.org/tutorials/gettingstarted/ This will involve downloading the processing environment onto your computer.