# How to draw a perfect flower

**URL:** https://discourse.processing.org/t/how-to-draw-a-perfect-flower/44734
**Category:** Coding Questions
**Created:** [July 8, 2024, 2:35pm UTC](https://discourse.processing.org/t/how-to-draw-a-perfect-flower/44734 "2024-07-08T14:35:06Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [July 8, 2024, 5:33pm UTC](https://discourse.processing.org/t/how-to-draw-a-perfect-flower/44734/3 "2024-07-08T17:33:21Z")

</div>

Hello @Ruka,

This may help:

> [@Underlap and overlap](https://discourse.processing.org/t/underlap-and-overlap/43158/3):
>
> Hello @Ernest, Consider using PGraphics to achieve this: [image] I am sharing some of the code for one half as an example. You can complete the rest. PGraphics pg2; void setup() { size(400, 400); pg2 = createGraphics(400, 400); noLoop(); } void draw() { background(220); int numCircles = 6; float radius = 100; float centerX = width/2; float centerY = height/2; pg2.beginDraw(); for (int i = 0; i \< numCircles; i++) { float angle = TWO\_PI / numCircles \* i - TAU/2; …

![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/8/a/8a5eb377788e491273374204ca3c31377ca10864.png)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/how-to-draw-a-perfect-flower/44734)._
