markraz
Full Member
- Joined
- Feb 19, 2014
- Messages
- 338
Attachments
Last edited:
ThanksSo what are you trying to do?
So what are you trying to do?
Yes, but it needs simplification. After it's simplified, you'll have the (a,b,c) shown in post 3.… Is this one way to do it? y/n …
Thanks I guess that was a typo. So are these (1,0,0) (0,1,0) (0,0,1) called 'vectors'? and can I change them to any real numbers to rotate the cylinders? are they unit vectors?Yes, but it needs simplification. After it's simplified, you'll have the (a,b,c) shown in post 3.
By the way, on the far right of your work, you need to change 0,1,0 to 0,0,1.
?
Thanks appreciate it, so can these UVW vectors be used to essentially rotate/transform the cylinder to different orientations?Yes they are vectors.
Personally I don't like the above notation, since if someone wrote sin xy I would assume it means sin(x*y). But in this case it makes no sense to have a vector quantity as the input to sin therefore it implies:-
r*cos(t)*(1,0,0) + r*sin(t)*(0,1,0) + s*(0,0,1)
To help in discussion of your other questions we could write:-
[math] \vec{p}=\left(\vec{u}\times r\cos{t}\right) + \left(\vec{v}\times r\sin{t}\right) + \left(\vec{w}\times s\right)[/math]
where p,u,v,w are vectors and p is a point on the surface of a cylinder IF...
- u,v, and w are orthogonal
- and the vectors u and v have the same magnitude (although it makes sense to make them unit vectors since an "r" constant exists in the equation)
- w is not a zero vector (this is implied by orthogonality, but it's worth stating it separately)
To help see this I recommend that you produce a 2D parametric plot of the following...
x(t)=r*sin(t)
y(t)=r*cos(t)
where r is some constant. (Sorry if this is too basic, you might already know the shape that will appear!)
Thanks appreciate it, so can these UVW vectors be used to essentially rotate/transform the cylinder to different orientations?
very cool thanks, makes sense.Yes they can.
In most applications we only want supply the "w" vector, since this determines the direction of the cylinder's axis. We can then choose an arbitrary "u" and "v" such that all three of the vectors u,v, and w are orthogonal.
Could I use Euler angles?
also are the r*cos(t) called "scalars" ??
great thanksYou could use any 3x3 rotation matrix. This general one combines three input angles into a final rotation matrix.
The 3 columns in the matrix could then map directly to u,v,w. (Or you could take rows of the matrix.) Doing this will give you 3 orthogonal vectors. You can switch the order that you take the columns(or rows), and this will determine the initial orientation of the cylinder (when all 3 input angles are 0).
Yes, I'm pretty sure they're called scalars. They have magnitude but don't have direction (however the magnitude can be -ve). But I don't know the reason why they aren't simply called "reals" or "real numbers" to be consistent with other branches of maths.
ohhh I get it thanks!!!. so this is what you guys call "row major" vs "column major"?They are kind-of equal, yes
However there's a problem with what you wrote because on the LHS the vector is a row vector, and on the RHS it's a column vector. Therefore this is better...
[math]r\cos(t)\left(\begin{array}{c} 1\\ 0\\ 0 \end{array}\right) = \left(\begin{array}{c} r\cos(t) \times 1\\ r\cos(t) \times 0\\ r\cos(t) \times 0 \end{array}\right)[/math]
so this is what you guys call "row major" vs "column major"?