# Points on the surface of a Sphere using beginShape(POINTS or QUADS)

**URL:** <https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425>\
**Category:** Coding Questions\
**Created:** [January 1, 2022, 11:45pm UTC](https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425 "2022-01-01T23:45:03Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [January 2, 2022, 12:23am UTC](https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425/6 "2022-01-02T00:23:36Z")

</div>

Hello,

Take a look here at the Cartesian Coordinates:

> **[Spherical coordinate system](https://en.wikipedia.org/wiki/Spherical_coordinate_system)**
>
> In mathematics, a spherical coordinate system is a coordinate system for three-dimensional space where the position of a point is specified by three numbers: the radial distance of that point from a fixed origin, its polar angle measured from a fixed zenith direction, and the azimuthal angle of its orthogonal projection on a reference plane that passes through the origin and is orthogonal to the zenith, measured from a fixed reference direction on that plane. It can be seen as the three-dimensi...

I used my original example for the random points, a translate, a rotate for _phi_ and a rotate for _theta_ and then drew a circle():

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/6/6dfcaab3de671b84659e642078afc1424e323b49.png)

This approach was fresh in my head from a recent project.

`:)`

---

_[View the full topic](https://discourse.processing.org/t/points-on-the-surface-of-a-sphere-using-beginshape-points-or-quads/34425)._
