# ellipseMode()

By default, the **x** and **y** inputs refer to the center of the ellipse.

This can be changed using `ellipseMode()`, with an input of **CENTER**, **CORNERS**, **CORNER**, or **RADIUS**.

#### ellipseMode(CENTER)

This is the default mode. The code:

```python
ellipse(x, y, width, height)
```

will use **(x,y)** as the center coordinates and **width** and **height** as the dimensions.

![](https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2F63welyH6mKdMX7szquxJ%2Fspaces_qbs7pgU3AVBY06Rl9M31_uploads_QlBjjeydULcgrVfjyiQd_image.png?alt=media\&token=5df566ae-ec92-41ac-9b20-cc98abb99cb9)

#### ellipseMode(CORNERS)

This mode is for specifying the coordinates of opposite corners of the ellipse's bounding box. The code:

```python
ellipse(x1, y2, x2, y2)
```

![](https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FIE51W2lNUm7iIUjeOHyj%2Fimage.png?alt=media\&token=3ca8d785-d2fc-4cd1-84d7-b310c364adfe)

#### ellipseMode(CORNER)

This mode is for specifying the **corner** of the ellipse's bounding box together with the **width** and **height**. The code:

```python
ellipse(x, y, width, height)
```

will use **(x,y)** as the bottom left corner of the ellipse's bounding box and **width** and **height** as the dimensions.

![](https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FgnKfQUhEVamsguTXMRuv%2Fimage%20\(1\).png?alt=media\&token=720ba19a-fa60-4854-b6db-4878f3a649bd)

#### ellipseMode(RADIUS)

This mode is for specifying the **center** of the ellipse together with **half the width** and **half the height**. The code:

```python
ellipse(x, y, wRadius, hRadius)
```

will use **(x,y)** as the center coordinates and **wRadius \* 2** and **hRadius \* 2** as the dimensions.

![](https://768248463-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fqbs7pgU3AVBY06Rl9M31%2Fuploads%2FJx8kQKzQqPyvD5WqGErQ%2Fimage%20\(2\).png?alt=media\&token=e791c9ce-747c-4ba8-84b9-32b4942c3a38)

**See** [**ellipse()**](https://learnpython.strivemath.com/p5-python-web/reference/shapes/2d/ellipse) **for examples and more info.**

{% hint style="info" %}
Find these documents helpful? Let the people who made them help your child learn to code at [**Strivemath**](https://www.strivemath.com/)<mark style="color:blue;">**!**</mark>

We'd love to hear your Feedback/Comments [here](https://docs.google.com/forms/d/e/1FAIpQLSeqorBAGTya-YBRI-VFjJxtgQtCz3ucGDI96K96sNyuaGuvdw/viewform?usp=sf_link).
{% endhint %}
