0% found this document useful (0 votes)
20 views49 pages

Get Processing For Android: Create Mobile, Sensor-Aware, and XR Applications Using Processing 2nd Edition Colubri PDF Ebook With Full Chapters Now

ebook

Uploaded by

adeusicadez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views49 pages

Get Processing For Android: Create Mobile, Sensor-Aware, and XR Applications Using Processing 2nd Edition Colubri PDF Ebook With Full Chapters Now

ebook

Uploaded by

adeusicadez
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 49

Full download ebook at ebookmass.

com

Processing for Android: Create Mobile,


Sensor-aware, and XR Applications Using
Processing 2nd Edition Colubri

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

Download more ebook from https://ebookmass.com


More products digital (pdf, epub, mobi) instant
download maybe you interests ...

Processing for Android: Create Mobile, Sensor-aware,


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

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

Signal processing for neuroscientists 2nd ed Edition


Drongelen

https://ebookmass.com/product/signal-processing-for-
neuroscientists-2nd-ed-edition-drongelen/

Tensors for Data Processing. Theory, Methods, and


Applications Yipeng Liu

https://ebookmass.com/product/tensors-for-data-processing-theory-
methods-and-applications-yipeng-liu/

Oil Palm Biomass for Composite Panels: Fundamentals,


Processing, and Applications S.M. Sapuan

https://ebookmass.com/product/oil-palm-biomass-for-composite-
panels-fundamentals-processing-and-applications-s-m-sapuan/
Digital Image Processing Using MATLAB Rafael C.
Gonzalez

https://ebookmass.com/product/digital-image-processing-using-
matlab-rafael-c-gonzalez/

Food Waste Recovery: Processing Technologies,


Industrial Techniques, and Applications 2nd Edition
Charis M. Galanakis

https://ebookmass.com/product/food-waste-recovery-processing-
technologies-industrial-techniques-and-applications-2nd-edition-
charis-m-galanakis/

Designing Applications for Google Cloud Platform:


Create and Deploy Applications Using Java Ashutosh
Shashi

https://ebookmass.com/product/designing-applications-for-google-
cloud-platform-create-and-deploy-applications-using-java-
ashutosh-shashi/

Essentials of Thermal Processing 2nd Edition Gary


Tucker

https://ebookmass.com/product/essentials-of-thermal-
processing-2nd-edition-gary-tucker/

Android For Dummies 2nd Edition Dan Gookin

https://ebookmass.com/product/android-for-dummies-2nd-edition-
dan-gookin/
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


