# Polygon in the form of a circle

**URL:** https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580
**Category:** Questions about Thunkable X
**Tags:** googlemaps
**Created:** [December 1, 2021, 5:45pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580 "2021-12-01T17:45:41Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [December 1, 2021, 5:45pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/1 "2021-12-01T17:45:41Z")

</div>

Hello. I ask for the help of the collective mind: is it possible to draw a circle on the map, in the center of which will be the current location of the user?

those. we draw a polygon consisting, for example, of 24 points, which are at an equal distance from the center. Maybe someone has an idea how to implement this? Thanks!

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [December 3, 2021, 9:08pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/2 "2021-12-03T21:08:34Z")

</div>

This is a complicated task, BUT [here’s](https://stackoverflow.com/questions/839899/how-do-i-calculate-a-point-on-a-circle-s-circumference) some starter material!

You’d essentially get your main point of interest, then use the formulas provided in the SO page and loop until you have completed your way around the circle. the formula increments around a fixed location and provides relevant coordinates to do so.

one of these day’s I’ll have to ccreate an example of this! great use cases for sure!

---

<div class="post-metadata">

### Author: ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)
#### Post date: [December 4, 2021, 11:52pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/3 "2021-12-04T23:52:12Z")

</div>

i found the exact problem (and solution) at stackoverflow [here](https://stackoverflow.com/questions/66177740/producing-points-in-a-circle-with-specific-radius-from-central-lat-long) .  
i got challenged by it so i turned it into a tiny app, with the solution expressed as thunkable function **get\_zone\_latlongs**

here’s the output for JFK international (40.6413,- 73.7781) and Paris (48.8566, 2.3522) - half-mile radius for 8 points.

 ![Screenshot_20211204-133224_Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/e/5/e595bbbced1f32e136e8c03f6aa468502bb068ae.jpeg)  
 ![Screenshot_20211204-133926_Thunkable](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/3/33c3fa45ce97efc1471c45c842450ff8cbe62ea4.jpeg)

and here’s the link to the project.  
[https://x.thunkable.com/copy/334a35bdc1cb2254567846e881c4b8fc](https://x.thunkable.com/copy/334a35bdc1cb2254567846e881c4b8fc)

main blocks are shown below:  
(the list viewer was just for verification and the function show\_points -ie. vertices - isn’t actually necessary but it was helpful for checking the plotting of points.)

 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/b/4b3336769d0f079841728c9e2ed4acc87284cbab.png)  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/9/4/9420fc53f54ec9bc43cb3454c74e9bcf7b3a26c2.png)

---

<div class="post-metadata">

### Author: ![jared](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/jared/32/138473_2.png) [@jared](https://community.thunkable.com/u/jared)
#### Post date: [December 5, 2021, 12:21am UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/4 "2021-12-05T00:21:26Z")

</div>

Awesome!

---

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [December 5, 2021, 4:25pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/5 "2021-12-05T16:25:37Z")

</div>

You are a genius!  
Thanks!!!

---

<div class="post-metadata">

### Author: ![lavrynenko](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/lavrynenko/32/108213_2.png) [@lavrynenko](https://community.thunkable.com/u/lavrynenko)
#### Post date: [December 5, 2021, 4:42pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/6 "2021-12-05T16:42:22Z")

</div>

During testing, a question arose - if I change the search radius to a value greater than 0.5 - the circle becomes an ellipse … ☹ What am I doing wrong?

---

<div class="post-metadata">

### Author: ![manyone](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@manyone](https://community.thunkable.com/u/manyone)
#### Post date: [December 5, 2021, 6:27pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/7 "2021-12-05T18:27:21Z")

</div>

Please read the link I provided at the start. It’s got something to do with the fact that the earth is not a perfect sphere and the map projection distorts the dimensions as you approach the poles. The formulas have been adjusted to account for these. So it might be the projection process. Perhaps it looks like an ellipse on a flat map on paper (or screen), it may turn out to be a circle when you plot the same points on a globe, I’m just guessing.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)
#### Post date: [March 5, 2022, 6:27pm UTC](https://community.thunkable.com/t/polygon-in-the-form-of-a-circle/1642580/8 "2022-03-05T18:27:57Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
