# Texture a sphere from a mercator projected image

**URL:** <https://discourse.threejs.org/t/texture-a-sphere-from-a-mercator-projected-image/38600>\
**Category:** Questions\
**Tags:** sphere, textures\
**Created:** [May 28, 2022, 11:21am UTC](https://discourse.threejs.org/t/texture-a-sphere-from-a-mercator-projected-image/38600 "2022-05-28T11:21:43Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![vielzutun.ch](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vielzutun.ch/32/21366_2.png) [@vielzutun.ch](https://discourse.threejs.org/u/vielzutun.ch)\
**Post date:** [May 31, 2022, 9:05am UTC](https://discourse.threejs.org/t/texture-a-sphere-from-a-mercator-projected-image/38600/7 "2022-05-31T09:05:04Z")

</div>

> [@vielzutun.ch](#):
>
> Points at intermediate latitudes will have intermediate mapping coordinates, derived from the Math.atan() function.

I have to correct myself on my above quote - it’s plain wrong.

The way to find the “v” component of mapping coordinates in the above example is like shown in the following sketch:

 ![Bildschirmfoto 2022-05-31 um 10.27.19](https://canada1.discourse-cdn.com/flex035/uploads/threejs/original/3X/a/3/a34649acabeb2792c981d70ddea485057a82e7a6.png)

I’ve replaced the “tan(value)” from my previous sketch with their actual results. For the example map covering the -75° … +75° latitude range, the result range has a height of

**`2 * tan( 75° ) = 7.464`**.

To arrive at the “v” component at, say, **-60°** , you take the _ **share** _ of its absolute distance from bottom in relation to the total value range: **`2.000 / 7.464 = 0.268`**.

---

_[View the full topic](https://discourse.threejs.org/t/texture-a-sphere-from-a-mercator-projected-image/38600)._