Another random document with
no related content on Scribd:
patent for selling good drink. Wherefore I pray you write a
petition for me to give into the King’s hands.’ ‘Very good,’
said Skelton. ‘Sit down,’ said the Welshman, ‘and write,
then.’ ‘What shall I write?’ asked Skelton. The Welshman
said, ‘Write Drink. Now write More drink.’ ‘What now?’ said
Skelton. ‘Write now A great deal of drink; and put to all
this drink A little crumb of bread, and a great deal of drink
to it, and read out what you have written.’ ‘Drink, more
drink, and a great deal of drink, and a little crumb of
bread, and a great deal of drink to it.’ Then quoth the
Welshman, ‘put out the little crumb of bread, and set
down all drink and no bread; and if I might have this
petition signed by the King, I care for no more, as long as
I live.’ ‘Well, then,’ said Skelton, ‘when you have got yours
passed, I will try to get another for bread, that you with
your drink, and I with my bread, may seek our living
together with bag and staff.’”
Whether Andrew Borde, the pleasant Sussex Doctor of Physic, really
wrote the little book of stories about Skelton, whom he might very
well have personally known, must be numbered among the
uncertainties; but Borde’s estimate of Taffy is cognate to that of
Skelton himself, as delivered to us in the book and in the Hundred
Merry Tales. For in his Introduction of Knowledge, 1542, the Doctor
puts into the mouth of his Cambro-Briton these lines:—
“I am a Welshman, and do dwell in Wales;
I have loved to search budgets, and look in mails,”
which seems to portray the predatory borderer and the thief by
breeding and instinct.
It is perhaps, at the same time, a matter for speculation whether
these traits of Welsh character were not more current after the
accession of the Tudors. Henry the Seventh, as his Privy Purse
Expenses establish, was very lavish in his presents to his
countrymen; and the royal partiality tended very possibly to render
them unpopular in England, and to bring their foibles and frailties
into print. The very tale above given reads like a burlesque on the
importunity of Taffy for privileges and monopolies at Henry’s hands,
and at the same time jeers pretty broadly at his propensity for
intemperance.
There is a story of a Scottish minister who went South, and was
invited to stay to dinner at an acquaintance’s. After they had dined,
the whiskey was brought in; the minister took to it kindly, and
accepted a proposal to remain till the morning. As the spare bed had
to be aired, and there was not time to prepare the warming-pan, the
lady of the house told Jenny the maidservant to undress, and get
into the bed to warm the sheets for their guest; but Jenny unluckily
(or otherwise) fell asleep, and when the visitor went up, he found
her still in possession. “Well,” said he to himself, “the dinner was
good; the whiskey was capital; but—this is hospitality indeed!”
We will not pursue the narration further. It is obviously a parody on
the conventional order of things, having by possibility some
indebtedness to the simple manners of a bygone time and less
fastidious sleeping arrangements. The improvised warming-pan
might have suggested itself to the guidwife; but we cherish a
suspicion that the ex post facto improver is answerable for the
pleasantry as it stands. In jocular history everybody is at angles to
real life; people do precisely what they ought not to do, say what
they ought not to say, are found where they ought not to be found.
That is the soul of the matter; and therein lies the cunning of the
wire-puller. He is for general purposes what Grobianus is for Cato
and Mrs. Grundy. He seldom invents; he has a preference for ready-
made material which he can employ as a groundwork or starting-
point; for a familiar name goes a long way. The artist has to be wary
how he deals with his puppet or lay-figure; he treads upon eggs a
little; much depends on the turn given; the anecdote which he tells
need not be true, God knows; it may be naughty within bounds; but
it must be amusing. That is peremptory.
The Bull, in its jocular acceptation, has been commonly viewed as a
genuine Irish product; but may it not be, on the contrary, of Italian
and ecclesiastical descent? The papal brief, in the first place,
borrowed its name from the leaden seal which was attached to it;
the odium under which Popery and its supporters fell in the time of
Elizabeth next led to the passage of the bull into our vocabulary as a
term of ridicule or contempt; and, finally, when the strong political
feeling had subsided, the expression stood for any piece of harmless
extravagance or hyperbolical bravado. These side-growths of
meaning are curious and instructive enough, and present many
strange and unsuspected survivals. To go no farther than the word
before us, the modern Italian attaches to his letter a bolla without
reflecting on its actual and archaic significance, just as he
perpetuates bygone methods of locomotion by continuing to call the
railway carriage a poste.
Perhaps the characterisation of an imperial German decree of 1356
as “a golden bull” is not more alien to the original sense and
function of the word than its pressure into service by the Italian of
our day to signify a postage-stamp.
INDEX.
Adroyns, John, 94.

Æsop, 30.

Affiliation of Stories, 111.

Alanus ab Insulis, 43.

Ana or Analecta, 177 et seqq.

Anecdote, Serious, 32.

Aristippus, 43.

Aristophanes, 64.

Armstrong, Archibald, 108.

Artistic origin of the Jest, 13-14.

Athenæus, 33, 34, 37-43.

Atmosphere and costume, 25.

Aulus Gellius, 33, 46-50.


Bagot, Sir W., 101.

Balguy, Dr., 67.

Bardolph, 124.

Barkstead, William, 181.

