100% found this document useful (6 votes)
24 views

Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing, 2nd Edition Andrés Colubri 2024 Scribd Download

Applications

Uploaded by

boweyryner2v
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
100% found this document useful (6 votes)
24 views

Processing for Android: Create Mobile, Sensor-aware, and XR Applications Using Processing, 2nd Edition Andrés Colubri 2024 Scribd Download

Applications

Uploaded by

boweyryner2v
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/ 40

Get ebook downloads in full at ebookmeta.

com

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/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookmeta.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

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/
ebookmeta.com

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/
ebookmeta.com

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/
ebookmeta.com

Nuclear Power Past present and future 2nd Edition Elliott

https://ebookmeta.com/product/nuclear-power-past-present-and-
future-2nd-edition-elliott/

ebookmeta.com
Practice Makes Perfect: Basic Spanish, Premium Third
Edition Dorothy Richmond

https://ebookmeta.com/product/practice-makes-perfect-basic-spanish-
premium-third-edition-dorothy-richmond/

ebookmeta.com

Gender in Film and Video 1st Edition Neal King

https://ebookmeta.com/product/gender-in-film-and-video-1st-edition-
neal-king/

ebookmeta.com

Machine Learning for High-Risk Applications: Approaches to


Responsible AI Patrick Hall

https://ebookmeta.com/product/machine-learning-for-high-risk-
applications-approaches-to-responsible-ai-patrick-hall/

ebookmeta.com

Mediatization and Mobile Lives A Critical Approach 1st


Edition Andre Jansson

https://ebookmeta.com/product/mediatization-and-mobile-lives-a-
critical-approach-1st-edition-andre-jansson/

ebookmeta.com

Outlines of Russian Culture Part 3 Architecture Painting


and Music Paul Miliukov (Editor)

https://ebookmeta.com/product/outlines-of-russian-culture-
part-3-architecture-painting-and-music-paul-miliukov-editor/

ebookmeta.com
International Relations Music and Diplomacy Sounds and
Voices on the International Stage Frédéric Ramel

https://ebookmeta.com/product/international-relations-music-and-
diplomacy-sounds-and-voices-on-the-international-stage-frederic-ramel/

ebookmeta.com
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
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 orders-ny@springer-sbm.com, 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 booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
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
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.
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

v
■ 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
■ 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
■ 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
■ 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
■ 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

x
■ 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
■ 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
■ 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
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
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
Other documents randomly have
different content
Fig. 49.—Old
(degenerated)
trichina cyst.
(Colin.)

The parasite, which at first appeared straight, soon assumes a bent


