Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Multimedia Programming with Pure Data
Multimedia Programming with Pure Data

Multimedia Programming with Pure Data: A comprehensive guide for digital artists for creating rich interactive multimedia applications using Pure Data

Arrow left icon
Profile Icon Bryan, Wai-ching CHUNG
Arrow right icon
$39.19 $48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (16 Ratings)
Paperback Jul 2013 350 pages 1st Edition
eBook
$26.09 $28.99
Paperback
$39.19 $48.99
Subscription
Free Trial
Renews at $19.99p/m
Arrow left icon
Profile Icon Bryan, Wai-ching CHUNG
Arrow right icon
$39.19 $48.99
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4 (16 Ratings)
Paperback Jul 2013 350 pages 1st Edition
eBook
$26.09 $28.99
Paperback
$39.19 $48.99
Subscription
Free Trial
Renews at $19.99p/m
eBook
$26.09 $28.99
Paperback
$39.19 $48.99
Subscription
Free Trial
Renews at $19.99p/m

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Table of content icon View table of contents Preview book icon Preview Book

Multimedia Programming with Pure Data

Chapter 2. Computer Graphics with the GEM Library

In this chapter, we will proceed with the Graphics Environment for Multimedia (GEM) library to work with computer graphics. We will start with the basics to create the GEM display window for graphics. Within the window, we will learn to draw 2D and 3D primitive shapes. We will understand the coordinates system in GEM in order to apply geometric transformations to the graphical shapes and also learn to enhance the surfaces of the graphical shapes with color information. Furthermore, we will learn to apply the lighting information to produce more realistic images. By the end, we should be able to produce a simple animation in 3D space.

GEM is an external library for the Pure Data software. It is available at http://gem.iem.at. Nevertheless, the version of Pure Data (pd-extended) we are using already includes the GEM library. We will use the GEM library to create both 2D and 3D graphics from scratch.

The topics that we are going to cover in this...

Using the GEM display window


All graphics we are going to create reside in a separate window with the main patch window. It is often called the GEM display window. We use the gemwin object to create the window. With different input messages, we can customize the properties of the display window.

Create a new Pd patch. Save it to your folder with name gem001.pd. Clear the console window by choosing Edit | Clear console.

Put the object gemwin onto your patch window, together with two messages and one toggle box. Connect all the messages and toggle boxes to the inlet of the gemwin object:

The gemwin object manages the graphics window. In this simple example, it receives two input messages:

  • create: This message creates a new window for graphics display

  • destroy: This message closes the graphics window

Also note the toggle box that sends the number, either 0 or 1 to the gemwin object. It is the rendering switch. Turning on the toggle will start graphics rendering within the window. Turning it off...

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...

Understanding the coordinates system


In the last section while working on the size of the graphical shapes, we understood that when a square object with size 4, it will cover the whole GEM window. In the polygon and curve examples, we learned that each point in the GEM window corresponds to a point in three-dimensional space.

The GEM window is a two-dimensional projection plane of a three-dimensional space. The origin (0, 0, 0) is the center of the window. The horizontal axis is the x axis. Toward the right-hand side is the increasing value of x. The vertical axis is the y axis. Moving upward increases the value of y. For the z axis, you have to imagine a line moving from the center of the GEM window toward your eyes:

If we consider all the points with z value equal to zero, it will form a flat surface parallel to the GEM window. On this surface, when we move from the left-hand margin to right-hand margin, the x value changes from -4 to 4. When we move from the bottom margin to the top margin...

Drawing basic 3D primitive shapes


All the 2D graphical shapes can work in the 3D environment. In addition, GEM provides a number of 3D primitives, such as cone, cube, cuboid, curve3d, cylinder, disk, sphere, teapot, torus, and tube. Let us learn it step-by-step by following a similar procedure.

Create an empty patch and save it with name gem003.pd in your folder. Put the gemwin object, create and destroy messages, and the toggle box for rendering.

We start from the simplest 3D object, cube. Put the gemhead and cube objects and connect them together. Similar to 2D shapes, we can also have the draw fill and draw line messages. Here is the patch and the resulting window. By using the draw line message, the 3D perspective projection of the cube is more obvious:

Here is the wire-frame rendering of the cube in the three-dimensional space:

Control for the cube object is simple. It has only one number inlet for its size. The next object is sphere. It has two parameters. One for the size and another...

Working with digital color


We have seen how to specify the window background color and the world light color. For all the 2D and 3D graphics, we can also individually specify the color information with RGB values. The coming example will show us how to specify color for the primitives.

