how to draw ribbons and pipes & planks in OpenGL

Started by
2 comments, last by dimebolt 18 years, 10 months ago
i m working on the molecular visualization application. can any body tell me about any molecular graphics libaray that supports the ribbon and pipes & planks representation of molecules. or can any body tell me how these complex 3d images are drawn so that i can make it myself.
Advertisement
I'd love to know that myself :)

I know that the popular VMD (http://www.ks.uiuc.edu/Research/vmd/) package is open source. I used that to write a PDB loader. I didn't have time to look in to the ribbon stuff and only draw atoms as spheres but it should be in there as well. If you're developing a commercial product, their license might be a bit restrictive but you could always just use it for 'inspiration' (just keep your fingers from the CTRL and C keys :).

Anyway, if you or someone else finds out how this mapping from atoms to ribbons/planks actually works, I'd like to know as well.

Tom
First check out the Visualization Toolkit (VTK). It is a common tool for scientific visualization. I don't know if it natively supports these visualizations, or if standard extensions for it exist. I do know I've seen ribbons used with VTK (as well as a dozen other visualization types)*.

Then; isn't a ribbon just like a line but with an orientation in the tangential direction? You could draw them similarly, from point to point, using a plane oriented along the normal vector.

Greetz,

Illco

*) Might it be that VTK calls ribbons streamlines?
Although I agree that VTK should in most cases be the first place to look for a scientific visualization problem (it seems this thread is a bit off topic for a gamedev forum, but let's continue anyway). However, in this case I'm not sure that VTK contains the required functionality as built in blocks. Which means that the question "how to draw ribbons in OpenGL?" becomes "how to draw ribbons in VTK". I would opt for VMD (or rasmol, pymol or whatever) first as they are existing solutions to the question "how to draw ribbons in OpenGL?".

Tom

This topic is closed to new replies.

Advertisement