# Volume with lines

**URL:** https://discourse.processing.org/t/volume-with-lines/43759
**Category:** Coding Questions
**Created:** [January 25, 2024, 2:55pm UTC](https://discourse.processing.org/t/volume-with-lines/43759 "2024-01-25T14:55:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![humano](https://avatars.discourse-cdn.com/v4/letter/h/dbc845/32.png) [@humano](https://discourse.processing.org/u/humano)
#### Post date: [January 25, 2024, 2:55pm UTC](https://discourse.processing.org/t/volume-with-lines/43759/1 "2024-01-25T14:55:51Z")

</div>

Hi there! I am drawing this origami folds simulating volume with a loop of lines in every side. But second side’s loop is not complete as I was expecting, following the red line you can see on the picture. Could anyone please tell me why?

 ![IMG_20240125_104502](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/9/0/90d00d408a14d82d08d43c92b2b5374ab20d9c60.jpeg)

```auto
void setup(){
size(1000,1000);
background(255);
stroke(0);
strokeWeight(1);

int num = 50;
for (float i=0; i<=num; i+=2) {

beginShape();
// x-Pos y-Pos
vertex(map(i, 0, num, 200, 800), map(i, 0, num, 400, 500));
vertex(map(i, 0, num, 300, 800), map(i, 0, num, 600, 500));
vertex(map(i, 0, num, 500, 800), map(i, 0, num, 200, 500));
endShape();
}
}

```

---

<div class="post-metadata">

### Author: ![quark](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/quark/32/26_2.png) [@quark](https://discourse.processing.org/u/quark)
#### Post date: [January 25, 2024, 4:45pm UTC](https://discourse.processing.org/t/volume-with-lines/43759/2 "2024-01-25T16:45:34Z")

</div>

The default fill color is white, same as your background. Switch off the fill and it works.

```auto
void setup() {
  size(1000, 1000);
  background(255);
  stroke(0);
  strokeWeight(1);
  noFill(); // switch off the fill
  int num = 50;
  for (float i=0; i<=num; i+=2) {

    beginShape();
    // x-Pos y-Pos
    vertex(map(i, 0, num, 200, 800), map(i, 0, num, 400, 500));
    vertex(map(i, 0, num, 300, 800), map(i, 0, num, 600, 500));
    vertex(map(i, 0, num, 500, 800), map(i, 0, num, 200, 500));
    endShape();
  }
}

```
