# How to plot shaded 3D balls

**URL:** <https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949>\
**Category:** Q&A\
**Created:** [October 16, 2020, 10:39pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949 "2020-10-16T22:39:10Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![seisman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/seisman/32/4_2.png) [@seisman](https://forum.generic-mapping-tools.org/u/seisman)\
**Post date:** [October 16, 2020, 10:39pm UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949/1 "2020-10-16T22:39:10Z")

</div>

![3Dball](https://canada1.discourse-cdn.com/flex047/uploads/gmt/original/1X/c452d78edfba489124589ca35a3ae391b3775058.png)

Any idea to plot shaded 3D balls in GMT? It seems there is no easy way to do it, but AFAIK, PostScript language has some basic supports for shading. Can GMT support it in the future?

---

<div class="post-metadata">

**Author:** ![timhume](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/timhume/32/296_2.png) [@timhume](https://forum.generic-mapping-tools.org/u/timhume)\
**Post date:** [October 17, 2020, 12:11am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949/2 "2020-10-17T00:11:51Z")

</div>

Do you want these shaded balls to appear on a map. Or just a single shaded ball?

It occurs to me that the Earth is a “ball”, so I can envisage how a global map projection (e.g. orthographic or a perspective projection) could have shading added to it (and simply leave off the coastlines).

---

<div class="post-metadata">

**Author:** ![seisman](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/seisman/32/4_2.png) [@seisman](https://forum.generic-mapping-tools.org/u/seisman)\
**Post date:** [October 17, 2020, 5:45am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949/3 "2020-10-17T05:45:35Z")

</div>

grdimage with shadings may work, but I believe that’s the hard way. I expect to be able to plot the 3d balls just like plotting circles.

---

<div class="post-metadata">

**Author:** ![timhume](https://yyz1.discourse-cdn.com/flex047/user_avatar/forum.generic-mapping-tools.org/timhume/32/296_2.png) [@timhume](https://forum.generic-mapping-tools.org/u/timhume)\
**Post date:** [October 18, 2020, 2:20am UTC](https://forum.generic-mapping-tools.org/t/how-to-plot-shaded-3d-balls/949/4 "2020-10-18T02:20:07Z")

</div>

I’m guessing the shading on the 3D balls will represent some sort of data? Maybe make a collection of all the possible shaded balls as raster images, and overlay the appropriate ones with the image module?
