3d modelling question

Roger Kohli

Newcomer
I have no practical reason for asking this question other than that I am just curious about the answer.

Suppose I wanted to model a solid cylinder in 3D graphics. I would require two approximate circles (made from triangles) for the ends (upper and lower) and some number of rectangles (2 triangles / rectangle) for the body.

Now, to approximate my circles I could calculate the position of a vertex on the circumference every, say, 10 degrees giving me 36 vertices. I could use these same vertices to form the rectangles (triangles) of the body.

The question is, would I get a better result if I offset the vertices of the lower circle by 5 degrees from the upper circle or would the result just look twisted? i.e. if one circle had vertices at 0, 10, 20, etc… degrees and the other 5, 15, 25…

My supposition is that by twisting the vertices like this, the triangles which previously formed the flat rectangles of the side, would no longer form flat rectangles and so give the cylinder more definition.

I hope that makes sense.

Oh, I'm thinking about from a lighting/shading point of view too.
 
Well, in one case you have quads as sides, and in the other case you have triangles as sides. If you had an "infinite" cylinder, both would look identical at the ends, but in the middle the one with triangles would look as if it had double the number of sides. Also, the silhouette of the one with triangles (if you look along its rotation axis) would look a bit more rounded. That is, if perspective doesn't completely hide the disc that's further away.

But from a lighting POV, I'd say the one with quads is better. And in cases where you have one cylinder moving in another cylinder, the one with quads is better, too.
 
The interesting thing here is that you would no longer have a cylinder.

What you'd get is a shape that appeared to curve in slightly in the middle, called a hyperboloid. The amount of narrowing will depend on the resolution, but if you want a cylinder you really want to keep your edges vertical.
 
PSarge said:
The interesting thing here is that you would no longer have a cylinder.

Why would that be, where you had one flat quad before, you now have half of that surface made by a triangle.

untitled.JPG


edit: ah, I suppose in 3D the sharp pointy bit would now actualy be a bit closer to the viewer.
 
Roger Kohli said:
PSarge said:
The interesting thing here is that you would no longer have a cylinder.

Why would that be, where you had one flat quad before, you now have half of that surface made by a triangle.

untitled.JPG


edit: ah, I suppose in 3D the sharp pointy bit would now actualy be a bit closer to the viewer.

Nearly, but not quite. The uprights on your flat quad will be the same distance from the axis of your cylinder all the way along they're length (They parallel to the axis). Yes, I'm stating the obvious, but....

The diagonals on your triangles don't share this property. If they were a constant distance from the axis throughout their length then they'd follow the curve of the cylinder. What you actually got is a line which takes a short cut, and is nearer the axis at it's middle then at it's ends.

Take a tube of Smarties (a type of sweet that comes in tubes here in the UK), eat them (always the best bit) and then twist the top and bottom of the tube. The middle get narrower as all the lines that were parallel to the axis start having to connect to places further round the cylinder. (btw: I don't know if that actually works, the cardboard may be too stiff, but you can propably imagine it.)

The effect is going to be small in your case, but I think a cylinder that doesn't have a straight edge will look wierder that one that's poorly lit.
 
Take a tube of Smarties (a type of sweet that comes in tubes here in the UK), eat them (always the best bit) and then twist the top and bottom of the tube. The middle get narrower as all the lines that were parallel to the axis start having to connect to places further round the cylinder. (btw: I don't know if that actually works, the cardboard may be too stiff, but you can propably imagine it.)
Cooling towers at nuclear power plants have the same shape.
 
Nathan said:
Cooling towers at nuclear power plants have the same shape.
OT but you also get those cooling towers at conventional power stations when there isn't an alternative heat sink (eg a lake).
 
Back
Top