form, then that of a figure “6,” then of a figure “3,” and preserves a
latent vitality throughout the entire period of encystment. These
cysts are of very small dimensions, invisible to the naked eye, and
their discovery necessitates the use of the microscope. They are
about ¹⁄₆₄th inch in length and ¹⁄₁₂₀th inch in width. Very frequently
two or three cysts may be found arranged in line, presenting the
appearance of beads on a string: more rarely two parasites may be
found in one cyst; exceptionally, as many as six or seven. The
appearance of “beads on a string” is due to the fact that the parasites
follow the interfascicular capillaries.
In animals which are kept for a long time and fattened the cyst
walls undergo fatty infiltration. The change is commonest in pigs. In
the same way calcareous infiltration sometimes occurs, but only
when the parasites have lost their vitality. This calcareous
degeneration consists in the deposit of carbonate and phosphate of
lime in the walls of the cyst; it never begins before the seventh or
eighth month after infestation, and is sometimes much longer
delayed.
No man or animal ever becomes infested except by the ingestion of
meat or drink containing larval trichinæ. The pig and small rodents
are most frequently attacked. Man contracts trichinosis by eating
insufficiently cooked infected pork. The fact that small rodents,
particularly rats, eat the bodies of their kind explains the persistence
of trichinosis in certain regions. Pigs roaming at large, and thus
liable to find and eat the dead bodies of such rodents, may contract
trichinosis in this way or from eating ordure.
For some weeks after the larvæ have penetrated the muscular
tissues the animals show stiffness of the limbs, difficulty in moving,
and in mastication, etc., but these troubles disappear in a short time.
The above facts explain why trichinosis in the pig is almost
unknown in France, Italy, and Spain. It is commoner in Germany
and in certain States of Europe, such as Holland and Russia,
although investigations had previously shown that in Paris about 7
per cent. of the sewer rats were sufferers from trichinosis and that in
Germany the percentage rose as high as 15 to 20. In Chicago and
Cincinnati, U.S.A., the proportion of rats suffering from trichinosis
has been as high as 50 to 70 per cent., and as in some of the
Northern States pigs were bred in complete freedom, it follows that
at one time very large numbers of American pigs must have suffered
from trichinosis.
In consequence of sanitary precautions this proportion has since
greatly diminished.
Diagnosis. During the animal’s life diagnosis is a difficult matter,
though, on the other hand, simple microscopic examination of
suspected meat is sufficient at once to settle the question. In dealing
with the living animal, however, it is necessary, as in examining
suspected meat, to obtain a fragment of muscle in order to submit it
to microscopic examination. This fragment can be obtained by the
method known as “harpoonage,”—a trocar provided with a cutting
hook, or a trocar the canula of which has a sharp-edged opening near
its end, being thrust into the muscle. On removing the trocar the
elasticity of the tissues causes a fragment to project into the opening
in the canula, and on withdrawing the latter a fragment sufficient for
examination is obtained. One may proceed in the same way by
harpoonage when examining large masses of suspected meat the
surface of which reveals no lesion.
The specimen having been obtained, a few fragments of the
muscular fasciculi are crushed between two glasses and examined
with a low power.
The trichinæ will be found towards the ends of the muscle near the
region of the tendons; few or none exist in the fat. These parasites
are most readily discovered in the diaphragm, in the muscles of the
shoulders and quarters, and in the psoas muscles.
Prognosis. The prognosis is relatively favourable so long as
infestation is only moderate. But it is very grave from the point of
view of public hygiene, on account of the possibility of persons
becoming infected by eating the diseased meat.
Treatment. There is no curative treatment. Formerly it was
believed that, provided the condition were early diagnosed, the
intestinal form might possibly be cured by administering purgatives
and vermifuges so as to prevent the embryos penetrating the system.
After Askanazy’s discoveries this view had to be abandoned, and
the practitioner is necessarily powerless in dealing with the muscular
form. Time alone effects improvement and a relative cure by causing
caseo-calcareous degeneration of the cysts. With a prophylactic
object, every precaution should be taken to prevent the possibility of
pigs being contaminated. This question particularly interests
America, because of the extreme prevalency of pig trichinosis there.
From the point of view of public hygiene all infected meat should
be seized and destroyed, despite the fact that perfect cooking
destroys the vitality of the parasites, which perish at 120° Fahr.
Ordinary salting but slightly affects their vitality, which explains
why from time to time the importation of meat has to be prohibited
and why meat should always be scrupulously inspected.
CHAPTER V.
RHEUMATISM.

In bovine pathology the term “Rheumatism” is applied to a


number of different morbid conditions, the sole connection between
which is that they seriously affect the organs of locomotion. This
reason may perhaps be accepted as sufficient for including the study
of rheumatism amongst diseases affecting locomotion.
The disease is of considerable importance, and for this reason the
study of rheumatism itself necessarily precedes the description of
pseudo-rheumatism, secondary rheumatism, or infectious
rheumatism in young and adult animals.

ARTICULAR RHEUMATISM.

Acute rheumatism has a clearly marked predilection for the


