Sign in to follow this  
FearL0rd

Bend Pipe

Recommended Posts


Hello,

I'm trying to draw a bend between 2 coordinates (XYZ) without success.

Can you help me draw a cylinder bend between 2 coordinates using XNA?

[IMG]http://img.photobucket.com/albums/v473/FearL0rd/xnatest.jpg[/IMG]


Thanks!!!!

Regards,

FearL0rd

Share this post


Link to post
Share on other sites
Define "without success" - what have you tried so far? How close have you got?

How many faces does each cylinder have? Are they in a fixed position and angle? Do you want to update the bent portion in real time, or is this something you just do once at startup?

Share this post


Link to post
Share on other sites
I'm tessellating the primitive using the this sample http://creators.xna.com/en-US/sample/primitives3D. The cylinder has 32 Faces

I can create the straight part without problems. I'm having trouble creating the 3d curves.

I created 5 little cylinder pieces but I cant have it bending to the right position and the curve is not smooth.

Is there a way to deform the cylinder instead use 5 cylinders to make a bend?

This is my first time using XNA. Is there a way to create a cylinder bend between 2 XYZ coordinates?

The angles can be, 90º and 45º

Share this post


Link to post
Share on other sites
A little mathy, but it explains generalized pipe tessellation for any curvature:

http://www.unchainedgeometry.com/jbloom/pdf/ref-frames.pdf

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this