## ← Circles - solution

• 2 Followers
• 40 Lines

### Get Embed Code x Embed video Use the following code to embed this video. See our usage guide for more details on embedding. Paste this in your document somewhere (closest to the closing body tag is preferable): <script type="text/javascript" src='https://amara.org/embedder-iframe'></script> Paste this inside your HTML body, where you want to include the widget: <div class="amara-embed" data-url="http://www.youtube.com/watch?v=iN26WKunhnY" data-team="udacity"></div> 4 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

1. So as we saw earlier on, you specify
the center point of the circle, and
2. then its radius in meters.
3. So here you can say I've set
the .center of my circle.
a new circle options.
5. And I set its center to be renton.
6. And renton of course,
is the latitude and
7. longitude that we created earlier for
the location of the rank and renton.
8. I set a radius of 5,000,
9. which means a 5 kilometer radius
around the rank and renton.
10. I've set the stroke color,
11. which is the diameter of the circle will
be drawn in this color, Color.GREEN.
12. And then I've set using a fill color,
using Color.argb.
13. And you see I've set the A to be 64,
14. which means it's going to
be semi transparent.
15. It's going to be slightly translucent.
16. So, we can see the color, the 0, 255,
0, which is going to be green, but
17. it's a partially transparent green.
18. Now when I run the app, I'll actually
see the circle projected properly,
19. including taking into account
the tilt and zoom of the camera.
20. And it will be drawn on
the surface of the earth.
21. Let's take a look at that.
22. So here you can see it, I have my
green circle, my semi translucent one.
23. So as I zoom in,
you'll see that my stroke is green.
24. You'll see that my circle is
25. the renton ice rink.
26. Because I've colored
it with translucency,
27. we can actually see through
to the map underneath.
28. And also because my camera
is tilted a little bit,
29. we can see that it's
slightly oval in shape.
30. I'm not looking straight down at
90 degrees to make it a circle.
31. I'm tilted a little bit, because I'm
looking somewhat up from the horizon
32. direction, towards the Earth,
and this part of Seattle.
33. So there we can see it.