Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Multimedia Programming with Pure Data

You're reading from  Multimedia Programming with Pure Data

Product type Book
Published in Jul 2013
Publisher Packt
ISBN-13 9781782164647
Pages 350 pages
Edition 1st Edition
Languages
Author (1):
Bryan, Wai-ching CHUNG Bryan, Wai-ching CHUNG
Profile icon Bryan, Wai-ching CHUNG

Table of Contents (17) Chapters

Multimedia Programming with Pure Data
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Getting Started with Pure Data 2. Computer Graphics with the GEM Library 3. Image Processing 4. Interactivity 5. Motion Detection 6. Animation with Particle System 7. Audio Programming 8. Interface with the Outside World 9. Extending Pure Data Communities and References Index

Drawing basic 2D graphics


Before exploring more advanced properties of the window, we start working on 2D graphics. The GEM library comes with a number of 2D primitives such as circle, curve, polygon, rectangle, square, and triangle.

Create a new Pd patch. Save it to your folder with name gem002.pd. Clear the console window by choosing Edit | Clear. Create a default graphics window with the gemwin object, create message, destroy message, and the toggle render box as shown in the last section.

We will first create a 2D square in this exercise. Put an object named square onto the patch window. If you switch to the Run mode and create the window to start rendering, nothing happens. In order to render the square object, we need one more GEM object, gemhead:

The gemhead object defines the path that GEM library uses to produce the graphics. When the GEM window starts to render any graphics, it searches all the gemhead objects in the patch. Starting from each gemhead object, it goes down the connection...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}