cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Rotate cylinder

erguezga
3-Visitor

Rotate cylinder

Hi,

I have a cylinder defined as follows:

and I would like to rotate it around the z-axis and represent it in a 3d graph.

How can I do it in Mathcad 15?

Thanks in advance,

Enrique

1 ACCEPTED SOLUTION

Accepted Solutions

You wrote that you wanted to rotate around the x-axis, not the z-axis, didn't you?

The order of your multiplication is wrong. you can't multiply a 3x1 matrix with a 3x3 matrix.

You cannot evaluate the multiplication numerically (thats the reason you get the error message of u, v being unknown) but you must assign the result to another function in the two variables u and v.

Then you plot this function either directly in 3D, or, as I prefer for better control and convenience, using createmesh.

Regards

Werner

View solution in original post

4 REPLIES 4

I am not quite sure what you are asking for.

To rotate you would simply apply/multiply with the appropriate transformation matrix.

If your cylinder is rotated around the z-axis its axis will still stay lying in pi1 (xy-plane).

Are you generally asking how to display a parametric surface in a 3D plot or is your goal an animation showing the rotating cylinder?

Hi,

Thanks, that is exactly what I am trying to do.

How did you do it?

I have tried to use the previous matrix but with 3 columns instead of three rows and multiplying it by the following transformation matrix:

I suppose that the mistake should be something very simple. Sorry for that.

Thanks and regards,

Enrique

You wrote that you wanted to rotate around the x-axis, not the z-axis, didn't you?

The order of your multiplication is wrong. you can't multiply a 3x1 matrix with a 3x3 matrix.

You cannot evaluate the multiplication numerically (thats the reason you get the error message of u, v being unknown) but you must assign the result to another function in the two variables u and v.

Then you plot this function either directly in 3D, or, as I prefer for better control and convenience, using createmesh.

Regards

Werner

Hola Enrique.

Espero esto sea lo que preguntas.

Buena suerte.

Alvaro.

rot.gif

Top Tags