# Https://qiita.com/enkatsu/items/37fcca5ceb30de13f565

**URL:** <https://discourse.processing.org/t/https-qiita-com-enkatsu-items-37fcca5ceb30de13f565/28134>\
**Category:** Gallery\
**Created:** [February 28, 2021, 4:07am UTC](https://discourse.processing.org/t/https-qiita-com-enkatsu-items-37fcca5ceb30de13f565/28134 "2021-02-28T04:07:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [February 28, 2021, 4:07am UTC](https://discourse.processing.org/t/https-qiita-com-enkatsu-items-37fcca5ceb30de13f565/28134/1 "2021-02-28T04:07:46Z")

</div>

```auto
PImage img;
PShape sphere;
PShape box;

void setup() {
  size(600, 600, P3D);
  img = loadImage("world32k.jpg");
  sphere = createShape(SPHERE, 100);
  sphere.setTexture(img);
  sphere.setStrokeWeight(0);

  box = createShape(BOX, 100);
  box.setTexture(img);
  box.setStrokeWeight(0);
}

void draw(){
  background(0);

  pushMatrix();
  translate(width/3, height/2, 100);
  rotateX(map(mouseY, 0, width, -PI, PI));
  rotateY(map(mouseX, 0, width, -PI, PI));
  shape(sphere);
  popMatrix();

  pushMatrix();
  translate(width/3 * 2, height/2, 100);
  rotateX(map(mouseY, 0, width, -PI, PI));
  rotateY(map(mouseX, 0, width, -PI, PI));
  shape(box);
  popMatrix();
}

```

---

<div class="post-metadata">

**Author:** ![jafal](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jafal/32/19112_2.png) [@jafal](https://discourse.processing.org/u/jafal)\
**Post date:** [February 28, 2021, 4:09am UTC](https://discourse.processing.org/t/https-qiita-com-enkatsu-items-37fcca5ceb30de13f565/28134/2 "2021-02-28T04:09:19Z")

</div>

![Untitled 43](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/1/1ee1684ac9905402eb1ce2aaf715ca4a7c87dd1e.jpeg)

---

<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:** [May 5, 2021, 1:14pm UTC](https://discourse.processing.org/t/https-qiita-com-enkatsu-items-37fcca5ceb30de13f565/28134/3 "2021-05-05T13:14:05Z")

</div>

Hello,

This is the same as this:  
_[ProcessingでSphereやBoxのPShapeを取得 - Qiita](https://qiita.com/enkatsu/items/37fcca5ceb30de13f565)_

My understanding is gallery is to “Share and discuss your work”:

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

The image is here:  
_[processing-docs/content/examples/Topics/Textures/TextureSphere/data at master · processing/processing-docs · GitHub](https://github.com/processing/processing-docs/tree/master/content/examples/Topics/Textures/TextureSphere/data)_