Bartholomew’s (St.) Hospital, 1.

Boccaccio, Gio., 119.

Borde, Andrew, 19, 170.

Bravo of Venice, The, by Monk Lewis, 88, 127-8.

Brighton, 103.

Bull, the Jocular, 222.

Burbage, Richard, 115.

Burke, E., 101.

Burns, R., 67.

Burton, Robert, 118.

Byron, H. J., 10.

Byron, Lord, 124.

Chamberlain, John, 204.

Chamberlain, Robert, 178, 184.


Charles II., 2, 79.

Chaucer, 7, 119.

Chesterfield, Lord, 81-2, 95.

Church, the Early, and the Jesters, 20-1.

Cibber, Colley, 97.

Cicero, 33.

Colnbrook, Maltman of, 153.

Coleridge, S. T., 124.

Conceits and Jests, Certain, 178, 184.

Continental influence, 142-5.

Convivial Discourses, The, 44.

Copley, Anthony, 178.

Crichton, James, the “Admirable,” 43.

Deipnosophistæ, 36-7, 43-4.

Devil Tavern, The, 32, 98.

Diogenes and Alexander, Story of, 86.

Diogenes Laertius, 33, 50-6.


Edith, The Widow, 168, 173.

Edward IV., 19, 205.

Egyptian artists, 16.

Elginbrod, Martin, 122-3.

Elizabethan and Jacobean Literature, Neglect of, in the


Last Century, 191-3.

Engraving, Influence of the, 15.

Epigram, The, 67-8.

Erasmus, 118.

Eulenspiegel, 173.

Fabliaux, 30.

Farmer, Dr., 111.

Foote, S., 10.

Formulation of Jests, 69.

Four Elements, Interlude of, 156-8.

Franklin, Benjamin, 109.

Garrick, David, 116.


Gaulardisms, 94.

Gesta Romanorum, 30.

Gillray and Rowlandson, 15.

Godolphin, Sydney, 43.

Goldsmith, O., 43, 93.

Gothamite Tales, The, 215.

Goussaut, M., 94-5.

Greek Anecdotes, 37-43.

—— Anthology, The, 45, 57-65.

—— Epigrams, 59-64.

—— Parodies, 42.

Greene, Robert, 97.

Grimaldi, Joseph, 12, 35.

Grisette, Parisian, 34.

Grotesque and caricature, 6, 14.

Guid and Godly Ballats, The, 131.

Harington, Sir John, 118, 182.

Harvey, Gabriel, 159.


Hawkins, Sir John, 116.

Henry VII., 2, 220.

Henry VIII., 21.

Henry IV. of France, 86-8.

Herodotus, 63.

Herring, Archbishop, 93.

Hetairai, the Greek, 34, 38, 40.

Heywood, John, 112, 158-60, 162.

High Life Below Stairs, 97.

Hobart, Parson, 126.

Hobson, Old, 168, 172.

Homer, 33.

Hood, Thomas, 10.

Hook, Theodore, 11.

Hundred Merry Tales, 7, 98, 111, 113, 153-61, 167, 201,


208.

Jack of Dover, 141, 149.

Jack the Giant-Killer, 136.


Jerrold, Douglas, 11, 73.

Joe Miller, 6, 7, 98, 178, 188 et seqq.

Johnson, Dr., 116.

Jonson, Benjamin, 98, 105, 107.

Knight of the Burning Pestle, The, 107.

Knight of the Tour Landry, 171.

Lamb, Charles, 73, 79, 114, 124.

Liston, 35.

Literary Club, The, 115-16.

Literature and the Drama, 22.

Lock, Mr., of Norbury, 192.

London Tavern, The, 82-3.

Lucian, 33, 35, 62.

Mackintosh, Sir James, 53.

Macrobius, Saturnalia of, 44.

Malaprop, Mrs., 95-6.


Malone, E., 24, 80-81, 101, 115-16, 192.

