# 3D shape with a bad seam

**URL:** <https://discourse.processing.org/t/3d-shape-with-a-bad-seam/13218>\
**Category:** Coding Questions\
**Created:** [August 6, 2019, 9:23pm UTC](https://discourse.processing.org/t/3d-shape-with-a-bad-seam/13218 "2019-08-06T21:23:35Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [August 6, 2019, 9:23pm UTC](https://discourse.processing.org/t/3d-shape-with-a-bad-seam/13218/1 "2019-08-06T21:23:35Z")

</div>

Hello all,

I produced a 3D quadt\_strip shape, but not only one row but multiple.

It’s kind of a circle (Moebius strip).

Unfortunately I have a big seam (horizontal right side) I cannot get rid of.

Can someone check my logic please? This gets called from setup() and is shown later.

Chrisir

 ![Unbenannt](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/65fd239400b4e7d75ddabc7016f4407a98111910.jpeg)

```auto

// defining a QUAD_STRIP shape 

int i2_span=100; 

void initMainItem() {

  // https://de.wikipedia.org/wiki/M%C3%B6biusband

  boolean grid=false; 

  moebius1=createShape(); 
  moebius1.beginShape(QUAD_STRIP);

  if (grid) {
    // only grid 
    moebius1.noFill();
    moebius1.stroke(0);
  } else {
    // full fill
    moebius1.fill(255, 0, 0);
    moebius1.noStroke();
  }

  // i2 -> radius (how wide the red strip is) 
  // i3 / i -> alpha (angle) 

  for (int i2=-i2_span; i2<i2_span; i2++) {
    for (int i3=0; i3<360+1; i3++) {

      int i=i3; 
      if (i>360) 
        i=i-360; 

      makeVertex3D(i2, i); 

      makeVertex3D(i2+1, i); 

      //
    }//for
    //
  }//for 

  // ---------------------------------

  /*
   for (int i2=-i2_span; i2<i2_span-1; i2+=1) {
   
   float r = i2/i2_span; 
   float alpha=radians(359); 
   PVector v = new PVector(
   cos(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
   sin(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
   (r/2) * sin(alpha/2));
   v.mult(factor1);
   v.y+=yadd1;
   // moebius1.vertex(v.x, v.y, v.z);
   
   r = (i2+1)/i2_span;  
   alpha=radians(0);
   v = new PVector(
   cos(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
   sin(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
   (r/2) * sin(alpha/2));
   v.mult(factor1);
   v.y+=yadd1;
   // moebius1.vertex(v.x, v.y, v.z);
   //
   }//for
   
   */

  moebius1.endShape();

  println("");
  println (">>>>"
    +leaves.size());
}//func

void makeVertex3D( int i2, int i) {

  float factor1=220; 
  float yadd1= 200; 

  float r = i2/i2_span; 
  float alpha=radians(i); 
  PVector v = new PVector(
    cos(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
    sin(alpha) * ( 1+ ((r/2) * cos ( alpha / 2 ) ) ), 
    (r/2) * sin(alpha/2));
  v.mult(factor1);
  v.y+=yadd1;
  moebius1.vertex(v.x, v.y, v.z);
}
//

```

---

_[View the full topic](https://discourse.processing.org/t/3d-shape-with-a-bad-seam/13218)._
