Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have to use this function to get a Surface of Revolution (homework).

newVertex = (oldVertex.y, someFunc1(oldVertex.x, oldVertex.y), someFunc2(oldVertex.x, oldVertex.y));

As far as I know (FIXME) Surface of Revolution means rotations of a (2D)curve around an axis in 3D. But this vertex computing gives a 3D plane (FIXME again :D), so rotation of this isn't obvious.

Am I misunderstanding something?

share|improve this question
Not quite sure what the question is exactly, but a 'Surface of Revolution' is also known as 3D Lathe. Here is an interactive demo - – DrDeth Apr 16 '11 at 15:04
Its a 2D curve rotated around the X axis. But this function is not a 2D curve. – user5584 Apr 16 '11 at 15:55
This is not Game Development. – AttackingHobo May 18 '11 at 3:07

I guess the 2D "curve" is given as a polyline with oldVertex vertices. Rotating the curve around an axis should result in appropriate 3D vertices where each old vertex creates a loop of new vertices given an angle-step.

The other possibility I imaging is rotating given 3D vertices according to their x/y components, ignoring z. That would involve some dot- and crossproducts but you example code doesn't make a lot of sense in that case.

Are you sure you got all those x/y/z parts right?

share|improve this answer
Yeah, I have X, Y, Y; But I still don't understand what to do. The mentioned function is not a curve. Its a shader used on a plane's vertices. No idai, where to do a rotation. – user5584 Apr 16 '11 at 22:07
Oh I got it. I don't have to rotate to begin with. – user5584 Apr 17 '11 at 15:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.