Drawing Molecules using openGL?

So far i've managed to draw a sort of diamond structure but i want to put spheres on some of the connecting vertices, put figuring out the angles and distances is quite tough, i was wondering whether there was any way of moving a sphere along a connecting vertex line directly.

Any one any ideas?

Or has anyone ever modelled hexagonal ice using c++ before?

Thanks

Not sure if i was very clear though
 

mgb_phys

Science Advisor
Homework Helper
7,660
11
A good starting point for openGL is the NeHe tutorials http://nehe.gamedev.net/

Do you particularly need to use raw openGL? If you are doing this to learn openGL - great, but if you need to do the chemistry there are lots of toolkits on top of openGL that might make life easier.
 

The Physics Forums Way

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving
Top