Questions tagged [processing]

Processing is an open source programming language and environment for people who want to create images, animations, interactions, and games.

The processing tag is misleading and leads to misunderstandings and even closure votes, because of the seemingly missing language tag. It is strongly recommended to tag questions additionally with a language tag.

But note Processing is not the same as Java.

Processing refers to the language built on top of Java and the minimal IDE it ships with. It is free and open-source, runs on Linux, Mac OS X, and Windows, and can output for screens, print, 3D packages and CNC printing.

The language simplifies a lot of complex concepts and eases the entry of designers, artists and non-programmers to the world of programming.

Over the years it was used to produce a number of astonishing projects ranging from data visualization, to physical computing , games, 3D, sound, live performance, and more.

Due to its vibrant community, Processing not only enjoys a contribution of over 100 libraries, but it is also present on major mobile platforms, such as Android and iOS.

There are online communities for sharing Processing content, like OpenProcessing.

Some websites even allow users to learn and use Processing directly in the browser, like the Flash-driven SketchPatch and the JavaScript-driven Sketchpad and p5.js (pure JavaScript).

There are also Processing ports to the following languages:

Advanced users are not constrained to the Processing IDE; sketches can be run from the command line, and projects can be set up to build and run directly from editors:

6836 questions
5
votes
2 answers

P5.js - Is there a way to cut out an image area?

Is there a way to "cut out" a piece of image and use it with the P5.js library? Example: Lets say I have a image of the size 100x100 but need to get a 10x10 pixel cutout that starts at pixel 50,50 I want to take the resulting 10x10 image and…
Oliver Goossens
  • 1,903
  • 3
  • 20
  • 26
5
votes
3 answers

Processing: How can I improve the framerate in my program?

So I've been working in Processing for a few weeks now, and, though I'm not experienced in programming, I have moved on to more complex projects. I'm programming an evolution simulator, that spawns creatures with random properties. Eventually, I'll…
Mike
  • 963
  • 4
  • 16
  • 38
5
votes
2 answers

Processing & OpenGL - Changing the camera position?

I'm doing a small project where I plot data sets onto a world. I've got the plotting done. Now I want to implement camera movement. I have some code where if a user holds down c and drags the mouse, the camera position is changed. The thing is, I'm…
Gabe Riddle
  • 131
  • 3
  • 5
5
votes
1 answer

How to display .obj file with .mtl in Android using Processing

I want to run a Processing sketch on Android mode where I load and display an .obj file. In Java mode it works perfectly but in Android mode the .obj geometry shows up without the materials (.mtl file). My .obj and .mtl(including png textures) are…
uip luis
  • 51
  • 4
5
votes
1 answer

Saving an image from Android Processing Sketch

I'm trying to save an image from my Android Processing sketch but I get an error. How can I save my sketch to an image file in the user's phone gallery? public void draw(){ beginShape(); for (int i=0; i
Martin Erlic
  • 5,467
  • 22
  • 81
  • 153
5
votes
2 answers

How to get performance increases using Processing for Android?

I have converted a few of my Processing sketches into Android apps, but they seem to run really slowly in the emulator and on my device. Are there any tips on how to increase the speed and performance of my sketch running as an Android app? Are…
Adam Harte
  • 10,369
  • 7
  • 52
  • 85
5
votes
1 answer

Start Shell Script in Java and destroy all processes on Exit

I need some special kind of setup to controll a LED Wall. Sadly i cant really change the programming language i use. My setup looks like this: Processing (some crazy java fork...) Sketch starts after Boot Process. The Processing Sketch scans a…
5
votes
1 answer

How can I make window smaller than 100 pixels

I try to make a status bar on the bottom of my screen, but the window can not be made less than 100 pixels. I'm working on Processing 3.0.1. I use the following code void setup() { surface.setResizable(true); surface.setSize(300, 20); …
Johntor
  • 587
  • 11
  • 26
5
votes
1 answer

Embed processing 3 into swing

I'm trying to integrate Processing 3 into a swing application, but because PApplet doesn't extend Applet anymore I can't just add it as a component right away. Is there anyway of embeding a Processing 3 sketch into Swing, it would be enough if I…
Cooki3Tube
  • 107
  • 1
  • 10
5
votes
2 answers

SimpleDateFormat always returns 1970.01.17 with wrong timezone

I have been using Processing 3.0, and I am trying to print a simple timestamp when my Arduino outputs certain values, but it is not working. I tried to use SimpleDateFormat, but it always returns 1970.01.17 17:48:35 GMT, rather than the actual time.…
MKII
  • 892
  • 11
  • 36
5
votes
2 answers

Processing- how to write; "On mouse click in region". For effect of clicking a button

I was wondering why this code doesn't work as intended. void mousePressed() { if (mouseX > width-50 && mouseX < width && mouseY > height-50 && mouseY < height) { img = loadImage("doraemon.png"); image(img, 0, 0, width,…
bisuke
  • 219
  • 3
  • 13
5
votes
1 answer

Unhandled exception type: InstantiationException in processing.org

I'm trying to do a simple Class.newInstance() from within processing, but I'm failing :( EDIT: as below instructed, the reason it didn't work was that Processing wraps all code into a class making all declared classes internal classes. The java …
Thijs Dalhuijsen
  • 768
  • 6
  • 14
5
votes
2 answers

Uniform point arrays and managing fragment shader coordinates systems

My aim is to pass an array of points to the shader, calculate their distance to the fragment and paint them with a circle colored with a gradient depending of that computation. For example: (From a working example I set up on shader…
Giuseppe
  • 379
  • 4
  • 13
5
votes
1 answer

Function arc() doesn't render right in p5.js

I am just making a little program with p5.js, but I found something weird. The arc() function doesn't seem to render correctly when the size is quite big. Here is my code: var ellipseSize = 200; var strokeSize = 60; for(var j=0;…
Art2B
  • 185
  • 1
  • 17
5
votes
1 answer

GLSL, passing functions

I wrote a simple Sphere Tracer in Processing (Java) and am porting it to WebGL / GLSL. When I wrote it in Processing I had a base class Shape and would extend it for specific shapes such as Box, Plane, Sphere, etc. Each specific shape had members…
asimes
  • 5,749
  • 5
  • 39
  • 76