# Find the triangle on a sphere

**URL:** https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655
**Category:** Support
**Created:** [August 26, 2019, 11:57pm UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655 "2019-08-26T23:57:06Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Elvis723](https://discourse.vtk.org/user_avatar/discourse.vtk.org/elvis723/32/826_2.png) [@Elvis723](https://discourse.vtk.org/u/Elvis723)
#### Post date: [August 26, 2019, 11:57pm UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655/1 "2019-08-26T23:57:06Z")

</div>

Hi! I want to find the triangle that contains a certain point on a sphere in vtk. How should I do that? I knew that spheres in vtk are by default approximated by triangles. Thanks in advance!

---

<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: [August 27, 2019, 3:41pm UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655/2 "2019-08-27T15:41:34Z")

</div>

Is the question related to vtk.js or ParaViewWeb as you are posting in the Web topic?

Also what do you mean by “you want to find a triangle that is based on a point”. Are you thinking of picking? If not, you can iterate over the cells and if you find a cell that use the index of the point you care about, you would have the answer to your question.

---

<div class="post-metadata">

### Author: ![Elvis723](https://discourse.vtk.org/user_avatar/discourse.vtk.org/elvis723/32/826_2.png) [@Elvis723](https://discourse.vtk.org/u/Elvis723)
#### Post date: [August 27, 2019, 8:48pm UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655/3 "2019-08-27T20:48:50Z")

</div>

Sorry I am new here and am not familiar with the Web topic. So yes I am coding in Paraview. I want to calculate the location of a particle inside a cell after bouncing to the inner surface of the cell. I heard that “triangles” are used to approximate the surface of the cell, so I am thinking about finding that specific triangle the particle collides.

---

<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: [August 27, 2019, 10:47pm UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655/4 "2019-08-27T22:47:03Z")

</div>

@cory.quammen how do we move topic?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cory.quammen/32/6751_2.png) [@cory.quammen](https://discourse.vtk.org/u/cory.quammen)
#### Post date: [August 28, 2019, 3:21am UTC](https://discourse.vtk.org/t/find-the-triangle-on-a-sphere/1655/5 "2019-08-28T03:21:19Z")

</div>

Moderators can edit the original post and change the category. I have done so.