articulations. Sometimes the great serous membranes are
simultaneously affected (pleura, pericardium, endocardium), but
only in very exceptional circumstances are they primarily attacked.
That form of rheumatism known as visceral is as a general rule
secondary in comparison with articular rheumatism. Several joints
and tendon sheaths may be attacked at the same time. Under such
circumstances rheumatism may be defined as a febrile disease,
probably of an infectious nature, revealing itself by simple or
multiple inflammation of joints and the tissues surrounding them,
and capable of becoming complicated with inflammation of the
pleura, pericardium, endocardium, meninges of the brain, etc.
Causation. All authors agree in recognising the influence of
heredity, of wet and cold, of sudden changes in temperature,
draughts in the stable, prolonged exposure to low temperatures, or
the chilling of animals saturated with perspiration. These are and
cannot be otherwise than occasional causes; but the determining
cause remains at present unknown.
In human pathology it has been proved beyond dispute that a
certain relationship exists between arthritism, or the “uric acid
diathesis,” and rheumatism. This fact is so well recognised that
doctors have said that rheumatism was to arthritism what scrofula is
to tuberculosis. That, however, does not advance our knowledge of
the question in the smallest degree, and it may simply be that
arthritism represents one of the principal favouring conditions in the
development of rheumatism.
In domestic animals the uric acid diathesis is little known, renal
lithiasis is no more a rarity than gravel; but at the present time no
one appears clearly to have established the relationship between
these diseases and the development of rheumatism. What, however,
we must all admit is that rheumatism exhibits all the phases of
development of a rapidly progressive infectious disease.
Numerous attempts have been made by doctors during the last few
years to discover the presence of a microscopic agent and to
demonstrate its pathological characteristics. Several microbes have
been described, but one is forced to confess that the results have
until now been very contradictory and uncertain; and yet there is
little room to doubt that the disease is of an infectious character.
Symptoms. The symptoms are generally well defined and well
developed. The onset is sudden; an animal which one day before
appeared perfectly well is attacked in one or several joints. Usually
the upper joints of the limb are involved—the shoulder, elbow, knee,
haunch, stifle, hock.
Nevertheless, invasion is probably not as sudden as it appears to
be, and, as in the human species, the subject begins by feeling erratic
pains, which, however, pass unnoticed. The animal moves with
difficulty, as though it were suffering from laminitis, and has pain
when placing weight on the limb, while the joint attacked soon shows
a swelling which extends to the tendon sheaths and the neighbouring
serous bursæ. The local temperature is higher than that of
surrounding parts, sensibility becomes very marked, and pain
attends the slightest pressure on, or even movement of, the affected
joint. Intense lameness follows, which may even at first give rise to
the suspicion of fracture. The animals remain lying for long periods,
groan from time to time, and suffer great pain when rising.
In some cases the local manifestations appear to be transferred
from one joint to another.
These local symptoms are accompanied by high fever. The
temperature rises to 105° or 106° Fahr., the pulse to 80 or 90, and
the breathing is enormously accelerated if the patients are forced to
move.
Loss of appetite is very marked. Rumination may be suspended,
and these grave symptoms are accompanied by constipation, rapid
wasting, cessation or marked diminution of the milk supply, decrease
in the quantity of urine passed, etc.
A few days after the onset, visceral complications may occur,
though fortunately such complications are far from being constant.
Auscultation and percussion sometimes reveal the lesions of
pleurisy, endocarditis, pericarditis, etc.
The development of articular rheumatism varies greatly, and may
occasionally continue for weeks or months, the condition of one joint
improving only to be followed by inflammation of another.
The visceral lesions rarely disappear completely, and it is not
uncommon to note symptoms of chronic valvular endocarditis.
Relapses are somewhat frequent, and the disease may continue in a
chronic form after the acute symptoms have disappeared.
Lesions. The joint itself is not alone affected. All the tissues
surrounding it are congested, swollen and painful, particularly the
sheaths and insertions of the tendons. Within the inflamed synovial
capsules of the joints an increased quantity of turbid synovia
accumulates, distending the joint and producing a condition of
hydrarthrosis.
In animals slaughtered during the course of the disease one finds
congestive infiltration of the limbs.
The temperature of the parts near the affected joints is higher than
that of neighbouring regions. Sensibility is much more acute, and the
slightest external pressure gives rise to pain.
In favourable cases the joint may appear scarcely injured. The
principal symptoms are those of pain. In old-standing cases certain
permanent changes may occur, such as thickening and hardening of
the wall of the synovial capsule, fibrous infiltration of the tissues
around the joint, or even diffuse and irregular calcareous infiltration.
Cases of false or true anchylosis are rare, the animals usually being
slaughtered before such conditions can develop.
Complications. The commonest complications are endocarditis
and pericarditis. Valvular endocarditis localised in the auriculo-
ventricular valves is revealed by a systolic sound, and by tumultuous
or irregular beating of the heart when the animals are forced to
move. Pericarditis, which seems rare in bovine animals, is much
commoner in sheep. This pericarditis, however, produces none of the
external signs of pericarditis due to a foreign body. Like tuberculous
pericarditis, it is only accompanied by a trifling amount of exudate,
and is recognised by increased cardiac dulness and diminution in the
cardiac sounds on auscultation.
Simple pleurisy associated with pericarditis is frequent in sheep,
but unknown or little known in the ox.
If in animals other visceral complications occur, affecting the
peritoneum, meninges of the brain or intestines, they are at present
little recognised.
Diagnosis. Articular rheumatism can only be confused with
osseous cachexia or laminitis. Osseous cachexia, however, possesses
symptoms peculiar to itself, and generally extends to an entire
district, whilst rheumatism appears in an isolated form. Again, the
arthritis peculiar to osseous cachexia most commonly affects the
joints of the extremities (fetlock and phalanges). The disease may be
differentiated from laminitis by simply manipulating the joints,
which are painful in rheumatism but not in laminitis, and by
percussing the claws, which are painful in laminitis but not in
rheumatism, and by noting the character of the gait.
Prognosis. The prognosis is grave, as in all acute diseases which
are capable of assuming a protracted chronic form. It is also
necessary to take into account the loss of condition, the possibility of
relapse, and the complications due to prolonged decubitus.
Treatment. The first indication is to place the patients in a nearly
constant temperature, to supply bedding generously, and to arrange
for the animal being undisturbed. Among drugs salicylate of soda
gives the best results if administered in sufficient doses—6 to 7
drams per day for oxen or cows of medium size, 45 to 75 grains for
sheep.
Diuretics, like bicarbonate of soda, nitrate of potash and hay tea or
infusion of couch grass, pellitory, etc., also give good results.
The joints attacked may be blistered, but it is often preferable to
use mild ointments, containing camphor or belladonna, because, as
soon as pain diminishes, moderate massage of the affected parts,
which favours rapid absorption of the effusions, can then at once be
resorted to. The diet should consist of easily digested food and of
lukewarm hay tea, etc. When the animals are suffering from kidney
disease in any form salicylate of soda is contra-indicated.
Antipyrin may also be of service in doses of 45 to 75 grains for
bovines and 15 grains for sheep. Preparations of methyl salicylate can
only be used for animals of value.

