Home arrow Java arrow Page 3 - Processing Media with Processing (Beta)
JAVA

Processing Media with Processing (Beta)


Last year saw the introduction of a new open source programming API developed specifically for use in the presentation of audio, image and other media files on the web, giving artists, designers and the like a whole new arena in which to strut their creative stuff. It can also be useful for learning fundamental concepts of programming in general.

Author Info:
By: Dan Wellman
Rating: 4 stars4 stars4 stars4 stars4 stars / 3
April 03, 2007
TABLE OF CONTENTS:
  1. · Processing Media with Processing (Beta)
  2. · Processing potential
  3. · Java heritage
  4. · Processing projects

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Processing Media with Processing (Beta) - Java heritage
(Page 3 of 4 )

As it is derived from Java, the structure of Processing applications must meet certain specifications. The semi-colon for example is used as a statement terminator, the comma is used to separate values and array value access is denoted within square brackets.  The functions that make up your application should be defined using the void functionname() {  }  syntax.  There are certain functions that are required in any Processing application such as the setup() function that is called when the program is started and defines the initial environment, such as the size of the window and the background color.  Or the draw() function that is called directly after setup() and continually executes while the program runs.

As you would expect from a language designed in part for working with images and multimedia, it has native support for rendering both two and three dimensional shapes.  You can also load and display images and work with pixels and manipulate shapes and images with the built in transformation methods that allow rotation and scaling, among other things. 

Additionally you get to control effects such as the lighting and the camera angle.  This allows the use of ambient lighting or spotlight effects for example and gives you a method of creating perspective or panning effects.  Methods are provided that easily let you set the background color of the window and the fill and stroke colour of shapes.  You can also control the color by setting RGB values and the hue and saturation.

There are a large number of data types to work with including everything you would expect such as Boolean, char, int and float, arrays, objects and strings as well as a large number of conversion data types and the standard set of string and array functions.  There is also a lot of math support built in with the standard set of operators in use as well as methods for standard calculation, trigonometry and random events.  PI, HALF and TWO are defined constants for working with circular shapes and objects.

While a picture may be worth 1000 words, words are still important in the expression of ideas, and with processing you can use fonts installed on your computer or create fonts to add to a projects data directory so that it can be easily exported and used.  This is useful for working with non-standard fonts that may not be installed on the end user's system.  You also have some control over the formatting of text used in your application, with methods to set the alignment, mode and size of text.


blog comments powered by Disqus
JAVA ARTICLES

- Deploying Multiple Java Applets as One
- Deploying Java Applets
- Understanding Deployment Frameworks
- Database Programming in Java Using JDBC
- Extension Interfaces and SAX
- Entities, Handlers and SAX
- Advanced SAX
- Conversions and Java Print Streams
- Formatters and Java Print Streams
- Java Print Streams
- Wildcards, Arrays, and Generics in Java
- Wildcards and Generic Methods in Java
- Finishing the Project: Java Web Development ...
- Generics and Limitations in Java
- Getting Started with Java Web Development in...

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 1 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials