# Subscribe - pvm

**URL:** <https://discourse.processing.org/t/subscribe-pvm/9964>\
**Category:** Coding Questions\
**Created:** [April 4, 2019, 1:27pm UTC](https://discourse.processing.org/t/subscribe-pvm/9964 "2019-04-04T13:27:48Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Solsticio](https://avatars.discourse-cdn.com/v4/letter/s/d07c76/32.png) [@Solsticio](https://discourse.processing.org/u/Solsticio)\
**Post date:** [April 4, 2019, 1:27pm UTC](https://discourse.processing.org/t/subscribe-pvm/9964/1 "2019-04-04T13:27:48Z")

</div>

2-

```auto
void setup(){
  size(400,400);
  frameRate(20);
}

void draw(){
  int i;
  for(i=0;i<height;i++){
    if(random(0,1)<0.5) stroke(0);
    else stroke(255);
    line(0,i,width,i);
  }
}

```

3-

```auto
void desenhaIFSP(float x, float y){

noStroke();
fill(255,0,0);
ellipse(60+x,40+y,56,56);
fill(0,130,0);
rect(32+x,70+y,55,55,5);
rect(32+x,128+y,55,55,5);
rect(32+x,186+y,55,55,5);

rect(90+x,12+y,55,55,5);
rect(90+x,70+y,55,55,5);
rect(90+x,128+y,55,55,5);
rect(90+x,186+y,55,55,5);

rect(148+x,128+y,55,55,5);
rect(148+x,12+y,55,55,5);
}

float x,y;
float dx,dy;

void setup(){
  
  size(800,600);
  x=0;
  y=0;
  dx=3;
  dy=3;
}

void draw(){
 
  background(255);
  desenhaIFSP(x,y);
  x+=dx;
  y+=dy;
  
  if(x>width-203 || x<-32) dx=-dx;
  if(y>height -242 || y<-12) dy=-dy;  
}

```

4-

```auto
int c,d;

void desenhaIFSP(int c){
noStroke();
fill(c,0,0);
ellipse(60,40,56,56);

fill(0,c,0);
rect(32,70,55,55,5);
rect(32,128,55,55,5);
rect(32,186,55,55,5);

rect(90,12,55,55,5);
rect(90,70,55,55,5);
rect(90,128,55,55,5);
rect(90,186,55,55,5);

rect(148,128,55,55,5);
rect(148,12,55,55,5);
}

void setup(){
  size(256,256);
  c=80;
  d=1;
}

void draw(){
  background(255);
  desenhaIFSP(c);
  c+=d;
  if(c>255||c<80)d=-d;
}

```

---

<div class="post-metadata">

**Author:** ![Stanlepunk](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/stanlepunk/32/11509_2.png) [@Stanlepunk](https://discourse.processing.org/u/Stanlepunk)\
**Post date:** [April 4, 2019, 7:50pm UTC](https://discourse.processing.org/t/subscribe-pvm/9964/2 "2019-04-04T19:50:13Z")

</div>

use to \</\> to add your code is easier to read. like below. And try to make as simple as you can. It’s eaier to see where is the problem for you and for the people read it.  
Because here we don’t know what you want, where is the problem…

```auto
void setup(){
 size(400,400);
 frameRate(20);
}

void draw() {
 int i;
 for(i=0;i<height;i++){
   if(random(0,1)<0.5) stroke(0);
   else stroke(255);
   line(0,i,width,i);
 }
}

```

```auto
void desenhaIFSP(float x, float y){
  noStroke();
  fill(255,0,0);
  ellipse(60+x,40+y,56,56);
  fill(0,130,0);
  rect(32+x,70+y,55,55,5);
  rect(32+x,128+y,55,55,5);
  rect(32+x,186+y,55,55,5);

  rect(90+x,12+y,55,55,5);
  rect(90+x,70+y,55,55,5);
  rect(90+x,128+y,55,55,5);
  rect(90+x,186+y,55,55,5);

  rect(148+x,128+y,55,55,5);
  rect(148+x,12+y,55,55,5);
}

```

```auto
float x,y;
float dx,dy;

void setup(){
  size(800,600);
  x=0;
  y=0;
  dx=3;
  dy=3;
}

void draw(){
  background(255);
  desenhaIFSP(x,y);
  x+=dx;
  y+=dy;

  if(x>width-203 || x<-32) dx=-dx;
  if(y>height -242 || y<-12) dy=-dy;
}

// 4-

int c,d;

void desenhaIFSP(int c){
  noStroke();
  fill(c,0,0);
  ellipse(60,40,56,56);

  fill(0,c,0);
  rect(32,70,55,55,5);
  rect(32,128,55,55,5);
  rect(32,186,55,55,5);

  rect(90,12,55,55,5);
  rect(90,70,55,55,5);
  rect(90,128,55,55,5);
  rect(90,186,55,55,5);

  rect(148,128,55,55,5);
  rect(148,12,55,55,5);
}

```

```auto
int c,d;
void setup(){
  size(256,256);
  c=80;
  d=1;
}

void draw(){
  background(255);
  desenhaIFSP©;
  c+=d;
  if(c>255||c<80)d=-d;
}

```

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [April 6, 2019, 5:19pm UTC](https://discourse.processing.org/t/subscribe-pvm/9964/3 "2019-04-06T17:19:40Z")

</div>

@Solsticio – what does “Subscribe - pvm” mean?

What is your question? What do you want to happen, and what is happening instead?
