# I have a question about the control of the polygon.

**URL:** https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882
**Category:** Development
**Created:** [December 12, 2023, 6:24am UTC](https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882 "2023-12-12T06:24:42Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ManInTheSouth](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maninthesouth/32/8126_2.png) [@ManInTheSouth](https://discourse.vtk.org/u/ManInTheSouth)
#### Post date: [December 12, 2023, 6:24am UTC](https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882/1 "2023-12-12T06:24:42Z")

</div>

![image](https://discourse.vtk.org/uploads/default/original/2X/e/ed8d1ec54ce6ee92e843397de6f66fe58023f1b3.png)

private void renderWindowControl1\_Load(object sender, EventArgs e)  
{

```
sphere.SetThetaResolution(8);
sphere.SetPhiResolution(20);

shrink.SetInputConnection(sphere.GetOutputPort());
shrink.SetShrinkFactor(0.9);

mapper.SetInputConnection(shrink.GetOutputPort());

actor.SetMapper(mapper);
actor.GetProperty().SetColor(0, 1, 0);

vtkRenderer ren1 = renderWindowControl1.RenderWindow.GetRenderers().GetFirstRenderer();
vtkRenderWindow renWin = renderWindowControl1.RenderWindow;

ren1.AddViewProp(actor);
renWin.SetSize(250, 250);
renWin.Render();
vtkCamera camera = ren1.GetActiveCamera();
camera.Zoom((double)1.5);

```

}

This is the code created using actviz.

My question is, it appears that the triangular polygons in the sphere are created and is it possible for me to choose one of each of these triangles to change the color and so on.

---

<div class="post-metadata">

### Author: ![lgivord](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lgivord/32/3543_2.png) [@lgivord](https://discourse.vtk.org/u/lgivord)
#### Post date: [December 12, 2023, 12:19pm UTC](https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882/2 "2023-12-12T12:19:18Z")

</div>

FYI @LucasGandel @alexy.pellegrini

---

<div class="post-metadata">

### Author: ![LucasGandel](https://discourse.vtk.org/user_avatar/discourse.vtk.org/lucasgandel/32/1831_2.png) [@LucasGandel](https://discourse.vtk.org/u/LucasGandel)
#### Post date: [December 12, 2023, 12:41pm UTC](https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882/3 "2023-12-12T12:41:35Z")

</div>

Hi @ManInTheSouth! The code you shared is adapted from a very simple Activiz example that only demonstrates the use of the vtkShrinkPolyData filter in a WindowsForm application. If my understanding is correct, you would like to achieve cell picking in this example and highlight the picked cell. This could be achieved by combining existing VTK examples like [CellPicking](https://examples.vtk.org/site/Cxx/Picking/CellPicking/) and [ColorCellsWithRGB](https://examples.vtk.org/site/Cxx/PolyData/ColorCellsWithRGB/). Such example can be adapted to C# easily because the Activiz API is the same as VTK.  
Hope this helps, feel free to contact me if you need further help.

---

<div class="post-metadata">

### Author: ![ManInTheSouth](https://discourse.vtk.org/user_avatar/discourse.vtk.org/maninthesouth/32/8126_2.png) [@ManInTheSouth](https://discourse.vtk.org/u/ManInTheSouth)
#### Post date: [December 13, 2023, 2:05am UTC](https://discourse.vtk.org/t/i-have-a-question-about-the-control-of-the-polygon/12882/5 "2023-12-13T02:05:58Z")

</div>

thank you for your answer
