100% found this document useful (1 vote)
10 views

Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing 2nd Edition Colubri download

The document provides information about the book 'Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing, 2nd Edition' by Andrés Colubri, which focuses on developing mobile applications using the Processing language. It includes details on downloading the book, its contents, and additional resources related to mobile development. The document also lists other related books available for download on the same platform.

Uploaded by

dilenelel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
10 views

Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing 2nd Edition Colubri download

The document provides information about the book 'Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing, 2nd Edition' by Andrés Colubri, which focuses on developing mobile applications using the Processing language. It includes details on downloading the book, its contents, and additional resources related to mobile development. The document also lists other related books available for download on the same platform.

Uploaded by

dilenelel
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Processing for Android: Create Mobile, Sensor-

aware, and XR Applications Using Processing 2nd


Edition Colubri pdf download

https://ebookmeta.com/product/processing-for-android-create-
mobile-sensor-aware-and-xr-applications-using-processing-2nd-
edition-colubri/

Download more ebook from https://ebookmeta.com


We believe these products will be a great fit for you. Click
the link to download now, or visit ebookmeta.com
to discover even more!

Processing for Android: Create Mobile, Sensor-aware,


and XR Applications Using Processing, 2nd Edition
Andrés Colubri

https://ebookmeta.com/product/processing-for-android-create-
mobile-sensor-aware-and-xr-applications-using-processing-2nd-
edition-andres-colubri/

Corona SDK Mobile Game Development 2nd Edition Learn


explore and create commercially successful mobile games
for iOS and Android Michelle M. Fernandez

https://ebookmeta.com/product/corona-sdk-mobile-game-
development-2nd-edition-learn-explore-and-create-commercially-
successful-mobile-games-for-ios-and-android-michelle-m-fernandez/

Cambridge IGCSE and O Level History Workbook 2C - Depth


Study: the United States, 1919-41 2nd Edition Benjamin
Harrison

https://ebookmeta.com/product/cambridge-igcse-and-o-level-
history-workbook-2c-depth-study-the-united-states-1919-41-2nd-
edition-benjamin-harrison/

Medical-Surgical Nursing : Concepts for


Interprofessional Collaborative Care 10th Edition Donna
D. Ignatavicius

https://ebookmeta.com/product/medical-surgical-nursing-concepts-
for-interprofessional-collaborative-care-10th-edition-donna-d-
ignatavicius/
Some Spanish American Poets Isaac Goldberg

https://ebookmeta.com/product/some-spanish-american-poets-isaac-
goldberg/

The Glittering World Anthology Native American Romance


Paranormal Fantasy 1st Edition Trinity Blacio S E Smith
Lia Violet Jamie K Schmidt Barb Shuler L Loren
Stephanie Burke Elle Boon Wendi Zwaduk Kate Richards
https://ebookmeta.com/product/the-glittering-world-anthology-
native-american-romance-paranormal-fantasy-1st-edition-trinity-
blacio-s-e-smith-lia-violet-jamie-k-schmidt-barb-shuler-l-loren-
stephanie-burke-elle-boon-wendi-zwaduk-kat/

Ground Beef Cookbook: 50 Delicious Ground Beef Recipes


2nd Edition Booksumo Press

https://ebookmeta.com/product/ground-beef-cookbook-50-delicious-
ground-beef-recipes-2nd-edition-booksumo-press/

Iran in an Emerging New World Order From Ahmadinejad to


Rouhani 1st Edition Ali Fathollah-Nejad

https://ebookmeta.com/product/iran-in-an-emerging-new-world-
order-from-ahmadinejad-to-rouhani-1st-edition-ali-fathollah-
nejad/

Midsummer Night Shifts 1st Edition Various Authors

https://ebookmeta.com/product/midsummer-night-shifts-1st-edition-
various-authors/
CYBORG: Human and Machine Communication Paradigm
(Prospects in Smart Technologies) 1st Edition Kuldeep
Singh Kaswan

https://ebookmeta.com/product/cyborg-human-and-machine-
communication-paradigm-prospects-in-smart-technologies-1st-
edition-kuldeep-singh-kaswan/
Processing
for Android
Create Mobile, Sensor-aware, and XR
Applications Using Processing

Second Edition

Andrés Colubri
Processing for Android
Create Mobile, Sensor-aware, and XR
Applications Using Processing

Second Edition

Andrés Colubri

More books: https://t.me/booksforits


Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using
Processing, Second Edition
Andrés Colubri
University of Massachusetts, Worcester, MA, USA

ISBN-13 (pbk): 978-1-4842-9584-7 ISBN-13 (electronic): 978-1-4842-9585-4


https://doi.org/10.1007/978-1-4842-9585-4

