# Problems with old code in Processing 3.0

**URL:** <https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276>\
**Category:** Coding Questions\
**Created:** [March 14, 2023, 5:12pm UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276 "2023-03-14T17:12:05Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![aespona](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aespona](https://discourse.processing.org/u/aespona)\
**Post date:** [March 14, 2023, 5:12pm UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276/1 "2023-03-14T17:12:06Z")

</div>

![screenshot_PDF](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/3/53451f303b5d9f79be82f83d390efde41a2a3aeb.jpeg)

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?

```auto
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();   
   
}

```

---

<div class="post-metadata">

**Author:** ![th75](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@th75](https://discourse.processing.org/u/th75)\
**Post date:** [March 15, 2023, 12:58am UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276/2 "2023-03-15T00:58:01Z")

</div>

hi,  
it looks P2D is the cause , remove it or P3D made it works (processing 4.2, apple m1) :

`size(858,1200);`

well, kind of work, as i m not sure what to expect but it looks good (;  
i can’t say why it s different for all renders

---

<div class="post-metadata">

**Author:** ![aespona](https://avatars.discourse-cdn.com/v4/letter/a/71e660/32.png) [@aespona](https://discourse.processing.org/u/aespona)\
**Post date:** [March 15, 2023, 4:19pm UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276/3 "2023-03-15T16:19:51Z")

</div>

Hello  
thanks for the help, with the P3D render it works but it doesn’t look like it did in the old version of Processing or in the PDF image that attach here. Also, sorry that I said that it was written in Processing 3.0 and actually was Processing 2.2.1.

What would happen if I install on the Mac Air M1 an older version of Processing?

Thank you!

 ![screenshot_PDF](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/5/3/53451f303b5d9f79be82f83d390efde41a2a3aeb.jpeg)

---

<div class="post-metadata">

**Author:** ![svan](https://avatars.discourse-cdn.com/v4/letter/s/82dd89/32.png) [@svan](https://discourse.processing.org/u/svan)\
**Post date:** [March 15, 2023, 4:32pm UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276/4 "2023-03-15T16:32:46Z")

</div>

> [@aespona](#):
>
> What would happen if I install on the Mac Air M1 an older version of Processing?

Try it and then report back.

---

<div class="post-metadata">

**Author:** ![th75](https://avatars.discourse-cdn.com/v4/letter/t/ebca7d/32.png) [@th75](https://discourse.processing.org/u/th75)\
**Post date:** [March 15, 2023, 8:14pm UTC](https://discourse.processing.org/t/problems-with-old-code-in-processing-3-0/41276/5 "2023-03-15T20:14:03Z")

</div>

hi,

processing doesn t really need install, so you can test all of them,  
i didn’t use version 2 but i use 3.5.4 quite often (only hack on m1 is you have to set a framerate in setup to get an image)  
it looks to me i have more problems with ventura than i had with monterey, with old libraries  
for those peticular libraries i use the intel version of 4.2 in place of arm version, it s slower to launch but otherwise run quite same
