# Orientation Verts in a Given Direction

## Recommended Posts

I'm hoping I can explain this clearly... I have made a circle, of points, which have noise applied to them making the circle a bit more random and 'wobbly'. I want to build a tunnel around this line, in effect creating a tube which constantly loops. What I have a problem with is orientating the points, so they follow the direction of the line. The spline is made up of a collection of points, and each of these points have a direction pointing towards the next point. I then create a circle of verts around each point, all orientated around the X axis. Obviously, if I use these verts, the tube will not 'flow' around, rather the tube will be rather static, and un-fitted. I want to orientate the circle of verts so they direction of the vert circle faces the direction of current point, thus making the tube flow. I tried translating the direction of the point into a rotation matrix, then applying this rotation matrix to each vert point, but the results seemed a bit erratic. Hopfully, I have explained my problem clearly, and someone has an answer Thanks Spree

##### Share on other sites
Could you post an example of one set of vertices?

Kuphryn

[Edited by - kuphryn on March 13, 2006 6:42:01 PM]

##### Share on other sites
Quote:
 Original post by SpreeTreeI'm hoping I can explain this clearly...I have made a circle, of points, which have noise applied to them making the circle a bit more random and 'wobbly'.I want to build a tunnel around this line, in effect creating a tube which constantly loops.What I have a problem with is orientating the points, so they follow the direction of the line. The spline is made up of a collection of points, and each of these points have a direction pointing towards the next point.I then create a circle of verts around each point, all orientated around the X axis. Obviously, if I use these verts, the tube will not 'flow' around, rather the tube will be rather static, and un-fitted.I want to orientate the circle of verts so they direction of the vert circle faces the direction of current point, thus making the tube flow.I tried translating the direction of the point into a rotation matrix, then applying this rotation matrix to each vert point, but the results seemed a bit erratic.Hopfully, I have explained my problem clearly, and someone has an answerThanksSpree
Check out this article, or the 'parallel transport frame' article in GPG. If your curve can follow any path, you'll probably want the PTF or something similar. If the tube has to connect to itself at the end, you'll have to do a little extra work to connect the first and last circles, as they're unlikely to line up correctly.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628352
• Total Posts
2982219

• 10
• 9
• 24
• 11
• 9