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

When clearing background, rect moves

So i've used a rect to divide the screen for two different background colours. The code im writing is for a minigame and its supposed to move a bubble up the screen, but when I click my mouse the rect I used to divide the screen moves as well. I…
Kronixzz
  • 13
  • 2
1
vote
1 answer

What should I do in my code in order to make a collision detection between a PNG sprite and a drawn circle occur in Processing 3 (Java)?

I have been coding a significantly simple game for my academic work in which the PNG bee sprite is meant to run away from the orange ball. If the bee collides with the orange ball, she dies. Apart from this, I intend to include a timer that keeps…
1
vote
1 answer

Smooth Movement Issues with Processing 4

I am writing a program where small 'birds' move around and follow your cursor. The instances don't rotate or anything fancy and I'm having a very unusual problem. If the instance is on the same X-level or Y-level it oscillates. I've come across this…
SKLR
  • 13
  • 6
1
vote
1 answer

How can I number a point list in p5.js

is it possible to number a list of points in p5.js? Right now I am using ml5.pj for face mesh detections, which outputs x and y coordinates for a set of 465 points. I want to select a few. In order to do that, I need to know what are the…
ibib
  • 109
  • 5
1
vote
1 answer

Can't start a Processing sketch window unless it's in the same file as main(String[] args)

I'm working in a project in IntelliJ with the Processing library imported. I have two files, StartUpGUI.java, and Renderer.java. If I ignore the first file and put this in Renderer.java, the sketch runs perfectly. public class Renderer extends…
1
vote
1 answer

Shape union in processing?

I'm learning processing and trying to create an SVG file containing a complex shape (path) which should be a union of a hexagon and a rectangle. But, unfortunately, I can't find any set operations on PShape.
kelin
  • 11,323
  • 6
  • 67
  • 104
1
vote
1 answer

How to make objects of the same class interact with each other?

I have a single class Part and two objects from this class part1 and part2. I would like to be able to have these objects bounce off of each other when they collide using methods. I am able to do this with functions outside the class, but would like…
1
vote
1 answer

Smooth 2d turret rotation accounting for wrapping

I wish to make a turret in a 2d game, which should rotate smoothly to the angle of the mouse. I came up with two solutions but neither are satifactory. The first: currentRot = targetRot; // Produces snapping + doesn't look realistic The second,…
Jomity
  • 56
  • 8
1
vote
1 answer

Arduino and Processing code error "disabling serialEvent()"

I am facing the following error in Processing. I'm using Windows 10, Processing version 3.5.4, and Arduino version 1.8.16. Error, disabling serialEvent() for COM3 null Processing code: import processing.serial.*; import…
1
vote
1 answer

Using Ani Library on Objects (Processing)

I am currently working with the Ani Library in Processing. I'm trying to fade in some rectangles one by one (on a PGraphics). To let the rectangles appear I use a loop - whose size I can control with MouseX. So one rectangle appears after the other.…
Cyrill
  • 833
  • 2
  • 6
  • 16
1
vote
0 answers

p5.js: How to get shapes based on random points and Bézier curves without crossing?

I would like to generate similar shapes like that with p5.js:
Anna_B
  • 820
  • 1
  • 4
  • 23
1
vote
3 answers

Export Application in Processing 4 fails with error message

I'm trying to export the game I'm working on in Processing 4 as a windows executable. The code itself is working fine, I can post all of it if necessary, but when I try and export it I get the following error: java.lang.NullPointerException: Cannot…
WolfyD
  • 865
  • 3
  • 14
  • 29
1
vote
1 answer

Creating GIF but cannot see filenames os glob

Goal: export this output as a GIF. This is working code, using Processing and Python. I am stuck with reading the image filenames to create a GIF. I downloaded gif-animation-3.0 and placed it in libraries folder. Attempted Solution: import…
DanielBell99
  • 896
  • 5
  • 25
  • 57
1
vote
1 answer

Processing is not creating "applet" folder when I export an sketch

I have a very simple code in Processing (it can be found in Visualizing Data by Ben Fry): void setup() { size(400,400); stroke(225); } void draw(){ line(15,25,mouseX,mouseY); } void mousePressed(){ background(192,64,0); } But when I…
Santiago
  • 11
  • 1
1
vote
2 answers

PGraphics with background(); in Processing

I am trying to draw ellipses from an array list onto a PGraphics layer. This works so far. However, I need to give the PGraphics layer a white background. The moment I add the background, I can't add any more ellipses by mouse click. I have already…
Cyrill
  • 833
  • 2
  • 6
  • 16
1 2 3
99
100