# Drawing a flower of life with 6 Vesica Piscis

**URL:** <https://discourse.processing.org/t/drawing-a-flower-of-life-with-6-vesica-piscis/46341>\
**Category:** Coding Questions\
**Created:** [May 7, 2025, 10:32am UTC](https://discourse.processing.org/t/drawing-a-flower-of-life-with-6-vesica-piscis/46341 "2025-05-07T10:32:54Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![behreajj](https://avatars.discourse-cdn.com/v4/letter/b/b5a626/32.png) [@behreajj](https://discourse.processing.org/u/behreajj)\
**Post date:** [May 8, 2025, 2:40am UTC](https://discourse.processing.org/t/drawing-a-flower-of-life-with-6-vesica-piscis/46341/7 "2025-05-08T02:40:20Z")

</div>

As far as I know, `scale` within `pushMatrix` and `popMatrix` can inflate the stroke weight, exaggerating errors. I would try `PVector` methods to transform a shape instead. Single precision (32 bit) floating point error might be a contributing factor as well, but there’s little to be done about it with Processing’s methods.

 ![screenCap](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/1/9/19cd22c393c83851b17a2674852698122d7288f8.png)

```processing
void setup() {
  size(400, 400, JAVA2D);
  // size(400, 400, P2D);

  strokeJoin(MITER);
  // strokeJoin(BEVEL);
  // strokeJoin(ROUND);
}

void draw() {
  PVector coRight = new PVector(1.0, 0.0);
  PVector fhRight = new PVector(0.690599, 0.178633);
  PVector rhRight = new PVector(0.690599, -0.178633);

  PVector coLeft = new PVector(0.0, 0.0);
  PVector fhLeft = new PVector(0.309401, -0.178633);
  PVector rhLeft = new PVector(0.309401, 0.178633);

  // Rotate
  float theta = frameCount * TAU / 360.0;
  coRight.rotate(theta);
  fhRight.rotate(theta);
  rhRight.rotate(theta);

  coLeft.rotate(theta);
  fhLeft.rotate(theta);
  rhLeft.rotate(theta);

  // Scale
  float scale = min(width, height) * 0.5;
  coRight.mult(scale);
  fhRight.mult(scale);
  rhRight.mult(scale);

  coLeft.mult(scale);
  fhLeft.mult(scale);
  rhLeft.mult(scale);

  // Translate
  PVector origin = new PVector(width / 2.0, height / 2.0);
  coRight.add(origin);
  fhRight.add(origin);
  rhRight.add(origin);

  coLeft.add(origin);
  fhLeft.add(origin);
  rhLeft.add(origin);

  background(#fff7d5);
  stroke(#202020);
  strokeWeight(5.0);

  fill(#0080ff);

  beginShape();
  vertex(coRight.x, coRight.y);
  bezierVertex(
    fhRight.x, fhRight.y,
    rhLeft.x, rhLeft.y,
    coLeft.x, coLeft.y);
  bezierVertex(
    fhLeft.x, fhLeft.y,
    rhRight.x, rhRight.y,
    coRight.x, coRight.y);
  endShape(CLOSE);
}

```

I got flickering with the `P2D` renderer on version 4.4.1 .

Other than that, the default AWT renderer passes the `strokeJoin` constant on to `BasicStroke`. For an angle that sharp, `BEVEL` is what’s left when `MITER` raises problems.

> <https://github.com/processing/processing4/blob/540d299cf39abee6b9de25db014d5d28be364032/core/src/processing/awt/PGraphicsJava2D.java#L2469>

If you had access to the AWT renderer directly, you might be able to fiddle with the `miterLimit` of the `BasicStroke`:

> **[BasicStroke (Java Platform SE 8 )](https://docs.oracle.com/javase/8/docs/api/java/awt/BasicStroke.html)**

Never tried that myself.

---

_[View the full topic](https://discourse.processing.org/t/drawing-a-flower-of-life-with-6-vesica-piscis/46341)._