Create an empty patch and save it with name gem004.pd in your folder. Put the gemwin object, create and destroy messages, and the toggle box for rendering. In addition, put a gemhead object with a sphere object.

Between the gemhead and the sphere objects, insert a color object. For color specification, it will be a message of three numbers: red, green, and blue. Clicking on the message will change the color of the sphere:

We can also use another object colorRGB to specify color for the graphical shapes. It requires three (RGB) to four (RGB and alpha) number boxes to specify the color. Remember that each number ranges from 0 to 1. If you press the Shift key and click-and-drag a number box upward or downward, you...

Applying geometric transformation


In this section, we start to move the graphical shapes in the 3D space. The operations are translation, rotation, and scale. Each operation comes with two versions. They are: translate, translateXYZ, rotate, rotateXYZ, scale, and scaleXYZ. In this book, we focus on the use of translateXYZ, rotateXYZ, and scaleXYZ. Readers can use the help menu to check the usage of translate, rotate, and scale.

Performing translation, rotation, and scaling

Create an empty patch and save it with name gem005.pd in your folder. Put the gemwin object, create and destroy messages, and the toggle box for rendering. In addition, put a gemhead object with a cube 3D object.

Between the gemhead and the cube objects, insert a translateXYZ object. The translateXYZ operation moves the object along each of the three axes. The three number boxes control the magnitude of the movement:

Note that the cube changes position and renders with a perspective view:

For rotation, insert the rotateXYZ...

Creating animation in 3D space


In Chapter 1, Getting Started with Pure Data, we have used the metro and random objects to create an animation of the graphical interface object (bang button). With the introduction of the GEM library, we can replace the bang button with other graphics. We have also used a float object to implement a counter. Actually, in pd-extended, we have another counter object that we can directly make use of.

Create an empty patch and save it with name Gem006.pd in your folder. Put the gemwin object, create and destroy messages, and the toggle box for rendering. In addition, create a metro object with a toggle box and connect it through a counter object.

For the counter object, it requires a number of input parameters. The three inlets we are using are for setting the minimum value, counter value, and the maximum value. In this case, I have used three message boxes for the purpose. The output of the counter object will be a number box:

Before turning on the metro object...

Summary


This chapter explains how to create 2D and 3D graphics in the GEM library, using primitive shapes, applying geometric transformations, such as translation and rotation, and how to make use of automation to create animation. So far, we have only used the basic color rendering and world lighting for the graphical shapes. In the next chapter, we are going to import external images into the GEM window.

Left arrow icon Right arrow icon

Key benefits

  • Carefully organized topics for interactive multimedia professional practice
  • Detailed reference to a large collection of resources in the open source communities to enhance the Pure Data software
  • Visual explanation and step-by-step tutorials with practical and creative multimedia applications
  •  

Description

Preparing interactive displays, creating computer games, and conducting audio-visual performance are now achievable without typing lines of code. With Pure Data, a graphical programming environment, creating interactive multimedia applications is just visually connecting graphical icons together. It is straightforward, intuitive, and effective. "Multimedia Programming with Pure Data" will show you how to create interactive multimedia applications. You will learn how to author various digital media, such as images, animations, audio, and videos together to form a coherent title. From simple to sophisticated interaction techniques, you will learn to apply these techniques in your practical multimedia projects. You start from making 2D and 3D computer graphics and proceed to animation, multimedia presentation, interface design, and more sophisticated computer vision applications with interactivity. With Pure Data and GEM, you will learn to produce animations with 2D digital imagery, 3D modelling, and particle systems. You can also design graphical interfaces, and use live video for motion tracking applications. Furthermore, you will learn Audio signal processing, which forms the key aspect to multimedia content creation. Last but not least, Network programming using Pure Data extension libraries explores applications to other portable devices.

Who is this book for?

An introductory book on multimedia programming for media artists/designers who like to work on interactivity in their projects, digital art/design students who like to learn the first multimedia programming technique, and audio-visual performers who like to customize their performance sets.

What you will learn

  • Prepare computer animations with 2D images, 3D modelling, and geometric transformation
  • Produce imageries with digital image processing techniques
  • Design graphical interfaces for audio-visual performance
  • Develop motion detection and tracking applications
  • Generate interactive animation with particle systems
  • Synthesize audio content for interactive applications
  • Connect Pure Data applications with external devices
  • Extend Pure Data with external libraries for advanced interactive applications
  •  
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jul 09, 2013
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164647
Category :
Tools :

What do you get with Print?

Product feature icon Instant access to your digital copy whilst your Print order is Shipped
Product feature icon Paperback book shipped to your preferred address
Product feature icon Redeem a companion digital copy on all Print orders
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
Modal Close icon
Payment Processing...
tick Completed

