Java
  Home arrow Java arrow Page 3 - Processing Media with Processing (Beta)
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVA

Processing Media with Processing (Beta)
By: Dan Wellman
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2007-04-03

    Table of Contents:
  • Processing Media with Processing (Beta)
  • Processing potential
  • Java heritage
  • Processing projects

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    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.

    More Java Articles
    More By Dan Wellman


       · Hi,I hope you find this introduction to processing interesting and I hope it...
     

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







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek