Most voted "java-processing" questions
Use this tag for questions related to Processing, an Open Source Programming Tool and Development Environment (IDE) Java-based and built for the electronic arts community with the aim of teaching basic programming notions in a visual context. Avoid using it for Java-related questions or processes involving Java.
Learn more…17 questions
Sort by count of
-
7
votes1
answer535
viewsHow does atan2 function?
I have the following scenario: The angle should be chosen so that it always points directly to the mouse. Find the angle relative to the X axis (then 0 is straight to the right and PI/2 is straight…
-
6
votes1
answer161
viewsCalculate tangent line by mouse/mouse coordinate
I want to calculate the tangent line to the points X and Y found by the mouse, being limited to the circle drawn... I was only able to develop until halfway through the program. Someone can save…
java-processingasked 9 years, 7 months ago Hyller Vianna 61 -
6
votes1
answer219
viewsError when adding value in array, repeated values
I have two arrays, A and B. I created 3 functions in which I take a value from the beginning of array A and array B, remove the values, compare the values and if the value of A is greater than that…
-
3
votes1
answer43
viewsRandomize images as textures in 3D solids
Good, I have 30 solids and I have a different image for each of them. I created one array for the images, and if you choose to use the same image at all (as I left here in the code, use the bandeira…
-
2
votes1
answer445
viewsHow to create a dynamic progress bar in R?
To follow the processing status in my routines I use the progress bars of the package pbapply, but I couldn’t find a dynamic way to follow more than one process. To illustrate the problem I…
-
2
votes1
answer1282
viewsLoops based on a flowchart
How do I write the code for a loop based on this flowchart? It has a do...while. Peeciso of a simple and direct response with nested loops.…
-
2
votes2
answers79
viewsAndroid - How to access an Activity through a Papplet?
I have a class with extends PApplet and I want to migrate from it to another with extends Activity I tried through a Intent but I couldn’t. Body of the Papplet class: public class CamMain extends…
-
2
votes1
answer155
viewsHow to check the size of a PFA-type array?
How do I check whether the array PFA (Partially-full array) is full and new elements cannot be added? If it is full, it should return true. boolean estaCheio(int[] data, int size){ ??? } I have 5…
-
1
votes1
answer107
viewsHow do I move a triangle around the corners of the screen using java?
I’m pretty new with java and I’m working on the project that I have to draw a triangle (which I have to call Alice) that is located in the upper left corner of the screen and it has to move in a…
-
1
votes2
answers151
viewsHelp in code printing of repeated characters
I want to print only the characters that are repeated in string and the amount of repetitions. If it appears only once, I don’t want to print it. I need help with boolena expression. How do I check…
-
0
votes1
answer41
viewsSequence of execution of tasks
I have a question about the execution sequence. For example, in the code below, because it prints y=2.0 and not y=4.0 and because it prints w=0.5 and not w=2.2. y=2.0 understands that it looks for…
-
0
votes2
answers66
viewsSize of arrays
If the theory says that the size of an array cannot be changed, only the elements. Because when I print the size of a the value is 10 and not 5 or 15? int[] a; a = new int[5]; a = new int[10];…
-
0
votes1
answer24
viewsFunction to search character
I’m trying to write a function that returns the index of the character. For example, I want to fetch the index of 'a' the fifth time it appears in the text. This is my code: int buscaChar (String…
-
0
votes0
answers66
viewsMake the mouse act with a joystick
My code should make the mouse act with a joystick to drive a ball on the screen. It should work as follows: if the mouse is in the crosshairs, the ball does not move. If the mouse is to the right or…
-
0
votes0
answers36
viewsPrint array on screen as text
How do I print the contents of an array on the screen using text() in the Processing language? I have the array pieces: final int MAX_SIZE=56; char[] pecas= new char[MAX_SIZE]; I added 6 in the…
-
0
votes2
answers300
viewsMultiply value in array
How do I multiply the elements of an array? what am I doing wrong? For example, if I have: int numbers[]={1,2,2,4,5,6}; and my card_block is 2, the restutado would 1x4x5x6=120; int countCards(int []…
-
-1
votes1
answer219
viewsLibrary for Processing Services
I have the source code below, but to work I need a library I can’t find, what I can do to solve? import ddf.minim.*; import ddf.minim.analysis.*; import processing.opengl.*; import…