Expanding an expression

markraz

Full Member
Joined
Feb 19, 2014
Messages
338
Hi I have a yes or no question,

Given and an expression that looks like this:
1606247999975.png

I want to expand it just for fun and assign it to some variables (a, b, c) , Is this one way to do it? y/n

1606249171057.png
Thanks in advance
 

Attachments

  • 1606247949932.png
    1606247949932.png
    22.9 KB · Views: 2
  • 1606248170515.png
    1606248170515.png
    23.6 KB · Views: 5
Last edited:
What do you mean by "expand" it.

The original expression gives a potentially infinite cylinder of radius [MATH]r[/MATH] provided that [MATH]0 \leq t < 2\pi[/MATH]
The domain of [MATH]s[/MATH] determines the length of this cylinder.

So what are you trying to do?
 
So what are you trying to do?
Thanks

I'm not trying to solve anything or do anything other than write it out in a more expanded form.
so to give you an example, if I had an expression like:

x * (x +1)

I could also write it like

(x^2 +x)

and it would mean the same as the original. That is all I am trying to do. I'm just trying to write it in a different form that is IMO more clear

Thanks in advance
 
Do you understand that it's actually 3 expressions? One for each coordinate?

Skeeter gave you the expressions expanded for each coordinate in post #3.
That's directly usable in a program.
 
… Is this one way to do it? y/n …
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.

?
 
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 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?

Thanks appreciate it

1606375660974.png
 
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!)
 
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?

Thanks again
 
Thanks appreciate it, so can these UVW vectors be used to essentially rotate/transform the cylinder to different orientations?

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.
 
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.
very cool thanks, makes sense.
 
FYI: Another way to specify the cylinder's direction is via 3 angles of rotation. (These three angles could then be used to generate the u,v,w vectors.)
 
FYI: Another way to specify the cylinder's direction is via 3 angles of rotation. (These three angles could then be used to generate the u,v,w vectors.)
Could I use Euler angles? like these
1606671338849.png

also are the r*cos(t) called "scalars" ??

1606671276664.png

thanks in advanced
 
Could I use Euler angles?

You 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).

also are the r*cos(t) called "scalars" ??

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.
 
You 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.
great thanks

so are these equal?


1606782160774.png
 
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]
 
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]
ohhh I get it thanks!!!. so this is what you guys call "row major" vs "column major"?

thanks
 
so this is what you guys call "row major" vs "column major"?

You can simply call them "row vector" or "column vector". Being pedantic about this is more important when you start multiplying vectors (perhaps with matrices).
 
Top