├── appendix a ├── layouts │ ├── settings.gradle │ ├── app │ │ ├── src │ │ │ ├── main │ │ │ │ ├── res │ │ │ │ │ ├── values │ │ │ │ │ │ ├── dimens.xml │ │ │ │ │ │ ├── strings.xml │ │ │ │ │ │ ├── colors.xml │ │ │ │ │ │ └── styles.xml │ │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ │ ├── ic_launcher.png │ │ │ │ │ │ └── ic_launcher_round.png │ │ │ │ │ ├── menu │ │ │ │ │ │ └── menu_main.xml │ │ │ │ │ └── layout │ │ │ │ │ │ └── content_main.xml │ │ │ │ ├── assets │ │ │ │ │ └── mosaic.jpg │ │ │ │ ├── java │ │ │ │ │ └── processing │ │ │ │ │ │ └── book │ │ │ │ │ │ └── layouts │ │ │ │ │ │ └── MySketch.java │ │ │ │ └── AndroidManifest.xml │ │ │ ├── test │ │ │ │ └── java │ │ │ │ │ └── processing │ │ │ │ │ └── book │ │ │ │ │ └── layouts │ │ │ │ │ └── ExampleUnitTest.java │ │ │ └── androidTest │ │ │ │ └── java │ │ │ │ └── processing │ │ │ │ └── book │ │ │ │ └── layouts │ │ │ │ └── ExampleInstrumentedTest.java │ │ ├── libs │ │ │ └── processing-core.jar │ │ ├── proguard-rules.pro │ │ └── build.gradle │ ├── .idea │ │ ├── copyright │ │ │ └── profiles_settings.xml │ │ ├── encodings.xml │ │ ├── modules.xml │ │ ├── runConfigurations.xml │ │ ├── gradle.xml │ │ └── compiler.xml │ ├── gradle │ │ └── wrapper │ │ │ ├── gradle-wrapper.jar │ │ │ └── gradle-wrapper.properties │ ├── build.gradle │ └── gradle.properties └── listing_a_1 │ ├── code │ └── sketch.properties │ └── listing_a_1.pde ├── chapter 1 ├── listing_1_1 │ ├── code │ │ └── sketch.properties │ └── listing_1_1.pde └── circle │ ├── code │ └── sketch.properties │ └── circle.pde ├── chapter 14 ├── listing_14_1 │ ├── code │ │ └── sketch.properties │ └── listing_14_1.pde ├── listing_14_2 │ ├── code │ │ └── sketch.properties │ └── listing_14_2.pde ├── listing_14_4 │ ├── code │ │ └── sketch.properties │ └── listing_14_4.pde ├── listing_14_5 │ ├── code │ │ └── sketch.properties │ └── listing_14_5.pde ├── listing_14_6 │ ├── code │ │ └── sketch.properties │ └── listing_14_6.pde ├── listing_14_7 │ ├── code │ │ └── sketch.properties │ └── listing_14_7.pde ├── listing_14_8 │ └── code │ │ └── sketch.properties ├── listing_14_9 │ └── code │ │ └── sketch.properties ├── listing_14_10 │ ├── code │ │ └── sketch.properties │ └── listing_14_10.pde ├── listing_14_11 │ └── code │ │ └── sketch.properties ├── listing_14_12 │ └── code │ │ └── sketch.properties ├── listing_14_13 │ └── code │ │ └── sketch.properties └── listing_14_3 │ ├── code │ └── sketch.properties │ ├── data │ └── mosaic.jpg │ └── listing_14_3.pde ├── chapter 2 ├── listing_2_1 │ ├── code │ │ └── sketch.properties │ └── listing_2_1.pde ├── listing_2_10 │ ├── code │ │ └── sketch.properties │ └── listing_2_10.pde ├── listing_2_11 │ ├── code │ │ └── sketch.properties │ └── listing_2_11.pde ├── listing_2_12 │ ├── code │ │ └── sketch.properties │ └── listing_2_12.pde ├── listing_2_13 │ ├── code │ │ └── sketch.properties │ └── listing_2_13.pde ├── listing_2_14 │ ├── code │ │ └── sketch.properties │ └── listing_2_14.pde ├── listing_2_15 │ ├── code │ │ └── sketch.properties │ └── listing_2_15.pde ├── listing_2_16 │ ├── code │ │ └── sketch.properties │ └── listing_2_16.pde ├── listing_2_17 │ ├── code │ │ └── sketch.properties │ └── listing_2_17.pde ├── listing_2_2 │ ├── code │ │ └── sketch.properties │ └── listing_2_2.pde ├── listing_2_3 │ ├── code │ │ └── sketch.properties │ └── listing_2_3.pde ├── listing_2_4 │ ├── code │ │ └── sketch.properties │ └── listing_2_4.pde ├── listing_2_6 │ ├── code │ │ └── sketch.properties │ └── listing_2_6.pde ├── listing_2_7 │ ├── code │ │ └── sketch.properties │ └── listing_2_7.pde ├── listing_2_8 │ ├── code │ │ └── sketch.properties │ └── listing_2_8.pde ├── listing_2_9 │ ├── code │ │ └── sketch.properties │ └── listing_2_9.pde ├── listing_2_18 │ ├── code │ │ └── sketch.properties │ ├── Flower.pde │ ├── listing_2_18.pde │ └── Spiral.pde └── listing_2_5 │ ├── code │ └── sketch.properties │ └── listing_2_5.pde ├── chapter 4 ├── listing_4_11 │ ├── code │ │ └── sketch.properties │ └── listing_4_11.pde ├── listing_4_12 │ ├── code │ │ └── sketch.properties │ └── listing_4_12.pde ├── listing_4_14 │ ├── code │ │ └── sketch.properties │ ├── data │ │ ├── cc.svg │ │ └── ruby.svg │ └── listing_4_14.pde ├── listing_4_16 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_4_16.pde ├── listing_4_17 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_4_17.pde ├── listing_4_18 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_4_18.pde ├── listing_4_19 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── SansSerif-32.vlw │ └── listing_4_19.pde ├── listing_4_20 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── SansSerif-32.vlw │ └── listing_4_20.pde ├── listing_4_21 │ ├── code │ │ └── sketch.properties │ └── listing_4_21.pde ├── listing_4_22 │ ├── code │ │ └── sketch.properties │ └── listing_4_22.pde ├── listing_4_3 │ ├── code │ │ └── sketch.properties │ └── listing_4_3.pde ├── listing_4_4 │ ├── code │ │ └── sketch.properties │ └── listing_4_4.pde ├── listing_4_6 │ └── code │ │ └── sketch.properties ├── listing_4_7 │ └── code │ │ └── sketch.properties ├── listing_4_8 │ ├── code │ │ └── sketch.properties │ └── listing_4_8.pde ├── listing_4_9 │ ├── code │ │ └── sketch.properties │ └── listing_4_9.pde ├── listing_4_2 │ ├── code │ │ └── sketch.properties │ └── listing_4_2.pde ├── listing_4_10 │ ├── code │ │ └── sketch.properties │ └── listing_4_10.pde ├── listing_4_1 │ ├── code │ │ └── sketch.properties │ └── listing_4_1.pde ├── listing_4_13 │ ├── code │ │ └── sketch.properties │ └── listing_4_13.pde ├── listing_4_15 │ ├── code │ │ └── sketch.properties │ └── listing_4_15.pde ├── listing_4_23 │ ├── code │ │ └── sketch.properties │ ├── listing_4_23.pde │ └── data │ │ └── borges.txt └── listing_4_5 │ ├── code │ └── sketch.properties │ └── listing_4_5.pde ├── chapter 5 ├── listing_5_10 │ └── code │ │ └── sketch.properties ├── listing_5_11 │ └── code │ │ └── sketch.properties ├── listing_5_12 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── jelly.jpg │ └── listing_5_12.pde ├── listing_5_13 │ ├── code │ │ └── sketch.properties │ └── listing_5_13.pde ├── listing_5_1 │ ├── code │ │ └── sketch.properties │ └── listing_5_1.pde ├── listing_5_2 │ ├── code │ │ └── sketch.properties │ └── listing_5_2.pde ├── listing_5_3 │ ├── code │ │ └── sketch.properties │ ├── Circle.pde │ └── listing_5_3.pde ├── listing_5_4 │ ├── code │ │ └── sketch.properties │ └── listing_5_4.pde ├── listing_5_9 │ └── code │ │ └── sketch.properties ├── listing_5_5 │ ├── code │ │ └── sketch.properties │ ├── Circle.pde │ └── listing_5_5.pde ├── listing_5_6 │ ├── code │ │ └── sketch.properties │ ├── Circle.pde │ └── listing_5_6.pde ├── listing_5_7 │ ├── code │ │ └── sketch.properties │ └── listing_5_7.pde └── listing_5_8 │ └── code │ └── sketch.properties ├── chapter 6 ├── listing_6_5 │ ├── code │ │ └── sketch.properties │ └── listing_6_5.pde ├── listing_6_2 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_6_2.pde ├── listing_6_3 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_6_3.pde ├── listing_6_6 │ ├── code │ │ └── sketch.properties │ └── data │ │ └── default.jpg ├── listing_6_9 │ ├── code │ │ └── sketch.properties │ └── data │ │ └── default.jpg ├── listing_6_7 │ ├── code │ │ └── sketch.properties │ ├── data │ │ ├── brush.ai │ │ ├── brush.png │ │ ├── brush2.ai │ │ └── brush2.png │ ├── listing_6_7.pde │ └── Particle.pde ├── listing_6_8 │ ├── code │ │ └── sketch.properties │ └── data │ │ └── jupiter.jpg ├── image_flow │ ├── code │ │ └── sketch.properties │ ├── icon-144.png │ ├── icon-192.png │ ├── icon-36.png │ ├── icon-48.png │ ├── icon-72.png │ ├── icon-96.png │ ├── data │ │ └── default.jpg │ ├── AndroidManifest.xml │ └── Field.pde ├── listing_6_1 │ ├── code │ │ └── sketch.properties │ └── listing_6_1.pde ├── listing_6_4 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── paine.jpg │ └── listing_6_4.pde ├── listing_6_10 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── default.jpg │ └── Field.pde ├── listing_6_11 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── default.jpg │ └── Field.pde └── listing_6_12 │ ├── code │ └── sketch.properties │ ├── data │ └── default.jpg │ └── Field.pde ├── chapter 7 ├── listing_7_1 │ ├── code │ │ └── sketch.properties │ └── listing_7_1.pde ├── listing_7_2 │ ├── code │ │ └── sketch.properties │ └── listing_7_2.pde ├── listing_7_5 │ ├── code │ │ └── sketch.properties │ └── listing_7_5.pde ├── listing_7_6 │ ├── code │ │ └── sketch.properties │ └── listing_7_6.pde ├── listing_7_7 │ └── code │ │ └── sketch.properties ├── listing_7_3 │ └── code │ │ └── sketch.properties └── listing_7_4 │ └── code │ └── sketch.properties ├── chapter 8 ├── listing_8_1 │ ├── code │ │ └── sketch.properties │ └── listing_8_1.pde ├── listing_8_10 │ ├── code │ │ └── sketch.properties │ └── listing_8_10.pde ├── listing_8_11 │ ├── code │ │ └── sketch.properties │ └── listing_8_11.pde ├── listing_8_12 │ ├── code │ │ └── sketch.properties │ └── listing_8_12.pde ├── listing_8_13 │ └── code │ │ └── sketch.properties ├── listing_8_7 │ ├── code │ │ └── sketch.properties │ └── listing_8_7.pde ├── listing_8_9 │ ├── code │ │ └── sketch.properties │ └── listing_8_9.pde ├── listing_8_8 │ └── code │ │ └── sketch.properties ├── listing_8_3 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── 4C.wav │ │ ├── 4D.wav │ │ ├── 4E.wav │ │ ├── 4F.wav │ │ ├── 4G.wav │ │ └── 5A.wav ├── listing_8_2 │ ├── code │ │ └── sketch.properties │ └── listing_8_2.pde ├── listing_8_4 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── 4C.wav │ │ ├── 4D.wav │ │ ├── 4E.wav │ │ ├── 4F.wav │ │ ├── 4G.wav │ │ └── 5A.wav ├── listing_8_5 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── 4C.wav │ │ ├── 4D.wav │ │ ├── 4E.wav │ │ ├── 4F.wav │ │ ├── 4G.wav │ │ └── 5A.wav └── listing_8_6 │ ├── code │ └── sketch.properties │ ├── data │ ├── 4C.wav │ ├── 4D.wav │ ├── 4E.wav │ ├── 4F.wav │ ├── 4G.wav │ └── 5A.wav │ └── AudioPlayer.pde ├── chapter 9 ├── listing_9_1 │ └── code │ │ └── sketch.properties ├── listing_9_2 │ └── code │ │ └── sketch.properties ├── listing_9_3 │ └── code │ │ └── sketch.properties ├── listing_9_4 │ ├── code │ │ └── sketch.properties │ └── listing_9_4.pde ├── listing_9_8 │ └── code │ │ └── sketch.properties ├── listing_9_9 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── streetview0.jpg │ │ ├── streetview1.jpg │ │ ├── streetview2.jpg │ │ ├── streetview3.jpg │ │ ├── streetview4.jpg │ │ ├── streetview5.jpg │ │ ├── streetview6.jpg │ │ ├── streetview7.jpg │ │ ├── streetview8.jpg │ │ └── streetview9.jpg ├── listing_9_10 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── streetview0.jpg │ │ ├── streetview1.jpg │ │ ├── streetview2.jpg │ │ ├── streetview3.jpg │ │ ├── streetview4.jpg │ │ ├── streetview5.jpg │ │ ├── streetview6.jpg │ │ ├── streetview7.jpg │ │ ├── streetview8.jpg │ │ └── streetview9.jpg ├── listing_9_5 │ └── code │ │ └── sketch.properties ├── listing_9_6 │ ├── code │ │ └── sketch.properties │ └── listing_9_6.pde ├── listing_9_7 │ └── code │ │ └── sketch.properties ├── listing_9_11 │ ├── code │ │ └── sketch.properties │ ├── Voronoi.pde │ └── LocationListener.pde └── street_collage │ ├── code │ └── sketch.properties │ ├── icon-36.png │ ├── icon-48.png │ ├── icon-72.png │ ├── icon-96.png │ ├── icon-144.png │ ├── icon-192.png │ ├── data │ └── default.png │ ├── Voronoi.pde │ ├── LocationListener.pde │ └── AndroidManifest.xml ├── chapter 12 ├── listing_12_7 │ ├── code │ │ └── sketch.properties │ └── listing_12_7.pde ├── listing_12_1 │ └── code │ │ └── sketch.properties ├── listing_12_11 │ └── code │ │ └── sketch.properties ├── listing_12_3 │ └── code │ │ └── sketch.properties ├── listing_12_6 │ └── code │ │ └── sketch.properties ├── listing_12_8 │ ├── code │ │ └── sketch.properties │ └── listing_12_8.pde ├── listing_12_9 │ └── code │ │ └── sketch.properties ├── listing_12_10 │ └── code │ │ └── sketch.properties ├── listing_12_12 │ └── code │ │ └── sketch.properties ├── listing_12_13 │ └── code │ │ └── sketch.properties ├── listing_12_2 │ └── code │ │ └── sketch.properties ├── listing_12_4 │ └── code │ │ └── sketch.properties ├── listing_12_5 │ └── code │ │ └── sketch.properties └── runnning_tree │ ├── code │ └── sketch.properties │ ├── icon-36.png │ ├── icon-48.png │ ├── icon-72.png │ ├── icon-96.png │ ├── icon-144.png │ ├── icon-192.png │ ├── preview_circular.png │ └── preview_rectangular.png ├── chapter 13 ├── listing_13_1 │ ├── code │ │ └── sketch.properties │ └── listing_13_1.pde ├── listing_13_17 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── earthmap1k.jpg │ └── listing_13_17.pde ├── listing_13_18 │ ├── code │ │ └── sketch.properties │ ├── data │ │ ├── shiva.jpg │ │ ├── tiger.png │ │ └── woodstock.png │ └── listing_13_18.pde ├── listing_13_19 │ ├── code │ │ └── sketch.properties │ ├── data │ │ ├── shiva.jpg │ │ ├── tiger.png │ │ └── woodstock.png │ └── listing_13_19.pde ├── listing_13_7 │ ├── code │ │ └── sketch.properties │ └── listing_13_7.pde ├── listing_13_16 │ ├── code │ │ └── sketch.properties │ └── listing_13_16.pde ├── listing_13_6 │ ├── code │ │ └── sketch.properties │ └── listing_13_6.pde ├── listing_13_10 │ ├── code │ │ └── sketch.properties │ └── listing_13_10.pde ├── listing_13_11 │ ├── code │ │ └── sketch.properties │ └── listing_13_11.pde ├── listing_13_12 │ └── code │ │ └── sketch.properties ├── listing_13_13 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── genera.py │ └── listing_13_13.pde ├── listing_13_14 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── raptor.jpg │ │ ├── rocket.png │ │ ├── raptor_normal.jpg │ │ ├── rocket.mtl │ │ ├── Raptor.mtl │ │ └── lowpolytree.mtl ├── listing_13_15 │ ├── code │ │ └── sketch.properties │ └── listing_13_15.pde ├── listing_13_2 │ ├── code │ │ └── sketch.properties │ └── listing_13_2.pde ├── listing_13_20 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── dirt.jpg │ │ └── grass.png ├── listing_13_3 │ ├── code │ │ └── sketch.properties │ └── listing_13_3.pde ├── listing_13_4 │ ├── code │ │ └── sketch.properties │ ├── data │ │ └── mosaic.jpg │ └── listing_13_4.pde ├── listing_13_5 │ ├── code │ │ └── sketch.properties │ └── listing_13_5.pde ├── listing_13_8 │ ├── code │ │ └── sketch.properties │ └── listing_13_8.pde └── listing_13_9 │ ├── code │ └── sketch.properties │ └── listing_13_9.pde ├── chapter 10 ├── listing_10_2 │ ├── code │ │ └── sketch.properties │ └── listing_10_2.pde ├── listing_10_1 │ ├── code │ │ └── sketch.properties │ └── listing_10_1.pde ├── listing_10_3 │ └── code │ │ └── sketch.properties ├── listing_10_4 │ ├── code │ │ └── sketch.properties │ └── listing_10_4.pde └── listing_10_5 │ ├── code │ └── sketch.properties │ └── listing_10_5.pde ├── LICENSE.txt ├── 9781484227183.jpg ├── chapter 15 ├── vr_draw │ ├── code │ │ └── sketch.properties │ ├── icon-144.png │ ├── icon-192.png │ ├── icon-36.png │ ├── icon-48.png │ ├── icon-72.png │ ├── icon-96.png │ └── data │ │ ├── fly-icon.png │ │ ├── cross-icon.png │ │ ├── home-icon.png │ │ ├── left-icon.png │ │ └── right-icon.png ├── listing_15_1 │ └── code │ │ └── sketch.properties ├── listing_15_2 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── cross-icon.png │ │ ├── left-icon.png │ │ └── right-icon.png ├── listing_15_3 │ ├── code │ │ └── sketch.properties │ ├── data │ │ ├── cross-icon.png │ │ ├── left-icon.png │ │ └── right-icon.png │ ├── listing_15_3.pde │ └── Geo.pde ├── listing_15_4 │ ├── code │ │ └── sketch.properties │ └── data │ │ ├── fly-icon.png │ │ ├── cross-icon.png │ │ ├── home-icon.png │ │ ├── left-icon.png │ │ └── right-icon.png └── listing_15_5 │ ├── code │ └── sketch.properties │ └── data │ ├── fly-icon.png │ ├── cross-icon.png │ ├── home-icon.png │ ├── left-icon.png │ └── right-icon.png ├── chapter 3 ├── listing_3_1 │ ├── code │ │ └── sketch.properties │ └── listing_3_1.pde ├── listing_3_2 │ ├── code │ │ └── sketch.properties │ └── listing_3_2.pde └── vines_draw │ ├── code │ └── sketch.properties │ ├── icon-144.png │ ├── icon-192.png │ ├── icon-36.png │ ├── icon-48.png │ ├── icon-72.png │ ├── icon-96.png │ ├── Flower.pde │ ├── AndroidManifest.xml │ ├── vines_draw.pde │ └── Spiral.pde ├── chapter 11 ├── listing_11_1 │ ├── code │ │ └── sketch.properties │ └── listing_11_1.pde ├── listing_11_2 │ ├── code │ │ └── sketch.properties │ └── listing_11_2.pde ├── listing_11_3 │ ├── code │ │ └── sketch.properties │ └── listing_11_3.pde ├── listing_11_4 │ └── code │ │ └── sketch.properties ├── listing_11_5 │ └── code │ │ └── sketch.properties ├── listing_11_6 │ └── code │ │ └── sketch.properties └── listing_11_7 │ ├── code │ └── sketch.properties │ └── data │ ├── moon.png │ └── FullMoon2010.jpg ├── processing-for-android-examples.txt ├── contributing.md └── README.md /appendix a/layouts/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | -------------------------------------------------------------------------------- /chapter 1/listing_1_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_14/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_15/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_16/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_17/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 2/listing_2_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_14/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_16/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_17/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_18/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_19/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_20/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_21/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_22/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 4/listing_4_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 5/listing_5_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 5/listing_5_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 5/listing_5_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 5/listing_5_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 6/listing_6_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 7/listing_7_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 7/listing_7_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 7/listing_7_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 7/listing_7_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 7/listing_7_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 9/listing_9_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 9/listing_9_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 9/listing_9_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 13/listing_13_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 13/listing_13_17/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 13/listing_13_18/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 13/listing_13_19/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 13/listing_13_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=app 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 14/listing_14_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=vr 2 | -------------------------------------------------------------------------------- /chapter 6/listing_6_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 6/listing_6_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 6/listing_6_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 6/listing_6_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 8/listing_8_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 9/listing_9_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=wallpaper 2 | -------------------------------------------------------------------------------- /chapter 10/listing_10_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /chapter 12/listing_12_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | component=watchface 2 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/LICENSE.txt -------------------------------------------------------------------------------- /9781484227183.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/9781484227183.jpg -------------------------------------------------------------------------------- /chapter 1/circle/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_16/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 15/vr_draw/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Java 2 | component=app 3 | mode.id=processing.mode.java.JavaMode 4 | -------------------------------------------------------------------------------- /appendix a/listing_a_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 14/listing_14_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/listing_15_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/listing_15_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/listing_15_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/listing_15_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/listing_15_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=vr 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-144.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-192.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-36.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-48.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-72.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/icon-96.png -------------------------------------------------------------------------------- /chapter 2/listing_2_18/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 2/listing_2_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 3/listing_3_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 3/listing_3_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 3/vines_draw/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_15/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_23/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 4/listing_4_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 5/listing_5_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 7/listing_7_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 7/listing_7_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 9/listing_9_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 16dp 3 | 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_14/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_15/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_20/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_8/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 13/listing_13_9/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=app 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-144.png -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-192.png -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-36.png -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-48.png -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-72.png -------------------------------------------------------------------------------- /chapter 3/vines_draw/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 3/vines_draw/icon-96.png -------------------------------------------------------------------------------- /chapter 6/image_flow/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-144.png -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-192.png -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-36.png -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-48.png -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-72.png -------------------------------------------------------------------------------- /chapter 6/image_flow/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/icon-96.png -------------------------------------------------------------------------------- /chapter 6/listing_6_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/4C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/4C.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/4D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/4D.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/4E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/4E.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/4F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/4F.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/4G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/4G.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_3/data/5A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_3/data/5A.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/4C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/4C.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/4D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/4D.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/4E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/4E.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/4F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/4F.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/4G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/4G.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_4/data/5A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_4/data/5A.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/4C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/4C.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/4D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/4D.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/4E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/4E.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/4F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/4F.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/4G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/4G.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_5/data/5A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_5/data/5A.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/4C.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/4C.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/4D.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/4D.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/4E.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/4E.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/4F.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/4F.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/4G.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/4G.wav -------------------------------------------------------------------------------- /chapter 8/listing_8_6/data/5A.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 8/listing_8_6/data/5A.wav -------------------------------------------------------------------------------- /appendix a/layouts/.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /chapter 10/listing_10_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 10/listing_10_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 10/listing_10_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 10/listing_10_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_1/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_3/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_6/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 11/listing_11_7/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_13/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_2/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_4/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/listing_12_5/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/runnning_tree/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=watchface 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-36.png -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-48.png -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-72.png -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-96.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/data/fly-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/data/fly-icon.png -------------------------------------------------------------------------------- /chapter 6/listing_6_10/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_12/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 6/listing_6_2/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_2/data/paine.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_3/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_3/data/paine.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_4/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_4/data/paine.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_7/data/brush.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_7/data/brush.ai -------------------------------------------------------------------------------- /chapter 6/listing_6_7/data/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_7/data/brush.png -------------------------------------------------------------------------------- /chapter 6/listing_6_7/data/brush2.ai: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_7/data/brush2.ai -------------------------------------------------------------------------------- /chapter 9/listing_9_11/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 9/street_collage/code/sketch.properties: -------------------------------------------------------------------------------- 1 | mode=Android 2 | component=wallpaper 3 | mode.id=processing.mode.android.AndroidMode 4 | -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-36.png -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-48.png -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-72.png -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-96.png -------------------------------------------------------------------------------- /chapter 11/listing_11_7/data/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 11/listing_11_7/data/moon.png -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-144.png -------------------------------------------------------------------------------- /chapter 12/runnning_tree/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/icon-192.png -------------------------------------------------------------------------------- /chapter 13/listing_13_18/data/shiva.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_18/data/shiva.jpg -------------------------------------------------------------------------------- /chapter 13/listing_13_18/data/tiger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_18/data/tiger.png -------------------------------------------------------------------------------- /chapter 13/listing_13_19/data/shiva.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_19/data/shiva.jpg -------------------------------------------------------------------------------- /chapter 13/listing_13_19/data/tiger.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_19/data/tiger.png -------------------------------------------------------------------------------- /chapter 13/listing_13_20/data/dirt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_20/data/dirt.jpg -------------------------------------------------------------------------------- /chapter 13/listing_13_20/data/grass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_20/data/grass.png -------------------------------------------------------------------------------- /chapter 13/listing_13_4/data/mosaic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_4/data/mosaic.jpg -------------------------------------------------------------------------------- /chapter 14/listing_14_3/data/mosaic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 14/listing_14_3/data/mosaic.jpg -------------------------------------------------------------------------------- /chapter 15/vr_draw/data/cross-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/data/cross-icon.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/data/home-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/data/home-icon.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/data/left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/data/left-icon.png -------------------------------------------------------------------------------- /chapter 15/vr_draw/data/right-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/vr_draw/data/right-icon.png -------------------------------------------------------------------------------- /chapter 4/listing_4_16/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 4/listing_4_16/data/paine.jpg -------------------------------------------------------------------------------- /chapter 4/listing_4_17/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 4/listing_4_17/data/paine.jpg -------------------------------------------------------------------------------- /chapter 4/listing_4_18/data/paine.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 4/listing_4_18/data/paine.jpg -------------------------------------------------------------------------------- /chapter 5/listing_5_12/data/jelly.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 5/listing_5_12/data/jelly.jpg -------------------------------------------------------------------------------- /chapter 6/image_flow/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/image_flow/data/default.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_10/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_10/data/default.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_11/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_11/data/default.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_12/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_12/data/default.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_6/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_6/data/default.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_7/data/brush2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_7/data/brush2.png -------------------------------------------------------------------------------- /chapter 6/listing_6_8/data/jupiter.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_8/data/jupiter.jpg -------------------------------------------------------------------------------- /chapter 6/listing_6_9/data/default.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 6/listing_6_9/data/default.jpg -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-144.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-144.png -------------------------------------------------------------------------------- /chapter 9/street_collage/icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/icon-192.png -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/raptor.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_14/data/raptor.jpg -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/rocket.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_14/data/rocket.png -------------------------------------------------------------------------------- /chapter 15/listing_15_4/data/fly-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_4/data/fly-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_5/data/fly-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_5/data/fly-icon.png -------------------------------------------------------------------------------- /chapter 9/street_collage/data/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/street_collage/data/default.png -------------------------------------------------------------------------------- /chapter 13/listing_13_17/data/earthmap1k.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_17/data/earthmap1k.jpg -------------------------------------------------------------------------------- /chapter 13/listing_13_18/data/woodstock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_18/data/woodstock.png -------------------------------------------------------------------------------- /chapter 13/listing_13_19/data/woodstock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_19/data/woodstock.png -------------------------------------------------------------------------------- /chapter 15/listing_15_2/data/cross-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_2/data/cross-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_2/data/left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_2/data/left-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_2/data/right-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_2/data/right-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_3/data/cross-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_3/data/cross-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_3/data/left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_3/data/left-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_3/data/right-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_3/data/right-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_4/data/cross-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_4/data/cross-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_4/data/home-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_4/data/home-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_4/data/left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_4/data/left-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_4/data/right-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_4/data/right-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_5/data/cross-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_5/data/cross-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_5/data/home-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_5/data/home-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_5/data/left-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_5/data/left-icon.png -------------------------------------------------------------------------------- /chapter 15/listing_15_5/data/right-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 15/listing_15_5/data/right-icon.png -------------------------------------------------------------------------------- /chapter 4/listing_4_19/data/SansSerif-32.vlw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 4/listing_4_19/data/SansSerif-32.vlw -------------------------------------------------------------------------------- /chapter 4/listing_4_20/data/SansSerif-32.vlw: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 4/listing_4_20/data/SansSerif-32.vlw -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview0.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview1.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview2.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview3.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview4.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview5.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview6.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview7.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview8.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_10/data/streetview9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_10/data/streetview9.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview0.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview1.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview2.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview3.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview4.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview5.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview6.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview7.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview8.jpg -------------------------------------------------------------------------------- /chapter 9/listing_9_9/data/streetview9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 9/listing_9_9/data/streetview9.jpg -------------------------------------------------------------------------------- /chapter 11/listing_11_7/data/FullMoon2010.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 11/listing_11_7/data/FullMoon2010.jpg -------------------------------------------------------------------------------- /chapter 12/runnning_tree/preview_circular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/preview_circular.png -------------------------------------------------------------------------------- /appendix a/layouts/app/libs/processing-core.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/libs/processing-core.jar -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/assets/mosaic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/assets/mosaic.jpg -------------------------------------------------------------------------------- /chapter 12/runnning_tree/preview_rectangular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 12/runnning_tree/preview_rectangular.png -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/raptor_normal.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/chapter 13/listing_13_14/data/raptor_normal.jpg -------------------------------------------------------------------------------- /appendix a/layouts/gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | layouts 3 | Settings 4 | 5 | -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-hdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-hdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-mdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-mdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Apress/processing-for-android/HEAD/appendix a/layouts/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png -------------------------------------------------------------------------------- /appendix a/layouts/.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/rocket.mtl: -------------------------------------------------------------------------------- 1 | newmtl Default 2 | illum 2 3 | Ka 0.698039 0.698039 0.698039 4 | Kd 0.698039 0.698039 0.698039 5 | Ks 0.710000 0.710000 0.710000 6 | Ns 76.109253 7 | map_Kd rocket.png 8 | 9 | -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/Raptor.mtl: -------------------------------------------------------------------------------- 1 | # Max2Mtl Version 4.0 Mar 10th, 2001 2 | # 3 | newmtl default02 4 | Ka 0.4 0.4 0.4 5 | Kd 0.9 0.9 0.9 6 | Ks 1.0 1.0 1.0 7 | d 1.0 8 | Ns 1.3 9 | illum 2 10 | map_Kd raptor.jpg 11 | # 12 | # EOF 13 | -------------------------------------------------------------------------------- /chapter 2/listing_2_3/listing_2_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(200, 200); 7 | ellipse(100, 100, 150, 150); -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #FF4081 6 | 7 | -------------------------------------------------------------------------------- /appendix a/layouts/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Apr 28 22:40:38 KST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip 7 | -------------------------------------------------------------------------------- /chapter 4/listing_4_16/listing_4_16.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | fullScreen(); 7 | PImage img = loadImage("paine.jpg"); 8 | image(img, 0, 0, width, height); -------------------------------------------------------------------------------- /chapter 6/listing_6_2/listing_6_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage pic; 7 | fullScreen(); 8 | pic = loadImage("paine.jpg"); 9 | image(pic, 0, 0, width, height); -------------------------------------------------------------------------------- /chapter 13/listing_13_13/data/genera.py: -------------------------------------------------------------------------------- 1 | import numpy 2 | 3 | x = numpy.random.uniform(-800, 800, size=1000) 4 | y = numpy.random.uniform(-800, 800, size=1000) 5 | z = numpy.random.uniform(-800, 800, size=1000) 6 | 7 | with open("puntos.txt", "w") as of: 8 | for i in range(0, 1000): 9 | of.write(str(x[i]) + " " + str(y[i]) + " " + str(z[i]) + "\n") -------------------------------------------------------------------------------- /chapter 4/listing_4_19/listing_4_19.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(450, 100); 7 | PFont font = loadFont("SansSerif-32.vlw"); 8 | textFont(font); 9 | fill(120); 10 | text("On Exactitude in Science", 40, 60); -------------------------------------------------------------------------------- /chapter 4/listing_4_20/listing_4_20.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(450, 100); 7 | PFont font = createFont("SansSerif", 32); 8 | textFont(font); 9 | fill(120); 10 | text("On Exactitude in Science", 40, 60); -------------------------------------------------------------------------------- /chapter 1/circle/circle.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | color bg = 150; 7 | 8 | void setup() { 9 | size(200, 200); 10 | } 11 | 12 | void draw() { 13 | background(bg); 14 | ellipse(mouseX, mouseY, 100, 100); 15 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_14/listing_2_14.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | } 9 | 10 | void draw() { 11 | if (mousePressed) { 12 | line(pmouseX, pmouseY, mouseX, mouseY); 13 | } 14 | } -------------------------------------------------------------------------------- /chapter 3/listing_3_1/listing_3_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | } 9 | 10 | void draw() { 11 | println("frame #", frameCount); 12 | } 13 | 14 | void mousePressed() { 15 | println("Press event"); 16 | } -------------------------------------------------------------------------------- /appendix a/layouts/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /chapter 2/listing_2_13/listing_2_13.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | size(1000, 500); 8 | noStroke(); 9 | fill(255, 100); 10 | } 11 | 12 | void draw() { 13 | if (mousePressed) { 14 | ellipse(mouseX, mouseY, 50, 50); 15 | } 16 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_14/data/cc.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /chapter 13/listing_13_6/listing_13_6.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(P3D); 8 | fill(120); 9 | } 10 | 11 | void draw() { 12 | background(157); 13 | translate(width/2, height/2); 14 | rotateY(millis()/1000.0); 15 | box(200); 16 | } -------------------------------------------------------------------------------- /chapter 6/listing_6_3/listing_6_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage pic; 7 | fullScreen(); 8 | pic = loadImage("paine.jpg"); 9 | imageMode(CENTER); 10 | float r = float(pic.width) / float(pic.height); 11 | float h = width/r; 12 | image(pic, width/2, height/2, width, h); -------------------------------------------------------------------------------- /chapter 13/listing_13_5/listing_13_5.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(P3D); 8 | fill(120); 9 | } 10 | 11 | void draw() { 12 | background(157); 13 | float x = map(cos(millis()/1000.0), -1, +1, 0, width); 14 | translate(x, height/2); 15 | box(200); 16 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_1/listing_2_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | int x = 0; 7 | 8 | void setup() { 9 | size(600, 200); 10 | strokeWeight(2); 11 | stroke(255); 12 | } 13 | 14 | void draw() { 15 | background(50); 16 | line(x, 0, x, height); //<>// 17 | x = (x + 1) % width; 18 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_1/listing_4_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(P2D); 8 | background(255); 9 | noFill(); 10 | rectMode(CENTER); 11 | } 12 | 13 | void draw() { 14 | float w = 2*(width/2-mouseX); 15 | rect(width/2, height/2, w, w/width * height); 16 | } -------------------------------------------------------------------------------- /chapter 1/listing_1_1/listing_1_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fill(0); 8 | } 9 | 10 | void draw() { 11 | background(204); 12 | if (mousePressed) { 13 | if (mouseX < width/2) rect(0, 0, width/2, height); 14 | else rect(width/2, 0, width/2, height); 15 | } 16 | } -------------------------------------------------------------------------------- /chapter 5/listing_5_4/listing_5_4.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | background(180); 9 | strokeWeight(10 * displayDensity); 10 | stroke(100, 100); 11 | } 12 | 13 | void draw() { 14 | if (mousePressed) line(pmouseX, pmouseY, mouseX, mouseY); 15 | } 16 | 17 | -------------------------------------------------------------------------------- /processing-for-android-examples.txt: -------------------------------------------------------------------------------- 1 | name=Processing for Android, 1st Edition 2 | category=Android 3 | authors=[Andres Colubri](http://andrescolubri.net/) 4 | url=http://p5android-book.andrescolubri.net/ 5 | sentence=Code examples of the book "Processing for Android: Create Mobile, Sensor-Aware, and VR Applications Using Processing" (Apress, 2017). 6 | paragraph= 7 | version=1 8 | prettyVersion=1.0 9 | lastUpdated=0 10 | minRevision=0 11 | maxRevision=0 12 | -------------------------------------------------------------------------------- /chapter 13/listing_13_7/listing_13_7.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(P3D); 8 | fill(120); 9 | } 10 | 11 | void draw() { 12 | background(157); 13 | translate(width/2, height/2); 14 | float f = map(cos(millis()/1000.0), -1, +1, 0.1, 5); 15 | scale(f); 16 | box(200); 17 | } -------------------------------------------------------------------------------- /chapter 14/listing_14_1/listing_14_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import processing.vr.*; 7 | 8 | void setup() { 9 | fullScreen(STEREO); 10 | fill(#AD71B7); 11 | } 12 | 13 | void draw() { 14 | background(#81B771); 15 | translate(width/2, height/2); 16 | lights(); 17 | rotateY(millis()/1000.0); 18 | box(300); 19 | } -------------------------------------------------------------------------------- /chapter 13/listing_13_14/data/lowpolytree.mtl: -------------------------------------------------------------------------------- 1 | # Blender MTL File: 'lowpolytree.blend' 2 | # Material Count: 2 3 | 4 | newmtl Bark 5 | Ns 96.078431 6 | Ka 0.000000 0.000000 0.000000 7 | Kd 0.176206 0.051816 0.016055 8 | Ks 0.015532 0.005717 0.002170 9 | Ni 1.000000 10 | d 1.000000 11 | illum 2 12 | 13 | newmtl Leaves 14 | Ns 96.078431 15 | Ka 0.000000 0.000000 0.000000 16 | Kd 0.029850 0.306291 0.017666 17 | Ks 0.085514 0.355277 0.074845 18 | Ni 1.000000 19 | d 1.000000 20 | illum 2 21 | -------------------------------------------------------------------------------- /chapter 2/listing_2_10/listing_2_10.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(600, 300); 7 | strokeWeight(5); 8 | fill(214, 87, 58); 9 | stroke(53, 124, 115); 10 | rect(10, 10, 180, 280); 11 | stroke(115, 48, 128); 12 | fill(252, 215, 51); 13 | rect(210, 10, 180, 280); 14 | stroke(224, 155, 73); 15 | fill(17, 76, 131); 16 | rect(410, 10, 180, 280); -------------------------------------------------------------------------------- /chapter 4/listing_4_18/listing_4_18.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage img; 7 | size(800, 533, P2D); 8 | img = loadImage("paine.jpg"); 9 | beginShape(); 10 | texture(img); 11 | vertex(100, 0, 0, 0); 12 | vertex(width - 100, 0, img.width, 0); 13 | vertex(width, height, img.width, img.height); 14 | vertex(0, height, 0, img.height); 15 | endShape(); -------------------------------------------------------------------------------- /chapter 5/listing_5_3/Circle.pde: -------------------------------------------------------------------------------- 1 | class Circle { 2 | color c; 3 | float x, y, r; 4 | Circle(float x, float y) { 5 | this.x = x; 6 | this.y = y; 7 | r = 70 * displayDensity; 8 | c = color(random(255), random(255), random(255), 100); 9 | } 10 | void grow() { 11 | r += 0.5 * displayDensity; 12 | } 13 | void setPosition(float x, float y) { 14 | this.x = x; 15 | this.y = y; 16 | } 17 | void draw() { 18 | fill(c); 19 | ellipse(x, y, r, r); 20 | } 21 | } -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/menu/menu_main.xml: -------------------------------------------------------------------------------- 1 | 5 | 10 | 11 | -------------------------------------------------------------------------------- /chapter 13/listing_13_1/listing_13_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | float angle = 0; 7 | 8 | void setup() { 9 | fullScreen(P3D); 10 | fill(#AD71B7); 11 | } 12 | 13 | void draw() { 14 | background(#81B771); 15 | lights(); 16 | translate(width/2, height/2); 17 | rotateY(angle); 18 | rotateX(angle*2); 19 | box(300); 20 | angle += 0.01; 21 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_4/listing_2_4.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(460, 200); 7 | strokeWeight(5); 8 | fill(255, 0, 0); 9 | stroke(0, 255, 0); 10 | ellipse(100, 100, 200, 200); 11 | fill(255, 0, 200); // Comment this line out to make second circle red 12 | stroke(0); 13 | ellipse(250, 100, 100, 100); 14 | fill(0, 200, 200); 15 | ellipse(380, 100, 160, 160); -------------------------------------------------------------------------------- /chapter 2/listing_2_16/listing_2_16.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(300, 300); 7 | noFill(); 8 | translate(width/2, height/2); 9 | beginShape(); 10 | float maxt = 10; 11 | float maxr = 150; 12 | for (float t = 1; t < maxt; t += 0.1) { 13 | float r = maxr/t; 14 | float x = r * cos(t); 15 | float y = r * sin(t); 16 | vertex(x, y); 17 | } 18 | endShape(); -------------------------------------------------------------------------------- /appendix a/layouts/app/src/test/java/processing/book/layouts/ExampleUnitTest.java: -------------------------------------------------------------------------------- 1 | package processing.book.layouts; 2 | 3 | import org.junit.Test; 4 | 5 | import static org.junit.Assert.*; 6 | 7 | /** 8 | * Example local unit test, which will execute on the development machine (host). 9 | * 10 | * @see Testing documentation 11 | */ 12 | public class ExampleUnitTest { 13 | @Test 14 | public void addition_isCorrect() throws Exception { 15 | assertEquals(4, 2 + 2); 16 | } 17 | } -------------------------------------------------------------------------------- /appendix a/listing_a_1/listing_a_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PShape world; 7 | 8 | void setup() { 9 | fullScreen(P2D); 10 | orientation(LANDSCAPE); 11 | world = loadShape("World-map.svg"); 12 | world.scale(height/world.getHeight()); 13 | shapeMode(CENTER); 14 | } 15 | 16 | void draw() { 17 | background(255); 18 | translate(width/2, height/2); 19 | shape(world); 20 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_7/listing_2_7.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(300, 300); 7 | int numTriangles = 10; 8 | beginShape(TRIANGLE_FAN); 9 | vertex(width/2, height/2); 10 | for (int i = 0; i <= numTriangles; i++) { 11 | float a = map(i, 0, numTriangles, 0, TWO_PI); 12 | float x = width/2 + 100 * cos(a); 13 | float y = height/2 + 100 * sin(a); 14 | vertex(x, y); 15 | } 16 | endShape(); -------------------------------------------------------------------------------- /chapter 6/listing_6_5/listing_6_5.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | color bckColor = #EA6411; 7 | 8 | void setup() { 9 | fullScreen(); 10 | requestPermission("android.permission.READ_EXTERNAL_STORAGE", "handlePermission"); 11 | } 12 | 13 | void draw() { 14 | background(bckColor); 15 | } 16 | 17 | void handlePermission(boolean granted) { 18 | if (granted) bckColor = #58EA11; 19 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_15/listing_4_15.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PShape world; 7 | 8 | void setup() { 9 | size(950, 620, P2D); 10 | world = loadShape("World-map.svg"); 11 | for (PShape child: world.getChildren()) { 12 | if (child.getName().equals("algeria")) child.setFill(color(255, 0, 0)); 13 | } 14 | } 15 | 16 | void draw() { 17 | background(255); 18 | shape(world); 19 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_2/listing_2_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | int x = 0; 7 | 8 | void setup() { 9 | size(600, 200); 10 | strokeWeight(2); 11 | stroke(255); 12 | } 13 | 14 | void draw() { 15 | background(50); 16 | line(x, 0, x, height); 17 | x = (x + 1) % width; 18 | } 19 | 20 | void keyPressed() { 21 | if (looping) { 22 | noLoop(); 23 | } else { 24 | loop(); 25 | } 26 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_5/listing_2_5.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(800, 800); 7 | stroke(0); 8 | fill(180); 9 | background(97); 10 | line(width/2, 0, width/2, height); 11 | line(0, height/2, width, height/2); 12 | rect(0, 0, 200, 200); 13 | rect(width - 200, 0, 199, 200); 14 | rect(width - 200, height - 200, 199, 199); 15 | rect(0, height - 200, 199, 199); 16 | rect(200, 200, width - 400, height - 400); -------------------------------------------------------------------------------- /chapter 10/listing_10_1/listing_10_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | strokeCap(ROUND); 9 | stroke(255); 10 | noFill(); 11 | } 12 | 13 | void draw() { 14 | background(0); 15 | if (wearAmbient()) strokeWeight(1); 16 | else strokeWeight(10); 17 | float angle = map(millis() % 60000, 0, 60000, 0, TWO_PI); 18 | arc(width/2, height/2, width/2, width/2, 0, angle); 19 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_14/listing_4_14.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(450, 200, P2D); 7 | PShape cc = loadShape("cc.svg"); 8 | PShape moz = loadShape("mozilla.svg"); 9 | PShape ruby = loadShape("ruby.svg"); 10 | translate(30, 50); 11 | cc.setFill(color(170, 116, 0)); 12 | cc.setStroke(color(255, 155, 0)); 13 | shape(cc); 14 | translate(cc.width + 30, 0); 15 | shape(moz); 16 | translate(moz.width + 30, 0); 17 | shape(ruby); -------------------------------------------------------------------------------- /chapter 4/listing_4_21/listing_4_21.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(900, 300); 7 | PFont font = createFont("Monospaced", 32); 8 | textFont(font); 9 | fill(120); 10 | text("...In that Empire, the Art of Cartography attained such Perfection " + 11 | "that the map of a single Province occupied the entirety of a City, " + 12 | "and the map of the Empire, the entirety of a Province.", 20, 20, 13 | width - 40, height - 40); -------------------------------------------------------------------------------- /chapter 5/listing_5_1/listing_5_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | strokeWeight(20); 9 | fill(#3B91FF); 10 | } 11 | 12 | void draw() { 13 | background(#FFD53B); 14 | stroke(#3B91FF); 15 | line(0, 0, mouseX, mouseY); 16 | line(width, 0, mouseX, mouseY); 17 | line(width, height, mouseX, mouseY); 18 | line(0, height, mouseX, mouseY); 19 | noStroke(); 20 | ellipse(mouseX, mouseY, 200, 200); 21 | } -------------------------------------------------------------------------------- /chapter 13/listing_13_17/listing_13_17.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PShape earth; 7 | PImage texmap; 8 | 9 | void setup() { 10 | fullScreen(P3D); 11 | texmap = loadImage("earthmap1k.jpg"); 12 | earth = createShape(SPHERE, 300); 13 | earth.setStroke(false); 14 | earth.setTexture(texmap); 15 | } 16 | 17 | void draw() { 18 | background(255); 19 | translate(width/2, height/2); 20 | rotateY(0.01 * frameCount); 21 | shape(earth); 22 | } -------------------------------------------------------------------------------- /chapter 10/listing_10_2/listing_10_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | frameRate(1); 9 | textFont(createFont("Serif-Bold", 48 * displayDensity)); 10 | textAlign(CENTER, CENTER); 11 | fill(255); 12 | } 13 | 14 | void draw() { 15 | background(0); 16 | if (wearInteractive()) { 17 | String str = hour() + ":" + nfs(minute(), 2) + ":" + nfs(second(), 2); 18 | text(str, width/2, height/2); 19 | } 20 | } -------------------------------------------------------------------------------- /chapter 9/listing_9_6/listing_9_6.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage street; 7 | String apiKey = ""; 8 | 9 | void setup () { 10 | size(512, 512); 11 | street = requestImage("http://maps.googleapis.com/maps/api/streetview?location=42.383401,-71.116110&size=512x512&fov=90&pitch=-10&key=" + apiKey); 12 | } 13 | 14 | void draw() { 15 | if (0 < street.width && 0 < street.height) { 16 | image(street, 0, 0, width, height); 17 | } 18 | } -------------------------------------------------------------------------------- /chapter 13/listing_13_4/listing_13_4.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | float angle = 0; 7 | PShape cube; 8 | 9 | void setup() { 10 | fullScreen(P3D); 11 | PImage tex = loadImage("mosaic.jpg"); 12 | cube = createShape(BOX, 400); 13 | cube.setTexture(tex); 14 | } 15 | 16 | void draw() { 17 | background(#81B771); 18 | lights(); 19 | translate(width/2, height/2); 20 | rotateY(angle); 21 | rotateX(angle*2); 22 | shape(cube); 23 | angle += 0.01; 24 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_8/listing_2_8.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(300, 300); 7 | beginShape(QUAD_STRIP); 8 | int numQuads = 10; 9 | for (int i = 0; i <= numQuads; i++) { 10 | float a = map(i, 0, numQuads, 0, TWO_PI); 11 | float x0 = width/2 + 100 * cos(a); 12 | float y0 = height/2 + 100 * sin(a); 13 | float x1 = width/2 + 130 * cos(a); 14 | float y1 = height/2 + 130 * sin(a); 15 | vertex(x0, y0); 16 | vertex(x1, y1); 17 | } 18 | endShape(); -------------------------------------------------------------------------------- /chapter 6/listing_6_4/listing_6_4.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage pic; 7 | float ratio; 8 | 9 | void setup() { 10 | fullScreen(); 11 | pic = loadImage("paine.jpg"); 12 | ratio = float(pic.width)/float(pic.height); 13 | } 14 | 15 | void draw() { 16 | background(0); 17 | float w = wallpaperHomeCount() * width; 18 | float h = w/ratio; 19 | float x = map(wallpaperOffset(), 0, 1, 0, -(wallpaperHomeCount()-1) * width); 20 | image(pic, x, 0, w, h); 21 | } -------------------------------------------------------------------------------- /appendix a/layouts/build.gradle: -------------------------------------------------------------------------------- 1 | // Top-level build file where you can add configuration options common to all sub-projects/modules. 2 | 3 | buildscript { 4 | repositories { 5 | jcenter() 6 | } 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:2.3.3' 9 | 10 | // NOTE: Do not place your application dependencies here; they belong 11 | // in the individual module build.gradle files 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | jcenter() 18 | } 19 | } 20 | 21 | task clean(type: Delete) { 22 | delete rootProject.buildDir 23 | } 24 | -------------------------------------------------------------------------------- /chapter 4/listing_4_17/listing_4_17.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage img; 7 | void setup() { 8 | size(800, 533); 9 | img = loadImage("paine.jpg"); 10 | } 11 | 12 | void draw() { 13 | image(img, 0, 0, width/2, height/2); 14 | tint(255, 0, 0); 15 | image(img, width/2, 0, width/2, height/2); 16 | tint(0, 255, 0); 17 | image(img, 0, height/2, width/2, height/2); 18 | tint(0, 0, 255); 19 | image(img, width/2, height/2, width/2, height/2); 20 | noTint(); 21 | } -------------------------------------------------------------------------------- /chapter 13/listing_13_2/listing_13_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(P3D); 8 | fill(#AD71B7); 9 | } 10 | 11 | void draw() { 12 | background(#81B771); 13 | float t = millis()/1000.0; 14 | float ex = width/2 + 500 * cos(t); 15 | float ey = height/2 + 500 * sin(t); 16 | float ez = 1000 + 100 * cos(millis()/1000.0); 17 | camera(ex, ey, ez, width/2, height/2, 0, 0, 1, 0); 18 | lights(); 19 | translate(width/2, height/2); 20 | box(300); 21 | } -------------------------------------------------------------------------------- /appendix a/layouts/.idea/runConfigurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 11 | 12 | -------------------------------------------------------------------------------- /chapter 14/listing_14_3/listing_14_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import processing.vr.*; 7 | 8 | float angle = 0; 9 | PShape cube; 10 | 11 | void setup() { 12 | fullScreen(MONO); 13 | PImage tex = loadImage("mosaic.jpg"); 14 | cube = createShape(BOX, 400); 15 | cube.setTexture(tex); 16 | } 17 | 18 | void draw() { 19 | background(#81B771); 20 | translate(width/2, height/2); 21 | lights(); 22 | rotateY(angle); 23 | rotateX(angle*2); 24 | shape(cube); 25 | angle += 0.01; 26 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_9/listing_4_9.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(300, 300, P2D); 7 | colorMode(HSB, 360, 100, 100); 8 | background(0, 0, 100); 9 | translate(width/2, height/2); 10 | noStroke(); 11 | beginShape(TRIANGLE_FAN); 12 | fill(TWO_PI, 0, 100); 13 | vertex(0, 0); 14 | for (int i = 0; i <= 10; i++) { 15 | float a = map(i, 0, 10, 0, 360); 16 | float x = 150 * cos(radians(a)); 17 | float y = 150 * sin(radians(a)); 18 | fill(a, 100, 100); 19 | vertex(x, y); 20 | } 21 | endShape(); -------------------------------------------------------------------------------- /chapter 3/listing_3_2/listing_3_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | noStroke(); 9 | } 10 | 11 | void draw() { 12 | background(0); 13 | float r = 50 * displayDensity; 14 | int maxi = int(width/r); 15 | int maxj = int(height/r); 16 | for (int i = 0; i <= maxi; i++) { 17 | float x = map(i, 0, maxi, 0, width); 18 | for (int j = 0; j <= maxj; j++) { 19 | float y = map(j, 0, maxj, 0, height); 20 | ellipse(x, y, r, r); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_12/listing_4_12.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(650, 200, P2D); 7 | PShape circle = createShape(ELLIPSE, 100, 100, 100, 100); 8 | PShape poly = createShape(); 9 | poly.beginShape(QUADS); 10 | poly.vertex(200, 50); 11 | poly.vertex(300, 50); 12 | poly.vertex(300, 150); 13 | poly.vertex(200, 150); 14 | poly.endShape(); 15 | PShape group = createShape(GROUP); 16 | group.addChild(circle); 17 | group.addChild(poly); 18 | shape(circle); 19 | shape(poly); 20 | translate(300, 0); 21 | shape(group); -------------------------------------------------------------------------------- /chapter 7/listing_7_1/listing_7_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import android.content.Context; 7 | import android.hardware.Sensor; 8 | import android.hardware.SensorManager; 9 | 10 | Context context; 11 | SensorManager manager; 12 | Sensor sensor; 13 | 14 | void setup() { 15 | fullScreen(); 16 | context = getContext(); 17 | manager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE); 18 | sensor = manager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER); 19 | } 20 | 21 | void draw() { 22 | } -------------------------------------------------------------------------------- /chapter 12/listing_12_7/listing_12_7.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(700, 200, P2D); 7 | Table table = loadTable("sensor-data.csv", "header"); 8 | background(90); 9 | stroke(247, 47, 47); 10 | strokeWeight(4); 11 | beginShape(LINE_STRIP); 12 | for (int i = 0; i < table.getRowCount(); i++) { 13 | TableRow row = table.getRow(i); 14 | int r = row.getInt("rate"); 15 | float x = map(i, 0, table.getRowCount() - 1, 0, width); 16 | float y = map(r, 0, 100, height, 0); 17 | vertex(x, y); 18 | } 19 | endShape(); -------------------------------------------------------------------------------- /chapter 13/listing_13_3/listing_13_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | float angle = 0; 7 | 8 | void setup() { 9 | fullScreen(P3D); 10 | fill(#AD71B7); 11 | noStroke(); 12 | } 13 | 14 | void draw() { 15 | background(#81B771); 16 | float fov = radians(map(cos(millis()/1000.0), -1, +1, 10, 80)); 17 | float ratio = float(width)/height; 18 | perspective(fov, ratio, 1, 2000); 19 | lights(); 20 | translate(width/2, height/2); 21 | rotateY(angle); 22 | rotateX(angle*2); 23 | box(300); 24 | angle += 0.01; 25 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_12/listing_2_12.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | float angle; 7 | 8 | void setup() { 9 | size(400, 400); 10 | rectMode(CENTER); 11 | noStroke(); 12 | } 13 | 14 | void draw() { 15 | background(170); 16 | translate(width/2, height/2); 17 | rotate(angle); 18 | rect(0, 0, 100, 100); 19 | pushMatrix(); 20 | translate(150, 0); 21 | rotate(2 * angle); 22 | scale(0.5); 23 | rect(0, 0, 100, 100); 24 | popMatrix(); 25 | translate(0, 180); 26 | ellipse(0, 0, 30, 30); 27 | angle += 0.01; 28 | } -------------------------------------------------------------------------------- /chapter 12/listing_12_8/listing_12_8.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | int bpm; 7 | 8 | void setup() { 9 | fullScreen(); 10 | frameRate(1); 11 | textFont(createFont("SansSerif", 28 * displayDensity)); 12 | textAlign(CENTER, CENTER); 13 | thread("generateData"); 14 | } 15 | 16 | void draw() { 17 | background(0); 18 | translate(0, wearInsets().bottom/2); 19 | text(bpm + " beats/min", 0, 0, width, height); 20 | } 21 | 22 | void generateData() { 23 | while (true) { 24 | bpm = int(random(60, 100)); 25 | delay(2000); 26 | } 27 | } -------------------------------------------------------------------------------- /chapter 14/listing_14_6/listing_14_6.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import processing.vr.*; 7 | 8 | void setup() { 9 | fullScreen(STEREO); 10 | } 11 | 12 | void draw() { 13 | background(120); 14 | translate(width/2, height/2); 15 | 16 | lights(); 17 | 18 | noStroke(); 19 | fill(#E3993E); 20 | beginShape(QUAD); 21 | vertex(-75, -75); 22 | vertex(+75, -75); 23 | vertex(+75, +75); 24 | vertex(-75, +75); 25 | endShape(QUAD); 26 | 27 | eye(); 28 | stroke(47, 177, 234, 150); 29 | strokeWeight(50); 30 | point(0, 0, 100); 31 | } -------------------------------------------------------------------------------- /chapter 10/listing_10_4/listing_10_4.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | if (wearSquare()) rectMode(CENTER); 9 | } 10 | 11 | void draw() { 12 | background(0); 13 | if (wearAmbient()) { 14 | stroke(255); 15 | noFill(); 16 | } else { 17 | noStroke(); 18 | fill(255); 19 | } 20 | float scale = map(second(), 0, 59, 0, 1); 21 | if (wearRound()) { 22 | ellipse(width/2, height/2, scale * width, scale * width); 23 | } else { 24 | rect(width/2, height/2, scale * width, scale * height); 25 | } 26 | } -------------------------------------------------------------------------------- /chapter 9/listing_9_11/Voronoi.pde: -------------------------------------------------------------------------------- 1 | class VoronoiPoint { 2 | float x, y; 3 | PImage img; 4 | 5 | VoronoiPoint(float x, float y, PImage img){ 6 | this.x = x; 7 | this.y = y; 8 | this.img = img; 9 | img.loadPixels(); 10 | } 11 | 12 | color getColor(int idx) { 13 | return img.pixels[idx]; 14 | } 15 | } 16 | 17 | int findClosestPoint(float x, float y) { 18 | int minIdx = -1; 19 | float minDist = 1000; 20 | for (int i = 0; i < points.length; i++) { 21 | VoronoiPoint p = points[i]; 22 | if (p == null) break; 23 | float d = dist(x, y, p.x, p.y); 24 | if (d < minDist) { 25 | minIdx = i; 26 | minDist = d; 27 | } 28 | } 29 | return minIdx; 30 | } -------------------------------------------------------------------------------- /appendix a/layouts/.idea/gradle.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 17 | 18 | -------------------------------------------------------------------------------- /chapter 13/listing_13_19/listing_13_19.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage texmap; 7 | 8 | void setup() { 9 | fullScreen(P3D); 10 | texmap = loadImage("woodstock.png"); 11 | textureMode(NORMAL); 12 | noStroke(); 13 | } 14 | 15 | void draw() { 16 | background(255); 17 | translate(width/2, height/2); 18 | rotateY(0.01 * frameCount); 19 | scale(displayDensity); 20 | beginShape(QUAD); 21 | texture(texmap); 22 | vertex(-150, -150, 0, 0); 23 | vertex(-150, 150, 0, 1); 24 | vertex(150, 150, 1, 1); 25 | vertex(150, -150, 1, 0); 26 | endShape(); 27 | } -------------------------------------------------------------------------------- /chapter 5/listing_5_2/listing_5_2.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | boolean drawing = false; 7 | float radius; 8 | 9 | void setup() { 10 | fullScreen(); 11 | noStroke(); 12 | fill(100, 100); 13 | } 14 | 15 | void draw() { 16 | background(255); 17 | if (drawing) { 18 | ellipse(mouseX, mouseY, radius, radius); 19 | } 20 | } 21 | 22 | void mousePressed() { 23 | drawing = true; 24 | radius = 70 * displayDensity; 25 | } 26 | 27 | void mouseReleased() { 28 | drawing = false; 29 | } 30 | 31 | void mouseDragged() { 32 | radius += 0.5 * displayDensity; 33 | } -------------------------------------------------------------------------------- /chapter 9/street_collage/Voronoi.pde: -------------------------------------------------------------------------------- 1 | class VoronoiPoint { 2 | float x, y; 3 | PImage img; 4 | 5 | VoronoiPoint(float x, float y, PImage img){ 6 | this.x = x; 7 | this.y = y; 8 | this.img = img; 9 | img.loadPixels(); 10 | } 11 | 12 | color getColor(int idx) { 13 | return img.pixels[idx]; 14 | } 15 | } 16 | 17 | int findClosestPoint(float x, float y) { 18 | int minIdx = -1; 19 | float minDist = 1000; 20 | for (int i = 0; i < points.length; i++) { 21 | VoronoiPoint p = points[i]; 22 | if (p == null) break; 23 | float d = dist(x, y, p.x, p.y); 24 | if (d < minDist) { 25 | minIdx = i; 26 | minDist = d; 27 | } 28 | } 29 | return minIdx; 30 | } -------------------------------------------------------------------------------- /chapter 14/listing_14_5/listing_14_5.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import processing.vr.*; 7 | 8 | PMatrix3D mat = new PMatrix3D(); 9 | 10 | void setup() { 11 | fullScreen(STEREO); 12 | hint(ENABLE_STROKE_PERSPECTIVE); 13 | } 14 | 15 | void draw() { 16 | background(120); 17 | translate(width/2, height/2); 18 | lights(); 19 | 20 | noStroke(); 21 | pushMatrix(); 22 | rotateY(millis()/1000.0); 23 | fill(#E3993E); 24 | box(150); 25 | popMatrix(); 26 | 27 | eye(); 28 | stroke(#2FB1EA); 29 | strokeWeight(50); 30 | line(100, -100, 0, 0, 0, 10000); 31 | } -------------------------------------------------------------------------------- /chapter 5/listing_5_5/Circle.pde: -------------------------------------------------------------------------------- 1 | class Circle { 2 | color c; 3 | float x, y, r, vx, vy; 4 | Circle(float x, float y) { 5 | this.x = x; 6 | this.y = y; 7 | r = 70 * displayDensity; 8 | c = color(random(255), random(255), random(255), 100); 9 | } 10 | void grow() { 11 | r += 0.5 * displayDensity; 12 | } 13 | void setPosition(float x, float y) { 14 | this.x = x; 15 | this.y = y; 16 | } 17 | void setVelocity(float vx, float vy) { 18 | this.vx = vx; 19 | this.vy = vy; 20 | } 21 | void draw() { 22 | x += vx; 23 | y += vy; 24 | if (x < 0 || x > width) vx = -vx; 25 | if (y < 0 || y > height) vy = -vy; 26 | fill(c); 27 | ellipse(x, y, r, r); 28 | } 29 | } -------------------------------------------------------------------------------- /chapter 5/listing_5_6/Circle.pde: -------------------------------------------------------------------------------- 1 | class Circle { 2 | color c; 3 | float x, y, r, vx, vy; 4 | Circle(float x, float y) { 5 | this.x = x; 6 | this.y = y; 7 | r = 70 * displayDensity; 8 | c = color(random(255), random(255), random(255), 100); 9 | } 10 | void grow() { 11 | r += 0.5 * displayDensity; 12 | } 13 | void setPosition(float x, float y) { 14 | this.x = x; 15 | this.y = y; 16 | } 17 | void setVelocity(float vx, float vy) { 18 | this.vx = vx; 19 | this.vy = vy; 20 | } 21 | void draw() { 22 | x += vx; 23 | y += vy; 24 | if (x < 0 || x > width) vx = -vx; 25 | if (y < 0 || y > height) vy = -vy; 26 | fill(c); 27 | ellipse(x, y, r, r); 28 | } 29 | } -------------------------------------------------------------------------------- /contributing.md: -------------------------------------------------------------------------------- 1 | # Contributing to Apress Source Code 2 | 3 | Copyright for Apress source code belongs to the author(s). However, under fair use you are encouraged to fork and contribute minor corrections and updates for the benefit of the author(s) and other readers. 4 | 5 | ## How to Contribute 6 | 7 | 1. Make sure you have a GitHub account. 8 | 2. Fork the repository for the relevant book. 9 | 3. Create a new branch on which to make your change, e.g. 10 | `git checkout -b my_code_contribution` 11 | 4. Commit your change. Include a commit message describing the correction. Please note that if your commit message is not clear, the correction will not be accepted. 12 | 5. Submit a pull request. 13 | 14 | Thank you for your contribution! -------------------------------------------------------------------------------- /chapter 2/listing_2_6/listing_2_6.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(600, 300); 7 | 8 | beginShape(QUADS); 9 | vertex(5, 250); 10 | vertex(590, 250); 11 | vertex(590, 290); 12 | vertex(5, 290); 13 | endShape(); 14 | 15 | beginShape(); 16 | vertex(30, 25); 17 | vertex(90, 90); 18 | vertex(210, 10); 19 | vertex(160, 120); 20 | vertex(210, 270); 21 | vertex(110, 180); 22 | vertex(10, 270); 23 | vertex(60, 150); 24 | endShape(CLOSE); 25 | 26 | beginShape(TRIANGLES); 27 | vertex(50, 30); 28 | vertex(90, 75); 29 | vertex(110, 30); 30 | endShape(); 31 | 32 | ellipse(470, 80, 70, 70); -------------------------------------------------------------------------------- /chapter 13/listing_13_18/listing_13_18.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | PImage texmap; 7 | 8 | void setup() { 9 | fullScreen(P3D); 10 | texmap = loadImage("woodstock.png"); 11 | noStroke(); 12 | } 13 | 14 | void draw() { 15 | background(255); 16 | translate(width/2, height/2); 17 | rotateY(0.01 * frameCount); 18 | scale(displayDensity); 19 | beginShape(QUAD); 20 | texture(texmap); 21 | vertex(-150, -150, 0, 0); 22 | vertex(-150, 150, 0, texmap.height); 23 | vertex(150, 150, texmap.width, texmap.height); 24 | vertex(150, -150, texmap.width, 0); 25 | endShape(); 26 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_8/listing_4_8.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(800, 480); 7 | float x = width/2; 8 | float y = height/2; 9 | stroke(0, 150); 10 | strokeWeight(10); 11 | strokeJoin(ROUND); 12 | strokeCap(ROUND); 13 | beginShape(LINES); 14 | for (int i = 0; i < 100; i++) { 15 | float px = x; 16 | float py = y; 17 | float nx = x + (random(0, 1) > 0.5? -1: +1) * 50; 18 | float ny = y + (random(0, 1) > 0.5? -1: +1) * 50; 19 | if (0 <= nx && nx < width && 0 <= ny && ny < height) { 20 | vertex(px, py); 21 | vertex(nx, ny); 22 | x = nx; 23 | y = ny; 24 | } 25 | } 26 | endShape(); -------------------------------------------------------------------------------- /chapter 10/listing_10_5/listing_10_5.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | if (wearSquare()) rectMode(CENTER); 9 | } 10 | 11 | void draw() { 12 | background(0); 13 | if (wearAmbient()) { 14 | stroke(255); 15 | noFill(); 16 | } else { 17 | noStroke(); 18 | fill(255); 19 | } 20 | translate(0, wearInsets().bottom/2); 21 | float scale = map(second(), 0, 59, 0, 1); 22 | if (wearRound()) { 23 | ellipse(width/2, height/2, scale * width, scale * width); 24 | } else { 25 | rect(width/2, height/2, scale * width, scale * height); 26 | } 27 | } -------------------------------------------------------------------------------- /chapter 2/listing_2_18/Flower.pde: -------------------------------------------------------------------------------- 1 | void drawFlower(float xc, float yc) { 2 | pushMatrix(); 3 | pushStyle(); 4 | noStroke(); 5 | translate(xc, yc); 6 | fill(random(60, 79), random(50, 60), 85, 190); 7 | beginShape(); 8 | int numLobes = int(random(4, 10)); 9 | for (int i = 0; i <= numLobes; i++) { 10 | float a = map(i, 0, numLobes, 0, TWO_PI); 11 | float a1 = map(i + 1, 0, numLobes, 0, TWO_PI); 12 | float r = random(10, 50); 13 | float x = r * cos(a); 14 | float y = r * sin(a); 15 | float x1 = r * cos(a1); 16 | float y1 = r * sin(a1); 17 | vertex(0, 0); 18 | vertex(0, 0); 19 | bezierVertex(x, y, x1, y1, 0, 0); 20 | } 21 | endShape(); 22 | popStyle(); 23 | popMatrix(); 24 | } -------------------------------------------------------------------------------- /chapter 3/vines_draw/Flower.pde: -------------------------------------------------------------------------------- 1 | void drawFlower(float xc, float yc) { 2 | pushMatrix(); 3 | pushStyle(); 4 | noStroke(); 5 | translate(xc, yc); 6 | fill(random(60, 79), random(50, 60), 85, 190); 7 | beginShape(); 8 | int numLobes = int(random(4, 10)); 9 | for (int i = 0; i <= numLobes; i++) { 10 | float a = map(i, 0, numLobes, 0, TWO_PI); 11 | float a1 = map(i + 1, 0, numLobes, 0, TWO_PI); 12 | float r = random(10, 50) * displayDensity; 13 | float x = r * cos(a); 14 | float y = r * sin(a); 15 | float x1 = r * cos(a1); 16 | float y1 = r * sin(a1); 17 | vertex(0, 0); 18 | vertex(0, 0); 19 | bezierVertex(x, y, x1, y1, 0, 0); 20 | } 21 | endShape(); 22 | popStyle(); 23 | popMatrix(); 24 | } -------------------------------------------------------------------------------- /chapter 4/listing_4_22/listing_4_22.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(900, 300); 7 | PFont titleFont = createFont("Serif", 32); 8 | PFont textFont = createFont("Serif", 28); 9 | textFont(titleFont); 10 | textAlign(CENTER); 11 | fill(120); 12 | text("On Exactitude in Science", width/2, 60); 13 | textFont(textFont); 14 | textAlign(RIGHT); 15 | textLeading(60); 16 | text("...In that Empire, the Art of Cartography attained such Perfection " + 17 | "that the map of a single Province occupied the entirety of a City, " + 18 | "and the map of the Empire, the entirety of a Province.", 19 | 20, 100, width - 40, height - 20); -------------------------------------------------------------------------------- /chapter 6/listing_6_1/listing_6_1.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | void setup() { 7 | fullScreen(); 8 | frameRate(25); 9 | noStroke(); 10 | fill(#FF03F3); 11 | } 12 | 13 | void draw() { 14 | background(#6268FF); 15 | float maxRad = 50 * displayDensity; 16 | for (int i = 0; i < width/maxRad; i++) { 17 | float x = map(i, 0, int(width/maxRad) - 1, 0, width); 18 | for (int j = 0; j < height/maxRad; j++) { 19 | float y = map(j, 0, int(height/maxRad) - 1, 0, height); 20 | float t = millis() / 1000.0; 21 | float r = maxRad * cos(t + 0.1 * PI * i * j); 22 | ellipse(x, y, r, r); 23 | } 24 | } 25 | } -------------------------------------------------------------------------------- /chapter 3/vines_draw/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/java/processing/book/layouts/MySketch.java: -------------------------------------------------------------------------------- 1 | package processing.book.layouts; 2 | 3 | import processing.core.PShape; 4 | import processing.core.PImage; 5 | import processing.core.PApplet; 6 | 7 | public class MySketch extends PApplet { 8 | float angle = 0; 9 | PShape cube; 10 | 11 | public void settings() { 12 | fullScreen(P3D); 13 | } 14 | 15 | public void setup() { 16 | fullScreen(P3D); 17 | PImage tex = loadImage("mosaic.jpg"); 18 | cube = createShape(BOX, 400); 19 | cube.setTexture(tex); 20 | } 21 | 22 | public void draw() { 23 | background(0x81B771); 24 | lights(); 25 | translate(width/2, height/2); 26 | rotateY(angle); 27 | rotateX(angle*2); 28 | shape(cube); 29 | angle += 0.01; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /appendix a/layouts/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /chapter 8/listing_8_12/listing_8_12.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | import ketai.sensors.*; 7 | 8 | KetaiSensor sensor; 9 | float rotationZ, offsetZ; 10 | 11 | void setup() { 12 | fullScreen(P2D); 13 | orientation(LANDSCAPE); 14 | sensor = new KetaiSensor(this); 15 | sensor.start(); 16 | rectMode(CENTER); 17 | fill(180); 18 | } 19 | 20 | void draw() { 21 | background(255); 22 | translate(width/2, height/2); 23 | rotate(rotationZ - offsetZ); 24 | rect(0, 0, height * 0.3, height * 0.3); 25 | } 26 | 27 | void onGyroscopeEvent(float x, float y, float z) { 28 | rotationZ += 0.1 * z; 29 | } 30 | 31 | void mousePressed() { 32 | offsetZ = rotationZ; 33 | } -------------------------------------------------------------------------------- /appendix a/layouts/gradle.properties: -------------------------------------------------------------------------------- 1 | # Project-wide Gradle settings. 2 | 3 | # IDE (e.g. Android Studio) users: 4 | # Gradle settings configured through the IDE *will override* 5 | # any settings specified in this file. 6 | 7 | # For more details on how to configure your build environment visit 8 | # http://www.gradle.org/docs/current/userguide/build_environment.html 9 | 10 | # Specifies the JVM arguments used for the daemon process. 11 | # The setting is particularly useful for tweaking memory settings. 12 | org.gradle.jvmargs=-Xmx1536m 13 | 14 | # When configured, Gradle will run in incubating parallel mode. 15 | # This option should only be used with decoupled projects. More details, visit 16 | # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects 17 | # org.gradle.parallel=true 18 | -------------------------------------------------------------------------------- /chapter 4/listing_4_3/listing_4_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | size(480, 480); 7 | translate(width/2, height/2); 8 | int numPoints = 100; 9 | int degree = 5; 10 | beginShape(); 11 | float[] coeffs = new float[degree]; 12 | for (int d = 0; d < degree; d++) { 13 | coeffs[d] = random(0, 1); 14 | } 15 | float phase = random(0, TWO_PI); 16 | for (int i = 0; i <= numPoints; i++) { 17 | float theta = map(i, 0, numPoints, 0, TWO_PI); 18 | float rho = 5; 19 | for (int d = 1; d <= degree; d++) { 20 | rho += coeffs[d - 1] * sin(d*theta+phase); 21 | } 22 | float x = 30 * rho * cos(theta); 23 | float y = 30 * rho * sin(theta); 24 | vertex(x, y); 25 | } 26 | endShape(); -------------------------------------------------------------------------------- /chapter 5/listing_5_3/listing_5_3.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | ArrayList circles; 7 | Circle newCircle; 8 | 9 | void setup() { 10 | fullScreen(); 11 | circles = new ArrayList(); 12 | noStroke(); 13 | } 14 | 15 | void draw() { 16 | background(255); 17 | for (Circle c: circles) { 18 | c.draw(); 19 | } 20 | if (newCircle != null) newCircle.draw(); 21 | } 22 | 23 | void mousePressed() { 24 | newCircle = new Circle(mouseX, mouseY); 25 | } 26 | 27 | void mouseReleased() { 28 | circles.add(newCircle); 29 | newCircle = null; 30 | } 31 | 32 | void mouseDragged() { 33 | newCircle.setPosition(mouseX, mouseY); 34 | newCircle.grow(); 35 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Apress Source Code 2 | 3 | This repository hosts all the code examples included in the book [*Processing for Android: Create Mobile, Sensor-Aware, and VR Applications Using Processing*](http://www.apress.com/us/book/9781484227183), by Andrés Colubri (Apress, 2017). 4 | 5 | [comment]: #cover 6 | ![Cover image](9781484227183.jpg) 7 | 8 | Download the files as a zip using the green button, or clone the repository to your machine using Git. 9 | 10 | You can also install all the examples through the Contributions Manager in the Processing Development Environment (PDE). 11 | 12 | ## Releases 13 | 14 | Release v1.0 corresponds to the code in the published book, without corrections or updates. 15 | 16 | ## Contributions 17 | 18 | See the file Contributing.md for more information on how you can contribute to this repository. -------------------------------------------------------------------------------- /chapter 6/listing_6_7/listing_6_7.pde: -------------------------------------------------------------------------------- 1 | // Processing for Android: 2 | // Create Mobile, Sensor-Aware, and VR Applications Using Processing 3 | // Andres Colubri 4 | // http://p5android-book.andrescolubri.net/ 5 | 6 | ArrayList particles; 7 | Field field; 8 | 9 | void setup() { 10 | size(1200, 600); 11 | field = new Field(); 12 | particles = new ArrayList(); 13 | } 14 | 15 | void draw() { 16 | background(255); 17 | field.display(); 18 | for (int i = particles.size() - 1; i >= 0; i--) { 19 | Particle p = particles.get(i); 20 | p.update(field); 21 | p.display(); 22 | if (p.dead()) particles.remove(i); 23 | } 24 | 25 | } 26 | 27 | void mouseDragged() { 28 | field.update(mouseX, mouseY, mouseX - pmouseX, mouseY - pmouseY); 29 | particles.add(new Particle(mouseX, mouseY)); 30 | } -------------------------------------------------------------------------------- /appendix a/layouts/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 15 | 16 |