View Full Version : Help make a cylinder WebGL
12-15-2010, 09:26 AM
hello I am French student currently carrying out our project of molecule modeling in 3D WebGL we need a method to display a cylinder.
Thank you enlighten us on this issue.
12-15-2010, 07:02 PM
WebGL doesn't have functions for generating cylinders - or any other specific geometric shape for that matter. You have to generate the vertices yourself...either in a modelling program (blender or 3DStudio or whatever) - or you generate the vertices using math. Probably, you'll want to do it with math.
I suggest you start with one of the simple WebGL demos:
There is also a "makeSphere" function. With a little creativity, I think you can figure out how to make a cylinder.
http://www.ibiblio.org/e-notes/webgl/mo ... inder.html (http://www.ibiblio.org/e-notes/webgl/models/cylinder.html)
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.