MUSCULAR RHEUMATISM.

Muscular rheumatism is due to causes similar to those of articular


rheumatism. The symptoms, moreover, often occur simultaneously,
or may alternate with the articular manifestations, with which they
are seldom entirely unconnected.
Moist cold seems to be the predetermining cause, whether it acts
indirectly on the nerve trunks or affects the capillary circulation in
the muscles, through the medium of the vaso-motor supply. The
results are revealed by the development of neuralgia, neuritis or
interstitial myositis; and these diseases, by producing more or less
intense pain, cause difficulty in movement or distinct lameness.
Attempts have been made to explain the development of these
lesions by ascribing a certain action to the uric acid (which is said to
be in excess in the body), and to the lactic acid, which accumulates in
the muscular tissue after fatigue or over-exertion, and may
occasionally produce temporary myositis. Up to the present time, no
satisfactory proof has been furnished enabling us to identify the
myositis of rheumatism with the myositis of over-exertion, which,
moreover, appears to differ from it in essential particulars.
Symptoms. Muscular rheumatism is often ill-recognised in
veterinary medicine, and closer observation would appear to suggest
that it is much less frequent than has been stated. Generalised
muscular rheumatism is rare; patients stand stiffly as though
incapable of moving; the limbs and the back appear rigid, and the
animal seems only capable of changing its position by a single
movement of its whole body. One might readily believe at first sight
that the case was one of generalised laminitis or slight generalised
tetanus. The animal has difficulty in rising; when moving the limbs
are dragged, and the patient is cautious in lying down.
Most frequently the disease is localised in one region, such as the
shoulder, the loins, or the quarters. The affected part is stiff, tense,
painful, hard, and as though in a state of cramp. Palpation and
pressure reveal the presence of very exaggerated sensibility, which
varies within wide limits, according to circumstances, changes in
atmospheric conditions, etc. These local signs are accompanied by a
general reaction of varying severity, somewhat resembling that seen
in articular rheumatism. Appetite is diminished or suppressed, as is
rumination; the muzzle is dry and hot; the temperature may rise as
high as 103° or 104° Fahr.
Lesions. The lesions are imperfectly recognised, because those
who might most easily observe and study them have often neither
the means nor the leisure for the purpose. Possibly one would at
times discover lesions of neuritis; but in any case it is not so very rare
to discover lesions of interstitial sclerosing myositis in the depths of
the muscles of the quarter, loins, shoulders, etc., a condition rarely
found in any other disease. Naturally these are only the ultimate
lesions of muscular rheumatism; for slight attacks leave no traces
visible to external examination.
Diagnosis. The commonest error is that of mistaking the
condition for laminitis of all four limbs. The history often suffices to
eliminate this disease from consideration, while palpation and
percussion of the claws remove any remaining doubt.
The prognosis is not usually grave, and recovery sometimes
follows the adoption of good hygienic conditions. On the other hand,
certain patients lose flesh rapidly.
Treatment. Salicylate of soda and antipyrin still form the two
most efficacious drugs, particularly the first, which may almost be
regarded as a veritable specific in rheumatism. The doses vary with
the size of the patients, from 2½ to 7 drams per day. These doses are
continued for six to eight days consecutively. Some authors prefer
salicylic acid, which, however, is more irritant, in doses of 15 to 75
grains. Tartar emetic, in doses of 2½ to 4 drams per day until
purgation is established, is also said to have proved of great value in
the hands of the older practitioners. Local treatment comprises
stimulating frictions with camphorated alcohol, ammonia, and oil of
turpentine. Such applications are usually of great service,
particularly when associated with methodical massage of the affected
parts. These modes of treatment should be supplemented with a
proper dietary and the administration of tepid, diuretic fluids as
required.

