PDA

View Full Version : Cylinder / Sphere mesh generation



07-18-2001, 02:06 AM
Does anyone know of source code to place cylinders and spheres of radius R at specified coordinates [(X,Y,Z) for spheres and (X1,Y1,Z1,X2,Y2,Z2) for cylinders]?

I don't want to use the glu routines, since I need different textures at various points on the objects.

I guess constructing them using triangle meshes would be best, but the working out vector math is beyond me.

Many thanks,

Rich Gilbert

RedZen
07-18-2001, 03:09 AM
hmmm this might not help at all, but have you looked into quadratics(sp?) ?

harsman
07-18-2001, 03:51 AM
I have some old c source that does this. Give me your email and I'll mail it to you. Also check out the FAQ for comp.graphics.algorithms

07-18-2001, 04:44 AM
Fantastic - that'll save a lot of time.

Thanks very much.

e-mail: r.gilbert@ic.ac.uk

BeeNew
10-16-2001, 06:48 AM
Originally posted by harsman:
I have some old c source that does this. Give me your email and I'll mail it to you. Also check out the FAQ for comp.graphics.algorithms


Can you mail me codes to Draw Circle, Cone, and Cylinder using quads?

harsman
10-16-2001, 07:17 AM
I'll mail you code to draw cylinders, you should be able to hack that to get cones (just replace the circle at one end of the cylinder with a single vertex) and disks/circles.