Send data to second sketch

Hi,

I want to fill blobs detected by blobdetection with a movie. I think the best way to do this is to create a second sketch, send the blob coords+size to that sketch and make everything black except the blob-covered areas.

Now, for this I need to send the data. I tried MQTT but it's too slow, and I've tried the pipeline method found here but can't get it to work with my data.

Would anyone know of a good, easy way to send numeric data to a second sketch?

Thanks

submitted by /u/Aldun
[link] [comments]

Need Help making Geometry Dash in Processing Python Mode

This is what I have so far, if anyone knows how to delay the jumping effect and or create scrolling please let me know :) Even if you only know Java please let me know how to and ill translate it to python

xPos=140

yPos=325

c=255

speed=10

x=640

y=300

jumpcounter=0

screen=0

def setup():

size(640,480)

background(120)

noStroke()

def ground():

global yPos stroke(5) strokeWeight(15) line(0,355,width,355) if yPos>355: yPos=355 

def checkJump():

if keyCode==32: jump() 

def jump():

global yPos global jumpcounter startingY=yPos while startingY-yPos<125: yPos=yPos-0.01 jumpcounter=jumpcounter+0.01 maxJump=yPos while yPos-maxJump<125: yPos=yPos+0.01 jumpcounter=jumpcounter+0.01 jumpcounter=0 

def draw():

global screen

if screen==0:

img = loadImage("background.jpg") image(img,0,0) font = createFont("Ariel", 10) textFont(font,60) text("Press Spacebar \n to start",100,100) if keyCode==32: screen=1 

elif screen==1:

background(200) fill(75) noStroke() rectMode(CORNERS) rect(0,height,width,355) fill(255) ground() strokeWeight(2) rectMode(CENTER) stroke(0,255,0) rect(xPos,yPos,60,60) checkJump() 

def display():

fill(c)

rect(x,y,30,10)

submitted by /u/SwagxGeneral
[link] [comments]

Socle du Monde Biennale – The geometries


Piero Manzoni (portrait.) Photo: Helene Bagger

In 1961 Piero Manzoni, the enfant terrible of the avantgarde in the mid 20th century, created 90 small cans, signed them and famously labelled them Artist’s Shit (Merda d’Artista). Each was priced by weight based on the value of gold at the time. The cans have since traveled to art collections all over the world and sold for spectacular sums at auctions houses. Still in 1961, the young artist made Socle du Monde (Base Of The World), a bronze plinth he placed upside down in a field in Herning, Denmark. The piece suggests that the whole world is a work of art. Manzoni created some of his masterpieces in the Danish city when he was the host of local shirt manufacturer and art enthusiast Aage Damgaard. The Herning Museum of Contemporary Art now houses what is probably the biggest collection of artworks by the brilliant iconoclast.

Socle du Monde gives its name to the oldest Danish biennale focusing on contemporary art. The ongoing edition has opened a few weeks ago (i wrote about Breeding a Planetary Community Chicken at the time and then lost control over my days.) I think it’s one of the most aesthetically pleasing art events i’ve attended over the past few years. But because the event is inspired by the masterpiece of a renowned exponent of conceptual art, it is also a biennale that conveys ideas, provocations and moments for reflection. I’ll get back next week with a post discussing these ideas and provocations but right now, here are some visual impressions of the biennale:


Hans Haacke and Yayoi Kusama, Socle du Monde Biennale 2017


Hans Haacke and Yayoi Kusama (detail), Socle du Monde Biennale 2017


Wim Delvoye, Super Cloaca (detail), 2007. Socle du Monde Biennale 2017


Entrance lobby at the Carl-Henning Pedersen & Else Alfelts Museum. Photo and Courtesy: Carl-Henning Pedersen & Else Alfelts Museum


I loved the faucets in the bathroom of the Carl-Henning Pedersen & Else Alfelts Museum


Detail of an ex-school complex designed by Jørn Utzon in 1969. Photo: Jens Wolter


Hesselholdt & Mejlvang, The Invisible Territory (detail), 2017. Socle du Monde Biennale 2017


Hesselholdt & Mejlvang, The Invisible Territory (detail), 2017. Socle du Monde Biennale 2017. Photo: Ole Jørgensen


Chapter 2: Painting with Time and Space: From Zero to the 60’s Avantgarde (exhibition view), Socle du Monde Biennale 2017. Photo: Jens Wolter


Günther Uecker, Socle du Monde Biennale 2017. Photo: Socle du Monde Biennale


Inside the lift of the Herning Højskole, Socle du Monde Biennale 2017. Photo: Jens Wolter


Tower of the Herning Højskole, Socle du Monde Biennale 2017. Photo: Jens Wolter