INFECTIOUS FORMS OF RHEUMATISM OR PSEUDO-


RHEUMATISM.

Under the head of infectious rheumatism or pseudo-rheumatism


may be grouped joint diseases of a rheumatic type accompanying
various general or local diseases in young animals and adults:
diseases of the umbilicus, rachitis, peripneumonia, retention of the
fœtus, dysentery, etc. These diseases are characterised by articular
symptoms, which sometimes appear early, sometimes only when the
disease itself is declining, and develop suddenly or gradually, the
joint cavities themselves either being directly invaded by the agents
of the primary disease or remaining exempt. These pseudo-
rheumatic attacks are due to the localised action of microbic toxins
on the articular synovial membranes. Sometimes the serous
membranes of the large body cavities are also implicated.
This theory explains the development of acute arthritis without the
presence of gonococci during the course of an attack of blenorrhagia
in man, and may be applied in respect of certain forms of arthritis or
synovitis without the presence of microbes in domestic animals.

INFECTIOUS RHEUMATISM IN YOUNG ANIMALS.

Causation. To explain the occurrence of infectious rheumatism


in young animals a variety of causes has been invoked, such as bad
feeding, the absence of that purgation which usually follows the
action of the mother’s first milk (i.e., colostrum), and clears the
bowel of meconium, the effect of heredity, of chills, of insufficient
food, and of unduly abundant or very rich food, which has been said
to produce indigestion and its various complications.
All these causes may play a certain part in favouring the
development of infectious rheumatism, but none constitutes the
direct cause.
Lecoq and Loiset in their investigations regarding this disease in
colts mentioned the almost invariable existence of lesions in the
umbilical region. Bollinger in 1869 recognised the possibility of
infection by way of the umbilical vein. Röll and Guillebeau are of the
same opinion, and Morot’s excellent study shows that here must be
sought the most frequent point of origin of the articular symptoms.
In animals born in dirty stables the umbilical cord becomes infected
at the time of birth, or its cicatrix a few days later. The result is the
development of rapidly fatal septicæmia, suppuration in the wound,
omphalitis, omphalo-phlebitis, or umbilical arteritis; and to this
infection are due the various complications, which may appear
almost immediately, as in the case of septicæmia of calves, or may be
deferred for a shorter or longer interval, for so long indeed that the
umbilicus may appear to have healed externally (infectious
pneumonia and endocarditis, infectious arthritis, etc.). The umbilical
cord and the tissues surrounding the cicatrix form excellent culture
grounds for those microorganisms which always exist in such
abundance in litter and manure; and there is, therefore, no difficulty
in understanding why in dirty stables infection so readily occurs. The
infective agents may be of very varying kinds, a fact which explains
the difference in the symptoms which follow umbilical infection;
although ovoid bacteria, streptococcus pyogenes, and the bacilli of
necrosis seem most common.
Omphalitis and omphalo-phlebitis are not the only diseases
capable of producing infectious rheumatism in young animals.
Certain infections resembling dysentery and diarrhœic enteritis are
also its frequent forerunners. In young animals even rachitis, which
is accompanied by various digestive disorders, may serve as the point
of origin for infectious rheumatism and all its complications.
In older animals—i.e., in animals from five to six months, or even
twelve to fifteen months—infectious rheumatism may occur without
a clearly defined cause. It then develops with the symptoms and
lesions of that condition known as “osteomyelitis of adolescence” in
human pathology. These forms of osteomyelitis are due to infection
with streptococci and staphylococci. In veterinary medicine the
pathogeny has not yet been accurately ascertained.
Symptoms. Infectious rheumatism in young animals assumes
one of two clinical appearances, possibly due to different causes, viz.
—plastic or suppurative arthritis following umbilical infection, and
simple exudative arthritis. In the former variety symptoms appear
soon after birth, rarely after the age of two months, and as an
exception in animals of six to eight months affected with rachitis.
The onset is sometimes sudden; the patient, though healthy on the
previous evening, is unable next morning to rise or move. Hence in
France this disease has received the titles, amongst others, of
laminitis and paralysis of the newly born.
Certain joints, often a pair, appear swollen, hot and painful. The
synovial sacs are distended, and in the upper joints of the limb
appear much more prominent than in the lower. When the patients
are still able to move they walk on three legs, but usually they remain
lying permanently, and if aroused show great difficulty in rising and
very acute pain in moving.
Fig. 50.—Young bull suffering from infectious rheumatism.

