I have a Spline curve,How could I Generate a 3D tube base on this curve?

I have a Spline curve,How could I Generate a 3D tube base on this curve?

this have struggle me some days. I want to build a 3D curve-tube which is shaped by a smooth curve.

give me a help,thanks a lot!

Man it is gonna take me a while to explain this…God please have mercy on my soul, Amen.
OK buddy here we go (All theory, I just thought of it)

Take your current point Pc at tk = t0 + k and another point Pn tk+1 = tk + some amount alpha that depends on how smooth you want your tunnel.

Ok let’s call V the vector made by subtracting Pc from Pn and then normalizing it, therefore V = normalize(Pn - Pc).

What we’re gonna do now is create a set of points equally distant from Pc and laying on the plane where V is the normal vector and Pc a point on that plane.

Let me put a demo together and get back to you, I really don’t feel too enthusiastic about writting a lot of stuff at once :stuck_out_tongue:

Thanks “Java Cool Dude” very much.
Fist,please forgive my poor English.

your method is right,but still have mamy detail I can resolve.
can you send me a Demo?My Email :


Java Cool Dude, if you prepare a demo could you please put it on a public share? :smiley:


Oh you guys will love it, just wait :smiley:

Coming soon, I still have few things to improve :stuck_out_tongue:

Maybe this can help you…


Sorry this demo turned out to be less impressive than I promised; I really am tight on free time these days :frowning:
Engine source

Java Cool Dude, Very nice job.
I like it :smiley: .
Thanks for sharing :slight_smile:

Thanks yooyo for the links.

Have a look at:

This was the basis of a old unreleased cg shader entry of mine. (where a fixed vertex buffer tube was stretched to plot along a entered maths equation -like a PQ torus knot)

Java cool Dude,very kind of you!excellent job. :smiley:

Thanks YooYo,sqrt[-1].

Oh you’re very welcome :smiley:

Ah it’s all starting to come together now…JavaCoolDude is also known as AbbaZabba from the nvnews forum.
The same fella who did these lovely demos using FBO:-

Good work, JavaCoolDude…and these are all in java?

Nah dude, it’s been a long time since I wrote anythnig in Java, here’s a link to some of the demos written back then:

Well Java Cool Dude is a regular demo dynamo. :wink:

I wonder how similar this method is to the one Quake 3 uses to generate bezier pipes.


hi,Java Cool Dude,I have seen your old Demos too.That’s great.

I’m reading the “SXMLEngine”,Is there any tutorials about it?
I need the help.

Hi there, the SXMLEngine stands for Shaders and XML engine.
It’s my own personal rendering engine where pretty much everything could be imported from and exported to my own proprietary XML format. (The RawData tag being the most obvious).
For example shaders, window setup, 3Dm moels loading and space positioning, spline generations, textures loading, GUI layout etc…could all be encapsulated into several files and modified at anytime with a regular text editor with absolutely no need to recompile anything.
This engine was born out of my personal effort to move away from Java3D to C++/ASM without losing the ease of use of the said Scenegraph.
Unfortunately I have no tutorials anywhere, but if requested, I should be able to put few ABCs demos together and upload them somewhere for ya.
Take care :smiley: