Hello everyone, I’m new here. Sorry for my english, I’m from Spain.
I have problems displaying a code that was written on a Imac 2009 in processing 3.0.
Now I work with Mac Air with an M1 processor and when I run the code it doesn’t display correctly. On the contrary, the generated PDF looks correct. Any help, please?
import processing.pdf.*;
PShape objecte;
float angle =0;
float x = 0;
float y = 0;
float rad;
float scalarx=1.001;
float scalary=1.001;
float blue = 200;
float red = 20;
float green = 20;
void setup() {
size(858,1200,P2D);
beginRecord(PDF,"cargola.pdf");
background(0);
smooth();
noLoop();
shapeMode(CENTER);
objecte = loadShape("objectex.svg");
}
void draw() {
translate(width/2-250,height/2);
for (int i = 0; i < 480;i++) {
rad = radians(angle);
objecte.disableStyle();
noFill();
stroke(red, green, blue,50);
strokeWeight(0.8/scalarx);
pushMatrix();
translate(x,y);
rotate(rad);
scale(scalarx,scalary);
shape(objecte,0,0,430,215);
scalarx+=0.0007;
scalary-=0.01;
angle +=0.25;
x += 0.1;
y -= random(0,2);
blue += scalarx*0.3;
red += scalarx*0.4;
green += scalarx*0.3;
popMatrix();
}
endRecord();
}