General disturbance is also very marked; the temperature varies


between 103° and 105° Fahr. The animals are dull, have no appetite,
and exhibit intense thirst. The pulse rate and respirations are
increased, and not uncommonly symptoms of grave visceral
complications, such as endocarditis, pleurisy, pneumonia, etc., can
be detected. Diarrhœic enteritis sometimes appears as a secondary
development.
The animals remain permanently lying down. They can only be
induced to rise with difficulty, and, when moved, exhibit very acute
pain.
In many cases the disease then takes a rapid course and ends
fatally. Death is the usual termination whenever any of the above-
mentioned visceral complications exist. Recovery is exceptional. In
certain lucky cases, sometimes without any treatment whatever, the
symptoms become less acute, the appetite persists or improves, fever
dimi
nish
es,
the
cond
ition
of
the
joint
s
rema
ins
stati
onar
y,
and
after
the
lapse
of
sever
al
Fig. 51.—Attitude when walking of a calf suffering from week
infectious rheumatism. s
there
is
ground for anticipating recovery. In all cases, however, the
convalescents remain thin and sickly, exhibit pain and capricious
appetite, and in very few cases indeed is there any economic reason
for keeping them alive.
More frequently infectious rheumatism terminates by abscess
formation in the joints. The articular cavity becomes filled with pus,
the tissues covering one of the synovial sacs soften, and the abscess
opens, discharging fibrinous clots, thin watery pus mixed with
synovia, and débris of articular cartilages or ligaments. Pyæmia is
the final complication when the patients are not slaughtered.
In the cases comprised under the second heading the symptoms
appear more slowly and develop insidiously, the chief, viz., a
tendency to remain lying and difficulty in movement, long preceding
the appearance of exudative arthritis. The course depends chiefly on
the nature of the infective agent. In calves suffering from
peripneumonia, calves from stables in which epizootic abortion
rages, rachitic calves or calves suffering from severe diarrhœic
enteritis, the joints do not become the seat of suppuration.
In such cases the arthritis is of a simple exudative character, but
without microbic infection of the joint cavity. This form is less
dangerous, and is often curable provided the original cause be kept
in mind.
Lesions. The lesions are always very marked, and are quite
different from those of simple rheumatism. The synovial membranes
and the periarticular tissues are always thickened, injected, inflamed,
and infiltrated.
In more benign cases the synovial exudate from the joint cavities is
simply cloudy, contains no infectious germs, and proves sterile on
attempts at cultivation. In such cases there is no abscess formation.
But most frequently this stage of serous exudation is only temporary,
and the articular fluid, which at first seems sterile, may, when tested
some days later by means of cultures, reveal the presence of
organisms. The synovia accumulated within the joint sometimes
contains fibrinous flocculi, which are at first small, but later form
veritable coagula, filling up and thickly coating all the prominences
of the joint and moulding themselves on the extremities of the bones
constituting the articulation. Sometimes the cartilages undergo very
rapid ulceration, the subjacent layers of bone become inflamed, and
the osteoarthritis which develops is so severe and painful that the
patients are forced to remain absolutely still, and are quite incapable
of rising. The lesions may remain stationary at this point. In other
cases suppuration occurs in the articulation itself, the wall of the
synovial cavity, the periarticular tissues, and the skin soften; then the
abscess breaks, giving rise to open suppurating arthritis. Animals are
rarely kept long enough to become so gravely affected; many die
before this stage, and the others are usually slaughtered. Moreover,
they rapidly perish from exhaustion and from visceral complications
of a pyæmic character.
Fig. 52.—Ulceration of the articular cartilage in infectious rheumatism.

