Create a swept surface ?

Dear everybody,

I got a question that how to create a swept surface like the picture below.

A circle and a curve are given, then a swept surface will be create.

Is the any code or tutorials similiar to this?

Regards

This should explain everything you need to know:

http://www.blackpawn.com/texts/pqtorus/default.html

thanks sqrt,

but I don’t know how to code? I don’t know any idea about this

Perhaps you had better explain what this is for and what you are trying to achieve.

Also if you can tell me what language and OpenGL experience you have. (If this is your first OpenGL program, it is probably too difficult for a beginner)

I have a curve and a cirle like the picture above, what I want is to render a 3D pipeline.

I use Visual C++ and OpenGL

The link sqrt[-1] gave you explains everything. If you don’t understand, then you should probably start with simpler things. Do the NeHe tutorials and someday the solution will appear in your head :slight_smile:

But to make it easier I will outline the idea for you: you walk along the curve and create circles of vertices on every step. Then you use quads to connect each circle. This is actually pretty simple after you got basic grasp of OpenGL and programming in general.