# How to render point as square in PCLVisualizer?

**URL:** https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966
**Category:** Support
**Created:** [December 5, 2024, 8:04am UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966 "2024-12-05T08:04:50Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![tomdong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomdong/32/9167_2.png) [@tomdong](https://discourse.vtk.org/u/tomdong)
#### Post date: [December 5, 2024, 8:04am UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966/1 "2024-12-05T08:04:50Z")

</div>

I’m using vtk9.3 from pcl1.14.1, the default rendering shape of point is sphere.  
My question is how to render them as square (which always face to user).

Thanks a lot!

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [December 5, 2024, 12:46pm UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966/2 "2024-12-05T12:46:12Z")

</div>

Hello @tomdong  
In VTK, the default shape of points is a square. Could you check if PCL is enabling this setting on the actor’s property (`actor->GetProperty()->SetRenderPointsAsSpheres(true)`

---

<div class="post-metadata">

### Author: ![tomdong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomdong/32/9167_2.png) [@tomdong](https://discourse.vtk.org/u/tomdong)
#### Post date: [December 6, 2024, 3:10am UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966/3 "2024-12-06T03:10:56Z")

</div>

Thanks Jaswant!  
I have noticed that this might be caused by calling ‘SetRenderPointsAsSpheres(true)’, however, when I search in PCL code on github, the result is empty 🙂

 ![企业微信截图_1733454495425](https://discourse.vtk.org/uploads/default/original/2X/9/94bbc808183de4ab892baa0414bb67ab3bc95957.png)

---

<div class="post-metadata">

### Author: ![jaswantp](https://discourse.vtk.org/user_avatar/discourse.vtk.org/jaswantp/32/10046_2.png) [@jaswantp](https://discourse.vtk.org/u/jaswantp)
#### Post date: [December 6, 2024, 2:13pm UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966/4 "2024-12-06T14:13:41Z")

</div>

Then PCL may be using `vtkSphereSource` and glyph filter. Any case, this is a PCL question. Please ask in that community.

---

<div class="post-metadata">

### Author: ![tomdong](https://discourse.vtk.org/user_avatar/discourse.vtk.org/tomdong/32/9167_2.png) [@tomdong](https://discourse.vtk.org/u/tomdong)
#### Post date: [December 8, 2024, 4:24am UTC](https://discourse.vtk.org/t/how-to-render-point-as-square-in-pclvisualizer/14966/5 "2024-12-08T04:24:05Z")

</div>

OK, thanks for your help 💓
