Recent from talks
Contribute something
Nothing was collected or created yet.
Processing
View on Wikipedia| Processing | |
|---|---|
| Paradigm | Object-oriented |
| Designed by | Casey Reas, Ben Fry |
| First appeared | 2001 |
| Stable release | 4.3.1
/ November 12, 2024[1] |
| License | GPL, LGPL |
| Filename extensions | .pde |
| Website | processing.org |
Processing is a free graphics library and integrated development environment (IDE) built for the electronic arts, new media art, and visual design communities with the purpose of teaching non-programmers the fundamentals of computer programming in a visual context.
Processing uses the Java programming language, with additional simplifications such as additional classes and aliased mathematical functions and operations. It also provides a graphical user interface for simplifying the compilation and execution stage.
The Processing language and IDE have been the precursor to other projects including Arduino and Wiring.
History
[edit]The project was initiated in 2001 by Casey Reas and Ben Fry, both formerly of the Aesthetics and Computation Group at the MIT Media Lab. In 2012, they started the Processing Foundation along with Daniel Shiffman, who joined as a third project lead. Johanna Hedva joined the Foundation in 2014 as Director of Advocacy.[2]
Originally, Processing had used the domain proce55ing.net, because the processing domain was taken; Reas and Fry eventually acquired the domain processing.org and moved the project to it in 2004.[3] While the original name had a combination of letters and numbers, it was always officially referred to as processing, but the abbreviated term p5 is still occasionally used (e.g. in "p5.js") in reference to the old domain name.[4]
In 2012 the Processing Foundation was established and received 501(c)(3) nonprofit status,[5] supporting the community around the tools and ideas that started with the Processing Project. The foundation encourages people around the world to meet annually in local events called Processing Community Day.[6]
Features
[edit]| Processing IDE | |
|---|---|
Screenshot of Processing's integrated development environment. | |
| Stable release | 4.3
/ July 26, 2023 |
| Repository | |
| Written in | Java, GLSL, JavaScript |
| Operating system | Cross-platform |
| Type | Integrated development environment |
| Website | processing |
Processing includes a sketchbook, a minimal alternative to an integrated development environment (IDE) for organizing projects.[7]
Every Processing sketch is actually a subclass of the PApplet Java class (formerly a subclass of Java's built-in Applet) which implements most of the Processing language's features.[8]
When programming in Processing, all additional classes defined will be treated as inner classes when the code is translated into pure Java before compiling.[9] This means that the use of static variables and methods in classes is prohibited unless Processing is explicitly told to code in pure Java mode.
Processing also allows for users to create their own classes within the PApplet sketch. This allows for complex data types that can include any number of arguments and avoids the limitations of solely using standard data types such as: int (integer), char (character), float (real number), and color (RGB, RGBA, hex).
Examples
[edit]The simplest possible version of a "Hello World" program in Processing is:
// This prints "Hello World." to the IDE console.
println("Hello World.");
However, due to the more visually oriented nature of Processing, the following code[10] is a better example of the look and feel of the language.
// Hello mouse.
void setup() {
size(400, 400);
stroke(255);
background(192, 64, 0);
}
void draw() {
line(150, 25, mouseX, mouseY);
}
Awards
[edit]In 2005 Reas and Fry won the Golden Nica award from Ars Electronica in its Net Vision category for their work on Processing.[11]
Ben Fry won the 2011 National Design Award given by the Smithsonian Cooper-Hewitt National Design Museum in the category of Interaction Design. The award statement says:
"Drawing on a background in graphic design and computer science, Ben Fry pursues a long-held fascination with visualizing data. As Principal of Fathom Information Design in Boston, Fry develops software, printed works, installations, and books that depict and explain topics from the human genome to baseball salaries to the evolution of text documents. With Casey Reas, he founded the Processing Project, an open-source programming environment for teaching computational design and sketching interactive-media software. It provides artists and designers with accessible means of working with code while encouraging engineers and computer scientists to think about design concepts."[12]
License
[edit]Processing's core libraries, the code included in exported applications and applets, is licensed under the GNU Lesser General Public License, allowing users to release their original code with a choice of license.
The IDE is licensed under the GNU General Public License.
Related projects
[edit]Design By Numbers
[edit]Processing was based on the original work done on Design By Numbers project at MIT. It shares many of the same ideas and is a direct child of that experiment.
p5.js
[edit]In 2013, Lauren McCarthy created p5.js, a native JavaScript alternative to Processing.js that has the official support of the Processing Foundation. p5.js gained over 1.5 million users.[13]
Since April 2022, p5.js has been led by Qianqian Ye, an Adjunct Associate Professor of Media Arts at USC.[14]
ml5.js
[edit]ml5.js is a p5.js library developed by NYU's ITP/IMA with funding and support provided by a Google Education grant.
Daniel Shiffman has made videos demonstrating ml5 and is a notable code contributor.
Processing.js
[edit]Processing.js is a discontinued JavaScript port that enabled existing Processing Java code to run on web.
It was initially released in 2008 by John Resig. The project was later run through a partnership between the Mozilla Foundation and Seneca College, led by David Humphrey, Al MacDonald, and Corban Brook. Processing.js was kept at parity with Processing up to its API version 2.1 release.
The project was discontinued in December 2018, two years after its active development had stopped.
P5Py
[edit]p5 is a Python library that provides high level drawing functionality to quickly create simulations and interactive art using Python. It combines the core ideas of Processing — learning to code in a visual context — with Python's readability to make programming more accessible to beginners, educators, and artists.[15]
Processing.py
[edit]Python Mode for Processing, or Processing.py is a Python interface to the underlying Java toolkit. It was chiefly developed by Jonathan Feinberg starting in 2010, with contributions from James Gilles and Ben Alkov.[16]
py5
[edit]py5 is a version of Processing for Python 3.8+. It makes the Java Processing jars available to the CPython interpreter using JPype. It can do just about everything Processing can do, except with Python instead of Java code.[17]
Wiring, Arduino, and Fritzing
[edit]Processing has spawned another project, Wiring, which uses the Processing IDE with a collection of libraries written in the C++ language as a way to teach artists how to program microcontrollers.[18] There are now two separate hardware projects, Wiring and Arduino, using the Wiring environment and language. Fritzing is another software environment of the same sort, which helps designers and artists to document their interactive prototypes and to take the step from physical prototyping to actual product.
Mobile Processing
[edit]Another spin-off project, now defunct, is Mobile Processing by Francis Li, which allowed software written using the Processing language and environment to run on Java powered mobile devices. Today some of the same functionality is provided by Processing itself.[19]
iProcessing
[edit]iProcessing was built to help people develop native iPhone applications using the Processing language. It is an integration of the Processing.js library and a Javascript application framework for iPhone.[20]
Spde
[edit]Spde (Scala Processing Development Environment) replaces Processing's reduced Java syntax and custom preprocessor with the off-the-shelf Scala programming language which also runs on the Java platform and enforces some of the same restrictions such as disallowing static methods, while also allowing more concise code, and supporting functional programming.[21][22][23]
JRubyArt
[edit]JRubyArt (formerly named ruby-processing) is a wrapper for Processing in the Ruby language, that runs on the Java platform using JRuby.
Quil
[edit]Quil is an interactive animation library for Clojure and ClojureScript based on Processing.[24][25]
Sketch
[edit]Sketch is a Common Lisp library highly inspired by Processing.[26]
Media
[edit]The music video for "House of Cards" by Radiohead was created using Processing combined with data from lidar technology, along with using acrylic glass and mirrors to create scenes in which the image appears distorted, partially disappears, or disintegrate as if being carried by wind.[27] Processing has also been used to create illustrations for publications such as Nature and The New York Times, to output sculptures for gallery exhibitions, to control huge video walls and to knit sweaters.[28]
See also
[edit]Footnotes
[edit]- ^ "Releases". GitHub. Retrieved 2024-12-19.
- ^ "People". processingfoundation.org. Archived from the original on 2019-10-05. Retrieved 2017-04-24.
- ^ "Processing 1.0 _ALPHA_ - processing.org". processing.org. Archived from the original on 2012-04-28. Retrieved 2017-12-24.
- ^ "What means number 5 in name "p5"? · Issue #2443 · processing/p5.js". GitHub.
- ^ Casey Reas; Ben Fry (May 29, 2018). "A Modern Prometheus". Medium.
- ^ "PCD". Medium.
- ^ Ira Greenberg (31 December 2007). Processing: Creative Coding and Computational Art. Apress. pp. 151–. ISBN 978-1-4302-0310-0.
- ^ Jeanine Meyer (15 June 2018). Programming 101: The How and Why of Programming Revealed Using the Processing Programming Language. Apress. pp. 121–. ISBN 978-1-4842-3697-0.
- ^ Ira Greenberg (25 March 2010). The Essential Guide to Processing for Flash Developers. Apress. pp. 412–. ISBN 978-1-4302-1980-4.
- ^ Tayste. "Hello Mouse - OpenProcessing". OpenProcessing.org. Retrieved 3 March 2022.
- ^ Meredith Hoy (3 January 2017). From Point to Pixel: A Genealogy of Digital Aesthetics. Dartmouth College Press. pp. 142–. ISBN 978-1-5126-0023-0.
- ^ "Cooper-Hewitt, National Design Museum Announces Winners and Finalists of the 12th Annual National Design Awards" (PDF). Archived from the original (PDF) on 2011-08-12.
- ^ "P5.js — Lauren Lee McCarthy".
- ^ "Qianqian Ye".
- ^ p5, p5py, 2021-09-29, retrieved 2021-10-12
- ^ Allison Parrish; Ben Fry; Casey Reas (11 May 2016). Getting Started with Processing.py: Making Interactive Graphics with Processing's Python Mode. Maker Media, Incorporated. ISBN 978-1-4571-8679-0.
- ^ py5 documentation, hx2a, 2021-09-13, retrieved 2022-05-10
- ^ "Processing, Wiring, and Arduino (EE Tip 101) - Circuit Cellar". 18 September 2013.[permanent dead link]
- ^ "Android - Processing". Archived from the original on 2014-08-19. Retrieved 2013-06-03.
- ^ "iProcessing Puts Processing.js on iPhone - But What About Browsers? - CDM Create Digital Music". 11 February 2010. Archived from the original on 13 October 2019. Retrieved 23 July 2018.
- ^ "Spde: Spde". Technically.us. Archived from the original on 2011-08-02. Retrieved 2013-08-20.
- ^ "Coderspiel / Runaway processing". Technically.us. Archived from the original on 2016-11-10. Retrieved 2013-08-20.
- ^ "Coderspiel / Flocking with Spde". Technically.us. Retrieved 2013-08-20.
- ^ "Quil: animation in Clojure".
- ^ "Quil Intro".
- ^ "Sketch". Github.com. Retrieved 2025-04-25.
- ^ Nye, Calley (2008-07-14). "Radiohead Partners With Google For Music Video Launch". The Washington Post. ISSN 0190-8286. Retrieved 2021-03-16.
- ^ Reas, Casey; Ben Fry (2015). Getting started with Processing (Second ed.). San Francisco. p. 183. ISBN 978-1-4571-8708-7. OCLC 905522686.
{{cite book}}: CS1 maint: location missing publisher (link)
References
[edit]- Bohnacker, Hartmut; Gross, Benedikt; Laub, Julia; Lazzeroni, Claudius (August 22, 2012), Generative Design: Visualize, Program, and Create with Processing (1st ed.), Princeton Architectural Press, p. 472, ISBN 978-1616890773
- Glassner, Andrew (August 9, 2010), Processing for Visual Artists: How to Create Expressive Images and Interactive Art (1st ed.), A K Peters/CRC Press, p. 955, ISBN 978-1-56881-716-3, archived from the original on April 21, 2011
- Reas, Casey; Fry, Ben (June 17, 2010), Getting Started with Processing (1st ed.), Make, p. 208, ISBN 978-1-4493-7980-3
- Noble, Joshua (July 21, 2009), Programming Interactivity: A Designer's Guide to Processing, Arduino, and Openframeworks (1st ed.), O'Reilly Media, p. 736, ISBN 978-0-596-15414-1
- Terzidis, Kostas (May 11, 2009), Algorithms for Visual Design Using the Processing Language (1st ed.), Wiley, p. 384, ISBN 978-0-470-37548-8
- Reas, Casey; Fry, Ben; Maeda, John (September 30, 2007), Processing: A Programming Handbook for Visual Designers and Artists (1st ed.), The MIT Press, p. 736, ISBN 978-0-262-18262-1, archived from the original on April 17, 2011
- Fry, Ben (January 11, 2008), Visualizing Data (1st ed.), O'Reilly Media, p. 382, ISBN 978-0-596-51455-6
- Greenberg, Ira (May 28, 2007), Processing: Creative Coding and Computational Art (Foundation) (1st ed.), friends of ED, p. 840, ISBN 978-1-59059-617-3, archived from the original on January 27, 2011
- Shiffman, Daniel (August 19, 2008), Learning Processing: A Beginner's Guide to Programming Images, Animation, and Interaction (1st ed.), Morgan Kaufmann, p. 450, ISBN 978-0-12-373602-4
- Faludi, Robert (January 4, 2011), Building Wireless Sensor Networks: with ZigBee, XBee, Arduino, and Processing (1st ed.), O'Reilly Media, p. 320, ISBN 978-0-596-80774-0, archived from the original on June 12, 2019, retrieved May 18, 2011
- Vantomme, Jan (September 20, 2012), Processing 2, Creative Programming Cookbook (1st ed.), Packt Publishing, p. 291, ISBN 9781849517942, archived from the original on July 2, 2014, retrieved February 25, 2013
- Pearson, Matt (June 1, 2011), Generative Art, A practical guide using Processing (1st ed.), Manning, p. 240, ISBN 9781935182627, archived from the original on June 24, 2019, retrieved February 25, 2013
- Jan, Vantomme (September 20, 2012), Processing 2: Creative Programming Cookbook (1st ed.), Packt Publishing, p. 306, ISBN 978-1849517942, archived from the original on July 2, 2014, retrieved February 25, 2013
- Sauter, Daniel (May 2, 2013), Rapid Android Development: Build Rich, Sensor-Based Applications with Processing (1st ed.), Pragmatic Bookshelf, p. 300, ISBN 978-1937785062, archived from the original on October 13, 2019, retrieved July 18, 2013
- Gradwohl, Nikolaus (May 20, 2013), Processing 2: Creative Coding Hotshot (1st ed.), Packt Publishing, p. 266, ISBN 978-1782166726, archived from the original on July 2, 2014, retrieved July 18, 2013
External links
[edit]Processing
View on GrokipediaOverview
Description
Processing is an open-source programming language and integrated development environment (IDE) designed for electronic arts, new media art, and visual design communities.[1] It functions as a flexible software sketchbook that enables users to create visual and interactive applications through a simplified programming approach.[3] Initiated in 2001 by Casey Reas and Ben Fry, who were graduate students at the MIT Media Lab under John Maeda's Aesthetics and Computation Group, Processing emerged as a tool to bridge programming with creative expression.[1] At its core, Processing is built on the Java platform, compiling sketches into Java bytecode for execution while providing a streamlined syntax that makes it accessible even without prior Java knowledge.[4] This syntax draws inspiration from languages like BASIC and Logo to simplify coding for visual outputs, supporting features such as 2D and 3D graphics rendering, animation through frame-based drawing functions, and interactivity with input devices like the mouse and keyboard.[1] The sketch-based paradigm organizes programs into lightweight, modular files—typically called "sketches"—that emphasize rapid prototyping and immediate visual feedback, allowing users to focus on artistic experimentation rather than complex setup.[4] Processing primarily targets artists, designers, educators, and programming beginners who seek to produce visual and interactive media without requiring deep knowledge of underlying systems or advanced computer science concepts.[1] It is widely used in art schools, universities, high schools, and by professionals in design, architecture, and visual arts to foster software literacy and creative coding skills.[1] This focus traces back to influences like John Maeda's Design By Numbers project from 1999, which pioneered accessible programming for visual thinkers and informed Processing's emphasis on intuitive, graphics-oriented development.[1]Purpose and Applications
Processing is designed to lower the barriers for non-programmers entering the field of coding by providing a simple, visual-oriented environment that facilitates the creation of interactive graphics, animations, and prototypes.[1] Its primary goals include promoting software literacy within the visual arts and fostering visual literacy in technology, allowing users—particularly beginners—to experiment with programming concepts through immediate visual feedback rather than abstract syntax.[1] This approach, inspired by accessible languages like BASIC and Logo, enables rapid iteration and encourages creative exploration over rigorous software engineering practices.[1] Key applications of Processing span generative art, where algorithms produce evolving visual forms; data visualization, transforming complex datasets into intuitive graphics; sound visualization, mapping audio inputs to dynamic displays; and physical computing interfaces, often integrated with hardware like Arduino to control sensors and actuators in real-time.[1][5] It serves as an educational tool for teaching programming fundamentals through visual outcomes, making abstract ideas tangible and engaging for students in art, design, and computer science courses.[1] In impact areas, Processing has been employed in museums for interactive exhibits, such as those at the Exploratorium, the Museum of Modern Art (MoMA), and the Victoria and Albert Museum, where it powers immersive installations that respond to visitor interactions.[1] In academia, it has been integrated into curricula at universities, art schools, and high schools worldwide, with studies showing it doubles student interest in pursuing further computer science courses.[1] Within industry, particularly UI/UX design and prototyping, Processing supports quick development of interactive mockups and visualizations, aiding architects, designers, and engineers in conceptualizing user experiences.[1]History and Development
Origins
Processing originated in spring 2001 when Casey Reas and Ben Fry, graduate students at the MIT Media Lab's Aesthetics and Computation Group, sought to create a programming environment tailored for visual artists and designers.[1] As members of John Maeda's research group, Reas and Fry built upon Maeda's earlier Design By Numbers (DBN) project from 1998, which aimed to make programming accessible to non-technical creatives but was limited by its proprietary nature and basic graphical capabilities.[1] They addressed these constraints by leveraging Java's flexibility while simplifying its syntax and setup, enabling rapid prototyping of visual and interactive works without the complexities of traditional software development.[6] The project emerged as part of Reas and Fry's thesis work at MIT, focusing on bridging computational thinking with artistic expression to empower users untrained in programming.[6] This initiative reflected a broader motivation to democratize technology, drawing from the Media Lab's legacy in exploratory computing tools like the Visual Language Workshop founded in 1975.[6] By fall 2001, Processing was sufficiently developed for initial public engagement, with Fry teaching the first workshop at Musashino Art University in Tokyo.[6] At its core, Processing was founded on principles of simplicity, open-source collaboration, and the integration of art and technology to foster creative experimentation.[1] Reas and Fry emphasized intuitive tools that prioritized immediate visual feedback over verbose code, encouraging a culture of sharing sketches and libraries to build a supportive ecosystem for learners and practitioners alike.[1] This approach not only lowered barriers for artists engaging with code but also positioned Processing as a catalyst for generative art and design innovation.[6]Milestones and Releases
Processing's development began with its initial alpha release on August 9, 2001, marking the start of a project initiated by Casey Reas and Ben Fry at the MIT Media Lab.[7] The first stable version, Processing 1.0, was released on November 24, 2008, after years of beta testing and community feedback, providing a mature IDE and language for visual arts programming.[8] This release solidified Processing as an accessible tool, with subsequent minor updates like 1.5.1 on May 15, 2011 focusing on stability for legacy users.[9] Major version updates introduced significant enhancements. Processing 2.0 launched on June 3, 2013, emphasizing improved performance through better rendering and syntax support, alongside expanded library integration for broader creative applications.[10] Version 3.0 arrived on October 1, 2015, shifting to a modular architecture that facilitated easier extensibility and added native support for platforms like Raspberry Pi with hardware acceleration.[11] Processing 4.0 was finalized on August 9, 2022, incorporating Java 17 compatibility, a redesigned user interface for modern workflows, and optimizations for cross-platform deployment.[12] The latest stable release, 4.3.1 on November 12, 2024, included bug fixes for core functionality and accessibility improvements such as better screen reader integration, followed by 4.4.10 on October 14, 2025, which addressed maintenance issues in the build system.[13][14] Organizationally, Ben Fry served as the long-term lead developer since the project's inception, guiding its evolution until his resignation from the Processing Foundation in October 2023 due to disagreements over the organization's priorities and use of donation funds for software development.[15] Fry has continued to contribute to the Processing software independently since then. The Processing Foundation, established in 2012, formalized the shift to fully open-source governance, enabling community-driven development.[6] Since the 2010s, contributions via GitHub have grown, with the main repository fostering collaborative bug fixes, feature additions, and mode enhancements through pull requests and issues.[16] From 2020 to 2025, developments emphasized steady maintenance over radical changes, with updates to web export tools improving JavaScript mode compatibility for browser-based sketches.[17] Integration with modern hardware, including Raspberry Pi, saw refinements in Processing 3 and later for seamless embedded applications.[18] A notable derivative milestone was the launch of p5.js in 2013, a JavaScript library extending Processing's principles to web development.[6]Technical Components
Language Features
Processing is a programming language that functions as a simplified subset of Java, optimized for visual and interactive applications within the arts and design fields. Its syntax adopts an imperative style, consisting of straightforward statements to declare variables, perform calculations, and issue drawing commands that render directly to a digital canvas. Central to its structure are predefined functions such assetup(), which runs once at startup to configure initial parameters like canvas size and frame rate, and draw(), which executes in a continuous loop to handle updates and animations at a consistent frame rate, typically 60 frames per second unless adjusted. This looping mechanism provides real-time visual feedback, distinguishing Processing from static programming environments and facilitating rapid iteration in creative workflows.[19][20][4]
The language incorporates event-driven paradigms to manage user interactions, featuring built-in handlers like mousePressed() for detecting clicks, mouseMoved() for tracking cursor position via variables such as mouseX and mouseY, keyPressed() for keyboard input, and keyReleased() for release events. Graphics form a core capability, with extensive libraries for 2D primitives including ellipse(x, y, width, height) to draw ovals and rect(x, y, width, height) for rectangles, alongside 3D shapes like box(size) and sphere(radius). Transformation functions such as rotate([angle](/page/Angle)) and translate(x, y) enable spatial manipulations, while color systems support RGB as the default mode and HSB via colorMode(HSB), with utilities like fill(c) and stroke(c) to apply hues, saturation, and brightness values. These elements allow for immediate visual experimentation without complex boilerplate code.[21]
Data handling emphasizes simplicity, supporting primitive types (integers, floats, booleans), arrays declared as int[] values = {1, 2, 3};, strings for text manipulation, and PImage objects for loading and processing images with functions like loadImage("filename.jpg"). Basic mathematical operations are accessible through functions such as sin(radians) for trigonometric sine and random(low, high) for generating values within a range, supporting procedural patterns and randomness in visuals. Although sketches typically avoid object-oriented constructs for quick prototyping, Processing fully supports Java's object-oriented features, including class definitions, inheritance with extends, and object instantiation using new, enabling modular code organization for larger projects. This blend of imperative sketching and extensible paradigms underscores Processing's role in fostering accessible, frame-rate-driven animations and interactive experiences.[22][23]
Integrated Development Environment
The Processing Development Environment (PDE) serves as the primary interface for developing sketches in Processing, offering an intuitive layout designed to facilitate rapid prototyping of visual and interactive applications. Key interface elements include a tabbed text editor that supports multiple files per sketch for organizing code, a message area that highlights syntax errors and compiler feedback in real time, a console section for displaying output from functions such asprint() and println(), and a dedicated preview window that launches automatically to render 2D or 3D graphics upon execution. This setup emphasizes simplicity, allowing users to focus on creative coding without complex setup.[24]
At its core, the PDE integrates essential tools for compilation, debugging, and distribution. The built-in compiler leverages the Java toolchain to process .pde files into executable bytecode when the Run button is activated, ensuring seamless integration with Processing's Java-based mode. Basic debugging features enable setting breakpoints to pause execution and inspect variable states, accessible through the Debug > Enable Debugger option. Export functionalities, invoked via File > Export Application, generate standalone executables or web-optimized outputs, supporting deployment across platforms without additional configuration.[24]
The workflow in the PDE is centered on efficient sketch management and iteration. Sketches are stored in a dedicated Sketchbook folder, initiated by File > New, with tabs allowing easy switching between files like the main .pde and supporting assets. Auto-completion for built-in functions and variables activates via Ctrl+Space (after enabling in Preferences > Editor), streamlining code entry. Integrated reference access, through Help > Reference or in-editor search, provides instant documentation for libraries and commands, while adding resources like images occurs via Sketch > Add File to populate the data subfolder automatically. The editor also offers syntax highlighting to support Processing's language constructs, aiding readability during development.[24]
Updates in Processing version 4.0 and subsequent releases have enhanced the PDE's usability and consistency. A new Theme Selector (Tools > Theme Selector) introduces customizable color schemes, including dark mode, to reduce eye strain and align with modern development preferences across Windows, macOS, and Linux installations. Cross-platform support has been refined for better consistency, with native compatibility for Apple Silicon and Raspberry Pi architectures, alongside hundreds of bug fixes for interface stability. Font rendering benefits from updated tools like Create Font (Tools > Create Font) and the createFont() function, which generate vector-based fonts for sharper, more efficient on-screen display in the preview window. Workflow improvements include relaxed sketch folder naming rules, configurable via Preferences, to better accommodate version control systems like Git.[25][26][24]
Modes and Extensibility
Processing offers several programming modes that extend its core Java-based environment, allowing users to write code in alternative languages while maintaining access to the IDE's visual feedback and tools. The default Java Mode provides the standard Processing syntax built on Java, but additional modes can be installed through the Contribution Manager. Python Mode, developed via the Processing.py project, enables sketches using Python syntax and leverages Jython for compatibility with Processing's Java underpinnings, making it suitable for users preferring Python's readability for prototyping visual ideas.[27] The p5.js Mode integrates JavaScript support, allowing code written in Processing's style to be exported and run in web browsers via the p5.js library, which translates Processing functions to HTML5 Canvas and WebGL rendering. This mode facilitates seamless transition to web-based creative coding without altering core logic. Android Mode, another official extension, adapts Processing sketches for mobile development on Android devices, incorporating device-specific features like touch input and sensors while compiling to APK files. These modes are managed through the IDE's "Manage Modes" menu, introduced in Processing 4 for streamlined installation and updates.[28] Extensibility in Processing is primarily achieved through its robust library system, which allows integration of community-contributed code to add functionalities beyond the core graphics and animation capabilities. Libraries are installed via the IDE's Contribution Manager under "Manage Libraries," which connects to a centralized repository of approved contributions. Notable examples include Minim, an audio library for real-time sound synthesis, analysis, and playback, and ControlP5, which provides customizable user interface components like sliders and buttons for interactive applications. Over 200 official and unofficial libraries exist, spanning categories such as video processing, networking, and artificial intelligence; for instance, GSVideo handles video capture and playback using libraries like GStreamer or QuickTime.[29][30] Users can further extend Processing by developing custom libraries in Java, which are structured as JAR files with accompanying documentation and examples. These user-defined libraries integrate directly into sketches via import statements and can be shared through the community. The contribution process involves submitting proposals via GitHub issues to the Processing Foundation's contributions repository, where maintainers review and add them to the official list for inclusion in the Contribution Manager. An example of such extensibility is the integration of ml5.js for machine learning in the p5.js Mode, enabling accessible AI features like image classification and pose detection in browser-based sketches without requiring external servers.[31] From 2020 to 2025, Processing 4 introduced enhancements to mode stability, including better compatibility with Java 17 and fixes for runtime errors in non-Java modes, ensuring more reliable execution across platforms. Updates also refined the library management system, with improved download handling and validation scripts to support growing contributions. While core renderers like P3D already leverage WebGL for 3D graphics, recent community libraries have expanded shader capabilities for advanced visual effects, and efforts toward accessibility include better high-DPI rendering and tooltips in the IDE. These developments, detailed in release notes, underscore Processing's ongoing evolution to support diverse creative workflows.[32][33]Practical Usage
Basic Examples
Processing provides a straightforward entry point for beginners through simple sketches that leverage its core structure: thesetup() function for initialization and the draw() function for continuous rendering at a specified frame rate. These functions form the backbone of every Processing program, allowing users to create visual output without complex boilerplate code.[34]
Hello World Example
A quintessential starting point is drawing a basic shape, such as an ellipse, to verify the environment is functioning correctly. The following minimal sketch illustrates this:ellipse(50, 50, 80, 80);
ellipse(50, 50, 80, 80);
setup() and draw() functions are implicitly handled by the IDE for such basic cases, running the code once in setup() to set the canvas and repeatedly in draw() for static output.[34]
To understand the structure, consider an expanded version that explicitly clears the background for consistent rendering:
void setup() {
size(640, 360);
}
void draw() {
background(255);
ellipse(50, 50, 80, 80);
}
void setup() {
size(640, 360);
}
void draw() {
background(255);
ellipse(50, 50, 80, 80);
}
setup() establishes a 640 by 360 pixel window, while draw() sets a white background (255 represents full white in RGB values from 0 to 255) and draws the ellipse each frame, preventing artifacts from prior renders. The output is a static white canvas with a black circle in the top-left quadrant. Common pitfalls for beginners include omitting the semicolon at the end of statements, which triggers syntax errors displayed in red in the IDE's message area, or forgetting background() calls, leading to overlapping drawings in looped executions. Running the sketch via Ctrl+R (Cmd+R on macOS) displays the result in a new window; stopping it requires clicking the square stop button or closing the window.[34]
Interactivity Basics
Processing excels in enabling immediate interaction, such as responding to mouse movements, which introduces dynamic behavior without advanced event handling. A fundamental example tracks the mouse position to draw a following shape, demonstrating variables likemouseX and mouseY that automatically update with cursor coordinates relative to the window's top-left origin.
Consider this sketch for a color-changing circle:
void setup() {
size(480, 120);
}
void draw() {
if (mousePressed) {
fill(0);
} else {
fill(255);
}
[ellipse](/page/Ellipse)(mouseX, mouseY, 80, 80);
}
void setup() {
size(480, 120);
}
void draw() {
if (mousePressed) {
fill(0);
} else {
fill(255);
}
[ellipse](/page/Ellipse)(mouseX, mouseY, 80, 80);
}
setup(), the window size is set to 480 by 120 pixels. The draw() loop, executing approximately 60 times per second by default, checks if the mouse button is pressed using mousePressed; if so, it fills the ellipse black (0), otherwise white (255). The ellipse() is then positioned at the current mouseX and mouseY. The result is an interactive circle that trails the mouse cursor and toggles color on click, providing visual feedback. Beginners often overlook the need for a background() call if persistence is desired (e.g., to trail the path), as omitting it causes shapes to accumulate; adding background(204); at the start of draw() would clear the canvas each frame. Additionally, mouseX and mouseY remain at their last values if the cursor leaves the window, avoiding erratic jumps.[34]
For drawing lines based on mouse movement, a simpler variant uses pmouseX and pmouseY to connect previous and current positions:
void setup() {
size(640, 360);
stroke(255);
}
void draw() {
background(51);
line(mouseX, mouseY, pmouseX, pmouseY);
}
void setup() {
size(640, 360);
stroke(255);
}
void draw() {
background(51);
line(mouseX, mouseY, pmouseX, pmouseY);
}
51) and white stroke, drawing a short line segment from the prior frame's mouse position to the current one, creating a trail effect when moved quickly. The output simulates freehand drawing, with line thickness controlled by default settings (1 pixel). A frequent error is not initializing stroke() or background(), resulting in invisible or cluttered lines; testing in the IDE reveals these issues promptly.[35]
Animation Introduction
Animation in Processing arises naturally from thedraw() loop's repetition, combined with time-based variables like frameCount, which increments each frame starting from 1 after setup(). This enables smooth motion by updating positions or properties incrementally, typically at 60 frames per second unless adjusted via frameRate().
A basic example animates a circle's horizontal position using the sine function for oscillatory movement:
void setup() {
size(640, 360);
}
void draw() {
background(255);
float x = sin(frameCount * 0.01) * 100 + width / 2;
ellipse(x, height / 2, 80, 80);
}
void setup() {
size(640, 360);
}
void draw() {
background(255);
float x = sin(frameCount * 0.01) * 100 + width / 2;
ellipse(x, height / 2, 80, 80);
}
setup() creates a standard window, and draw() clears to white before calculating x as the window's center (width / 2) plus a sine wave offset: sin() takes radians derived from frameCount * 0.01 (a slow multiplier for smooth cycling) scaled by 100 pixels for amplitude. The ellipse centers vertically at height / 2 and oscillates left-right. The output shows a circle waving sinusoidally across the canvas, completing a full cycle roughly every 628 frames (since 2π radians ≈ 6.28, and 0.01 scaling yields 628 steps). To set a consistent pace, add frameRate(30); in setup() for 30 FPS. Pitfalls include choosing too large a multiplier (e.g., 0.1 causes rapid flickering) or neglecting background(), which leaves a growing trail; beginners should experiment with values in the IDE to observe effects, using println(frameCount); in draw() to monitor timing in the console.[36][37]
Advanced Applications
Processing has been extensively applied in data visualization to handle and render complex datasets, leveraging built-in functions likeloadTable() for CSV files and loadJSONObject() for JSON parsing to create dynamic charts and graphs. For instance, a typical workflow involves loading a JSON dataset containing fields such as species names and population metrics, extracting values with methods like getString() and getInt(), and plotting them as interactive bar charts or scatter plots using Processing's drawing primitives; this approach enables real-time updates based on user input or live data streams.[38][39]
In interactive installations, Processing integrates seamlessly with hardware like Arduino to create responsive physical computing environments, where sensor data drives visual outputs. A representative case study is an ultrasonic sensor-based project where Arduino captures distance measurements via serial communication, mapping them to parameters such as animation speed and line thickness in a Processing sketch that generates spiraling geometric patterns; user proximity alters the artwork in real time, demonstrating Processing's role in bridging digital visuals with physical interaction.[40]
Generative art in Processing often employs advanced techniques like recursion and Perlin noise to produce organic, evolving patterns without explicit user control. An advanced sketch might use recursion to draw self-similar structures, such as branching trees, by defining a function that calls itself with scaled-down parameters until a base case is reached, combined with Perlin noise for natural variation— for example, generating terrain-like forms where noise values, computed as noise(x * 0.01), modulate branch angles or densities to mimic fluid, non-repetitive growth.[41]
Notable projects highlight Processing's impact in artistic practice. Jared Tarbell's Substrate (2003) simulates crystal growth on a computational grid using iterative perpendicular line extensions governed by simple rules, structured around loops that spawn and propagate line segments until a density threshold is met, resulting in intricate, city-like emergent structures across resolutions like 900x900 pixels with 350 objects.[42] Similarly, Joshua Davis's works, such as those utilizing his HYPE library for Processing, explore algorithmic image-making through vector-based interactions and dynamic frameworks, enabling early web art experiments with randomized particle systems and layered compositions that evolve based on procedural rules.[43]