Questions tagged [processing]
Use this tag for code written in the Processing programming environment based on Java, or one of its ports to other languages.
processing
6,866
questions
-1
votes
1
answer
87
views
MySQL lottery processing best practices
I have a situation with a lottery system with a very high level of processing transactions at a time, let me put you in context:
There are 10 different s draws.
Each draw has many games and each ...
0
votes
1
answer
50
views
How to implement proportional guidance in 2D
I am trying to implement proportional navigation in order to create a missile class that receives the target location every frame update and intercepts it accordingly. I would like the missile to ...
0
votes
1
answer
35
views
Making a 3D grid of points with Processing PeasyCam
I'm trying to create a 3D grid of points in a box using processing with PeasyCam to visualize the box. To make the grid of points, I'm using a method that I've used successfully in 2D.
import peasy.*;
...
2
votes
2
answers
54
views
Adding processing 4 to Intellji IDE
I have downloaded the Processing 4 zip, and unzipped it. Now I added the core.jar library to my project, but it seems like it's messing some libraries, the "gluegen" and "jogl", I ...
0
votes
0
answers
20
views
If I have a png image of a clut(Color Look Up Table), how do I convert it to a 5x4 filter matrix?
Color Look Up Table
I have no idea.I'm not familiar with Color Look Up Table. Has anyone dealt with this kind of problem.I want to convert the color mapping table into a matrix for image processing. ...
0
votes
0
answers
36
views
Running Java program with Added Libraries from Command Line
I've built a simple Java program using some Processing classes, and I'm trying to get them to run from the command line (so I can get them to run on a Raspberry Pi without an IDE). I can get the .java ...
0
votes
0
answers
40
views
Audio device constantly restarting in Processing 4.3 (using PCH intel audio device & Ubuntu 22.04)
I am trying to use Processing 4.3 to play and analyse music.
Unfortunately, I am not able to play any sound or listen to the microphone for more than 1 second. The program is running but the audio ...
0
votes
1
answer
31
views
Seeker or Value Bar Not Snapping?
I am currently working on a project for school and came across an issue. I am currently using Processing.exe for the project. The slider can't seem to snap. I tried following a similar question and ...
1
vote
1
answer
21
views
Processing - Mouse Pressed to generate new values
I have this code to generate a grid of random tiles, using class and object. I want to whenever user press the mouse, canvas will automatically refresh and generate a new art work. And the mousepress ...
0
votes
1
answer
49
views
How can I draw my cursor image in front of everything else?
Im trying to create a MS Paint type application in Processing Java, and as of right now, I am kinda stuck at one part. In my app, I have the shape thats going to be drawn shown as a red transparent ...
1
vote
0
answers
64
views
Array on Python Processing 3.5.4
I'm building a radar. I have some problems with the lines that show where an object is located.
This is how it works now, but I want the different lines to have different values, so I need an array, ...
1
vote
2
answers
95
views
How do I increase the speed of an object inside my java processing app without sacrificing the frames
Okay so I am learning how to make games and stuff in java and I am using processing in that i am trying to generate a ellipse that will move constantly when fired, how I am animating is in draw() ...
1
vote
1
answer
25
views
Multiple class instances sharing the same values
I'm only seeing one car when I run this code
Here's the main code:
Car leafy;
Car honda;
void setup(){
size(1920, 1080);
leafy=new Car(0,900);
honda=new Car(400, 500);
}
void draw(){
...
1
vote
1
answer
58
views
Fly Swatter in Processing - Almost works
The task is create a fly swatting game in Processing where a fly appears at a random location on the screen, once the fly is swatted it is replaced with the image of a swatted fly, and another fly ...
-3
votes
1
answer
68
views
why do they rotate together?
MovingMark[] mks = new MovingMark[20];
void setup(){
size(800,600);
smooth();
colorMode(HSB, 360, 100, 100);
for(int i=0; i<mks.length; i++)
mks[i] = new MovingMark();
}
...
0
votes
0
answers
21
views
How do I change the camera cent in processing?
I'm creating a 2d minecraft game, and I need to move the center of the camera, for example, set the camera cent to 0.0 and the center of the window will be 0.0
I searched for information on the ...
1
vote
1
answer
92
views
I want to run Python processing in VS Code but processing-py.jar does not exist
I would like to be able to processing on VS Code since it's just a better IDE and it would make what I am doing right now faster.
I searched many tutorials up but they all require you to have the ...
1
vote
3
answers
67
views
Reading serial values on Processing using python
I'm making a radar for a school project and it's the first time I use Processing. I have some knowledge in python so I used that language.
I searched online and I couldnt find a solution.
This is the ...
0
votes
1
answer
27
views
How do I shuffle these blocks and make a win/loss game-state?
I'm trying to code this game in processing where you have to click on four tiles in the correct order. If you click on the tiles in the correct order, it's supposed to display "You won!" in ...
1
vote
1
answer
54
views
How to read and process big csv file fast and keep memory usage low in java?
Use case
Huge CSV file ~500MB that needs to be read very fast and to not load the meemory with.
Ideea that I used.
Read the csv line by line and save the transformed data directly into the database. ( ...
0
votes
1
answer
39
views
Why does the shadow appear above the image in this p5.js code?
I'm trying to draw a shadow effect below an image using p5.js, but the shadow is appearing above the image instead. Here's my code:
function setup() {
createCanvas(windowWidth, windowHeight);
}
...
0
votes
1
answer
25
views
How to fix rendering issue when rotating an arc in processing?
I am trying to make a yin yang that rotates around its center, and I have figured out all the code for it. Except when I start rotating the yin yang, one of the white arcs that I have drawn has a very ...
1
vote
1
answer
214
views
Kinect V1 not connecting to Kinect Studio v1.8.0
I am currently facing an issue with Kinect V1 and Kinect Studio v1.8.0. Despite attempting to connect, I encounter the following error message: "Please launch a Kinect-enabled app and then press ...
2
votes
1
answer
53
views
How to create a 2d top-down movement system where moving while holding two keys is possible in processing?
So, Im trying to teach myself how to make smaller games and I wanted to make a top-down game. I'm still generally new to coding so my code isn't the best. I am trying to create a movement system, but ...
2
votes
0
answers
49
views
How to fix the problem on converting ShaderToy color to Processing?
I am trying to convert this ShaderToy shader https://www.shadertoy.com/view/XsG3z1 to the Processing, but the processing seems to have different color channel, as shown below:
In Shadertoy shader by ...
0
votes
0
answers
38
views
2d UI elements in a 3d environment in Processing
I'm making a basic minecraft-style 3d game, and I'm trying to add UI. I set up the game using the built in camera() function, not peasycam, which is what all the answers I've seen are for. I want to ...
0
votes
1
answer
96
views
Using A* to Create Procedurally Generated Rooms in Processing
I've been working on this Processing project for a couple days and have a couple questions. First I'll show you where I started and how I got to where I am.
I first began by using a variation of the A*...
-1
votes
2
answers
82
views
Having some issues with Void Draw in Processing
void setup() {
size(500,500);
background(#87ceeb);
fill(#567d46);
rect(0,height/2,500,height/2);
fill(#FFA500);
circle(50,50,75);
// Cloud 1
noStroke();
fill(#...
1
vote
1
answer
100
views
Understanding NAudio and converting buffer to floats
I create my capture passing in the samplerate(48000) and Channels(2)
capture = new WasapiLoopbackCapture(device);
capture.WaveFormat = WaveFormat.CreateIeeeFloatWaveFormat(SampleRate, Channels);
// ...
0
votes
0
answers
28
views
Processing ZoomOut
I am currently developing a simple 2D map with terrain and other stuff, but I have encountered a problem relative to the zoom. In fact I can zoom in without any problem, but when I try to zoom out the ...
0
votes
0
answers
32
views
I struggle with a basic feedback delay network
Im working on a basic fdn reverb in Matlab. I managed to do a feedforward which was really easy but I kinda struggle with a feedback. Below you can see my code and tell me if it is even right. The ...
0
votes
1
answer
33
views
i cant seem to find the syntaxerror in setup and draw in this flowfield sketch
this is my first post on stackoverflow and I am also quite new to Java, I made a sketch in processing 4.3, (first in python mode, which did actually work, then i made this Java version) that generates ...
1
vote
0
answers
44
views
How to do bulk search and replace changes in your entire codebase based on rules?
It happened I need to add (or change, or change order) a new function "FunctionB()" into an existing code base (php files, ie. text files) based on rule like the following: in the main ...
0
votes
0
answers
80
views
How to calculate ODS, OIS and AP metrics?
I'm working on image edge detection and i need to calculate optimal dataset scale (ODS), optimal image scale (OIS) and average precision (AP) metrics? Is there any example for python or matlab? Or how ...
2
votes
0
answers
97
views
Why does Java show a worse result when using the same Processing code?
I have written the exact same code twice, once in the Processing (4.3) IDE and once in Eclipse using the core.jar file. In both IDEs the code results in a rectangle with rounded corners on a white ...
-1
votes
1
answer
48
views
Processing - Weird behavior in IF statement [duplicate]
I have this code.
if(infoDisplay.readChar() == SOH) {
waitingForReturn = false;
println("Got here 9");
String inStr = infoDisplay.readStringUntil(EOT);
inStr = inStr.substring(0,...
0
votes
1
answer
43
views
Creating draw in Processing
I need to create such a picture in Processing:
(https://i.sstatic.net/ihJc4.png)
Unfortunatelly I have got problem beacause my letters overlap and I got something like this:
(https://i.sstatic.net/...
1
vote
1
answer
50
views
FIltering out chaotic noise from breathing sensor signal
I've got a signal from a respiratory sensor (chest strap, piezo sensor) and I need to extract (live) the breath-per-minute value. Now for a nice steady signal this is not such a problem, the problem ...
0
votes
0
answers
24
views
Avoiding mouse cursor blocking at the end of the window?
I'm working for a simple game. Mouse movement must rotate the view. But when the mouse reaches the edges of the window it freezes and mouseX and mouseY variables no longer increment. How do I make ...
0
votes
1
answer
178
views
tic tac toe in java processing
I'm currently working on a simple Tic-Tac-Toe game in Processing, and I'm having trouble with two aspects:
Placement Issue:
The X and O symbols are not being placed correctly on the grid. The ...
0
votes
1
answer
26
views
I need help moving 2 objects freely in Processing, making pong
Its bad code but only because its a test, but if you could help thatll be great
heres my code:
float x = 100;
float y = 260;
float y2 = 265;
float x2 = 600;
void setup() {
size(750,750);
}
void ...
0
votes
0
answers
61
views
Javafx setup issues
I'm not really sure what to do with these errors. I'm trying to use processing in Eclipse with javafx, and I don't remember it being this involved a few years ago. When I try to run my java app ...
-3
votes
1
answer
107
views
java.lang.NoClassDefFoundError for papplet
I'm having issues getting processing set up. I have another project I pulled that uses it perfectly well, but when I try to create a new project, I keep running into errors. I have all my libraries ...
0
votes
0
answers
51
views
Processing in Eclipse--Cannot access class because it does not export to module core
Does anyone have any insight as to why this is failing? I've tried variations of adding the libraries--I'm trying to create a new project, and have the shapes package working in another older project, ...
0
votes
1
answer
36
views
I am trying to use processing in Eclipse, but I'm fairly confused--where do I import processing? Assume I know nothing
This is the error I'm getting. Am I supposed to download another library? Surely creating a PApplet isn't how this goes?
Error: Could not find or load main class
finishedBlossomingTree....
1
vote
1
answer
35
views
The constructor does not exist
I am trying to make a simple class for a pizza topping that can be dragged around with the mouse. When trying to implement this class, I get the error "the constructor "Toppings" does ...
0
votes
0
answers
27
views
The final field "" cannot be assigned, cannot figure out what is wrong
So, I had some issues with this code thanks to Syntax errors etc. I have managed to eliminate the Syntax Errors but have now been greeted with "The final field code_from_lab.Wheel.x cannot be ...
0
votes
0
answers
18
views
Synchronizing a Voltage Source Signal with a Database Signal in Simulink
I'm working on a project in Simulink where I need to synchronize a real-time voltage source signal with a voltage signal extracted from a csv file. Both signals are at 60Hz, but they may be out of ...
1
vote
0
answers
154
views
Is there a way to using Processing with Pyodide in Python Mode?
I'm trying to write Processing graphics programs in Python that run in a web browser that I can then copy into a script on my local machine and run them with py5. I haven't been able to find a ...
1
vote
0
answers
53
views
Why am I getting the wrong result when getting the length of an array in p5.js? [duplicate]
Had a weird bug in my program, here's what I used to output:
print(packet.visitedNodes, packet.visitedNodes.length)
Here is the class:
class Packet {
constructor(visitedNodes, data) {
this....