vtkParametricFunction Class on VTK.js

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,

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++/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.

HTH

1 Like