Maloniana, 20, 101.

“Martin said to his man,” a ballad, 131.

Matthews, Charles, 10.

May, Thomas, 98.

Mensa Philosophica, 44.

Mermaid, The, 32.

Merry Tales and Quick Answers, 33-4, 105, 117, 119, 123,
162-7.

Mitre, The, 32.

More, Sir Thomas, 118, 154-67.

Mother Bunch, 149.

Mottley, John, 188-99.

Myrtilus, 43.

New Wife of Beath, 75-7.

Newcastle, Duke of, 212.

Nithardus, 1.

Oriental influence, 16, 121-4.


Parallelisms, 105-7, 112-14.

Parodies, Greek, 42.

Parr, Dr., 53.

Partington, Mrs., 90-91.

Pasquil’s Jests, 147.

Pausanius Laccus, 37.

Peele, George, 168.

Pennant, Thomas, 212-13.

Philip of Macedon, 36.

Phryne, 36, 40.

Piozzi, Mrs., 116.

Plato, 64.

Plutarch’s Lives, 32-3.

Pool Valley, Brighton, 105.

Quin, 10.

Rahere, 1.
Raleigh, Sir Walter, 116.

Rameses dynasty, 16.

Randolph, Thomas, 98-9.

Rastells, The, 154, 158, 162.

Raumer, F. von, 96.

Ravenscroft’s Deuteromelia, 130-31.

Reynard the Fox, 30.

Reynolds, Sir Joshua, 116.

Richard III. and the Northern man, 206.

Richardson, Jonathan, 24, 81.

Roses, Wars of the, 204-5.

Sackful of News, The, 147.

Schoolmaster, The, or Teacher of Table Philosophy, 44.

Schools of humour, old and modern, 193.

Scogin, Jests of, 19-21, 109, 168.

Scottish minister, Story of a, 220-21.

Scottish stories, 90, 215.

Shakespear, 7, 115, 124, 146.


—— Jest-Books, 152-67.

Sheridan, R. B., 110, 113.

Shoes, mending of, 201.

Sixty, The Athenian Club of the, 36, 65-6.

Skelton, John, 159, 168, 174-6, 210, 218.

Smith, Sydney, 9.

Spenser, 7, 159.

Strawberry, 140.

Tadema, Alma, R.A., 97.

Talfourd, Frank, 10.

Tarlton, Richard, 35, 152, 168, 172, 179, 183.

Tavern-life, 32.

Taylor the Water Poet, 153, 178-82.

Testament, New, Anecdote of the, 205.

Thales, 52-3.

Tooke, John Horne, 82-3.

Turanian art, 16.


Typography, 15, 17.

United States, 28.

Wales and the Welsh, characteristics of, 217-19.

Walpole, Horace, 125, 193.

Walworth, 1.

Warton, Joseph, 67.

Wellington, Duke of, 211.

Whittington, Sir Richard, 1.

Wooden Legs, The Man with, 78.

Woolner, Richard, 181.

Wright Thomas, 5.

Yeo, an ancient Devonshire family, 204.

Yorick, 173.
THE BOOK-LOVER’S LIBRARY.

On Antique paper, cloth, 4s. 6d.; hand-made paper,


Roxburgh, 7s. 6d. net; large paper, 21s. net.
Newspaper Reporting in Olden Time and To-day. By
John Pendleton, Author of “A History of Derbyshire,”
etc.
SECOND EDITION. Price 4s. 6d., and 7s. 6d.

How to Catalogue a Library. By Henry B. Wheatley, F.S.A.,


Author of “How to Form a Library.”
SECOND EDITION. Price 4s. 6d.

The Enemies of Books. By the late William Blades,


