Reputation: 15
How can I use spline interpolation in 3D with WebGL?. This is for molecule modeling, specifically Trace representation. I have been searching information about it, but i hven't found how to use it in WebGL. Will i need create the algorithm?
Upvotes: 0
Views: 750
Reputation: 3629
You can use it, but there're no ready-to-use facilities in WebGL. What you need to do is instead of generating geometry for strait lines between atoms (?) generate appropriately segmented splines. Also, WebGL 2 geometry shaders may come in handy to generate such splines in a performant manner.
However, if you're implementing a molecular viewer or editor and need to display alpha helices, beta sheets and such for a protein, maybe the best way would be to render them as pre-made primitives (e.g., modeled in a 3d software, exported and used as a ready geometry).
Upvotes: 1