# vtkParametricFunction Class on VTK.js

**URL:** https://discourse.vtk.org/t/vtkparametricfunction-class-on-vtk-js/4048
**Category:** Web
**Created:** [August 22, 2020, 4:32pm UTC](https://discourse.vtk.org/t/vtkparametricfunction-class-on-vtk-js/4048 "2020-08-22T16:32:50Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Souleymane0](https://discourse.vtk.org/user_avatar/discourse.vtk.org/souleymane0/32/2222_2.png) [@Souleymane0](https://discourse.vtk.org/u/Souleymane0)
#### Post date: [August 22, 2020, 4:32pm UTC](https://discourse.vtk.org/t/vtkparametricfunction-class-on-vtk-js/4048/1 "2020-08-22T16:32:50Z")

</div>

Hello,

I want to visualize Parametric surfaces using VTK.js and I was wondering if there is the extention of the vtkParametricFunction Class in VTK.js as well, because I didn’t find it on the library.  
If there isn’t such class in the JavaScript version, how can I render parametric surfaces (Conic Spiral, Ellipsoid, Torus …).

Thanks,

---

<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 24, 2020, 2:53pm UTC](https://discourse.vtk.org/t/vtkparametricfunction-class-on-vtk-js/4048/2 "2020-08-24T14:53:05Z")

</div>

I guess those vtk source were never written in JS. But if you feel like it, you could create a Pull-Request with their conversion from C++ to JS. You can use the vtkConeSource [C++](https://gitlab.kitware.com/vtk/vtk/-/blob/master/Filters/Sources/vtkConeSource.cxx)/[JS](https://github.com/Kitware/vtk-js/blob/master/Sources/Filters/Sources/ConeSource/index.js) as an example.

Another option could also be to use the WebAssembly path, by writing your code in VTK/C++ and exposing only the set of control/methods you would like to the JS world. You can find some [examples here](https://gitlab.kitware.com/vtk/vtk/-/tree/master/Examples/Emscripten/Cxx).

HTH
