# New Functions in PROCESSING 3.5

**URL:** <https://discourse.processing.org/t/new-functions-in-processing-3-5/7723>\
**Category:** Coding Questions\
**Created:** [January 22, 2019, 3:29am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723 "2019-01-22T03:29:20Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![jonzamarripa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jonzamarripa/32/3358_2.png) [@jonzamarripa](https://discourse.processing.org/u/jonzamarripa)\
**Post date:** [January 22, 2019, 3:29am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/1 "2019-01-22T03:29:20Z")

</div>

I just updated my processing to 3.5 and I saw that they added circle () and square()  
Does anyone know the syntax and parameters of these functions? I think it’s exciting to have these new features.

---

<div class="post-metadata">

**Author:** ![JackWitherell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jackwitherell/32/3361_2.png) [@JackWitherell](https://discourse.processing.org/u/JackWitherell)\
**Post date:** [January 22, 2019, 3:44am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/2 "2019-01-22T03:44:12Z")

</div>

```auto
circle(int x, int y, int diameter);

```

prints a circle at location `x`, `y` with a diameter of `diameter`

```auto
square(int x, int y, int wh);

```

prints a square at location `x`, `y` with a width and height of `wh`

By the way, did you know that processing has code suggestions if you enable them in preferences and press ctrl+space while typing? It’s very useful.  
 ![Untitleaaad](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/7e3122231eae2d2ea759380fb14f823c63096bef.png)

The actual documentation will probably be updated within a day or so.

---

<div class="post-metadata">

**Author:** ![kll](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kll/32/964_2.png) [@kll](https://discourse.processing.org/u/kll)\
**Post date:** [January 22, 2019, 3:50am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/3 "2019-01-22T03:50:26Z")

</div>

you see this already?

> [@Size(); not working for me / Processing 3.5](https://discourse.processing.org/t/size-not-working-for-me-processing-3-5/7688/4):
>
> [https://processing.org/reference/settings\_.html](https://processing.org/reference/settings_.html)[https://processing.org/reference/setup\_.html](https://processing.org/reference/setup_.html) that are Updated on January 20, 2019 05:42:15pm EST but nothing mentioned like that. until now the settings() was usable but only NEEDED for eclipse? ( as the above reference states ) can not test on Raspberry Pi RASPBIAN linux until available, but on win 7 64bit and right int diam=200; // used for eclipse and mandatory at rev 3.5 ??? void settings() { size(200,200); } void setup() { // …

and pls. use

> processing 3.5.1

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 22, 2019, 6:34am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/4 "2019-01-22T06:34:03Z")

</div>

> [@JackWitherell](#):
>
> Prints a circle at location _x_ , _y_ with a radius of _radius_.

Radius? Function **ellipse()** uses diameter by default for both its _width_ & _height_! 😶

---

<div class="post-metadata">

**Author:** ![JackWitherell](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jackwitherell/32/3361_2.png) [@JackWitherell](https://discourse.processing.org/u/JackWitherell)\
**Post date:** [January 22, 2019, 6:35am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/5 "2019-01-22T06:35:53Z")

</div>

![aaaa](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/b/bf9557fcc841a5c2e804f5ae2ea95ec465beda3d.png)  
You’re right. My bad. Edited my original post.

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 22, 2019, 6:44am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/6 "2019-01-22T06:44:02Z")

</div>

For completeness’ sake, we can make **ellipse()** (possibly **circle()** as well since I haven’t installed 3.5.1 yet to confirm it) use radius in place of diameter for both its _width_ & _height_ by calling `ellipseMode(RADIUS);`: 🔘

[Processing.org/reference/ellipseMode\_.html](http://Processing.org/reference/ellipseMode_.html)

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 22, 2019, 6:48am UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/7 "2019-01-22T06:48:56Z")

</div>

**A small warning:** if we intend to have our Java Mode sketch to automatically transpile to JS via Pjs, we should avoid both **circle()** & **square()** completely! 😿

[ProcessingJS.org/reference/](http://ProcessingJS.org/reference/)

---

<div class="post-metadata">

**Author:** ![jonzamarripa](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jonzamarripa/32/3358_2.png) [@jonzamarripa](https://discourse.processing.org/u/jonzamarripa)\
**Post date:** [January 22, 2019, 1:03pm UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/8 "2019-01-22T13:03:20Z")

</div>

Thanks @JackWitherell this was insightful! makes sense.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [January 27, 2019, 8:32pm UTC](https://discourse.processing.org/t/new-functions-in-processing-3-5/7723/9 "2019-01-27T20:32:35Z")

</div>

Circle and square have been added to the reference.

- [https://processing.org/reference/square\_.html](https://processing.org/reference/square_.html)
- [https://processing.org/reference/circle\_.html](https://processing.org/reference/circle_.html)

…and yes, it looks like the arguments / render style for circle and square are controlled by ellipseMode() and rectMode(), just as with ellipse and rect.