Shipping Address

Billing Address

Shipping Methods
Estimated delivery fee Deliver to United States

Economy delivery 10 - 13 business days

Free $6.95

Premium delivery 6 - 9 business days

$21.95
(Includes tracking information)

Product Details

Publication date : Jul 09, 2013
Length: 350 pages
Edition : 1st
Language : English
ISBN-13 : 9781782164647
Category :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just $5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total $ 127.17 158.97 31.80 saved
Machine Learning with R
$48.79 $60.99
Mastering openFrameworks: Creative Coding Demystified
$39.19 $48.99
Multimedia Programming with Pure Data
$39.19 $48.99
Total $ 127.17 158.97 31.80 saved Stars icon

Table of Contents

9 Chapters
Getting Started with Pure Data Chevron down icon Chevron up icon
Computer Graphics with the GEM Library Chevron down icon Chevron up icon
Image Processing Chevron down icon Chevron up icon
Interactivity Chevron down icon Chevron up icon
Motion Detection Chevron down icon Chevron up icon
Animation with Particle System Chevron down icon Chevron up icon
Audio Programming Chevron down icon Chevron up icon
Interface with the Outside World Chevron down icon Chevron up icon
Extending Pure Data Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.4
(16 Ratings)
5 star 75%
4 star 12.5%
3 star 0%
2 star 6.3%
1 star 6.3%
Filter icon Filter
Top Reviews

Filter reviews by




Andrea Bui Jan 17, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good hints, practical approaches, good for who needs both an entry level with GEM; offers also refreshing hints for more experienced programmers. Definitely liked it.
Amazon Verified review Amazon
celiatr Aug 29, 2013
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a very useful and practical book for benignners and not so beningnners about the creation of pd paches especially on image section, fact that is very interesting because on internet there are more concrete information about sound that about profesional multimedia.The idea of duplicate the examples that appears on the book for make it since 0 and render it, give us the posibility of understand step by step how Pure Data works on image or on video and not only we can improve our knowledges , we also can make similar paches but doing exactly the effects we want obtain, because we work whit programing that use open libaries.On my opinion, the interactive part of the book is for me the most interesting.I encourage reading this book because it hold on our notions of pure data for that we could advance and create the ideal pach for each one.
Amazon Verified review Amazon
Balekian Sébastien Nov 10, 2018
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Super bien vilgarisé pour les débutant!
Amazon Verified review Amazon
Yinzhen Bao Jun 23, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I came across this book's e-book version on uni library. The content is really detailed and helpful for creating things by pure data. I recommend this book.
Amazon Verified review Amazon
C H Newell Dec 25, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
this is an excellent accessible book for students wanting to play with Pd - not having the code examples online is a bonus as they cannot cut and paste and that way they learn the programme - all examples very clear. expensive but worth it
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is the digital copy I get with my Print order? Chevron down icon Chevron up icon

When you buy any Print edition of our Books, you can redeem (for free) the eBook edition of the Print Book you’ve purchased. This gives you instant access to your book when you make an order via PDF, EPUB or our online Reader experience.

What is the delivery time and cost of print book? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
What is custom duty/charge? Chevron down icon Chevron up icon

Customs duty are charges levied on goods when they cross international borders. It is a tax that is imposed on imported goods. These duties are charged by special authorities and bodies created by local governments and are meant to protect local industries, economies, and businesses.

Do I have to pay customs charges for the print book order? Chevron down icon Chevron up icon

The orders shipped to the countries that are listed under EU27 will not bear custom charges. They are paid by Packt as part of the order.

List of EU27 countries: www.gov.uk/eu-eea:

A custom duty or localized taxes may be applicable on the shipment and would be charged by the recipient country outside of the EU27 which should be paid by the customer and these duties are not included in the shipping charges been charged on the order.

How do I know my custom duty charges? Chevron down icon Chevron up icon

The amount of duty payable varies greatly depending on the imported goods, the country of origin and several other factors like the total invoice amount or dimensions like weight, and other such criteria applicable in your country.

For example:

  • If you live in Mexico, and the declared value of your ordered items is over $ 50, for you to receive a package, you will have to pay additional import tax of 19% which will be $ 9.50 to the courier service.
  • Whereas if you live in Turkey, and the declared value of your ordered items is over € 22, for you to receive a package, you will have to pay additional import tax of 18% which will be € 3.96 to the courier service.
How can I cancel my order? Chevron down icon Chevron up icon

Cancellation Policy for Published Printed Books:

