Log In
Or create an account ->
Imperial Library
Home
About
News
Upload
Forum
Help
Login/SignUp
Index
Cover
Title
Dedication
Copyright
Acknowledgments
A.1 A little bit of history
A.2 Kickstarter
Preface
P.1 What is this book?
P.2 A word about Processing
P.3 What do you need to know?
P.4 What are you using to read this book?
P.5 The “story” of this book
Part I: Inanimate objects
Part II: It’s alive!
Part III: Intelligence
P.6 This book as a syllabus
P.7 The Ecosystem Project
P.8 Where do I find the code online and submit feedback?
Table of Contents
Introduction
I.1 Random Walks
I.2 The Random Walker Class
Pseudo-Random Numbers
I.3 Probability and Non-Uniform Distributions
I.4 A Normal Distribution of Random Numbers
Calculating Mean and Standard Deviation
I.5 A Custom Distribution of Random Numbers
I.6 Perlin Noise (A Smoother Approach)
Noise Detail
Mapping Noise
Two-Dimensional Noise
I.7 Onward
Chapter 1. Vectors
1.1 Vectors, You Complete Me
1.2 Vectors for Processing Programmers
1.3 Vector Addition
1.4 More Vector Math
Vector subtraction
Vector multiplication
1.5 Vector Magnitude
1.6 Normalizing Vectors
1.7 Vector Motion: Velocity
1.8 Vector Motion: Acceleration
Acceleration Algorithms!
1.9 Static vs. Non-Static Functions
1.10 Interactivity with Acceleration
The Ecosystem Project
Chapter 2. Forces
2.1 Forces and Newton’s Laws of Motion
Newton’s First Law
Newton’s Third Law
Newton’s Third Law (as seen through the eyes of Processing)
2.2 Forces and Processing—Newton’s Second Law as a Function
Newton’s Second Law
2.3 Force Accumulation
2.4 Dealing with Mass
2.5 Creating Forces
2.6 Gravity on Earth and Modeling a Force
2.7 Friction
2.8 Air and Fluid Resistance
2.9 Gravitational Attraction
2.10 Everything Attracts (or Repels) Everything
Chapter 3. Oscillation
3.1 Angles
3.2 Angular Motion
3.3 Trigonometry
3.4 Pointing in the Direction of Movement
3.5 Polar vs. Cartesian Coordinates
3.6 Oscillation Amplitude and Period
3.7 Oscillation with Angular Velocity
3.8 Waves
3.9 Trigonometry and Forces: The Pendulum
3.10 Spring Forces
Chapter 4. Particle Systems
4.1 Why We Need Particle Systems
4.2 A Single Particle
4.3 The ArrayList
4.4 The Particle System Class
4.5 A System of Systems
4.6 Inheritance and Polymorphism: An Introduction
4.7 Inheritance Basics
4.8 Particles with Inheritance
4.9 Polymorphism Basics
4.10 Particle Systems with Polymorphism
4.11 Particle Systems with Forces
4.12 Particle Systems with Repellers
4.13 Image Textures and Additive Blending
Chapter 5. Physics Libraries
5.1 What Is Box2D and When Is It Useful?
5.2 Getting Box2D in Processing
5.3 Box2D Basics
SETUP
DRAW
Core elements of a Box2D world:
5.4 Living in a Box2D World
5.5 Building a Box2D Body
Step 1: Define a body.
Step 2: Configure the body definition.
Step 3: Create the body.
Step 4: Set any other conditions for the body’s starting state.
5.6 Three’s Company: Bodies and Shapes and Fixtures
Step 1: Define a shape.
Step 2: Create a fixture.
Step 3: Attach the shape to the body with the fixture.
5.7 Box2D and Processing: Reunited and It Feels So Good
Step 1: Add Box2D to our main program (i.e. setup() and draw()).
Step 2: Link every Processing Box object with a Box2D Body object.
5.8 Fixed Box2D Objects
5.9 A Curvy Boundary
Step 1: Define a body.
Step 2: Define the Shape.
Step 3: Configure the Shape.
Step 4: Attach the Shape to the body with a Fixture.
5.10 Complex Forms
5.11 Feeling Attached—Box2D Joints
Step 1: Make sure you have two bodies ready to go.
Step 2: Define the joint.
Step 3: Configure the joint’s properties.
Step 4: Create the joint.
5.12 Bringing It All Back Home to Forces
5.13 Collision Events
Step 1: Contact, could you tell me what two things collided?
Step 2: Fixtures, could you tell me which body you are attached to?
Step 3: Bodies, could you tell me which Particles you are associated with?
5.14 A Brief Interlude—Integration Methods
5.15 Verlet Physics with toxiclibs
Getting toxiclibs
Core Elements of VerletPhysics
Vectors with toxiclibs
Building the toxiclibs physics world
5.16 Particles and Springs in toxiclibs
5.17 Putting It All Together: A Simple Interactive Spring
5.18 Connected Systems, Part I: String
5.19 Connected Systems, Part II: Force-Directed Graph
5.20 Attraction and Repulsion Behaviors
Chapter 6. Autonomous Agents
6.1 Forces from Within
6.2 Vehicles and Steering
6.3 The Steering Force
6.4 Arriving Behavior
6.5 Your Own Desires: Desired Velocity
6.6 Flow Fields
6.7 The Dot Product
6.8 Path Following
6.9 Path Following with Multiple Segments
6.10 Complex Systems
6.11 Group Behaviors (or: Let’s not run into each other)
6.12 Combinations
6.13 Flocking
6.14 Algorithmic Efficiency (or: Why does my $@(*%! run so slowly?)
6.15 A Few Last Notes: Optimization Tricks
1) Magnitude squared (or sometimes distance squared)
2) Sine and cosine lookup tables
3) Making gajillions of unnecessary PVector objects
Chapter 7. Cellular Automata
7.1 What Is a Cellular Automaton?
7.2 Elementary Cellular Automata
7.3 How to Program an Elementary CA
7.4 Drawing an Elementary CA
7.5 Wolfram Classification
7.6 The Game of Life
7.7 Programming the Game of Life
7.8 Object-Oriented Cells
7.9 Variations of Traditional CA
Chapter 8. Fractals
8.1 What Is a Fractal?
8.2 Recursion
8.3 The Cantor Set with a Recursive Function
8.4 The Koch Curve and the ArrayList Technique
8.5 Trees
8.6 L-systems
Chapter 9. The Evolution of Code
9.1 Genetic Algorithms: Inspired by Actual Events
9.2 Why Use Genetic Algorithms?
9.3 Darwinian Natural Selection
9.4 The Genetic Algorithm, Part I: Creating a Population
9.5 The Genetic Algorithm, Part II: Selection
9.6 The Genetic Algorithm, Part III: Reproduction
9.7 Code for Creating the Population
Step 1: Initialize Population
Step 2: Selection
Step 3: Reproduction
9.8 Genetic Algorithms: Putting It All Together
9.9 Genetic Algorithms: Make Them Your Own
Key #1: Varying the variables
Key #2: The fitness function
Key #3: Genotype and Phenotype
9.10 Evolving Forces: Smart Rockets
9.11 Smart Rockets: Putting It All Together
9.12 Interactive Selection
9.13 Ecosystem Simulation
Genotype and Phenotype
Selection and Reproduction
Chapter 10. Neural Networks
10.1 Artificial Neural Networks: Introduction and Application
10.2 The Perceptron
10.3 Simple Pattern Recognition Using a Perceptron
10.4 Coding the Perceptron
10.5 A Steering Perceptron
10.6 It’s a “Network,” Remember?
10.7 Neural Network Diagrams
10.8 Animating Feed Forward
The end
Further Reading
Books
Papers and Articles
Index
← Prev
Back
Next →
← Prev
Back
Next →