Book description
Python is a powerful programming language that's easy to learn and fun to play with. But once you've gotten a handle on the basics, what do you do next?
Python Playground is a collection of imaginative programming projects that will inspire you to use Python to make art and music, build simulations of real-world phenomena, and interact with hardware like the Arduino and Raspberry Pi. You'll learn to use common Python tools and libraries like numpy, matplotlib, and pygame to do things like:
- Generate Spirograph-like patterns using parametric equations and the turtle module
- Create music on your computer by simulating frequency overtones
- Translate graphical images into ASCII art
- Write an autostereogram program that produces 3D images hidden beneath random patterns
- Make realistic animations with OpenGL shaders by exploring particle systems, transparency, and billboarding techniques
- Construct 3D visualizations using data from CT and MRI scans
- Build a laser show that responds to music by hooking up your computer to an Arduino
Programming shouldn't be a chore. Have some solid, geeky fun with Python Playground.
Publisher resources
Table of contents
- Cover Page
- Title Page
- Copyright Page
- Brief Contents
- Contents in Detail
- Acknowledgments
- Introduction
- Part I: Warming Up
-
Part II: Simulating Life
- Chapter 3: Conway’s Game of Life
- Chapter 4: Generating Musical Overtones with the Karplus-Strong Algorithm
- Chapter 5: Boids: Simulating a Flock
- Part III: Fun with Images
-
Part IV: Enter 3D
- Chapter 9: Understanding OpenGL
- Chapter 10: Particle Systems
-
Chapter 11: Volume Rendering
- How It Works
- Requirements
- An Overview of the Project Code
- Generating a 3D Texture
- The Complete 3D Texture Code
- Generating Rays
- The Complete Ray Generation Code
- Volume Ray Casting
- The Complete Volume Ray Casting Code
- 2D Slicing
- The Complete 2D Slicing Code
- Putting the Code Together
- The Complete Main File Code
- Running the Program
- Summary
- Experiments!
-
Part V: Hardware Hacking
- Chapter 12: Introduction to the Arduino
- Chapter 13: Laser Audio Display
- Chapter 14: A Raspberry Pi–based Weather Monitor
- Appendix A: Software Installation
- Appendix B: Basic Practical Electronics
-
Appendix C: Raspberry Pi Tips and Tricks
- Setting Up Wi-Fi
- Checking Whether Your Pi Is Connected
- Preventing the Wi-Fi Adapter from Going to Sleep
- Backing Up Your Code and Data from the Pi
- Backing Up Your Entire Pi OS
- Logging In to Your Pi with SSH
- Using the Raspberry Pi Camera
- Enabling Sound on Your Pi
- Making Your Pi Talk
- Making HDMI Work
- Making Your Pi Mobile
- Checking Your Raspberry Pi Hardware Version
- Index
- Footnotes
- Resources
- About the Author
Product information
- Title: Python Playground
- Author(s):
- Release date: October 2015
- Publisher(s): No Starch Press
- ISBN: 9781593276041
You might also like
book
Scaling Python with Dask
Modern systems contain multi-core CPUs and GPUs that have the potential for parallel computing. But many …
book
The Python 3 Standard Library by Example, Second Edition
Master the Powerful Python 3 Standard Library through Real Code Examples "The genius of Doug's approach …
book
Python One-Liners
Python One-Liners will teach you how to read and write “one-liners”: concise statements of useful functionality …
book
Classic Computer Science Problems in Python
Classic Computer Science Problems in Python deepens your knowledge of problem solving techniques from the realm …