# vtkTubeFilter vary radius

**URL:** https://discourse.vtk.org/t/vtktubefilter-vary-radius/10361
**Category:** Support
**Created:** [January 2, 2023, 3:43pm UTC](https://discourse.vtk.org/t/vtktubefilter-vary-radius/10361 "2023-01-02T15:43:36Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![micheleivani](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/a88e4f/32.png) [@micheleivani](https://discourse.vtk.org/u/micheleivani)
#### Post date: [January 2, 2023, 3:43pm UTC](https://discourse.vtk.org/t/vtktubefilter-vary-radius/10361/1 "2023-01-02T15:43:36Z")

</div>

Hello,

I need to get the following behavior.

 ![91ce13269ea2aad8a40028f2b1a23cb567497cc0](https://discourse.vtk.org/uploads/default/original/2X/9/91ce13269ea2aad8a40028f2b1a23cb567497cc0.jpeg)

I have a list of points with x,y, and z coordinates and radius. I want to use a vtkKochanekSpline and vtkTubeFilter with the SetVaryRadiusToVaryRadiusByAbsoluteScalar option.

I checked this example [https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/](https://kitware.github.io/vtk-examples/site/Cxx/VisualizationAlgorithms/TubesFromSplines/), but it uses just two values. My issue is to calculate the t value.

Any help on this @LucasGandel ?

Thank you.

---

<div class="post-metadata">

### Author: ![Yohann\_Bearzi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/yohann_bearzi/32/671_2.png) [@Yohann\_Bearzi](https://discourse.vtk.org/u/Yohann_Bearzi)
#### Post date: [January 3, 2023, 2:55pm UTC](https://discourse.vtk.org/t/vtktubefilter-vary-radius/10361/2 "2023-01-03T14:55:16Z")

</div>

Hi Michel,

I’m not sure I fully understand what you are trying to do, so let me expose what I think you want to do. You have a scalar array of some value named `t` and you want to scale your spline with this `t`? I think that you can do that by setting `SetInputArrayToProcess` to `t`, and turning on `VaryRadiusToVaryRadiusByScalar` on.