Mischa Kuball, Translocating ELEVHØJHUS, inside the Herning Højskole, Socle du Monde Biennale 2017. Photo: Ole Jørgensen


Hesselholdt & Mejlvang, The Invisible Territory (detail), 2017. Socle du Monde Biennale 2017. Photo: Ole Jørgensen


Christian Megert, Socle du Monde Biennale 2017


Antony Gormley, The Allotment, 1997 – 1998. Photo: Ole Jørgensen


Terrasse outside the HEART – Herning Museum of Contemporary Art


Heinz Mack. Socle du Monde Biennale 2017. Photo: Ole Jørgensen


Ingvar Cronhammar, Elia, 2001. Photo: Ole Jørgensen.

Previously: Breeding a Planetary Community Chicken.

The 2017 Socle du Monde Biennale – to challenge the Earth, the Moon, the Sun & the Stars remains open until 27 August 2017 in Herning, Denmark.

My pong paddle doesnt move

Guys I need this as endassignment for my school and no one can help me, please tell me why my paddle (Bat1) doesnt move

Code:

Ball myBall;//maak object Ball

Bat1 myBat1;//maak object Bat1

void setup() {

size(400,400); //grootte scherm

myBall = new Ball();//initieer Ball

myBat1 = new Bat1();//initieer Bat1

}

void draw() {

background (0); //zwarte achtergrond

//Ball

myBall.drawBall();//gebruik Ball

myBall.moveBall();//beweeg Ball

myBall.stopandturnBall();//functie Ball(stuiter)

//Bat1

myBat1.drawBat1();//gebruik Bat1

myBat1.moveBat1();//beweeg Bat1

}

//CLASS BALL

