# How I can create circle object?

**URL:** <https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105>\
**Category:** Questions\
**Created:** [December 16, 2014, 11:57am UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105 "2014-12-16T11:57:04Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![shyl\_sml](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/shyl_sml/32/48_2.png) [@shyl\_sml](https://discourse.mapeditor.org/u/shyl_sml)\
**Post date:** [December 16, 2014, 11:57am UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/1 "2014-12-16T11:57:05Z")

</div>

is editor support circle object? Or only ellipse?

---

<div class="post-metadata">

**Author:** ![Ablu](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/ablu/32/1496_2.png) [@Ablu](https://discourse.mapeditor.org/u/Ablu)\
**Post date:** [December 16, 2014, 3:36pm UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/2 "2014-12-16T15:36:00Z")

</div>

Isn’t a circle just a specific ellipse? 🙂 Just make sure height and width are the same and you have a circle 😉

Regards,  
Ablu

---

<div class="post-metadata">

**Author:** ![shyl\_sml](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/shyl_sml/32/48_2.png) [@shyl\_sml](https://discourse.mapeditor.org/u/shyl_sml)\
**Post date:** [December 16, 2014, 3:52pm UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/3 "2014-12-16T15:52:34Z")

</div>

Yes, ofcouse.  
I use Tile to create game on libgdx. Libgdx can parse and load tmx-maps. I find, that libgdx support not only [EllipseMapObject](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/objects/EllipseMapObject.html), but also [CircleMapObject](http://libgdx.badlogicgames.com/nightlies/docs/api/com/badlogic/gdx/maps/objects/CircleMapObject.html). Then suggested, that Tile also different ellipse and circle…  
For me, as developer, there is no difference between this objects, because I can parse each object and extract x,y.

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [December 16, 2014, 4:42pm UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/4 "2014-12-16T16:42:24Z")

</div>

I’m not sure if the `CircleMapObject` is actually used by libgdx when loading a map. I could imagine it is only a libgdx-specific extension feature that could be used in your own code and may be a little more convenient in some cases.

Tiled has no separate notion of circle objects, since as Ablu pointed out you can just make an ellipse where width and height are equal. I do think it would make sense to support locking of the aspect ratio while resizing, to make it easier to keep a circle a circle. This is currently not possible so generally you’d have to use the Properties view to make sure the width and height are equal.

---

<div class="post-metadata">

**Author:** ![shyl\_sml](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/shyl_sml/32/48_2.png) [@shyl\_sml](https://discourse.mapeditor.org/u/shyl_sml)\
**Post date:** [December 16, 2014, 8:32pm UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/5 "2014-12-16T20:32:45Z")

</div>

Understood. No problem. It was only a matter of curiosity.

---

<div class="post-metadata">

**Author:** ![rileyrg](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/rileyrg/32/1844_2.png) [@rileyrg](https://discourse.mapeditor.org/u/rileyrg)\
**Post date:** [February 17, 2015, 10:19pm UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/6 "2015-02-17T22:19:21Z")

</div>

Yes but in LibGDX how does one then create a Box2d body from an ellipse? There is a CircleShape but not an EllipseShape with which to seed createFixture(shape,0);

---

<div class="post-metadata">

**Author:** ![bjorn](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.mapeditor.org/bjorn/32/1599_2.png) [@bjorn](https://discourse.mapeditor.org/u/bjorn)\
**Post date:** [February 18, 2015, 7:29am UTC](https://discourse.mapeditor.org/t/how-i-can-create-circle-object/105/7 "2015-02-18T07:29:33Z")

</div>

Since Box2D does not support ellipse objects, you’ll have to triangulate it (creating a polygon shape that roughly matches the shape of the ellipse).