Copyright © 2023 by Andrés Colubri


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Spandana Chatterjee
Development Editor: Spandana Chatterjee
Coordinating Editor: Mark Powers
Cover image designed by eStudioCalamar
Distributed to the book trade worldwide by Apress Media, LLC, 1 New York Plaza, New York, NY 10004,
U.S.A. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail [email protected], or visit
www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer
Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation.
For information on translations, please e-mail [email protected]; for reprint,
paperback, or audio rights, please e-mail [email protected].
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (https://github.com/Apress). For more detailed information, please visit
https://www.apress.com/gp/services/source-code.
Paper in this product is recyclable

More books: https://t.me/booksforits


To L. J. for accompanying during the writing of this book.
To my family and friends for always supporting me.
And to the Processing community for putting these tools to great use.

More books: https://t.me/booksforits


Table of Contents

About the Author�����������������������������������������������������������������������������������������������������xv


About the Technical Reviewer�������������������������������������������������������������������������������xvii
Acknowledgments��������������������������������������������������������������������������������������������������xix
Introduction������������������������������������������������������������������������������������������������������������xxi


■Part I: First Steps with Processing for Android���������������������������������� 1

■Chapter 1: Getting Started with the Android Mode����������������������������������������������� 3
What Is the Processing Project?��������������������������������������������������������������������������������������� 3
The Processing Language���������������������������������������������������������������������������������������������������������������������� 3
The Processing Development Environment�������������������������������������������������������������������������������������������� 4

Extending Processing������������������������������������������������������������������������������������������������������� 6
The Contribution Manager���������������������������������������������������������������������������������������������������������������������� 7

Processing for Android����������������������������������������������������������������������������������������������������� 8


Installing the Android Mode�������������������������������������������������������������������������������������������������������������������� 9
Interface of the Android Mode�������������������������������������������������������������������������������������������������������������� 10
Running a Sketch on a Device�������������������������������������������������������������������������������������������������������������� 12
Running a Sketch in the Emulator�������������������������������������������������������������������������������������������������������� 14

Summary������������������������������������������������������������������������������������������������������������������������ 16

■Chapter 2: The Processing Language������������������������������������������������������������������ 17
A Programming Sketchbook for Artists and Designers�������������������������������������������������� 17
The Structure of a Processing Sketch���������������������������������������������������������������������������� 17

More books: https://t.me/booksforits


■ Table of Contents

Drawing with Code��������������������������������������������������������������������������������������������������������� 20


Coordinates������������������������������������������������������������������������������������������������������������������������������������������ 21
Form����������������������������������������������������������������������������������������������������������������������������������������������������� 23
Color����������������������������������������������������������������������������������������������������������������������������������������������������� 25
Applying Geometric Transformations���������������������������������������������������������������������������������������������������� 28

Responding to User Input����������������������������������������������������������������������������������������������� 32


Coding a “Vine Drawing” App����������������������������������������������������������������������������������������� 35
Summary������������������������������������������������������������������������������������������������������������������������ 38

■Chapter 3: From Sketch to Play Store����������������������������������������������������������������� 39
Sketching and Debugging���������������������������������������������������������������������������������������������� 39
Getting Information from the Console�������������������������������������������������������������������������������������������������� 39
Getting more information with logcat��������������������������������������������������������������������������������������������������� 41
Using the Integrated Debugger������������������������������������������������������������������������������������������������������������� 41
Reporting Processing Bugs������������������������������������������������������������������������������������������������������������������ 42

Preparing a Sketch for Release�������������������������������������������������������������������������������������� 42


Adjusting for Device’s DPI�������������������������������������������������������������������������������������������������������������������� 43
Using the Emulator������������������������������������������������������������������������������������������������������������������������������� 46
Setting Icons and Bundle Name����������������������������������������������������������������������������������������������������������� 48
Setting Package Name and Version������������������������������������������������������������������������������������������������������ 48
Exporting As Signed Bundle����������������������������������������������������������������������������������������������������������������� 49

Summary������������������������������������������������������������������������������������������������������������������������ 51


■Part II: Drawing and Interaction������������������������������������������������������� 53

■Chapter 4: Drawing Graphics and Text���������������������������������������������������������������� 55
Drawing Shapes������������������������������������������������������������������������������������������������������������� 55
More Types of Shapes��������������������������������������������������������������������������������������������������������������������������� 55
Curve Shapes��������������������������������������������������������������������������������������������������������������������������������������� 58
Using Bézier Curves����������������������������������������������������������������������������������������������������������������������������� 60
Shape Attributes����������������������������������������������������������������������������������������������������������������������������������� 66
Shape Styles����������������������������������������������������������������������������������������������������������������������������������������� 67

vi

More books: https://t.me/booksforits


■ Table of Contents

Drawing Images������������������������������������������������������������������������������������������������������������� 69
Drawing Text������������������������������������������������������������������������������������������������������������������� 70
Loading and Creating Fonts������������������������������������������������������������������������������������������������������������������ 70
Text Attributes��������������������������������������������������������������������������������������������������������������������������������������� 73
Scaling Text������������������������������������������������������������������������������������������������������������������������������������������ 73

Renderers in Processing������������������������������������������������������������������������������������������������ 75
The PShape Class����������������������������������������������������������������������������������������������������������� 76
Creating PShapes��������������������������������������������������������������������������������������������������������������������������������� 76
Loading Shapes from SVG�������������������������������������������������������������������������������������������������������������������� 79
Texturing Shapes���������������������������������������������������������������������������������������������������������������������������������� 81

Summary������������������������������������������������������������������������������������������������������������������������ 82

■Chapter 5: Touchscreen Interaction��������������������������������������������������������������������� 83
Touch Events in Android������������������������������������������������������������������������������������������������� 83
Basic Touch Events������������������������������������������������������������������������������������������������������������������������������� 83
Multi-touch Events������������������������������������������������������������������������������������������������������������������������������� 89

Touch-Based Interaction������������������������������������������������������������������������������������������������ 93
Item Selection��������������������������������������������������������������������������������������������������������������������������������������� 93
Scrolling����������������������������������������������������������������������������������������������������������������������������������������������� 95
Swipe and Pinch����������������������������������������������������������������������������������������������������������������������������������� 97

Using the Keyboard������������������������������������������������������������������������������������������������������ 100


Summary���������������������������������������������������������������������������������������������������������������������� 101

■Chapter 6: Live Wallpapers�������������������������������������������������������������������������������� 103
Live Wallpapers������������������������������������������������������������������������������������������������������������ 103
Writing and Installing Live Wallpapers����������������������������������������������������������������������������������������������� 103
Using Multiple Home Screens������������������������������������������������������������������������������������������������������������ 105
Handling Permissions������������������������������������������������������������������������������������������������������������������������� 107

Drawing with Particle Systems������������������������������������������������������������������������������������ 111


Simulating Natural Motion������������������������������������������������������������������������������������������������������������������ 116

vii

More books: https://t.me/booksforits


■ Table of Contents

An Image-Flow Wallpaper�������������������������������������������������������������������������������������������� 120


Loading, Resizing, and Cropping Images�������������������������������������������������������������������������������������������� 120
Putting Everything Together��������������������������������������������������������������������������������������������������������������� 121
Wrapping the Project Up��������������������������������������������������������������������������������������������������������������������� 124

Summary���������������������������������������������������������������������������������������������������������������������� 126


■Part III: Sensors������������������������������������������������������������������������������ 127

■Chapter 7: Reading Sensor Data������������������������������������������������������������������������ 129
Sensors in Android Devices������������������������������������������������������������������������������������������ 129
Accelerometer������������������������������������������������������������������������������������������������������������������������������������ 129
Gyroscope������������������������������������������������������������������������������������������������������������������������������������������� 130
Magnetometer������������������������������������������������������������������������������������������������������������������������������������ 130
Location���������������������������������������������������������������������������������������������������������������������������������������������� 130

Accessing Sensors from Processing���������������������������������������������������������������������������� 130


Creating a Sensor Manager���������������������������������������������������������������������������������������������������������������� 131
Adding a Sensor Listener������������������������������������������������������������������������������������������������������������������� 131
Reading Data from the Sensor����������������������������������������������������������������������������������������������������������� 132
Reading Data from Other Sensors������������������������������������������������������������������������������������������������������ 134

The Ketai Library���������������������������������������������������������������������������������������������������������� 135


Installing Ketai������������������������������������������������������������������������������������������������������������������������������������ 135
Using Ketai����������������������������������������������������������������������������������������������������������������������������������������� 136
Event Handlers in Ketai���������������������������������������������������������������������������������������������������������������������� 138
Summary���������������������������������������������������������������������������������������������������������������������� 140

■Chapter 8: Driving Graphics and Sound with Sensor Data�������������������������������� 141
Using Ketai to Read Sensor Data���������������������������������������������������������������������������������� 141
Measuring Acceleration������������������������������������������������������������������������������������������������ 141
Shake Detection��������������������������������������������������������������������������������������������������������������������������������� 142
Step Counter��������������������������������������������������������������������������������������������������������������������������������������� 143
Audio-visual Mapping of Step Data���������������������������������������������������������������������������������������������������� 144
Playing Audio�������������������������������������������������������������������������������������������������������������������������������������� 149

viii

More books: https://t.me/booksforits


■ Table of Contents

Using the Magnetic Sensor������������������������������������������������������������������������������������������ 152


Creating a Compass App�������������������������������������������������������������������������������������������������������������������� 152

The Gyroscope�������������������������������������������������������������������������������������������������������������� 156


Controlling Navigation with the Gyroscope���������������������������������������������������������������������������������������� 159

Summary���������������������������������������������������������������������������������������������������������������������� 162

■Chapter 9: Geolocation�������������������������������������������������������������������������������������� 163
Location Data in Android���������������������������������������������������������������������������������������������� 163
Using Location API in Processing��������������������������������������������������������������������������������� 164
Location Permissions������������������������������������������������������������������������������������������������������������������������� 165
Accessing Data from Multiple Threads����������������������������������������������������������������������������������������������� 167
Location with Ketai����������������������������������������������������������������������������������������������������������������������������� 171
Using Additional Location Data����������������������������������������������������������������������������������������������������������� 172

A Street View Collage��������������������������������������������������������������������������������������������������� 174


Using Google Street View Image API��������������������������������������������������������������������������������������������������� 175
Making a Simple Image Collage��������������������������������������������������������������������������������������������������������� 177
Putting Everything Together��������������������������������������������������������������������������������������������������������������� 179

Summary���������������������������������������������������������������������������������������������������������������������� 182


■Part IV: Wearables and Watch Faces���������������������������������������������� 183

■Chapter 10: Wearable Devices��������������������������������������������������������������������������� 185
From Activity Trackers to Smartwatches���������������������������������������������������������������������� 185
Smartwatches������������������������������������������������������������������������������������������������������������������������������������ 186

Running Watch Face Sketches������������������������������������������������������������������������������������� 186


Using a Watch������������������������������������������������������������������������������������������������������������������������������������� 186
Using the Emulator����������������������������������������������������������������������������������������������������������������������������� 189
Displaying Time���������������������������������������������������������������������������������������������������������������������������������� 191
Counting Steps����������������������������������������������������������������������������������������������������������������������������������� 192
Designing for Smartwatches���������������������������������������������������������������������������������������� 193
Adjusting for Screen Shape���������������������������������������������������������������������������������������������������������������� 194
Watch Face Preview Icons������������������������������������������������������������������������������������������������������������������ 194

Summary���������������������������������������������������������������������������������������������������������������������� 195
ix

More books: https://t.me/booksforits


■ Table of Contents


■Chapter 11: Visualizing Time����������������������������������������������������������������������������� 197
From Sundials to Smartwatches���������������������������������������������������������������������������������� 197
Using Time to Control Motion������������������������������������������������������������������������������������������������������������� 198
Square vs. Round Watch Faces���������������������������������������������������������������������������������������������������������� 200

Working with a Watch Face Concept���������������������������������������������������������������������������� 203


Elapsed/Remaining Time�������������������������������������������������������������������������������������������������������������������� 204
Adding Interaction������������������������������������������������������������������������������������������������������������������������������ 206
Loading and Displaying Images���������������������������������������������������������������������������������������������������������� 207

Summary���������������������������������������������������������������������������������������������������������������������� 209

■Chapter 12: Visualizing Physical Activity���������������������������������������������������������� 211
Body Sensors��������������������������������������������������������������������������������������������������������������� 211
Step Counter��������������������������������������������������������������������������������������������������������������������������������������� 211
Heart Rate������������������������������������������������������������������������������������������������������������������������������������������� 211

Visualizing Physical Activity in Real Time��������������������������������������������������������������������� 212


Simple Step Counter��������������������������������������������������������������������������������������������������������������������������� 212
Accessing the Heart Rate Sensor������������������������������������������������������������������������������������������������������� 214
Visualizing Step Count Data���������������������������������������������������������������������������������������������������������������� 215
A Beating Heart����������������������������������������������������������������������������������������������������������������������������������� 217
Sensor Debugging������������������������������������������������������������������������������������������������������������������������������ 219

Grow a Tree As You Exercise!��������������������������������������������������������������������������������������� 223


Generating a Tree with a Particle System������������������������������������������������������������������������������������������� 223
Incorporating Step Count Data����������������������������������������������������������������������������������������������������������� 226
Tweaking the Watch Face������������������������������������������������������������������������������������������������������������������� 228
Blooming the Tree������������������������������������������������������������������������������������������������������������������������������� 229

Summary���������������������������������������������������������������������������������������������������������������������� 235


■Part V: 3D and Shaders������������������������������������������������������������������� 237

■Chapter 13: 3D in Processing���������������������������������������������������������������������������� 239
The P3D Renderer�������������������������������������������������������������������������������������������������������� 239
Hello World in 3D�������������������������������������������������������������������������������������������������������������������������������� 239

More books: https://t.me/booksforits


■ Table of Contents

3D Transformations������������������������������������������������������������������������������������������������������ 240


Combining Transformations���������������������������������������������������������������������������������������������������������������� 241

3D Shapes�������������������������������������������������������������������������������������������������������������������� 243


Custom Shapes����������������������������������������������������������������������������������������������������������������������������������� 245
The Camera���������������������������������������������������������������������������������������������������������������������������������������� 246
Immediate vs. Retained Rendering����������������������������������������������������������������������������������������������������� 249
Custom PShape Objects��������������������������������������������������������������������������������������������������������������������� 250
Loading OBJ Shapes��������������������������������������������������������������������������������������������������������������������������� 253

Summary���������������������������������������������������������������������������������������������������������������������� 255

■Chapter 14: Lighting and Texturing������������������������������������������������������������������� 257
Making 3D Scenes more Realistic with Lights and Textures���������������������������������������� 257
Light Sources and Material Properties����������������������������������������������������������������������������������������������� 257
Texture Mapping��������������������������������������������������������������������������������������������������������������������������������� 261

Putting Everything Together����������������������������������������������������������������������������������������� 265


Summary���������������������������������������������������������������������������������������������������������������������� 267

■Chapter 15: GLSL Shaders��������������������������������������������������������������������������������� 269
What Is a Shader?�������������������������������������������������������������������������������������������������������� 269
The Graphics Pipeline: Vertex and Pixel Shaders�������������������������������������������������������������������������������� 269
The PShader Class������������������������������������������������������������������������������������������������������������������������������ 272
Anatomy of a Simple Shader�������������������������������������������������������������������������������������������������������������� 274
Defining Custom Uniforms������������������������������������������������������������������������������������������������������������������ 277
Types of Shaders in Processing����������������������������������������������������������������������������������� 279
Color Shaders������������������������������������������������������������������������������������������������������������������������������������� 279
Texture Shaders���������������������������������������������������������������������������������������������������������������������������������� 280
Light Shaders������������������������������������������������������������������������������������������������������������������������������������� 283
Texlight Shaders��������������������������������������������������������������������������������������������������������������������������������� 286
Image Postprocessing Filters������������������������������������������������������������������������������������������������������������� 288
Day-to-Night Earth Shader and Live Wallpaper������������������������������������������������������������ 292
Summary���������������������������������������������������������������������������������������������������������������������� 301

xi

More books: https://t.me/booksforits


■ Table of Contents


■Part VI: Extended Reality: VR and AR��������������������������������������������� 303

■Chapter 16: Basics of VR����������������������������������������������������������������������������������� 305
Brief History of VR�������������������������������������������������������������������������������������������������������� 305
Google Cardboard������������������������������������������������������������������������������������������������������������������������������� 305
Hardware Requirements��������������������������������������������������������������������������������������������������������������������� 306

VR in Processing���������������������������������������������������������������������������������������������������������� 306
Stereo Rendering�������������������������������������������������������������������������������������������������������������������������������� 307
Monoscopic Rendering����������������������������������������������������������������������������������������������������������������������� 309
VR Interaction��������������������������������������������������������������������������������������������������������������� 310
Eye and World Coordinates����������������������������������������������������������������������������������������������������������������� 311
The Line of Sight��������������������������������������������������������������������������������������������������������������������������������� 313
Selecting a Shape with Screen Coordinates��������������������������������������������������������������������������������������� 315
Bounding Box Selection���������������������������������������������������������������������������������������������������������������������� 318

Movement in VR����������������������������������������������������������������������������������������������������������� 322


Automatic Movement�������������������������������������������������������������������������������������������������������������������������� 323
Unconstrained Movement������������������������������������������������������������������������������������������������������������������� 325

Summary���������������������������������������������������������������������������������������������������������������������� 328

■Chapter 17: Basics of AR����������������������������������������������������������������������������������� 329
A Brief History of AR����������������������������������������������������������������������������������������������������� 329
AR on Android������������������������������������������������������������������������������������������������������������������������������������� 330
Requirements������������������������������������������������������������������������������������������������������������������������������������� 331
Getting Started����������������������������������������������������������������������������������������������������������������������������������� 331

Drawing Trackables������������������������������������������������������������������������������������������������������ 332


Using Anchors������������������������������������������������������������������������������������������������������������������������������������� 335
Hitting Trackables������������������������������������������������������������������������������������������������������������������������������� 337
Adding a User Interface���������������������������������������������������������������������������������������������������������������������� 340
Using Custom Shaders in AR�������������������������������������������������������������������������������������������������������������� 343
Drawing in AR������������������������������������������������������������������������������������������������������������������������������������� 346

Summary���������������������������������������������������������������������������������������������������������������������� 350

xii

More books: https://t.me/booksforits


■ Table of Contents


■Chapter 18: Creating XR Experiences���������������������������������������������������������������� 351
Challenges with XR Apps���������������������������������������������������������������������������������������������� 351
Drawing in VR������������������������������������������������������������������������������������������������������������������������������������� 352
Initial Sketches����������������������������������������������������������������������������������������������������������������������������������� 353

A Simple VR UI�������������������������������������������������������������������������������������������������������������� 354


Drawing in 3D��������������������������������������������������������������������������������������������������������������� 359
Flying Around��������������������������������������������������������������������������������������������������������������� 366
Final Tweaks and Packaging���������������������������������������������������������������������������������������� 371
Intro Text��������������������������������������������������������������������������������������������������������������������������������������������� 371
Icons and Package Export������������������������������������������������������������������������������������������������������������������ 372

Summary���������������������������������������������������������������������������������������������������������������������� 373


■Part VII: Appendixes����������������������������������������������������������������������� 375

■Chapter 19: Appendix A: Gradle and Android Studio Integration���������������������� 377
Google Tools for Android Development������������������������������������������������������������������������� 377
Exporting a Sketch As a Gradle Project������������������������������������������������������������������������ 379
Importing into Android Studio�������������������������������������������������������������������������������������� 380
Adding a Processing Sketch to a Layout���������������������������������������������������������������������� 384

■Chapter 20: Appendix B: Processing Libraries for Android������������������������������� 389
Extending Processing with Libraries���������������������������������������������������������������������������� 389
Installing Libraries with the Contribution Manager���������������������������������������������������������������������������� 389
Installing Libraries Manually�������������������������������������������������������������������������������������������������������������� 392

Writing New Libraries��������������������������������������������������������������������������������������������������� 393

Index��������������������������������������������������������������������������������������������������������������������� 397

xiii

More books: https://t.me/booksforits


About the Author

Andrés Colubri is a senior member of the Processing project and the


main developer of the OpenGL renderer, the video library, and Processing
for Android. He originally studied Physics and Mathematics in Argentina
and later did an MFA in the Design Media Arts Department at UCLA. He
uses Processing as a tool to bridge his interests in computer graphics,
data visualization, and biomedical research. He is currently an assistant
professor at the University of Massachusetts Chan Medical School
(https://co-labo.org).

xv

More books: https://t.me/booksforits


About the Technical Reviewer

Massimo Nardone has more than 25 years of experience in security, web


and mobile development, cloud, and IT architecture. His true IT passions
are security and Android. He has been programming and teaching others
how to program with Android, Perl, PHP, Java, VB, Python, C/C++, and
MySQL for more than 20 years. He holds a Master of Science degree in
computing science from the University of Salerno, Italy.
He has worked as a CISO, CSO, security executive, IoT executive,
project manager, software engineer, research engineer, chief security
architect, PCI/SCADA auditor, and senior lead IT security/cloud/SCADA
architect for many years. His technical skills include security, Android,
cloud, Java, MySQL, Drupal, COBOL, Perl, web and mobile development,
MongoDB, D3, Joomla, Couchbase, C/C++, WebGL, Python, Pro Rails,
Django CMS, Jekyll, Scratch, and more.
He was a visiting lecturer and supervisor for exercises at the Networking Laboratory of the Helsinki
University of Technology (Aalto University). He also holds four international patents (in the PKI, SIP, SAML,
and Proxy areas). He is currently working for Cognizant as head of cybersecurity and CISO to help clients
in areas of information and cybersecurity, including strategy, planning, processes, policies, procedures,
governance, awareness, and so forth. In June 2017, he became a permanent member of the ISACA
Finland Board.
Massimo has reviewed more than 45 IT books for different publishing companies and is the coauthor
of Pro Spring Security: Securing Spring Framework 5 and Boot 2-based Java Applications (Apress, 2019),
Beginning EJB in Java EE 8 (Apress, 2018), Pro JPA 2 in Java EE 8 (Apress, 2018), and Pro Android Games
(Apress, 2015).

xvii

More books: https://t.me/booksforits


Exploring the Variety of Random
Documents with Different Content
To the children who do not live in New York, I ought to say that
we have a splendid regiment of soldiers, called the “Light Guard,”
who, whenever they cheer, always say, “Hurra! hurra! hurra! ti-g-a-
r!” I don’t know why they do it, but this is what is meant by “three
cheers and a tiger.”
Phil bade the farmer, his wife, and little Essie good-night with
tears in his eyes, promising to come and see them every day. Mr.
Wiseman had invited Kriss and the other boys to stay a week at
Woodlawn, which was a most delightful fact to know and
experience. A merry, merry week they all had, and you may be sure
Johnny was included in every day’s pleasure, and Essie was with
them very often.
And now, my darlings reading this, do you think it likely that Mr.
Wiseman will ever have to send Philip away again? I do not, and I
hope you are of the same opinion; but if you would like me to keep
one eye on his future movements, and write to you about them, just
let me know, won’t you?

“That’s all,” said Aunt Fanny. “What do you think of it, my merry
men and ladies? Will Philip Badboy Wiseman do for a beginning?”
“It’s perfectly splendid!” cried the children.
“And you don’t mean to eat greedily of flower-pot pudding after
this, or snap each other’s legs with knots in your pocket-
handkerchiefs?”
“Oh no, dear Aunt Fanny. This pop-gun has made us better
already. We mean to be ever so kind, industrious, and unselfish after
this.”
“I wish I had a kite like Johnny’s,” said Peter.
“Who knows, if you try to be a loving, obedient child, but what the
Honorable Mr. Kite may call upon you next spring, all ready for an
airing. I’ll have a talk with my friend Johnny about it.”
“Oh goody! will you?” cried Peter, jumping straight up and down in
the air. “My! how good I’ll be! I’m going to begin right away;” and he
sat down, solemn and stiff, twirling his thumbs one over the other,
and saying, “Look at me! Only see how good I am!” while the rest
laughed merrily at the joke.
Then Aunt Fanny had a kind kiss from all, and bade them good-
night.

PRACTISE TRUE POLITENESS.

The next time Aunt Fanny came she had a funny and rather
mischievous twinkle in her eyes. She did not say a word, while she
unfolded her manuscript but quietly read out the Pop-gun printed
above, and then said her story was called by the comical title of
THE DOG’S DINNER-PARTY.
The children looked at each other, wondering what was coming,
then fastened their eager eyes on the reader, who began as follows:
Once upon a time there lived a funny, bustling, little old
gentleman, who thought that dogs, horses, cats, and monkeys,
ought to live just as he did; that is, first and foremost, to behave
with perfect politeness, learn to read and write, sit at the table and
eat their meals with knives and forks, and sleep in French
bedsteads, all tucked up warm. He even insisted on their wearing
clothes and patent leather boots, and they ran clattering about the
house on their hind legs, with trousers and coats on, and their tails
dangling out behind, like a pocket handkerchief out of a pocket.
The little bustling old gentleman was a bachelor. He had tried
about twenty-nine times to get married, but the ladies, one and all,
insisted that the dogs, cats, and monkeys must be turned out of the
house, if they consented to come in, which was very disagreeable
and unreasonable, and made the old gentleman so mad, he said to
himself he would see them to Jericho first; so making each one in
turn a very low bow, for he was the very pink of politeness, he took
himself off, and that was the last of getting married.
So his family consisted of four fine dogs, six beautiful cats, eight
comical monkeys, one fat cook, and one fat coachman, two thin
housemaids, and nobody knows how many grooms and footmen—
and they all lived together, a great deal happier than Barnum’s
happy family, and what do you suppose was the reason? Why, they
were taught by the bustling little old gentleman to be perfectly
polite. I forgot to tell you that his name was Lord Chesterfield.
One day Beppo—one of the family—a handsome brown and white
spaniel, went out for a walk. As soon as he got out of sight of the
house, he dived into a bramble bush, and scratched off all his
clothes, for they plagued him to death, and he trotted joyously
along, whistling—

“With reading, and writing, and riches,


For once in my life, I have done!
I’ve got rid of that old pair of breeches;
So, hurrah! my brave boys, for some fun!”

Presently he came to a fine river, and was just thinking he would


take a swim, when he heard a piercing scream, and something went
splash into the water.
Beppo rushed to the brink just in time to see a little golden-haired
child disappear under the rippling waves.
In he dashed, like a flying-fish, swam like lightning to the spot,
and caught the little child’s dress in his mouth; then turning, swam
back, and laid it, drenched and gasping, on the green bank, just as
the nurse, her face white with terror, and her limbs trembling, was
struggling to reach the shore.
The poor woman caught the beautiful child in her arms and kissed
her, and thanked Heaven for her rescue. Then she patted and
hugged Beppo, who stood wagging his tail and shaking the water
out of his long silky hair. “Ah, madam,” he said, with a very polite
how, and his fore-paw on his heart, “I am truly grateful that I was
made a spaniel: if I had been a stupid poodle-dog I should have
been afraid of the water, and the poor little darling would have been
drowned.”
“Why!” exclaimed the nurse in astonishment, “is it possible you
can talk?”
“Yes, ma’am, my master, the Lord Chesterfield, will have it, though
I’d much rather bark; and he makes us eat at the table out of plates,
and cut our food with knives and forks, when I think a marrow-bone
to gnaw, out in the court-yard, is as nice again; but he says gnawing
bones is perfectly dreadful, and we must learn to eat politely.”
“Well, that is very funny! I shall tell about it as soon as I get
home.”
So the nurse hastened away, with the pretty child, and was soon
telling the frightened mother how little Lucy had run away from her,
and tumbled into the river, and how the beautiful spaniel, who could
talk like a Christian, had saved her life.
The grateful mother went out the next morning and bought a
splendid gold collar, and had this inscription engraved upon it: “For
the noble and brave dog Beppo, who saved little Lucy’s life.”
When the parcel came, the little bustling old gentleman opened it,
and reading the words on the gold collar, called Beppo to him.
“Why, only look at this splendid collar, my good fellow,” he cried;
“why did you not tell me of your adventure?”
“I only did my duty,” Beppo modestly answered.
“Ah! I am quite proud of you. I shall give you a dinner-party, and
you shall carry round the invitations yourself.”
“May I invite little golden-haired Lucy?” asked Beppo. “I should
like to so much.”
“Certainly,” said Lord Chesterfield; “suppose you write the note
yourself; it will be a very delicate attention.”
Down sat Beppo, joyously, and soon he had penned this fine
invitation:

“Master Beppo wishes you to dine with me to-


morrow at five o’ clock.
“Miss Lucy Hill.”

This was not exactly the right way to word it, but you see his
education was not yet completed.
Then the little bustling old gentleman wrote the rest of the notes;
for Beppo was rather slow, and ran his tongue out in the most
fearful manner, in his anxiety to spell the words right, and then they
were nicely sealed up in envelopes, and he put them all together in
a pretty little basket.
And now the coachman was ordered to bring out the state
carriage and four horses, and Beppo, sitting up inside on his hind-
legs, very grand, and no doubt exceedingly uncomfortable, carried
the notes of invitation to the most fashionable dogs of his
acquaintance.
Three of the dogs to be invited lived in the house, as you know;
but they had notes as well as the rest, for that is the way to be
perfectly polite. I dare say you have many a time heard people say
something like this—
“Oh, it don’t make any difference what there is for dinner when
you come, because we are so intimate; but I should be mortified to
death, not to have every thing nice when General Fusbos is invited,
as he is such a stranger.”
This is abominable manners—as if you ought not to treat those
you love far better than a stranger. It always makes me very
indignant when such a remark is made to me; and I sincerely hope
you will profit all your life by this hint about true politeness from our
friend Beppo.
You can’t have a great many at a dinner party, you know; so you
must be careful to invite the most agreeable people, and as many
ladies as gentlemen. Beppo knew this as well as you, and so you
may be sure he had taken great pains to have a pleasant party.
The next morning there were a great many people ringing at the
little bustling old gentleman’s door, and each one left a note.
Beppo ran into a corner with them, as fast as they arrived, and
read them in a great hurry. At last one came, very pretty, of a three-
cornered shape, and smelling of roses. The moment Beppo opened
it, and glanced at the contents, he danced around the room for joy,
waving the note in the air with one of his fore-paws. Then he rushed
up to his master, exclaiming—
“She’s coming! my Lord Chesterfield, she’s coming! Just fancy how
delightful to have her sweet face and golden curls among our hairy
muzzles! Oh, we must be very polite, and make her as happy as
possible.”
It was a lovely summer’s day. The sun turned the ripples of the
river into shifting gold, and there was singing, and buzzing, and
whispering, and laughing everywhere; all felt kind and loving. Even
the hideous old scarecrow in the cornfield allowed Beppo, in his joy,
to dash at him and playfully throw him down, bang! on his old red
nose, and he never once attempted to get up; for he said, in his
pine-wood heart—
“I’m a brute, after all, to frighten the poor birds out of their wits.
I’ll just lie down here and take a nap, and let the dear little things
have a good time for once.”
Oh, it was charming to see that even an old scarecrow could be
polite, which, after all, is only another name for loving-kindness.
Just before five o’clock, the nurse brought little Lucy, dressed in
blue, and looking like a fairy. Strange to say, although only four
years old, she was not in the least frightened, but put her soft white
arms around Beppo’s neck, and said, “Oh, I love oo, good dog!” and
hugged him so kindly, that he would have given all the world to have
had her tumble into the water again, so that he might save her life
once more.
The little bustling old gentleman took her by the hand, and
showed her all over his curious old house, with its suits of rusty
armor, great stag horns nailed to the walls, and queer black-looking
paintings; and Beppo followed wherever they went, gently wagging
his tail, and answering every question with admirable politeness.
And now all the dogs who had been invited had come, and were
sitting in the parlor waiting for the dinner-bell to ring, talking and
laughing as pleasantly and properly as the king, or the president, or
you, or I.
Of course, the first thing any one said, after “How-de-do?” was,
“It’s a fine day!” because that’s the solemn rule in all polite society.
Then, of course, they went on to say it was worse weather last
week, and would be better weather next week; and after about a
dozen more deeply interesting remarks upon the weather, the
dinner-bell rang, and made them all jump. But the very next instant
they sat down again, trying to look as if they were in no sort of
hurry, as it would have been very bad manners to rush pell-mell
down stairs. Everybody knows that.
First the little bustling Lord Chesterfield stepped out, leading Lucy
with the utmost consideration and politeness. Then Beppo made a
low bow to a very respectable old lady-mastiff, and begged the
honor of handing her into dinner, to which she graciously consented.
Then a very tall stag-hound, with an uncommonly sharp nose, paired
off with Flora, a beautiful pointer; while a large, grave, middle-aged
Newfoundland dog made himself agreeable to an Italian greyhound
of no particular age; at least she never liked to tell how old she was,
and almost always had the snuffles. Then a pert little black-and-tan
terrier skipped up to a coquettish King Charles, and said “would she
make him the happiest dog in the world?” upon which she shook her
silky ears, and putting her head on one side, and half shutting her
beautiful black eyes, lisped out “she would;” while a fat poodle,
invited because she was so exceedingly genteel, and a Skye terrier,
also used to the very best society, brought up the rear; and thus
they marched two and two, with the utmost propriety, into the
dining-room.
And now see this elegant party at the table. The little bustling old
gentleman at the foot, and Beppo, whose back is turned to you, at
the head, with Lucy at his right hand.
I forgot to tell you that our friend had requested a private
interview with my Lord Chesterfield, about an hour before dinner.
“Well, sir, what do you wish?” he asked.
“My dear master,” said Beppo, respectfully, “you know very well
that the dogs who will come to my dinner-party will none of them
have on coats or pantaloons, or hooped skirts. I do not wish to
mortify them, so please let me wear my natural suit for this once,
and only my gold collar.”
The little bustling old gentleman turned upon him with a look of
rage, enough to petrify a milestone.
“Is this your gratitude?” he roared, “when I am spending all my
days in teaching you to live and dress like a gentleman?”
Then, recollecting all of a sudden that he was setting a very bad
example of politeness, he put on a remarkably sweet expression,
and added in the mildest tone—
“Excuse me; I forgot myself. I believe—well—yes, upon the whole,
as this party is given in your honor, you may do as you please to-
day.”
“Bow, wow, wow!” barked Beppo, in a perfect ecstasy of delight,
and leaping with all four feet in the air. “Bow, w-o-w-w! Oh, my
goodness!” he continued, suddenly stopping; “I forgot myself, or
rather you, sir. Please to forgive me; I could not keep the bark in;
and it is utterly impossible to stop wagging my tail, I am so happy.”
“Ah! how short is life!” sighed Lord Chesterfield; “I am afraid I
shall die before my dogs, cats, and monkeys come to perfection!”
But you ought to have seen how elegantly they arranged
themselves at the table, bowing and smiling the whole blessed time.
It was something worth looking at, I can tell you—all sitting up as
fine as you please, five on each side. The waiters, who were rigged
out in regimentals, tied white napkins around their necks, at which, I
must confess, there was some snarling and a bark or so, and one or
two tried to wriggle out of them; but at a grave, severe look from
my Lord Chesterfield, they gave up with a low whine, which was
much better than could have been expected.
Beppo had a fine piece of beef to carve, and his master a pair of
roasted chickens; but all the rest of the dishes were pies of different
kinds of birds—pigeon-pie, snipe-pie, woodcock-pie, poll-parrot-pie,
owl-pie, cat-bird-pie, and booby-pie, for a booby is a bird as well as
a dunce.
Oh, my goodness! how they did want to dive into these delicious
pies with their paws. If they had dared, they would have behaved
exactly as most people do on board of steamboats, where they
pounce on all the dishes they can reach at once, and empty them
pell-mell on their plates. I have seen oysters, pie, roast beef, salt
fish, and ice cream, all mixed up on the same plate—a perfectly
horrible mess; and that was because these greedy people had not
the first idea of politeness or courtesy one to another, and the want
of it made them behave like pigs.
“Shall I help you to a slice of the chicken, madam?” said Lord
Chesterfield to Lucy.
“If you please,” said Lucy, with a pretty little bow and smile.
“What part do you prefer, madam?”
“I like the merry sort, if you please,” answered the dear little thing
—meaning the merry thought.
Now this was perfect good manners. Some people would have
said, “Any part—I’m not at all particular,” and would have been very
impolite, for then the carver would not be sure he should suit them;
so, when you are asked, always choose a part.
“Will you have chicken?” asked Lord Chesterfield of the
respectable old lady-mastiff.
“Oh, oh! give it to me! I want some,” squeaked out the little black-
and-tan terrier, quick as a flash, before the old mastiff could utter a
syllable.
What an awful look he got from the bustling little old gentleman!
and the mastiff faced round upon him with, “Sir, you’re a
disrespectful puppy,” and glared in a way to frighten him into fits;
while the stag-hound opposite stuck his sharp nose up in the air, and
remarked in a whisper to Flora, the beautiful pointer, that “really,
young America was getting too impudent for any thing.”
Beppo looked imploringly at his master to forgive little Snap this
time, as he was young and silly, and hastened to put a delicious cat-
bird, with crust and gravy, on his plate; and after this the dinner
went on splendidly, except that the greyhound of no particular age
kept her tongue waggling out of her mouth very nearly the whole
time, on account of the snuffles, which prevented her from breathing
freely. It was not very elegant conduct, but as she couldn’t help it,
nobody looked at her; and that, you’ll own, was the politest way of
behaving under the circumstances. The fat poodle and the Skye
terrier talked a little in French about it, to be sure, but as nobody
else understood what they said, and as they smiled all the time, the
rest took it for granted that they were admiring their neighbors, and
felt highly gratified.
Everybody ate and drank with all the decorum and delicacy of our
city aldermen, who ought to be held up as examples of courtesy,
honesty, and moderation, to the whole universe. They did not leave
so much as a bone on their plates; but I am sorry to say they were
in rather too much of a hurry at dessert, for most of them burned
their mouths severely with the hot cracker pudding, and Snap, the
black-and-tan terrier, declared that it must have been made of fire-
crackers.
But, take it all in all, it was a splendid entertainment; and, after it
was over, the ladies went back to the parlors, and talked about the
last fashions. “Ears were to be cut off closer than ever, for terriers,”
said the King Charles; and “red, white and blue collars were
considered rather old-timed,” was observed by the beautiful pointer;
“that is, unless the army did something decided at once, then they
would be the rage again immediately.” The gentlemen of course
talked of nothing but money, money, money, as men, the dogs!?
always do, when they get together, and if Lord Chesterfield had not
made the signal to move, they would have stayed there talking
about money to this day.
Lucy had taken the pretty little King Charles spaniel in her lap, and
they had a most delightful chat together, which ended in their
vowing everlasting friendship to each other, and promising to
exchange visits every day, for, as the King Charles was one of Lord
Chesterfield’s family, this could be very easily done.
When the gentlemen came up stairs, they had coffee, and then,
as it was getting dark, the little bustling old gentleman ordered the
gas to be lighted, and proposed some music. First, Lucy played “Old
Dog Tray,” with one little white finger on the piano, and then she
lisped out, in her sweet way, “I know a pretty ’tory.”
“Ah! tell it!” cried all the company, gathering gently round her, for
there was no pushing, or squealing—“Here, let me come in! don’t
crowd so!” No, indeed! for that would have been any thing but
polite. They all fastened their eyes on the lovely little girl, who stood
resting her arm on Beppo’s neck, so proud and happy to have it
there, and in her sweet voice, like a robin’s song, she began:

“A—doo was faller fas,[1]


A—’tar bedan a—bink,
I heard a voice, a—said,
“Dint, pitty teeter, dint!”
A—looker in a—hed,
A—’fore me I a—pied
A snow ’ite mount a—lamb,
’Ith a maiden at a—side.
No ozzer seep—a—near;
A—lamb was a—ll aloney,
And by a ’ittle cord
Was fasser to a toney,
Ith—ith—

[1]
“The dew was falling fast, the stars began to blink,
I heard a voice—it said ‘Drink, pretty creature, drink!’ &c.”—
Wordsworth’s poem of the “Pet Lamb.”
“Oh! I tant say any more,” said Lucy. “What a pity!” and she bent
down her lovely golden head, and blushed.
“Oh yes, what a pity!” echoed all the company. “It was so sweet;
but we thank you very much for this; it was beautiful!”
“Will oo sing for me?” asked Lucy.
“Certainly,” they all cried with the utmost readiness; “our voices
are not very good, and will sound horridly after your sweet tones,
but you may be sure we shall do our best.”
They selected a hunting song with a chorus, and sure enough,
with the exception of the stag-hound, whose voice was melody itself,
you might have supposed it a compound of distressed rats, an old
pump-handle, ungreased cart-wheels, a poker on a tin pan, and the
spiritual rappers quarrelling together; for it was all squeal, howl,
whine, grunt, and groan, of the most dismal description; but as they
really tried with all their might and main to sing a good song,
everybody looked pleased, because they took the will for the deed,
and made the best of it. Do you observe that, my young friends?
Well, never curl your lips with contempt, or make fun of any honest,
kind-hearted effort to entertain you. Try to be pleased and thankful:
take the will for the deed, and, my word for it, you will find a
delicious glow come into your heart, and a lovely expression in your
eyes; all your ugly thoughts will fly away to the bottomless pit, and
you will find yourself really loving the one you meant to ridicule.
Presently there came one of those long, solemn pauses which will
take place, do your best, when you have company, and Lord
Chesterfield hastened to propose a game. As they were nearly all
young and frisky, with the truest politeness, he proposed a
frolicsome play, though he would much rather have had a sober talk
on politics himself. Mind this, if you have a little party, don’t insist on
doing what you like best, and taking all the prettiest and best things,
but study the wishes of your guests, and do what pleases them
most.
So Lord Chesterfield proposed the game of the “Family Coach,” to
assist their digestion, which was hailed with bounds of delight by all
except the old lady-mastiff, and the middle-aged Newfoundland dog,
who preferred to take a quiet chat together, which ended in a nap
on the sofa; but as they smiled and nodded to each other all the
same, the rest concluded they were only shutting their eyes, as very
sentimental people do when they talk, and so no offence was taken
at their sleeping before company, and the poor old things had a very
refreshing time of it.
The little bustling old gentleman appointed himself master of
ceremonies, and there not being dogs enough for a grand frolic,
introduced a few of the cats and monkeys; who were so enchanted
at the chance to come in, that they frisked, and danced, and made a
very narrow escape of screaming for joy and becoming perfectly
riotous with the fun of the thing; and that, you know, would not
have been polite.
I have a great mind to write down the way Lord Chesterfield made
them play this game. I think you will like to know. So here it is.
Usually, you must invent a story about the “Family Coach,” as you
play; but unless you are very bright and quick about it, there is not
much fun. The next time you have a little party, play this game as it
is set down here. I have never seen any written before, and I think,
if you use this story, you will have a real funny time.
In the first place, Lord Chesterfield gave them all a part or name,
which they must by no means forget, and the point is, that when
your name is called, you must get up instantly, twirl around quickly,
and sit down again; and when “Family Coach” is mentioned,
everybody in the play must get up instantly, twirl around quickly, and
sit down again.
There were little Lucy and twenty-eight dogs, cats, and monkeys
to play, and they each took one of these parts:
1. Off-leader
2. Near-leader }Horses.

3. Off-wheeler
4. Near-wheeler
5. Reins.
6. Traces.
7. Pole.
8. Whip.
9. Box.
10. Fore-axles.
11. Hind-axles.
12. Fore-wheels.
13. Hind-wheels.
14. Dog’s tail.
15. Lamps.
16. Foot-board.
17. Steps.
18. Windows.
19. Doors.
20. Linch-pin.
21. Hubs.
22. Spokes.
23. Springs.
24. Coachman.
25. Footman.
26. Old lady.
27. Fat poodle.
28. Coach-dog.
29. Blinders.

Then the good old gentleman began, speaking rather quickly—


“Once upon a time, in a certain tumbledown old house in the
country, there existed a family heir-loom, in the shape of a Family
Coach.”
All the dogs, cats, and monkeys bounced up with such a whirl,
that they looked like whipping-tops, with their own quickly whisking
tails for whips, and dear little Lucy, in her haste and delight, tumbled
over sideways, and fell softly on the carpet. She did not hurt herself
the least bit, but jumped up laughing, to Beppo’s great joy, and the
play went on.
“To be sure, the Family Coach was rather worn out: the wheels
were none of the best; the axles were nearly rotten; the linch-pins
were rusty; the box tottering, and the whole Family Coach decaying.
“But then the old lady who owned it thought it worth all the new
ones from here to Kamtschatka. The fat poodle and the coach-dog
couldn’t live without it. The fat poodle barked, and the coach-dog
wagged his tail for joy whenever it appeared. Indeed nobody knew
whether the old lady, the fat poodle, the coach-dog, the coach-dog’s
tail, the coachman, or the footman, was most delighted at the event,
when one day the old lady ordered out the Family Coach.
“Immediately the footman told the coachman, the coachman told
the coach-dog, the fat poodle heard of it and barked, and the Family
Coach groaned in every part under the rubbing and the scrubbing
that was bestowed upon the pole, the reins, the traces, the box, the
fore-axles, the hind-axles, the fore-wheels, the hind-wheels, the
lamps, the foot-board, the steps, the windows, the doors, the linch-
pins, the hubs, the spokes, and the springs.
“At last, the off-leader and near-leader the off-wheeler and near-
wheeler, were harnessed to the pole and traces; the blinders and
reins were in apple-pie order; the lamps were lit, and the coachman
mounted the box; the footman, the foot board; the old lady got
inside, and the fat poodle was following, when, lo and behold! the
coach-dog got jealous, seized the fat poodle by the leg, and made
him bawl, ‘Ki-i! ki-i!’
“Then the coachman flourished his whip, the footman fell off the
foot-board laughing, and the old lady nearly fainted. But a crack of
the whip on the coach-dog’s tail made him let go, and the poor fat
poodle got inside with a piece out of his leg; the leaders and
wheelers pranced and danced, the axles groaned, and the Family
Coach started.
“For some time all went on beautifully; the wheels rolled smoothly
around; the leaders and wheelers trotted comfortably along; the
coachman only cracked his whip for show; the footman amused
himself by going to sleep; the old lady nodded inside; and the fat
poodle stared out of the windows and doors, and grinned and made
faces at the coach-dog, who had to run underneath.
“Presently the roads became rough, and the springs began to
pitch the Family Coach about. The axles groaned, the linch-pins
became shaky, the hubs were in a pucker, the spokes gave a
warning crack, and the footman woke up with a prodigious jerk, that
nearly took his head off. The coachman now gathered up the reins
and cracked the whip in earnest; the old lady squeaked, and told the
coachman to be careful; the coachman got saucy, and said he knew
his own business best; the fat poodle began to turn pale, and the
coach-dog took precious good care to keep himself and his tail out
of danger.
“But oh! ah! alas! the very next minute the Family Coach went
pounce into a great mud-hole. The coachman jumped off the box,
the footman tumbled off the foot-board, and both tried to lift the
fore-wheels and hind-wheels, but they found they couldn’t do it.
Then they got back to their places; the coachman cracked his whip
tremendously; the off-leader and near-leader, off-wheeler and near-
wheeler, bounced and jumped, and pranced and danced, till their
blinders were twisted into their eyes; the pole rattled; the reins and
traces creaked; both the axles groaned; but the wheels wouldn’t
turn.
“At last, slap, bang! with one tremendous crash! the linch-pins
came out, and the wheels rolled off; the two leaders and two
wheelers ran away with their blinders; the lamps were smashed; the
doors and windows broken; the fat poodle fell on the old lady; the
old lady tumbled down on the floor, which broke through, and all
came pounce on the poor coach-dog, who lost his tail by its being
squeezed off; and coachman, footman, old lady, fat poodle, and
coach-dog lay all jumbled up amid the ruins of wheels, axles, reins,
traces, whip, pole, lamps, foot-board, steps, windows, doors, linch-
pins, hubs, spokes, and springs which once composed that splendid
old fossil, the Family Coach.”
There were lots of forfeits to redeem, notwithstanding the natural
quickness of little Lucy and the dogs, cats, and monkeys to whirl and
spring about. Of course you know that if you forget to turn around
when your name is called, you must pay a forfeit. The redeeming of
these made an immense deal of laughing and chattering. The dogs
acted funny, the cats funnier, and the monkeys funniest of all; while
little Lucy’s eyes sparkled like diamonds, and she danced and sang
the whole time; so, upon the whole, it was quite as delightful a party
as one made altogether of good little boys and girls; for the best of
all was, that not a single cross bark, snarl, mew, chatter, or squeal
was heard; and I for one would much rather be invited to a party of
perfectly polite and good-natured dogs, cats, and monkeys, than to
one of children who wanted to slap and scratch. Wouldn’t you?

“Oh you funny, funny Aunt Fanny!” cried the children, laughing
heartily, “to make dogs and cats teach us politeness; who ever heard
of such a thing before?”
“That’s what I call pretty sharp shooting,” said Fred.
“And the shot must have gone through and through you,”
observed Kitty, quietly. “You remember how you pulled my chair
from under me just as I was going to sit upon it yesterday, and
made me come down bang on the floor.”
“Yes, and you shook the room so, I thought it would crack the
looking-glass; and then you looked round so astonished and silly, I
almost died laughing.”
“Oh, Fred!” exclaimed Aunt Fanny; “is it possible you were so
rude? If I were an absolute monarch, I would condemn you to be
upset once a day for a week in exactly the same manner. I am a
great believer in the kind of punishment the boys call ‘tit for tat.’ If a
boy should cut the string of your kite, I should cut the strings of all
his kites for a whole season, explaining every time—‘That’s for
punishment, my fine friend. I don’t think you’ll cut another boy’s
kite-string in a hurry.’”
Fred turned very red; but, standing up, he said pleasantly, “Here,
Kitty, come and upset me.”
She ran behind his chair, but he did not think she would play this
trick before company, and he turned quickly, with such perfect
confidence, as she snatched the chair away, that he came down with
a most tremendous thump! which made the very windows rattle,
amid the shouts and laughter of the rest.
“How do you like it?” asked Aunt Fanny, quietly.
“Not much,” said Fred, grinning in rather a rueful manner. “I’m
cured, though. I don’t think I shall upset anybody again; and just let
them try it on me—that’s all.”
At this they all laughed harder than ever, and declared that Aunt
Fanny’s rule for punishment was the very “best they had ever heard
of.
“But do you not see, my darlings,” she said, seriously, “that it only
proves the glorious wisdom of Our Saviour’s golden rule? Whenever
you are tempted to play a trick, or say a sharp thing, just stop one
moment, and ask yourself, ‘Would I like to have this done or said to
me?’ If you ask yourself this question honestly, the little monitor
which God has placed in all your hearts, will answer you so faithfully
and kindly, that you would be very naughty children not to listen to
its whisperings.
“And now let me tell you the true definition of politeness. It is ‘real
kindness kindly expressed.’ Don’t forget this. Put this definition in
your pop-guns, and fire it off as often as you can, and, my word for
it, everybody you shoot will come to love you dearly. For my part, I
should like to dine off such shots, red-hot, every day of my life. And
so good night, little Pop-gun youngsters, and pleasant dreams to you
all.”
“Ah, dear Aunt Fanny! please stay a little minute longer,” cried all
the children, running to kiss her. “It’s so very early.”
“Well, I believe I will stay just long enough to ask your advice
about something.”
“Oh dear, yes! Ask away. We love to give advice.” And the six
children immediately tried to look as wise as twelve large owls, or as
Governor Wise of Virginia, who, they said, kept it all in his name,
and nowhere else; while Aunt Fanny, with a very grave face,
proceeded to observe—
“This story finishes the first volume of ‘Pop-Guns.’ Do you think it
will do to go with ‘Nightcaps’ and the rest? or do you advise me to
burn it up?”
“Burn it up!” screamed the children, running again to her and
kissing her. “No, no, no; pray, don’t. Have them printed, and we will
read them twenty times, and play the ‘Family Coach’ too! Let’s play
Family Coach now.”
And so they did; though, as there were only ten of them, Sophie
had to be all the four horses, Kitty the coachman, footman, and old
lady; while mamma, papa, Aunt Fanny, and the rest, were all sorts of
things at once. But they had great fun, and were perfectly wornout
with laughing, particularly when little Bob had to twirl round, which
he always did in such a desperate hurry, that he tumbled over his
own legs, and upset himself every time.
And, after that, the forfeits were enchanting; for Aunt Fanny knew
a great many funny ones; and Fred said he did “wish Aunt Fanny
was a ‘real true child,’ so they could have her to play with them the
whole time;” which speech, she declared, was the very finest
compliment she had ever received; and Uncle Fanny (that’s Aunt
Fanny’s husband) said—
“Well, Peter, I always said you were about six months younger
than either of your children, and now I am surer of it than ever.”
“What makes Uncle Fanny call her ‘Peter?’” whispered Kitty to Lou.
“He always does it. He did it in one of the ‘Mitten’ books.”
“Because he thinks it teases me,” said Aunt Fanny, whose ears are
very sharp, and heard the whisper.
“Why, Peteretta! does it tease you?” said Uncle Fanny.
“There! he is at it, worse than ever: let’s all go and shake him,”
cried Aunt Fanny.
The six children rushed at him pell-mell—and he got a splendid
shaking—little Bob squeezing one knee and tickling him almost to
death; Peter the other, while the rest of the children shook him just
where they could get at him.
“Ah! he’s sorry,” cried Kitty, in a sweet, coaxing voice; “hear how
he sighs!”
Sure enough, Uncle Fanny was sighing, because he could not
laugh any more, he had got so weak; but he caught at dear little
Kitty’s comforting word, and gasped out, “Oh yes, I’m sorry, dreadful
sorry—I’ll never call Peter Aunt Fanny again—I mean, Aunt Peter,
Fannyretta—I mean—oh, Peter!! I will be good!”
Aunt Fanny had given his ear a good pinch, and the children
laughed harder than ever, to see him holding up his hands, and
pretending to be afraid of a little woman about half his size, and
they were just going to shake him again, when he ran for his life,
and, getting out on the front stoop, declared he would not come into
the house again.
So they had to let Aunt Fanny go to him, after she had promised
not to be long before she fired off another pop-gun at them.
And they promised her to be always kind and good to their little
companions, and make the very best use of their time—as Philip
Wiseman did at last—and to “practise true politeness” everywhere,
and towards everybody, like Beppo and his friends.

After Aunt Fanny went away, the children were so anxious to


impress upon her mind the serious importance of having the first
volume of Pop-guns printed immediately, that they called a mass
meeting in the corner, before they bid their parents good-night.
“I say,” said Fred, “let’s write one of those things papa reads out
of the paper, when any great man dies, beginning with, ‘Whereas,’
and going on with a whole lot of ‘resolves’ full of compliments.”
“But I don’t want Aunt Fanny to die,” cried little Bob, beginning to
rub his eyes.
“Oh no! She isn’t going to die. But we don’t want her to burn up
our Pop-guns,” explained Lou, kindly.
“Oh!” said Bob, and looked quite comforted.
So Fred got a sheet of paper, and filling a pen very full of ink, for
fear it might dry up before he got it to the paper, he began to write;
and by dint of breathing very hard, and bouncing up and down in his
chair after finishing every sentence, he soon completed this elegant
set of resolutions:—
“Whereas, As we are afraid Aunt Fanny may burn up
Pop-guns, which, would be awful; and
“Whereas, Ever so many children would be so sorry,
they would not know what to do; therefore,
“Resolved, That the stories are perfectly delightful,
and would do the children more good than forty
whippings, or a hundred doses of medicine; and
“Resolved, That after being told in the famous story
of the “Dinner Party,” that the

Dogs and cats were so polite,


They quite forgot to bark and bite,

it would never do to let all the rest of the children in


the world lose a chance of growing as polite, as we
mean to be after this, or as amiable and unselfish as
Philip Badboy became; and so, dear Aunt Fanny, you
will please to send your stories to Mr. Sheldon
immediately, and ask him to get them printed in the
very greatest hurry—real head-over-heels hurry, too.”

“There!” cried Fred, reading the manifesto over with admiration,


but with a vague idea that they did not sound quite right,
particularly the last one. “There! Now we must sign our names—
ladies first.”
So Sophie and the rest signed; and Aunt Fanny got the resolutions
before breakfast the next morning, and had a good laugh over them.
But she sent the stories to Mr. Sheldon, and here they are for her
darlings out in the world.
The children to whom they were read have promised to make her
happy by trying to profit by the good examples given, and avoid
what is unlovely and sinful. Will you try too? Ah! tell Aunt Fanny that
you will,—and that our Father in Heaven may help you, shall be her
daily prayer.
*** END OF THE PROJECT GUTENBERG EBOOK POP-GUNS: ONE
SERIOUS AND ONE FUNNY ***

Updated editions will replace the previous one—the old editions


will be renamed.

Creating the works from print editions not protected by U.S.


copyright law means that no one owns a United States
copyright in these works, so the Foundation (and you!) can copy
and distribute it in the United States without permission and
without paying copyright royalties. Special rules, set forth in the
General Terms of Use part of this license, apply to copying and
distributing Project Gutenberg™ electronic works to protect the
PROJECT GUTENBERG™ concept and trademark. Project
Gutenberg is a registered trademark, and may not be used if
you charge for an eBook, except by following the terms of the
trademark license, including paying royalties for use of the
Project Gutenberg trademark. If you do not charge anything for
copies of this eBook, complying with the trademark license is
very easy. You may use this eBook for nearly any purpose such
as creation of derivative works, reports, performances and
research. Project Gutenberg eBooks may be modified and
printed and given away—you may do practically ANYTHING in
the United States with eBooks not protected by U.S. copyright
law. Redistribution is subject to the trademark license, especially
commercial redistribution.

START: FULL LICENSE


THE FULL PROJECT GUTENBERG LICENSE
PLEASE READ THIS BEFORE YOU DISTRIBUTE OR USE THIS WORK

To protect the Project Gutenberg™ mission of promoting the


free distribution of electronic works, by using or distributing this
work (or any other work associated in any way with the phrase
“Project Gutenberg”), you agree to comply with all the terms of
the Full Project Gutenberg™ License available with this file or
online at www.gutenberg.org/license.

Section 1. General Terms of Use and


Redistributing Project Gutenberg™
electronic works
1.A. By reading or using any part of this Project Gutenberg™
electronic work, you indicate that you have read, understand,
agree to and accept all the terms of this license and intellectual
property (trademark/copyright) agreement. If you do not agree
to abide by all the terms of this agreement, you must cease
using and return or destroy all copies of Project Gutenberg™
electronic works in your possession. If you paid a fee for
obtaining a copy of or access to a Project Gutenberg™
electronic work and you do not agree to be bound by the terms
of this agreement, you may obtain a refund from the person or
entity to whom you paid the fee as set forth in paragraph 1.E.8.

1.B. “Project Gutenberg” is a registered trademark. It may only


be used on or associated in any way with an electronic work by
people who agree to be bound by the terms of this agreement.
There are a few things that you can do with most Project
Gutenberg™ electronic works even without complying with the
full terms of this agreement. See paragraph 1.C below. There
are a lot of things you can do with Project Gutenberg™
electronic works if you follow the terms of this agreement and
help preserve free future access to Project Gutenberg™
electronic works. See paragraph 1.E below.
1.C. The Project Gutenberg Literary Archive Foundation (“the
Foundation” or PGLAF), owns a compilation copyright in the
collection of Project Gutenberg™ electronic works. Nearly all the
individual works in the collection are in the public domain in the
United States. If an individual work is unprotected by copyright
law in the United States and you are located in the United
States, we do not claim a right to prevent you from copying,
distributing, performing, displaying or creating derivative works
based on the work as long as all references to Project
Gutenberg are removed. Of course, we hope that you will
support the Project Gutenberg™ mission of promoting free
access to electronic works by freely sharing Project Gutenberg™
works in compliance with the terms of this agreement for
keeping the Project Gutenberg™ name associated with the
work. You can easily comply with the terms of this agreement
by keeping this work in the same format with its attached full
Project Gutenberg™ License when you share it without charge
with others.

1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside
the United States, check the laws of your country in addition to
the terms of this agreement before downloading, copying,
displaying, performing, distributing or creating derivative works
based on this work or any other Project Gutenberg™ work. The
Foundation makes no representations concerning the copyright
status of any work in any country other than the United States.

1.E. Unless you have removed all references to Project


Gutenberg:

1.E.1. The following sentence, with active links to, or other


immediate access to, the full Project Gutenberg™ License must
appear prominently whenever any copy of a Project
Gutenberg™ work (any work on which the phrase “Project
Gutenberg” appears, or with which the phrase “Project
Gutenberg” is associated) is accessed, displayed, performed,
viewed, copied or distributed:

This eBook is for the use of anyone anywhere in the United


States and most other parts of the world at no cost and
with almost no restrictions whatsoever. You may copy it,
give it away or re-use it under the terms of the Project
Gutenberg License included with this eBook or online at
www.gutenberg.org. If you are not located in the United
States, you will have to check the laws of the country
where you are located before using this eBook.

1.E.2. If an individual Project Gutenberg™ electronic work is


derived from texts not protected by U.S. copyright law (does not
contain a notice indicating that it is posted with permission of
the copyright holder), the work can be copied and distributed to
anyone in the United States without paying any fees or charges.
If you are redistributing or providing access to a work with the
phrase “Project Gutenberg” associated with or appearing on the
work, you must comply either with the requirements of
paragraphs 1.E.1 through 1.E.7 or obtain permission for the use
of the work and the Project Gutenberg™ trademark as set forth
in paragraphs 1.E.8 or 1.E.9.

1.E.3. If an individual Project Gutenberg™ electronic work is


posted with the permission of the copyright holder, your use and
distribution must comply with both paragraphs 1.E.1 through
1.E.7 and any additional terms imposed by the copyright holder.
Additional terms will be linked to the Project Gutenberg™
License for all works posted with the permission of the copyright
holder found at the beginning of this work.

1.E.4. Do not unlink or detach or remove the full Project


Gutenberg™ License terms from this work, or any files
containing a part of this work or any other work associated with
Project Gutenberg™.

1.E.5. Do not copy, display, perform, distribute or redistribute


this electronic work, or any part of this electronic work, without
prominently displaying the sentence set forth in paragraph 1.E.1
with active links or immediate access to the full terms of the
Project Gutenberg™ License.

1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if
you provide access to or distribute copies of a Project
Gutenberg™ work in a format other than “Plain Vanilla ASCII” or
other format used in the official version posted on the official
Project Gutenberg™ website (www.gutenberg.org), you must,
at no additional cost, fee or expense to the user, provide a copy,
a means of exporting a copy, or a means of obtaining a copy
upon request, of the work in its original “Plain Vanilla ASCII” or
other form. Any alternate format must include the full Project
Gutenberg™ License as specified in paragraph 1.E.1.

1.E.7. Do not charge a fee for access to, viewing, displaying,


performing, copying or distributing any Project Gutenberg™
works unless you comply with paragraph 1.E.8 or 1.E.9.

1.E.8. You may charge a reasonable fee for copies of or


providing access to or distributing Project Gutenberg™
electronic works provided that:

• You pay a royalty fee of 20% of the gross profits you


derive from the use of Project Gutenberg™ works
calculated using the method you already use to calculate
your applicable taxes. The fee is owed to the owner of the
Project Gutenberg™ trademark, but he has agreed to
donate royalties under this paragraph to the Project
Gutenberg Literary Archive Foundation. Royalty payments
must be paid within 60 days following each date on which
you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly
marked as such and sent to the Project Gutenberg Literary
Archive Foundation at the address specified in Section 4,
“Information about donations to the Project Gutenberg
Literary Archive Foundation.”

• You provide a full refund of any money paid by a user who


notifies you in writing (or by e-mail) within 30 days of
receipt that s/he does not agree to the terms of the full
Project Gutenberg™ License. You must require such a user
to return or destroy all copies of the works possessed in a
physical medium and discontinue all use of and all access to
other copies of Project Gutenberg™ works.

• You provide, in accordance with paragraph 1.F.3, a full


refund of any money paid for a work or a replacement
copy, if a defect in the electronic work is discovered and
reported to you within 90 days of receipt of the work.

• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.

1.E.9. If you wish to charge a fee or distribute a Project


Gutenberg™ electronic work or group of works on different
terms than are set forth in this agreement, you must obtain
permission in writing from the Project Gutenberg Literary
Archive Foundation, the manager of the Project Gutenberg™
trademark. Contact the Foundation as set forth in Section 3
below.

1.F.

1.F.1. Project Gutenberg volunteers and employees expend


considerable effort to identify, do copyright research on,
transcribe and proofread works not protected by U.S. copyright
law in creating the Project Gutenberg™ collection. Despite these
efforts, Project Gutenberg™ electronic works, and the medium
on which they may be stored, may contain “Defects,” such as,
but not limited to, incomplete, inaccurate or corrupt data,
transcription errors, a copyright or other intellectual property
infringement, a defective or damaged disk or other medium, a
computer virus, or computer codes that damage or cannot be
read by your equipment.

1.F.2. LIMITED WARRANTY, DISCLAIMER OF DAMAGES - Except


for the “Right of Replacement or Refund” described in
paragraph 1.F.3, the Project Gutenberg Literary Archive
Foundation, the owner of the Project Gutenberg™ trademark,
and any other party distributing a Project Gutenberg™ electronic
work under this agreement, disclaim all liability to you for
damages, costs and expenses, including legal fees. YOU AGREE
THAT YOU HAVE NO REMEDIES FOR NEGLIGENCE, STRICT
LIABILITY, BREACH OF WARRANTY OR BREACH OF CONTRACT
EXCEPT THOSE PROVIDED IN PARAGRAPH 1.F.3. YOU AGREE
THAT THE FOUNDATION, THE TRADEMARK OWNER, AND ANY
DISTRIBUTOR UNDER THIS AGREEMENT WILL NOT BE LIABLE
TO YOU FOR ACTUAL, DIRECT, INDIRECT, CONSEQUENTIAL,
PUNITIVE OR INCIDENTAL DAMAGES EVEN IF YOU GIVE
NOTICE OF THE POSSIBILITY OF SUCH DAMAGE.

1.F.3. LIMITED RIGHT OF REPLACEMENT OR REFUND - If you


discover a defect in this electronic work within 90 days of
receiving it, you can receive a refund of the money (if any) you
paid for it by sending a written explanation to the person you
received the work from. If you received the work on a physical
medium, you must return the medium with your written
explanation. The person or entity that provided you with the
defective work may elect to provide a replacement copy in lieu
of a refund. If you received the work electronically, the person
or entity providing it to you may choose to give you a second
opportunity to receive the work electronically in lieu of a refund.
If the second copy is also defective, you may demand a refund
in writing without further opportunities to fix the problem.

1.F.4. Except for the limited right of replacement or refund set


forth in paragraph 1.F.3, this work is provided to you ‘AS-IS’,
WITH NO OTHER WARRANTIES OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.

1.F.5. Some states do not allow disclaimers of certain implied


warranties or the exclusion or limitation of certain types of
damages. If any disclaimer or limitation set forth in this
agreement violates the law of the state applicable to this
agreement, the agreement shall be interpreted to make the
maximum disclaimer or limitation permitted by the applicable
state law. The invalidity or unenforceability of any provision of
this agreement shall not void the remaining provisions.

1.F.6. INDEMNITY - You agree to indemnify and hold the


Foundation, the trademark owner, any agent or employee of the
Foundation, anyone providing copies of Project Gutenberg™
electronic works in accordance with this agreement, and any
volunteers associated with the production, promotion and
distribution of Project Gutenberg™ electronic works, harmless
from all liability, costs and expenses, including legal fees, that
arise directly or indirectly from any of the following which you
do or cause to occur: (a) distribution of this or any Project
Gutenberg™ work, (b) alteration, modification, or additions or
deletions to any Project Gutenberg™ work, and (c) any Defect
you cause.

Section 2. Information about the Mission


of Project Gutenberg™
Project Gutenberg™ is synonymous with the free distribution of
electronic works in formats readable by the widest variety of
computers including obsolete, old, middle-aged and new
computers. It exists because of the efforts of hundreds of
volunteers and donations from people in all walks of life.

Volunteers and financial support to provide volunteers with the


assistance they need are critical to reaching Project
Gutenberg™’s goals and ensuring that the Project Gutenberg™
collection will remain freely available for generations to come. In
2001, the Project Gutenberg Literary Archive Foundation was
created to provide a secure and permanent future for Project
Gutenberg™ and future generations. To learn more about the
Project Gutenberg Literary Archive Foundation and how your
efforts and donations can help, see Sections 3 and 4 and the
Foundation information page at www.gutenberg.org.

Section 3. Information about the Project


Gutenberg Literary Archive Foundation
The Project Gutenberg Literary Archive Foundation is a non-
profit 501(c)(3) educational corporation organized under the
laws of the state of Mississippi and granted tax exempt status
by the Internal Revenue Service. The Foundation’s EIN or
federal tax identification number is 64-6221541. Contributions
to the Project Gutenberg Literary Archive Foundation are tax
deductible to the full extent permitted by U.S. federal laws and
your state’s laws.

The Foundation’s business office is located at 809 North 1500


West, Salt Lake City, UT 84116, (801) 596-1887. Email contact
links and up to date contact information can be found at the
Foundation’s website and official page at
www.gutenberg.org/contact

You might also like