# Shape for points

**URL:** <https://discourse.threejs.org/t/shape-for-points/1869>\
**Category:** Questions\
**Tags:** points, points-material\
**Created:** [February 16, 2018, 6:51pm UTC](https://discourse.threejs.org/t/shape-for-points/1869 "2018-02-16T18:51:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Odin04ka](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/odin04ka/32/1090_2.png) [@Odin04ka](https://discourse.threejs.org/u/Odin04ka)\
**Post date:** [February 16, 2018, 6:51pm UTC](https://discourse.threejs.org/t/shape-for-points/1869/1 "2018-02-16T18:51:29Z")

</div>

Hi all got a function for create points:

```
function generateSpherePoints(size, count){
    geometry = new THREE.Geometry(spherical);
    for(let i = 0; i < count; i++){
      geometry.vertices.push(setRandomPointInSphere(50));
    }
    var material_medium = new THREE.PointsMaterial({color: 0xffffff, size: size,alphaTest: 0, transparent: true});
     points = new THREE.Points(geometry, material_medium);
    return points;
}

```

how without textures i can change point shape from box to sphere?

---

<div class="post-metadata">

**Author:** ![prisoner849](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/prisoner849/32/535_2.png) [@prisoner849](https://discourse.threejs.org/u/prisoner849)\
**Post date:** [February 16, 2018, 7:59pm UTC](https://discourse.threejs.org/t/shape-for-points/1869/2 "2018-02-16T19:59:03Z")

</div>

Did I get it correctly, that you want to have shape of points as circles instead of squares?

---

<div class="post-metadata">

**Author:** ![Odin04ka](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/odin04ka/32/1090_2.png) [@Odin04ka](https://discourse.threejs.org/u/Odin04ka)\
**Post date:** [February 16, 2018, 8:03pm UTC](https://discourse.threejs.org/t/shape-for-points/1869/3 "2018-02-16T20:03:08Z")

</div>

yes. box - squares. Sorry…

---

<div class="post-metadata">

**Author:** ![Odin04ka](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/odin04ka/32/1090_2.png) [@Odin04ka](https://discourse.threejs.org/u/Odin04ka)\
**Post date:** [February 16, 2018, 9:09pm UTC](https://discourse.threejs.org/t/shape-for-points/1869/4 "2018-02-16T21:09:13Z")

</div>

or may be better use sprites?

---

<div class="post-metadata">

**Author:** ![Mugen87](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/mugen87/32/5645_2.png) [@Mugen87](https://discourse.threejs.org/u/Mugen87)\
**Post date:** [February 17, 2018, 9:14am UTC](https://discourse.threejs.org/t/shape-for-points/1869/5 "2018-02-17T09:14:30Z")

</div>

Maybe this article is helpful to you:

[https://www.desultoryquest.com/blog/drawing-anti-aliased-circular-points-using-opengl-slash-webgl/](https://www.desultoryquest.com/blog/drawing-anti-aliased-circular-points-using-opengl-slash-webgl/)

In `three.js` you need to adjust `PointsMaterial` to achieve anti-aliased circular points. You can find the shader code for this in the linked document.

Before you do that: Why not just using a texture?

---

<div class="post-metadata">

**Author:** ![Odin04ka](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/odin04ka/32/1090_2.png) [@Odin04ka](https://discourse.threejs.org/u/Odin04ka)\
**Post date:** [February 17, 2018, 9:31am UTC](https://discourse.threejs.org/t/shape-for-points/1869/6 "2018-02-17T09:31:57Z")

</div>

so thank you!
