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
1
vote
0 answers

Moving objects in processing

I made a program of interactive traffic lights, basically there is an intersection between two roads and there are 4 traffic lights and 4 cars, one of them going from right to left, another from left to right, another from top to bottom, and another…
1
vote
3 answers

Variables using "random()" change everytime they are called

I am drawing a colored object with random RGB color values via the background() function in Processing, waiting half a second, and then changing the position of the RGB values (e.g. swapping R with B, etc): void draw() { z = float(random(255)); …
1
vote
1 answer

Fill under randomly generated hills

PImage ball; void setup(){ size(600,500); background(255); ball = loadImage("ball.png"); } void draw(){ float oldx = 0; float oldy = 0.5*height; int dif = 1; for(float x = 0; x < width; x++) { float y =…
Joe Smith
  • 11
  • 2
1
vote
1 answer

Code is not changing background every half a second

The title sums it up. I'm also a newbie to processing, so please, explain my error to me like I'm 5. void setup(){ size(500,500); int(q=1) } void draw(){ if(q>0){ float(z=random(255)); float(x=random(255)); …
1
vote
1 answer

How can I make the vector points of each line move into the center?

I was making a Java processing code that basically records where 20 of your mouse clicks and draws lines that connect the vector point of each mouse click to the center of the screen, which in this case is 600x600. I was able to create the lines but…
Crystallean
  • 125
  • 7
1
vote
1 answer

My "final PVector" variable is changing every frame, why?

Well, honestly, I have no idea what's gone wrong here, I've looked through all of my code and couldn't find any assignments or anything like that, and after Bing AI couldn't help, I don't what I did wrong. Anyway here's my code: import…
1
vote
1 answer

Drawing spheres Processing

I'm working on a sketch where I'll need to draw a lot. of spheres, but I think I'm missing something about how their coordinates work. In this example I'm trying to draw a line of spheres, equally distant apart on the x-axis. I can draw the spheres…
Ben Delany
  • 75
  • 10
1
vote
0 answers

P5 intersection of a vector in a PShape type Box

I try to have a function who can detect intersection of a vector in a PShape of type Box. I create a function GetIntersection for that. It work for all box's faces execept for Front and Back faces. public PVector getIntersection(PVector…
1
vote
0 answers

What kind of data populates the array when you call the "PImage.get(x, y, length, width)" function?

I'm currently trying to consistently monitor a specific area of a PImage for it's color values, and pull XY coordinates of the first pixel to flag a change. Example: A thresholded video is playing, I want to monitor a specific area, and pull the…
1
vote
1 answer

SkiaSharp performance worse than Processing?

Edit: The F# code has been updated such that it only uses the Silk.NET and SkiaSharp NuGet packages. It reproduces the same lower performance. In Processing, you can find a performance example demonstrating the rendering of 50,000 lines in an…
bmitc
  • 357
  • 1
  • 9
1
vote
1 answer

Center a sentence onto a canvas using a for loop in processing

still learning I'm trying to get a sentence split into word by word and trying to make it to the center of the canvas in processing anytime when I enter a new sentence. I'm trying to do this using 'for' loops and I can't determine how to position…
1
vote
1 answer

How to mask text box with image in Processing w/ cp5

Within my code, I wanted to overlay the warning_img over the alert_box I have created, however using the mask function produces an error as the alert_box is not an image and needs to stay as a text box as it will be edited later to produce changing…
snj534
  • 21
  • 1
1
vote
1 answer

How can I add a player controlled platform that catches the tetrominoes to my Tetris code?

I'm a student and I was given the task of creating a retro arcade game on Processing (pong, space invaders, breakout, tetris etc.) but with a twist. The twist I thought was to create a Tetris Tower Stacker, which is like Tetris but instead of…
cdy
  • 11
  • 3
1
vote
1 answer

Processing adding random colors to SVG files in a random grid layout

I'm inserting a few SVG files in a grid layout and want the colors to be random. But they're only applying random color to the square SVG object itself, not the shapes within the SVG. Is this something that I needed to embed in the SVG file? I'm…
1
vote
0 answers

Kinect for Processing error when using multiple cameras

I'm trying to run two Kinect V1 cameras simultaneously in Processing 3. I have gotten to a solution that is not sustainable, and am I trying to make something more stable/reliable. At the moment, whenever I try to run both cameras simultaneously on…