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?

  • \$\begingroup\$ Not quite sure what the question is exactly, but a 'Surface of Revolution' is also known as 3D Lathe. Here is an interactive demo - fisme.uu.nl/toepassingen/00182/toepassing_wisweb.en.html \$\endgroup\$
    – DrDeth
    Apr 16, 2011 at 15:04
  • \$\begingroup\$ Its a 2D curve rotated around the X axis. But this function is not a 2D curve. \$\endgroup\$
    – user5584
    Apr 16, 2011 at 15:55
  • 3
    \$\begingroup\$ This is not Game Development. \$\endgroup\$ May 18, 2011 at 3:07

1 Answer 1


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?

  • \$\begingroup\$ 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. \$\endgroup\$
    – user5584
    Apr 16, 2011 at 22:07
  • 1
    \$\begingroup\$ Oh I got it. I don't have to rotate to begin with. \$\endgroup\$
    – user5584
    Apr 17, 2011 at 15:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .