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
1 answer

Using processing libraries in processing.js

For those that don't know, Processing is a great Java library =for rendering nice visualizations of data and serves as a wrapper for JOGL. Processing.js is the Javascript port of this library. In order to create a processing applet inside HTML, you…
OVERTONE
  • 11,797
  • 20
  • 71
  • 87
5
votes
1 answer

Variable doesn't restart if set to random

The language used is called 'Processo' a weaker and simpler version of Processing used at my school to introduce Java syntax in a visual way. I'm still working on the code, but the overall purpose is similar to crossy road, but the cars are moving…
Anna
  • 55
  • 3
5
votes
4 answers

Processing.js - Sleep, Wait, TimeOut, Pause, Delay?

Is there a sleep() function for Processing.js? If not what would be a suitable alternative to add a delay in the draw() loop? I am using JQuery with Processing - can I use a JQuery or Javascript function to cause a sleep type delay in the…
logic-unit
  • 4,195
  • 12
  • 47
  • 72
5
votes
0 answers

Problem with DFS graph algorithm, wrong loops found

I want to create an algorithm to understand how many closed areas there are in a graph with the relative points, at the moment the problem is that it finds almost all the loops, using a DFS algorithm. However, a problem arises This is my actual…
Klayser
  • 334
  • 4
  • 12
5
votes
1 answer

P5 image gallery animation

I am trying to dynamically load a set of images and translate them in the Z direction at a constant speed while having randomised values for the X and Y I am working with the following code and I am stuck on how to use the image texture property. I…
Ahmed Meeran
  • 105
  • 6
5
votes
1 answer

How to use external libraries in the Eclipse (Java) and Processing for Arduino

I was able to get functionality out of the Arduino through Eclipse following the tutorial Arduino in Eclipse via Processing. However, I did run into a problem; I was unable to use libraries such as the Servo library or a library for EL wire. How…
rickykoter
  • 66
  • 2
5
votes
3 answers

Gradual fading by drawing a transparent rectangle repeatedly

This is a question about Processing.org. I am fading out previously drawn objects by drawing a semi-transparent white rectangle over the view for every frame. However, it appears that they never fade to completely white. The fading has a fixed…
Szabolcs
  • 24,728
  • 9
  • 85
  • 174
5
votes
3 answers

How do I fill a rectangle or ellipse with a gradient in Processing?

I am trying to get my paddles from white to gradient (linear) and the ball to have a radial gradient. Thanks for your help!You can find the code for the paddles in void drawPaddle. This is my goal: This is my code: //Ball int ballX = 500; int ballY…
5
votes
3 answers

how to convert jpeg to tiff file in python

Is there any way to convert .jpeg to .tiff file? If yes, then how to do that? There are many library in Python that can convert file from one format to another. But, I have not found anything for this problem. Thanks in advance!
jony
  • 924
  • 10
  • 25
5
votes
3 answers

Best way for Processing to display graphics on a custom built remote display?

The goal is to use Processing as a scripting environment for creating graphics and to have the output display on a custom display device that is something like an LED light panel. The server running the program will be on a 1U rack. The idea is all…
Todd Hoff
  • 712
  • 5
  • 12
5
votes
1 answer

transforming coordinates while drawing in p5.js

I'm trying to figure out how to make a track for this car game I'm working on. The current issue is that when I'm drawing the track, the coordinates of the drawing get transformed relative to the coordinates of the car. Sorry, it's kind of hard to…
BlackCoffee
  • 159
  • 1
  • 10
5
votes
1 answer

Processing - Rough pixel sorting algorithm stops after a part of the image

I wrote a code for processing and had formerly sorted pixels with selection sort. I have to hand it in and the teacher said it is taking to long like this, so I decided to divide the pixels brightness into parts of 50 and just sort it very roughly.…
5
votes
1 answer

Rotating, inverting and translating a PShape object in Processing

I would like to: translate, invert and rotate a single quadrilateral (PShape object) multiple times then change the height of one of its 2 top vertices so as the whole thing act as an articulated arm that can be bent either to the right or the…
solub
  • 1,291
  • 17
  • 40
5
votes
3 answers

how to calculate the dist() from mouseX, mouseY to a rectangle in Processing

If it was the dist to a point it would be dist(mouseX, mouseY, x, y) for point(x,y) but how can I calculate dist() from the mouse's current position to rectMode(CORNERS); rect(x1,y2,x2,y2); Thanks
Julio Diaz
  • 9,067
  • 19
  • 55
  • 70
5
votes
2 answers

Generate a n-color rainbow palette

I'm trying to generate a rainbow with 15 different colors with (runnable code here): size(360,100); colorMode(HSB, 360, 100, 100); // Hue in degrees in [0, 360], // saturation/brightness in [0, 100] …
Basj
  • 41,386
  • 99
  • 383
  • 673