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

UDP Sockets Processing

I am writing the server side of an UDP Socket in Processing and encountering a NullPointerException every time on the line DatagramPacket receivePacket = new DatagramPacket(receiveData, 4096);. The client side is a Python file. Here is the code for…
dawnoflife
  • 1,572
  • 10
  • 42
  • 62
1
vote
1 answer

Is there a way to append an array of objects in processing?

According to Processing's documentation, you can append an array of objects the same way, as you append any other array. I'm doing exactly that, but I get an error: cannot convert from Object to sketch_220416a.planet[] Here is a minimal,…
szg12345
  • 45
  • 8
1
vote
1 answer

Drawing a smooth line in p5js

I have a function that I created which draws a line from the coordinates of its first argument to the coordinates of the second argument. The code runs the function using the mouse coordinates as the argument for the function. However, I am having…
1
vote
0 answers

Moving drawn shape to the location where the mouse is clicked using select button in processing

The current project allows me to draw and select the drawn shape, what I would like to do is once I press the button select and click on the shape, I would like to move the shape to the location where the mouse is clicked. As seen in the example…
Muhammad_786
  • 33
  • 1
  • 5
1
vote
2 answers

Cannot find a class or type named “Circle”

I'm not sure why "Circle" isn't being recognized in my code. The error that shows up in Processing says "Cannot find a class or type named “Circle”" I am trying to take values that are taken from a sensor (through Arduino) & visualize them in…
yoggocup
  • 25
  • 4
1
vote
2 answers

Processing isn't loading videos

I'm using Processing 4.0b7 (also tried with previous versions), and installed its Video Library. I have the following code (Im literally just trying to play a video): import processing.video.*; Movie video; void setup() { size(640, 480); video…
1
vote
2 answers

Create custom drawing tool with processing

I am currently in the process of coding a kind of drawing tool in Processing. I want to be able to draw a black line with the mouse, but have it fade away again. For this I first thought of working with a black ellipse that fades from black to…
Cyrill
  • 833
  • 2
  • 6
  • 16
1
vote
1 answer

How to make parameters change a function when calling it?

I want to create a function that can generate two balls that rise at different speeds. I used the parameters of the speed in which it rises called change and another parameter of its x coordinates called x, so that they don't originate from the same…
1
vote
0 answers

Code not lighting every LED in Adafruit Neopixel, using Processing and Arduino

I'm trying to use Processing to find the average rgb value of my computer screen in sections, and sending that data to Arduino to light my 60 LED strip. The code for changing the colors of the strip to match my computer screen is working, but only…
1
vote
1 answer

Why do the lines (muscles) not line up with part3 (blue)?

https://i.stack.imgur.com/5E2IN.jpg The lines (muscles) start out in the center as I want. (This video starts out a second or two into the sketch.) Why do the muscles not line up with the center of part3 (Blue circle)? Is it simply a trigonometric…
1
vote
0 answers

Can I use an equation to change variable values while keeping a separate variable at constant value?

I want to make a pendulum. I have a line with a ball fixed to both ends of the line. Ball1 is fixed in place. I want ball2 to "fall" (move down the screen) and I want it to "swing" on the line. AKA I want the ball to move down and I want the line to…
1
vote
1 answer

rotate squares with push/popmatrix and for loop

Im trying to make each square in my grid randomly rotated, so each one has a diffrent angle, but instead i rotate all of my squares. I dont understandt why, as both the rotate and the rect is drawn once at a time inside of the for loop? int xStep =…
Soma Juice
  • 369
  • 1
  • 11
1
vote
1 answer

Vector path blending in JavaScript or Processing

I am trying to write some software that will do something similar to Adobe Illustrator's blend tool. The goal is to create new paths using stored paths as base ingredients at different weights (i.e. 30% path1 70% path2). For those unfamiliar, the…
Saiato
  • 257
  • 1
  • 3
  • 14
1
vote
1 answer

processing error (It looks like you're mixing "active" and "static" modes.)

It looks like you're mixing "active" and "static" modes. I want to play two figures different direction. I am a beginner and need help in understanding what to do wiht the error. int x,y; int diam; int xdir; int z,r; int zdir; int extent; void…
seung1717
  • 11
  • 1
1
vote
1 answer

Processing Picking up ellipse from screen

I have a project that creates an array list of balls (ellipses). When I press my mouse down (left button) and hold it an ellipse follows my mouse. When I let go the ellipse is placed on the screen where my mouse was. I wanna be able to right click…
Jane
  • 17
  • 5
1 2 3
99
100