# 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.

![](/files/Q2mzMbX8AT3VyvjLDnI5)

#### 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)
```

![](/files/BfjUkXrfYid9Pz3KvhpW)

#### 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.

![](/files/T0ZF77hEXUgyoqn9ycJO)

#### 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.

![](/files/9cFyLgc1p1sHPSNv4lIs)

**See** [**ellipse()**](/p5-python-web/reference/shapes/2d/ellipse.md) **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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://learnpython.strivemath.com/p5-python-web/reference/controlling-the-environment/ellipsemode.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
