# How to create a 3D geometry with faceted reflection of light (sphere)

**URL:** <https://discourse.processing.org/t/how-to-create-a-3d-geometry-with-faceted-reflection-of-light-sphere/40932>\
**Category:** Coding Questions\
**Created:** [February 15, 2023, 5:15am UTC](https://discourse.processing.org/t/how-to-create-a-3d-geometry-with-faceted-reflection-of-light-sphere/40932 "2023-02-15T05:15:18Z")\
**Posts on this page:** 1\
**Showing post:** 4

<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:** [February 15, 2023, 2:20pm UTC](https://discourse.processing.org/t/how-to-create-a-3d-geometry-with-faceted-reflection-of-light-sphere/40932/4 "2023-02-15T14:20:10Z")

</div>

Hello @peskythisdot,

Related:

> [@Sketch runs slow in P5.js WEBGL, (SOLVED by using P5.Geometry)](https://discourse.processing.org/t/sketch-runs-slow-in-p5-js-webgl-solved-by-using-p5-geometry/31990):
>
> Hi. I am translating a sketch from P5.java to P5.js. In java, it runs nice and smooth at a frameRate near 60. In p5.js the frameRate drops to around 4 f/s and a lot of details are missing. How can I improve this, or is WEBGL really that bad? Thanks. Edit: Please skip to the actual sketch I am translating [here below](https://discourse.processing.org/t/sketch-runs-slow-in-p5-js/31990/5). P5.java: int num; float pt[]; int style[]; float sin\_ar[]; float cos\_ar[]; float PRECISION = 1.0; int AR\_LENGTH = 360; void setup() { size(600, 600, P3D); background(255)…

`:)`

---

_[View the full topic](https://discourse.processing.org/t/how-to-create-a-3d-geometry-with-faceted-reflection-of-light-sphere/40932)._
