# Rect corner radius issue. Squircles!?

**URL:** https://discourse.processing.org/t/rect-corner-radius-issue-squircles/3924
**Category:** Coding Questions
**Created:** [September 28, 2018, 4:37am UTC](https://discourse.processing.org/t/rect-corner-radius-issue-squircles/3924 "2018-09-28T04:37:08Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![jb4x](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jb4x/32/789_2.png) [@jb4x](https://discourse.processing.org/u/jb4x)
#### Post date: [September 28, 2018, 6:02am UTC](https://discourse.processing.org/t/rect-corner-radius-issue-squircles/3924/4 "2018-09-28T06:02:08Z")

</div>

Hi EliTheiceMan,

Good question!

If you look at the way they draw rounded rectangle, they use `quadraticVertex()`:

> <https://github.com/processing/processing/blob/master/core/src/processing/core/PGraphics.java#L2700-L2730>

So they are using bezier curves to draw the rounded edges. And the way they are using the bezier curves is by putting the control points on the corner of the rectangle like so:

![RoundedRect](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/b5922f63031f61ce4db3c2955c8f311ff8019a68.png)

The thing is that you can’t draw a perfect circle with bezier curves so you’ll never get perfect circles with this method.

Although there might be a way to make it appears a bit more like a circle by putting the control point [in a very specific place](https://stackoverflow.com/questions/1734745/how-to-create-circle-with-b%C3%A9zier-curves).

---

_[View the full topic](https://discourse.processing.org/t/rect-corner-radius-issue-squircles/3924)._