You can cancel any order within 1 hour of placing the order. Simply contact customercare@packt.com with your order details or payment transaction id. If your order has already started the shipment process, we will do our best to stop it. However, if it is already on the way to you then when you receive it, you can contact us at customercare@packt.com using the returns and refund process.

Please understand that Packt Publishing cannot provide refunds or cancel any order except for the cases described in our Return Policy (i.e. Packt Publishing agrees to replace your printed book because it arrives damaged or material defect in book), Packt Publishing will not accept returns.

What is your returns and refunds policy? Chevron down icon Chevron up icon

Return Policy:

We want you to be happy with your purchase from Packtpub.com. We will not hassle you with returning print books to us. If the print book you receive from us is incorrect, damaged, doesn't work or is unacceptably late, please contact Customer Relations Team on customercare@packt.com with the order number and issue details as explained below:

  1. If you ordered (eBook, Video or Print Book) incorrectly or accidentally, please contact Customer Relations Team on customercare@packt.com within one hour of placing the order and we will replace/refund you the item cost.
  2. Sadly, if your eBook or Video file is faulty or a fault occurs during the eBook or Video being made available to you, i.e. during download then you should contact Customer Relations Team within 14 days of purchase on customercare@packt.com who will be able to resolve this issue for you.
  3. You will have a choice of replacement or refund of the problem items.(damaged, defective or incorrect)
  4. Once Customer Care Team confirms that you will be refunded, you should receive the refund within 10 to 12 working days.
  5. If you are only requesting a refund of one book from a multiple order, then we will refund you the appropriate single item.
  6. Where the items were shipped under a free shipping offer, there will be no shipping costs to refund.

On the off chance your printed book arrives damaged, with book material defect, contact our Customer Relation Team on customercare@packt.com within 14 days of receipt of the book with appropriate evidence of damage and we will work with you to secure a replacement copy, if necessary. Please note that each printed book you order from us is individually made by Packt's professional book-printing partner which is on a print-on-demand basis.

What tax is charged? Chevron down icon Chevron up icon

Currently, no tax is charged on the purchase of any print book (subject to change based on the laws and regulations). A localized VAT fee is charged only to our European and UK customers on eBooks, Video and subscriptions that they buy. GST is charged to Indian customers for eBooks and video purchases.

What payment methods can I use? Chevron down icon Chevron up icon

You can pay with the following card types:

  1. Visa Debit
  2. Visa Credit
  3. MasterCard
  4. PayPal
What is the delivery time and cost of print books? Chevron down icon Chevron up icon

Shipping Details

USA:

'

Economy: Delivery to most addresses in the US within 10-15 business days

Premium: Trackable Delivery to most addresses in the US within 3-8 business days

UK:

Economy: Delivery to most addresses in the U.K. within 7-9 business days.
Shipments are not trackable

Premium: Trackable delivery to most addresses in the U.K. within 3-4 business days!
Add one extra business day for deliveries to Northern Ireland and Scottish Highlands and islands

EU:

Premium: Trackable delivery to most EU destinations within 4-9 business days.

Australia:

Economy: Can deliver to P. O. Boxes and private residences.
Trackable service with delivery to addresses in Australia only.
Delivery time ranges from 7-9 business days for VIC and 8-10 business days for Interstate metro
Delivery time is up to 15 business days for remote areas of WA, NT & QLD.

Premium: Delivery to addresses in Australia only
Trackable delivery to most P. O. Boxes and private residences in Australia within 4-5 days based on the distance to a destination following dispatch.

India:

Premium: Delivery to most Indian addresses within 5-6 business days

Rest of the World:

Premium: Countries in the American continent: Trackable delivery to most countries within 4-7 business days

Asia:

Premium: Delivery to most Asian addresses within 5-9 business days

Disclaimer:
All orders received before 5 PM U.K time would start printing from the next business day. So the estimated delivery times start from the next day as well. Orders received after 5 PM U.K time (in our internal systems) on a business day or anytime on the weekend will begin printing the second to next business day. For example, an order placed at 11 AM today will begin printing tomorrow, whereas an order placed at 9 PM tonight will begin printing the day after tomorrow.


Unfortunately, due to several restrictions, we are unable to ship to the following countries:

  1. Afghanistan
  2. American Samoa
  3. Belarus
  4. Brunei Darussalam
  5. Central African Republic
  6. The Democratic Republic of Congo
  7. Eritrea
  8. Guinea-bissau
  9. Iran
  10. Lebanon
  11. Libiya Arab Jamahriya
  12. Somalia
  13. Sudan
  14. Russian Federation
  15. Syrian Arab Republic
  16. Ukraine
  17. Venezuela
Modal Close icon
Modal Close icon