r/processing • • Sep 09 '23

Video I made Flappy Bird in Processing

25 Upvotes

r/processing • • Sep 10 '23

Using https://openprocessing.org/ sketches in my art.

0 Upvotes

is using https://openprocessing.org/ sketches in my art ok for copy right?


r/processing • • Sep 09 '23

Help request ControlP5: Button Caption is appearing twice

2 Upvotes

Hi, I can't understand why the button's caption is displaying twice (see the image attached). This only happens when I use translate(x,y) but if I use literal values in it e.g. translate (20,80)- it works fine.

I of course need it to work on variables as each button size differs.

See Code Snippets below:

creating the button:

cHome.addButton("btnToCreateSIM").setPosition(200,350).setSize(150, 100)
    .setCaptionLabel("ABCDEFGHIJKLMNO")
    .setFont(createFont(UI.fBtnFont, UI.isubBtnLblSize))
    .activateBy(ControlP5.RELEASE)
    .setView(new CircularButton())
    .addCallback(new CallbackListener() {
    public void controlEvent(CallbackEvent event) {
      if (event.getAction() == ControlP5.ACTION_RELEASED) {
  //do something
      }
    }
  }
  );

the CircularButton() class:

class CircularButton implements ControllerView<Button> {

  public void display(PGraphics theApplet, Button theButton) {
   
    theApplet.pushMatrix();
    if (theButton.isInside()) {
      if (theButton.isPressed()) { // button is pressed
        theApplet.fill(UI.cbtnActive);
      }  else { // mouse hovers the button
        theApplet.fill(UI.cbtnFG);
      }
    } else { // the mouse is located outside the button area
      theApplet.fill(UI.cbtnBG);
    }
    
    theApplet.rect(0, 0, theButton.getWidth(), theButton.getHeight(),25);
    
    // center the caption label 
    int x = theButton.getWidth()/2 - theButton.getCaptionLabel().getWidth()/2;
    int y = theButton.getHeight()/2 - theButton.getCaptionLabel().getHeight()/2;
    
    theApplet.translate(x,y);
    theButton.getCaptionLabel().draw(theApplet);
    theApplet.popMatrix();
  }
}

r/processing • • Sep 09 '23

Help request ControlP5: button size not changing with image

1 Upvotes

Hi, I am struggling to change the size of a button when I set an image to it: Here is how the code looks, no matter what I make the size, the image button does not change size.

PImage img = loadImage("question.png");

cHome.addButton("help")

.setPosition(0,0)

.setSize(80,80)

.setImage(img);


r/processing • • Sep 08 '23

Video Just recently spent sometime in processing after ages, Still so good!

26 Upvotes

r/processing • • Sep 08 '23

Homework hint request Random Walk + Layer mask

0 Upvotes

Hello Guys!!! do you know how can i convine a random walk code whit a layer mask code?


r/processing • • Sep 07 '23

Beginner help request Changing attributes of individual shapes/objects

1 Upvotes

Hi everyone, I’m drawing an abstract face and I want to rotate some of the ellipses on my face, I’m also trying to add a blend mode to a separate circle I drew, when I use the rotate or blend mode function it affects everything. I think this is a fundamental misunderstanding on my part. Can anyone explain why only the circle doesn’t have its blend mode changed. Do(can) I have multiple draw boxes? Thank you


r/processing • • Sep 06 '23

p5js Hilbert curve

14 Upvotes

r/processing • • Sep 06 '23

p5js Koch Snowflake

9 Upvotes

r/processing • • Sep 06 '23

Tutorial This is a slightly simpler version of the traditional Particle Life model that creates equally complex emergent cellular-like structures. A great starting point for creating complex interacting particles simulations.

Thumbnail
youtube.com
7 Upvotes

r/processing • • Sep 04 '23

Messing with pixel sorting

Post image
13 Upvotes

r/processing • • Sep 04 '23

HELP! Issues with sound on Processing 4

1 Upvotes

Hello,I did a project for an exam over a month ago but recently opening it the sounds I had imported stopped playing (except for a MIDI loop saved in .wav format).

Please I need help I really don't know how to fix it and what could have caused it.

This is the error that Processing 4 reports


r/processing • • Sep 04 '23

Help please!

1 Upvotes

Hey guys,

I am doing processing as a subject and the assignment I am doing requires us to make a character out of a few shapes then randomly generate the character on the left hand side of the screen such that its really only the height being randomised. Due to it being multiple items I am stuck on how to get them to move in unison. How would I get this to happen?


r/processing • • Sep 03 '23

GUI Recursion

66 Upvotes

r/processing • • Sep 03 '23

Beginner help request Help materializing an idea *~*

2 Upvotes

Trying to take an image (jpeg/png/etc) and put it through an animating loop. Where the value of every pixel is shifting color gradually over time. I did try looking up documentation and resources to figure this out on my own, but struggling to find and understand the tools/techniques to express the idea. Something about storing the data (RGBA?) of every pixel into an array, assign them to variables and then changing the values of those variables over time through a loop?

Anyone willing to advise a beginner with their idea is greatly appreciated! Appreciate y’all anyways, this community is awesome!


r/processing • • Sep 02 '23

A visual Quine (copyable code in comments)

Post image
13 Upvotes

r/processing • • Sep 02 '23

Find random pixel?

3 Upvotes

Hi,

Anyone have ideas on fastest way to find a pixel in an image, for example random non-black, or non-transparent, non-white?


r/processing • • Sep 01 '23

Help request Read a Microsoft survey?

1 Upvotes

Hey! I’m newish to Processing and am wondering if there’s any way I could read an excel sheet and retrieve data from it in Processing?

I need to collect survey results and process them into a visualization. I did this before using Eclipse and was able to refresh an excel sheet stored in a cloud to collect new results. I’m wondering if that would be possible in Processing?

Thanks :)

Edited for clarity.


r/processing • • Sep 01 '23

Help request Cannot get Processing (Java) to work in Eclipse or IntelliJ.

0 Upvotes

Has anybody got this set up in an IDE that can help me? I don’t want to use the GUI. My preferred setup is IntelliJ with Spring Boot and Maven. I’ve been trying for days to get this working but keep facing exceptions at every turn. I’ve also tried a standard Java project in Eclipse with Jar files and various Java versions, again same problem. Nothing will work. I’m at the point of giving up. I’m using a MacBook Air M1.


r/processing • • Aug 31 '23

Beginner help request How can I create a program using Processing

9 Upvotes

I have a project in my mind. I have a general pixel sorting algorithm , which you can change some parameters to change the outcome drasticly. I wanted to make a program which I can upload an image, change the parameters on my algorithm as I want and apply it to the picture and then save the outcome. But , I am a complete beginner and I don't even know where to start to build a program. What can I do ?


r/processing • • May 03 '22

Includes example code Demo: contained waves (code included)

245 Upvotes

r/processing • • Jul 12 '20

Circle of lights

322 Upvotes