In many cases post-mortem examination reveals nothing whatever


in the region of the umbilical cord (through which infection has
occurred), but the germs of infection may be found in the blood or
general circulation; or again, careful investigation may show
ulceration of the umbilicus, lesions of omphalitis, of ascending
umbilical arteritis in consequence of infection of the thrombus, of
umbilical phlebitis, or of infective peritonitis, etc. The infectious
agent reaches the liver through the blood-vessels, then attains the
posterior vena cava, after which the infection assumes the gravest
possible character, producing complications like arthritis and
purulent infection, with the formation of multiple abscesses in the
depths of the viscera.
The Staphylococcus aureus and various streptococci are the most
frequent but not the only causes of these infections.
The diagnosis is not difficult, provided the disease be not
mistaken for true rheumatism. As true rheumatism is very rare in
young animals, and as, on the other hand, attention is aroused by the
presence of lesions of the umbilicus and by the existence of diarrhœic
enteritis, rachitis, etc., there is seldom room for doubt.
Prognosis. The prognosis is extremely grave whenever the case
results from infection of the umbilicus. French statistics place the
mortality at 90 per cent. and German at 75 per cent.
Curative treatment can only be attempted with any chance of
success in the simple exudative form. Even then it is necessary to
simultaneously treat the primary disease, such as rachitis or
diarrhœic enteritis.
The recommendations of former practitioners as to the use of
saline purgatives, cream of tartar, etc., were probably due to their
having recognised that diarrhœa is sometimes the primary cause.
Moussu has seen simple exudative arthritis in rachitic subjects
disappear, together with the rachitis, under proper treatment.
The indications therefore are, firstly, to take measures against the
primary disease, treating the local lesions separately with blisters,
douches, or simply cold applications and massage. Provided the
general condition can be improved, recovery may follow.
Unfortunately, this treatment is useless against infectious
rheumatism with suppurative arthritis resulting from infection of the
umbilicus. In such cases treatment, if undertaken, should be directed
towards perfectly disinfecting the umbilical wound or any existing
sinuses.
Injections of strong carbolic solution, the application of antiseptic
ointments or of antiseptic pencils containing iodoform, salol, etc.,
into the sinuses, followed by a surgical dressing covering the
umbilicus, form the basis of this primary treatment, which, it need
scarcely be said, has little chance of checking the course of already
existing arthritis. The use of internal antiseptics and of antipyretics
like camphor, salicylate of soda, etc., is worthy of trial. On the other
hand, prophylactic treatment in an infected area has every chance of
succeeding. The use of dry, clean litter under the mother and the
new-born calf, thorough cleansing of the umbilical cord or umbilical
cicatrix, and the application to the umbilicus of a small surgical
dressing or even a smear of tar, almost always suffice to prevent the
occurrence of these forms of arthritis.
INFECTIOUS PSEUDO-RHEUMATISM IN ADULTS.

