OK the curved interpolation...
Assuming you know the following how to smoothly go around the object and generate triangle strips I think the only question is how to get a curve between the (x,y) coordinates right?
I personally split the code into two routines:
a) a double loop from 0..360 degrees (up and around), steps passed into the routine
b) a routine that takes a model, an up and an around and emits the vertex using opengl calls.
So routine a) looks like:
up=0
do {
around =0
glBegin(GL_TRIANGLE_STRIP)
do { // must go all the way to 360 degrees
sorPoint (modelpointer, around, up) // lower point of pair
sorPoint (modelpointer, around, up+vang) // upper point of pair
around+=hang;
} while (around<=360)
glEnd()
up+=vang
} while (up<360) // note less than...
here is the ciritcal part of the sorPoint, routine b:
...
t = up/360 * numverticesinmodel -1 //get a t value smoothly between 0.0..numvert-1
lowerindex = floor(t) //This is the index of the vertex below t position
upperindex = roof (t) // and above t position
interpval = fractionalpart(t) // we need to interpolate using a number between 0..1
vertexy = linearinterpolate (vertex[lowerindex].y, vertex[upperindex].y, interpval)
vertexx = [b]linearinterpolate[/b] (vertex[lowerindex].y, vertex[upperindex].y, [b]interpval*interpval[/b])
...generate s too (vertexx is the radius, so you know how to do this bit
...glVertex,normal,texture calls
sore point :-) get it :-). OK well no guarantees on that exact pseudo-code but it should help you...
Yes I do know it does a lot of unnecessary calculation, but my version is very very small in the 1k. Also I'm not certain this is the minimum code way. All those floor, roof etc I have written in as few bytes as possible (obviously not using the actual floor function) but its still costly. There are other ways to write this which might be 20-30 bytes less.
Good luck