# For vtkPolyData find location for a given texture coordinate?

**URL:** https://discourse.vtk.org/t/for-vtkpolydata-find-location-for-a-given-texture-coordinate/13263
**Category:** Support
**Created:** [February 5, 2024, 7:13pm UTC](https://discourse.vtk.org/t/for-vtkpolydata-find-location-for-a-given-texture-coordinate/13263 "2024-02-05T19:13:55Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [February 5, 2024, 7:13pm UTC](https://discourse.vtk.org/t/for-vtkpolydata-find-location-for-a-given-texture-coordinate/13263/1 "2024-02-05T19:13:55Z")

</div>

If I have a vtkPolyData object with texture coordinates, and I am given a texture coordinate (u, v), is it possible to find or interpolate the location in 3D where the texture coordinates correspond to? Something like (u, v) = (0.5, 0.5) → (1, 2, 3) in “real” space?

---

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [February 6, 2024, 1:29pm UTC](https://discourse.vtk.org/t/for-vtkpolydata-find-location-for-a-given-texture-coordinate/13263/2 "2024-02-06T13:29:08Z")

</div>

Might there be some way to use vtkCellPicker, tweaked to look for texture coordinates somehow?

---

<div class="post-metadata">

### Author: ![will.schroeder](https://discourse.vtk.org/user_avatar/discourse.vtk.org/will.schroeder/32/233_2.png) [@will.schroeder](https://discourse.vtk.org/u/will.schroeder)
#### Post date: [February 6, 2024, 1:58pm UTC](https://discourse.vtk.org/t/for-vtkpolydata-find-location-for-a-given-texture-coordinate/13263/3 "2024-02-06T13:58:07Z")

</div>

How about: you grab the data array containing the texture data, and use std::find() (or equivalent) to find the texture coordinates that match your query. This will give you the cell id (if cell data) or point id (if point data), which can then be used to determine a geometric location.