The infectious pseudo-rheumatism of adults differs from


infectious rheumatism in young animals in that it never becomes
complicated with suppurative arthritis, and rarely affects more than
one joint at a time. The hind limbs are the parts usually attacked, and
the joints seem predisposed to disease in the following order of
frequency: the femoro-tibial, coxo-femoral, and hock joints.
On account of its greater frequency in cows, it has been termed
“arthritis of milch cows” and “infectious arthritis of milch cows,” etc.
In reality it may also attack bulls and oxen, but such cases are
exceptional.
Causation. First mentioned by Coulbeaux in 1824, and by
Pauleau in 1832, this disease has been well studied by Ph. Heu. Old
works mention it as attacking good milkers in the best dairies around
Paris, and Heu declares it to be the most deadly disease after
peripneumonia and tuberculosis.
This form of arthritis usually appears in an insidious form after
abortion, retention of the fœtus, or post-partum metritis. In cases of
epizootic abortion infectious rheumatism sometimes assumes an
epizootic form, and completes the devastation begun by abortion.
Under other and much rarer circumstances it may follow enteritis of
adults or attacks of mammitis, etc. The pathogeny of these forms of
arthritis is not difficult to understand, for in the greater number of
instances they form delayed consequences of local uterine infection.
Fig. 53.—Infectious rheumatism. Arthritis of the left stifle joint.

The soluble products secreted by infectious organisms multiplying


within the uterus are absorbed by the uterine mucous membrane,
causing slow intoxication; and in consequence of the special elective
affinity which the toxins show for the articular serous membranes,
and in many cases also for the visceral serous membranes, the
special characteristics are developed. Under certain circumstances
the joint cavity may even become the seat of true microbic infection.
Symptoms. The appearance of the first symptoms is difficult to
identify, for many cows abort, fail to “cleanse,” or become affected
with metritis without infectious rheumatism supervening. It is a
long-delayed condition, which may be postponed for weeks or even
for several months after an abnormal parturition, and to a time when
the symptoms of metritis have almost entirely disappeared. The
onset is characterised by difficulty in rising, and soon afterwards by
lameness, or by the animal failing to place weight on one of the hind
limbs. The affected joint, usually one of the articulations of the stifle,
appears markedly enlarged, is not appreciably hot to the touch, but
reveals a certain amount of painful sensibility on pressure. The
periarticular tissues are infiltrated and the synovial sacs slightly
distended.
After a few
days, a week or
two at most, the
periarticular
swelling
diminishes, and
the condition
appears to
remain
stationary.
Appetite is
normal or only
diminished. The
pain continues,
and causes
progressive
wasting and
diminution in
the yield of milk.
If at this time
the practitioner
Fig. 54.—The femoro-tibial makes a careful Fig. 55.—Normal
joint in a case of infectious digital femoro-tibial joint.
rheumatism. All the examination of
articular surfaces of one the diseased
side have undergone change region, he may find one of two
(the condyle of the femur, conditions. In the first, the synovial
interarticular cartilage, and sacs appear distended, fluctuating and
the upper extremity of the in exactly the same condition as in
femur). ordinary bog spavin. This is what has
been termed the exudative form of
infectious arthritis. In the second, the
enlarged joint remains very sensitive, the walls of the synovial sac are
thickened, fluctuation is either absent or only slightly marked, but
induration is very manifest. This constitutes the plastic form.

You might also like