Author of “The Biography and Typography of Wm.
Caxton.”
Foreign Visitors in England, and What They Thought of
us. By Edward Smith.
The Book of Noodles; Stories of Simpletons; or, Fools
and their Follies. By W. A. Clouston.
The Story of Some Famous Books. By Frederick Saunders.
Gleanings in Old Garden Literature. By W. C. Hazlitt.
The Dedication of Books. To Patron and Friend. By
Henry B. Wheatley, F.S.A.
Modern Methods of Illustrating Books.
The Literature of Local Institutions. By G. L. Gomme,
F.S.A.
Old Cookery Books and Ancient Cuisine. By W. C.
Hazlitt.
How to Form a Library. By Henry B. Wheatley, F.S.A.
In demy 8vo, tastefully printed and bound, price 6s.
net (450 copies).
The Earlier Writings of William Makepeace Thackeray.
By Chas. P. Johnson, Author of “Hints to Collectors of
Thackeray’s Works.”
Tastefully printed, handsomely bound, price 15s.;
hand-made paper, Roxburgh gilt top, 21s. net.
The Library of Mary Queen of Scots. By Julian Sharman.
With a Photogravure Reproduction of a rare Portrait,
and a Facsimile Signature of the Queen.
In small fcap. 8vo size, antique paper, appropriately
bound in contemporary binding. Published at 5s.
A Book for Boys and Girls; or, Country Rhymes for
Children. By John Bunyan. First published in 1686.
With an Introduction by Rev. John Brown, D.D.,
Author of “John Bunyan, his Life, Times, and Work.”
In crown 8vo., cloth, price 4s. 6d.
Govett’s King’s Book of Sports. A History of the
Declarations of King James I. and King Charles I.
Tastefully printed, cloth, 4s. 6d.; hand-made paper,
9s. net.
The Diversions of a Bookworm. By J. Rogers Rees,
Author of “The Pleasures of a Bookworm.”
In fcap. 8vo., Second Edition, price 4s. 6d.
The Pleasures of a Bookworm. By J. Rogers Rees.
In fcap. 8vo., price 4s. 6d., post free; large paper,
21s. net.
The Brotherhood of Letters. By J. Rogers Rees. Being
Chapters on Notable Meetings of Literary Men.
In fcap. 8vo., olive cloth, price 4s. 6d.
Stray Leaves of Literature. By Fredk. Saunders, Author of
“Story of Some Famous Books.”

London: ELLIOT STOCK, 62, Paternoster Row,


E.C.
TRANSCRIBER’S NOTES:
Obvious typographical errors have been corrected.
Inconsistencies in hyphenation have been
standardized.
Archaic or variant spelling has been retained.
*** END OF THE PROJECT GUTENBERG EBOOK STUDIES IN
JOCULAR LITERATURE ***

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
Section 4. Information about Donations to
the Project Gutenberg Literary Archive
Foundation
Project Gutenberg™ depends upon and cannot survive without
widespread public support and donations to carry out its mission
of increasing the number of public domain and licensed works
that can be freely distributed in machine-readable form
accessible by the widest array of equipment including outdated
equipment. Many small donations ($1 to $5,000) are particularly
important to maintaining tax exempt status with the IRS.

The Foundation is committed to complying with the laws


regulating charities and charitable donations in all 50 states of
the United States. Compliance requirements are not uniform
and it takes a considerable effort, much paperwork and many
fees to meet and keep up with these requirements. We do not
solicit donations in locations where we have not received written
confirmation of compliance. To SEND DONATIONS or determine
the status of compliance for any particular state visit
www.gutenberg.org/donate.

While we cannot and do not solicit contributions from states


where we have not met the solicitation requirements, we know
of no prohibition against accepting unsolicited donations from
donors in such states who approach us with offers to donate.

International donations are gratefully accepted, but we cannot


make any statements concerning tax treatment of donations
received from outside the United States. U.S. laws alone swamp
our small staff.

Please check the Project Gutenberg web pages for current


donation methods and addresses. Donations are accepted in a
number of other ways including checks, online payments and

You might also like