# RenderPointsAsSpheres() in vtk.js

**URL:** https://discourse.vtk.org/t/renderpointsasspheres-in-vtk-js/9000
**Category:** Web
**Created:** [July 23, 2022, 4:29pm UTC](https://discourse.vtk.org/t/renderpointsasspheres-in-vtk-js/9000 "2022-07-23T16:29:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Sigsev-Dev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sigsev-dev/32/5549_2.png) [@Sigsev-Dev](https://discourse.vtk.org/u/Sigsev-Dev)
#### Post date: [July 23, 2022, 4:29pm UTC](https://discourse.vtk.org/t/renderpointsasspheres-in-vtk-js/9000/1 "2022-07-23T16:29:38Z")

</div>

Hi,  
I am pretty new with vtk.js

I am reading a poly data using the tube filter example application but I need to also render the points as spheres. A function RenderPointsAsSpheres() is available in VTK to do so, and also in paraview there is an option in point geometry to render points as spheres with certain scalar properties. How do I do the same in vtk.js?

Thank you

---

<div class="post-metadata">

### Author: ![Sebastien\_Jourdain](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sebastien_jourdain/32/100_2.png) [@Sebastien\_Jourdain](https://discourse.vtk.org/u/Sebastien_Jourdain)
#### Post date: [July 24, 2022, 3:58am UTC](https://discourse.vtk.org/t/renderpointsasspheres-in-vtk-js/9000/2 "2022-07-24T03:58:54Z")

</div>

The current WebGL implementation does not support it but it is very likely that the WebGPU one will.

Otherwise as an alternative, you might be able to use the [SphereMapper](https://kitware.github.io/vtk-js/examples/SphereMapper.html).

---

<div class="post-metadata">

### Author: ![Sigsev-Dev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/sigsev-dev/32/5549_2.png) [@Sigsev-Dev](https://discourse.vtk.org/u/Sigsev-Dev)
#### Post date: [July 24, 2022, 11:53am UTC](https://discourse.vtk.org/t/renderpointsasspheres-in-vtk-js/9000/3 "2022-07-24T11:53:06Z")

</div>

I have used tube viewer example application to read .vtp files, if you’re suggesting me sphere mapper how do I pass the input points from .vtp file to be converted to spheres? And how do I incorporate the sphere mapper functions in the tube viewer code?

I’m new and struggling with this.

Thanks a lot in advanced!!