class Ball {//data van Ball

float xpos;

float ypos;

float bsize;

float lsize;

float xspeed;

float yspeed;

Ball() {//constructie Ball

xpos = width/2;

ypos = height/2;

bsize = 30;//breedte

lsize = 30;//lengte

xspeed = 2.6;//snelheid horizontaal

yspeed = 3.2;//snelheid verticaal

}

//funtionaliteit (display, beweging, functies)

void drawBall() {

fill(#3C4DB9);

ellipse(xpos, ypos, bsize, lsize);//grootte ball

}

void moveBall() {//beweging Ball

xpos = xpos + xspeed;

ypos = ypos + yspeed;

}

void stopandturnBall() {//beweging functies

if(xpos > width -bsize/2) {//draai om (stuiter rechts)

xspeed = -xspeed;

}

else if (xpos < 0 +bsize/2) {//stuiter links

xspeed = -xspeed;

}

if(ypos > width -lsize/2) {//stuiter boven

yspeed = -yspeed;

}

else if (ypos < 0 +lsize/2) {//stuiter beneden

yspeed = -yspeed;

}

}

}

//CLASS BAT1

class Bat1 {//data van Bat1

float xbat1;

float ybat1;

float bbat1;

float lbat1;

float sbat1;

boolean up;

boolean down;

Bat1() {//constructie Bat1

rectMode(CENTER);

xbat1 = 50;

ybat1 = height/2;

bbat1 = 30;

lbat1 = 100;

sbat1 = 5;

}

//funtionaliteit (display, beweging, functies)

void drawBat1() {

fill(#F21120);

rect(xbat1, ybat1, bbat1, lbat1);//grootte Bat1

}

void moveBat1() {//beweging Bat1

if(up) {

ybat1 = ybat1 + sbat1;

}

if(down) {

ybat1 = ybat1 - sbat1;

}

}

void keyPressed() {//beginnen met bewegen

if(key == 'w' || key == 'W') {

up = true;

}

if(key == 's' || key == 'S') {

down = true;

}

}

void keyReleased() {//stoppen met bewegen

if(key == 'w' || key == 'W') {

up = false;

}

if(key == 's' || key == 'S') {

down = false;

}

}

}

submitted by /u/Htfxv1978
[link] [comments]

Laggy sketch because of the background ?

Hi guys ! I'm making a project for an exam with a friend, and on my computer when I execute the sketch it isn't lagging, but on her computer (maybe less powerful than mine) it's lagging. I think the problem is the picture in the background, but it is only 14ko so I find it strange that it doesn't work properly. Here is a part of the code which I think contain the problem

int screen = 0; int Menu = 0; int Niveau = 4; int JeuNiv1 = 1; int JeuNiv2 = 2; int JeuNiv3 = 3; int Regles = 5; // Déclaration des images PImage table; // Déclaration d'une variable contenant le nombre de boules int nbreBoule = 2; // Déclaration d'une liste d'instances de l'objet Boule Boule [] boules= new Boule[nbreBoule]; void setup() { smooth(); // Lissage des contours size (1200, 606); // Taille de la fenêtre (largeur,hauteur) table=loadImage ("Bibillard-min.jpg"); // Lecture de l'image (c'est-à-dire importation des pixels du fichier "TableBillard.png" dans notre variable table) // Création de deux boules à deux positions précises différentes boules[0] = new Boule(255, 299); boules[1] = new Boule(770, 450); } // Les évènements claviers void keyPressed() { if (screen == 4) { // Si l'écran est celui des niveaux, if (key == '1') { // Et si l'utilisateur appuie sur la touche '1' du clavier, screen = 1; // Alors l'écran du niveau 1 s'affiche } else // Sinon, if (key == '2') { // Si l'utilisateur appuie sur la touche '2' du clavier, screen = 2; // Alors l'écran du niveau 2 s'affiche } else // Sinon, if (key == '3') { // Si l'utilisateur appuie sur la touche '3' du clavier, screen = 3; // Alors l'écran du niveau 3 s'affiche } } if (screen == 1 || screen == 2 || screen == 3) { //Si l'écran est celui d'un des niveaux if (key == 'r') { // et que l'utilisateur appuie sur R alors screen = 0; // on revient sur la sélection des niveaux } } } // Les évènements souris void mousePressed() { if (screen == 0) { // Si l'écran est celui du menu, if (mouseX > 450 && mouseX < 750 && mouseY > 50 && mouseY < 200 && mouseButton == LEFT) { // Et si la souris se situe dans les coordonnées du rectangle "Commencer à jouer !" et si l'utilisateur appuie sur le bouton gauche de la souris, screen = 4; // Alors l'écran des niveaux s'affiche } else // Sinon, if (mouseX > 450 && mouseX < 750 && mouseY > 225 && mouseY < 375 && mouseButton == LEFT) { // Si la souris se situe dans les coordonnées du rectangle "Règles du jeu" et si l'utilisateur appuie sur le bouton gauche de la souris, screen = 5; } else // Sinon, if (mouseX > 450 && mouseX < 750 && mouseY > 400 && mouseY < 550 && mouseButton == LEFT) { // Si la souris se situe dans les coordonnées du rectangle "Quitter" et si l'utilisateur appuie sur le bouton gauche de la souris, exit(); // Alors, le jeu se ferme } } if (screen == 1 || screen == 2 || screen == 3 && mouseButton == LEFT) { // Si l'écran est celui du niveau 1, ou celui du niveau 2, ou celui du niveau 3 et si l'utilisateur appuie sur le bouton gauche de la souris, boules[0].deplacementbdirigee(); // Alors la boule dirigée par la souris se déplace } if (screen == 5 && mouseX > 20 && mouseX < 120 && mouseY >30 && mouseY < 80 && mouseButton == LEFT) { screen = 0; } } void draw() { smooth(); // Lissage des contours des boules noStroke(); // Rendre invisible le contour des boules background(table); fill(255); // Couleur de remplissage des boules : blanche if (screen == 0) { // Si l'écran est celui du menu, fill(250, 227, 228); // Couleur de remplissage du rectangle "Commencer à jouer !" : gris-rosé rect(450, 50, 300, 150); // Rectangle "Commencer à jouer" fill(250, 227, 228); // Couleur de remplissage du rectangle "Règles du jeu" : gris-rosé rect(450, 225, 300, 150); // Rectangle "Règles" fill(250, 227, 228); // Couleur de remplissage du rectangle "Quitter" : gris-rosé rect(450, 400, 300, 150); // Rectangle "Quitter" PFont jouer; jouer = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(jouer, 50); fill(0); // Couleur de remplissage du texte "Commencer à jouer !" : noire text("Commencer à jouer !", 495, 137); // Dessin du texte ("Commencer à jouer!", coordonnée x, coordonnée y) PFont regle; regle = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(regle, 50); fill(0); // Couleur de remplissage du texte "Règles du jeu" : noire text("Règles du jeu", 528, 310); // Dessin du texte ("Règles du jeu", coordonnée x, coordonnée y) PFont quitter; quitter = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(quitter, 50); fill(0); // Couleur de remplissage du texte "Quitter" : noire text("Quitter", 565, 487); // Dessin du texte ("Quitter", coordonnée x, coordonnée y) if (mouseX > 450 && mouseX < 750 && mouseY > 50 && mouseY < 200) { // Si la souris survole le rectangle "Commencer à jouer!", cursor(HAND); // Affiche une main } else if (mouseX > 450 && mouseX < 750 && mouseY > 225 && mouseY < 375) { // Si la souris survole le rectangle "Règles du jeu", cursor(HAND); // Affiche une main } else if (mouseX > 450 && mouseX < 750 && mouseY > 400 && mouseY < 550) { // Si la souris survole le rectangle "Quitter", cursor(HAND); // Affiche une main } else cursor(ARROW); // Sinon affiche une flèche } if (screen == 4) { // Si l'écran est celui des niveaux, fill(250, 227, 228); // Couleur de remplissage du rectangle " '1' : Niveau 1" : gris-rosé rect(450, 50, 300, 150);// Rectangle " '1' : Niveau 1" fill(250, 227, 228); // Couleur de remplissage du rectangle " '2' : Niveau 2" : gris-rosé rect(450, 225, 300, 150); // Rectangle " '2' : Niveau 2" fill(250, 227, 228); // Couleur de remplissage du rectangle " '3' : Niveau 3" : gris-rosé rect(450, 400, 300, 150); // Rectangle " '3' : Niveau 3" PFont jouer; jouer = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(jouer, 50); fill(0); // Couleur de remplissage du texte " '1' : Niveau 1" : noire text(" '1' : Niveau 1", 500, 140); PFont regle; regle = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(regle, 50); fill(0); // Couleur de remplissage du texte " '2' : Niveau 2" : noire text(" '2' : Niveau 2", 500, 315); PFont quitter; quitter = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(quitter, 50); fill(0); // Couleur de remplissage du texte " '3' : Niveau 3" : noire text(" '3' : Niveau 3", 500, 487); if (mouseX > 450 && mouseX < 750 && mouseY > 50 && mouseY < 200) { // Si la souris survole le rectangle " '1' : Niveau 1", cursor(HAND); // Affiche une main } else if (mouseX > 450 && mouseX < 750 && mouseY > 225 && mouseY < 375) { // Si la souris survole le rectangle " '2' : Niveau 2", cursor(HAND); // Affiche une main } else if (mouseX > 450 && mouseX < 750 && mouseY > 400 && mouseY < 550) { // Si la souris survole le rectangle " '3' : Niveau 3", cursor(HAND); // Affiche une main } else cursor(ARROW); // Sinon affiche une flèche } if (screen == 1 || screen == 2 || screen == 3) { // Si l'écran est celui du niveau 1, ou celui du niveau 2, ou celui du niveau 3 fill(255); // Couleur de remplissage du rectangle "Retour" : blanc rect(20, 30, 100, 50);// Rectangle " Retour" PFont retour; retour = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(retour, 35); fill(0); // Couleur de remplissage du texte " Retour " : noire text("'r' : Retour", 17, 67); // Cette boucle va déplacer les boules fill(255); for (int i=0; i<nbreBoule; i++) { boules[i].mouvement(); boules[i].Collisionmur(); boules[i].Collisionboules(); boules[1].mouvementnond(); // Mouvement spécifique pour la boule non dirigée par la souris boules[i].retour(); } } if (screen == 5) { fill(250, 227, 228); // Couleur de remplissage du rectangle " '1' : Niveau 1" : gris-rosé rect(200, 40, 800, 526);// Rectangle contenant les règles PFont R1; R1 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R1, 50); fill(0); // Couleur de remplissage du texte "Commencer à jouer !" : noire text("Bienvenue dans « Pool training session »", 220, 80); // Dessin du texte ("Commencer à jouer!", coordonnée x, coordonnée y) PFont R2; R2= loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R2, 40); fill(0); // Couleur de remplissage du texte "Commencer à jouer !" : noire text("- Cliquez sur « Commencer à jouer ! » (clic gauche de la souris).", 220, 125); // Dessin du texte ("Commencer à jouer!", coordonnée x, coordonnée y) PFont R3; R3 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R3, 40); fill(0); text("- Choisissez un niveau :", 220, 170); PFont R4; R4 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R4, 40); fill(0); text("* Niveau 1 en pressant la touche 1 du clavier,", 250, 215); PFont R5; R5 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R5, 40); fill(0); text("* Niveau 2 en pressant la touche 2 du clavier,", 250, 260); PFont R6; R6 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R6, 40); fill(0); text("* Niveau 3 en pressant la touche 3 du clavier,", 250, 305); PFont R7; R7 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R7, 40); fill(0); text("* Les niveaux sont à difficulté progressive.", 250, 350); PFont R8; R8 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R8, 40); fill(0); text("But : rentrez la boule blanche (dont vous n’avez pas le contrôle) dans un des trous noirs à l’aide", 220, 400); PFont R9; R9 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R9, 40); fill(0); text("de l’autre boule. Cette dernière est dirigée par la position de la souris et commence à se déplacer lors", 220, 430); PFont R10; R10 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R10, 40); fill(0); text("du clic gauche de la souris.", 220, 460); PFont R11; R11 = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(R11, 60); fill(0); text("Bonne chance !", 500, 530); fill(250, 227, 228); // Couleur de remplissage du rectangle "Retour" : blanc rect(20, 30, 100, 50);// Rectangle " Retour" PFont retour; retour = loadFont("Painting_in_the_Sunlight-108.vlw"); textFont(retour, 35); fill(0); // Couleur de remplissage du texte " Retour " : noire text("Retour", 40, 62); } } 

Sorry for my grammatical mistakes, I'm french.

Full code with picture and font: https://www.dropbox.com/s/1e29ytf03e0u90u/Pool_Training_Session.rar?dl=0

submitted by /u/MAYZdF
[link] [comments]

Onclick hit the target with football!

So, I'm trying to develop a simple football game. When I click the "KICK" button the bottom slider should stop sliding. and if the slider stops on red area the ball animates to out of post. If the slider stops on green area the ball should hit the target. and targets value become 2.

https://www.openprocessing.org/sketch/432173

I'm not sure how to hit the target with ball when the slider in on green area.

submitted by /u/srikanthnaalla
[link] [comments]

Economia Festival. Consumerism, crabs, automation, and other insights by non-economists


Keith Yahrling, Home Depot, Philadelphia, Pennsylvania, 2007


Evgeny Morozov with Olga Mink. Photo by Diewke van den Heuvel for Baltan Laboratories

Another quick look back at the Economia festival that took place at Baltan Laboratories in Eindhoven a few weeks ago…

As i mentioned earlier, the event’s rallying cry was that time had come to discuss the economy without inviting the economists to the table. The festival performances, screenings, artworks and talks did indeed bring a radically new perspective on the economical challenges that society has been facing over the last decade. The keynotes were particularly unexpected and enlightening. The ever eloquent and provocative Evgeny Morozov walked us through the signs of the formidable march of the tech giants towards political control and economic monopoly. Pankaj Mishra explored the Age of Anger and his talk was, imho, far less incisive than his book. The videos of their keynotes are online but i’m going to put the spotlight on the other two talks: Frank Trentmann‘s chronicle of the consumerist society and Geerat Vermeij‘s theory about how a closer study of biological ecosystems can teach us more about the mechanisms and trends of the economy than we might suspect.


Frank Trentmann. Photo by Diewke van den Heuvel for Baltan Laboratories


Frank Trentmann. Photo by Diewke van den Heuvel for Baltan Laboratories

Frank Trentmann: A world of consumers. Keynote lecture at the Economia Festival

Historian Dr. Frank Trentmann drew upon his book Empire of Things to narrate the history of consumption and the many impulses that drive our ‘material self’. It was a fascinating and instructive talk. I learnt that consumption didn’t start in the 1950s in the US but long before that, in Europe and in the China of the Ming dynasty. And that the biggest boom in consumption took place in the 1950s and 1960s when society was becoming more equal and the states started to dedicate more resources to the well-being of their citizens. I was reminded that women, at a time when they were not allowed to vote, turned their purchasing power into civic power, feeling that they had a social duty towards the underpaid workers who were producing the goods. Whether you agree with his views or not, you might find Trentmann’s concluding remarks thought-provoking, especially when he explains why he doesn’t believe that we’ve reached peak stuff, and why the drive for ‘experiences‘ is nothing new and won’t slow down our shopping frenzy.


Geerat Vermeij. Photo by Diewke van den Heuvel for Baltan Laboratories


Geerat Vermeij: The economy of nature. Keynote lecture at the Economia Festival

Geerat Vermeij is an evolutionary biologist. Eleven years ago, he wrote Nature: An Economic History, a book which explores how processes common to all economic systems–competition, cooperation, adaptation, and feedback–govern evolution as surely as they do the human economy, and how historical patterns in both human and nonhuman evolution follow from this principle.

Throughout his talk, the scientist highlighted strong parallels between biological evolution and economics in the human realm in order to try and answer a rather vital questions: Can we construct a healthy economy that doesn’t grow?


Pankaj Mishra. Photo by Diewke van den Heuvel for Baltan Laboratories


Evgeny Morozov. Photo by Diewke van den Heuvel for Baltan Laboratories


Photo by Diewke van den Heuvel for Baltan Laboratories

The Economia festival was curated by Wiepko Oosterhuis and organised by Baltan Labs in Eindhoven.

Previously: Economia, a festival on economy without the economists and Economia festival: short films about finance.