r/processing

Program turning the brightness value of the middle pixel into a midi CC signal

Made using Processing, TouchOSC, LoopBe, and Vital.

u/MorganHarvester — 1 day ago

how do i flip a single image without flipping the entire screen?

https://preview.redd.it/9okygw9z9fwg1.png?width=635&format=png&auto=webp&s=8eb648c54a3f416dd621f0f41874be729627a7ff

as you can see this is a very primitive looking project (for now), but I'll polish everything up once I've gotten the essentials done and over with.

I want to flip the pickaxe sprite to give it the illusion of rotation rather than actually rotating it, since when I tried to using:

pushMatrix();

translate(x,y);

rotate(radians(spriteRotate));

image(sprite, x,y,100,100);

popMatrix();

it didn't work out in the slightest.

I also tried to use the scale() function, cycling through scale(100,100), scale(100,-100), scale(-100,-100), scale(-100,100), but that just flipped the entire screen. I'm new to coding so I don't know much outside of these methods. If anyone knows how I can solve this I'd be a happy man

reddit.com
u/MacheteToothpick — 3 days ago
🔥 Hot ▲ 73 r/processing+1 crossposts

Smallness, Boundlessness

"I always knew I was a dust. But I never knew I was also a universe." Akiane Kramarik

u/Delicious-Job-5125 — 6 days ago

A small matrix effect

I have a grid of characters that i fade away and a couple objects that walk down resetting the aplha and randomizing the characters. Not very complex but looks nice.

u/createaccount314 — 8 days ago
▲ 16 r/processing+1 crossposts

Creating in After Effects using code similar to p5.js

I developed a tool called momentum.js that allows you to create motion graphics in After Effects using a p5.js-like coding approach. It also lets you control variables with interactive controls and animate them using keyframes.

https://preview.redd.it/yp0qrid1dwug1.png?width=8000&format=png&auto=webp&s=83d893cad47a95faf2fdd2506abf4400cf4a6805

More details:
https://github.com/barium3/momentumjs
https://www.creativeapplications.net/member/momentum-js-integrating-generative-art-and-timeline-based-animation/

reddit.com
u/South-Step6497 — 11 days ago
▲ 8 r/processing+1 crossposts

Built a small iPad tool inspired by Processing — exploring generative motion with simple rules

I’ve been exploring generative visuals and built a small iPad tool to experiment more freely.

Instead of writing code, everything is driven by parameters and simple rules evolving over time.

This loop comes from a combination of grid transformations and motion systems — no keyframes involved.

I’d be really curious how you’d approach something like this in Processing.

u/_T_one — 7 days ago
▲ 2 r/processing+1 crossposts

How to reduce number of drawn lines?

I used processing to create this sketch which I call distorted honeycomb. After opening it in Inkscape I used the AxiDraw extension in preview mode. The dark lines are the sketch imported from processing as a DXF and the pink lines indicate all of the pen paths. I'm wondering if there is any way to connect the lines which appear to be connected on the sketch so that each individual short segment isn't drawn separately. Ideally I'd like to have it draw long jagged lines rather than 1000 short segments. Is this possible? How? Appreciate all advice. I’m new at this.

reddit.com
u/a-pilot — 13 days ago

radial colors advanced lite by Steffen Harder

Feel free to dig the code! Have fun! Do you already know Openprocessing.org? If you're an autodidakt, generative art fan or an academic: this is the right place for you!

If you want to get in contact with an polymath from Bauhaus-Universität Weimar, write to steffen@steffenharder.de

Go check out more of me via:

https://linktr.ee/steffen_harder

Best Greetings from "Kreativer Norden".

openprocessing.org
u/Prah-Brah-K-Dah-Brah — 11 days ago

Can i use an ESP32 cam with processing

Im very new to processing and I’m doing this all for a school project. I currently am trying to do color sensing with processing by making it detect the color red specifically. I got it working on my pc’s webcam by making it detect the rgb values inside a small box in the middle of the cam feed. Now I want to use an esp32 cam because I was going to mount this onto a car and have it spin in place until it detects the color red. The car would be controlled by an arduino controlling two motors. I have zero experience with the esp32 cam and the only reason I chose it is because it is tiny plus I’ve heard that its pretty reliable. Can I use my processing code with it or would that require its own thing?

reddit.com
u/shabink — 3 days ago

Project Recommendation

I'm part of an improvisational theater show and I have a performance this Friday at my city's cultural center. But just today I had the idea that I could create a small installation in the entrance while people waits: I have an old CRT TV and a Raspberry Pi I can connect, and I think I could also set up a webcam.

Given the limited time, what existing Processing project could I easily implement? The show is about historical events reimagined with humor.

reddit.com
u/Away_Sea2611 — 8 days ago

Floating enemies

 my enemies made with create shape are floating off the ground. i have shapemode(center) active 
and changeing the collision on the floor as i have here fixes it for some enemies but not all. 
they do have textures on them and maybe it could be a texture issue like drawing top down and 
missing some of the bottom? I also have a slight suspicion that its pivot point is the bottom of 
the texture somewhere instead of the middle. I am new to processing and have only been usng it 
about a year and would love to learn more and how to fix this pivot point. 



 PShape getRect(float l, float h, float d, PImage texture) {
    PShape cube = createShape();
    cube.beginShape(QUADS);
    cube.noStroke();
    cube.texture(texture);
    // Front face
    cube.vertex(-l/2, h/2, d/2, 0, 1);
    cube.vertex(-l/2, -h/2, d/2, 0, 0);
    cube.vertex( l/2, -h/2, d/2, 1, 0);
    cube.vertex( l/2, h/2, d/2, 1, 1);
    
    cube.endShape();
    return cube;
  }  Squirt(int xpos, int zpos) {
    super();
    position.x = -6000+ xpos*1000 + random(-400, 400);
    position.z = -6000+ zpos*1000 + random(-400, 400);
    position.y = 0;
    l=75;
    h=75;
    d=75;
    range = 10;
    speed = .1;
    self = getRect(l, h, d, squirtTex);
  }  Boobie(int xpos, int zpos) {
    super();
    position.x = -6000+ xpos*1000 + random(-400, 400);
    position.z = -6000+ zpos*1000 + random(-400, 400);
    position.y = 0;
    l=50;
    h=150;
    d=50;
    range = 1000;
    speed = 0;
    self = getRect(l, h, d, boobieTex1);
    revealedSelf = getRect(l, h, d, boobieTex2);
  }  void dealWithCollision(SmallCollisionObjects c) {
    if(c instanceof Enemy)
    c.position.y = sideT;
    if (c instanceof Player) {
    c.position.y = sideT - c.h / 2;
      Player b = (Player) c;
      b.grounded = true;
      if (b.velocityY > 0) {
        b.velocityY = 0;
        println("collision with floor");
      }
    }

    c.calcSides(c.l, c.h, c.d);
  }
the skulls in the picture are floating while the crying things touch the ground perfectly after 
the collision change, which i do not want to have to do.

https://preview.redd.it/owms30kcwewg1.png?width=1554&format=png&auto=webp&s=2a16fd019ce79f315202ae38cbc601370e846352

https://preview.redd.it/qrbf3k31wewg1.png?width=1586&format=png&auto=webp&s=e0fcbfb8efedf87c45428589be300d1bea2bbf37

reddit.com
u/Weedowmaker — 3 days ago