Message Boards Message Boards


How to rotate a 3D plot along its perpendicular axis?

Posted 1 month ago
7 Replies
0 Total Likes

I'm trying to rotate a 3D plot for a complex polynomial along its perpendicular axis but its giving me an error. I'm using the inbuilt function RevolutionPlot3D. Please advise me the correction.

7 Replies

Something like this?

Animate[Plot3D[Re[x], {xi, 0.1, 1}, {k, 0.1, 1},
   ViewPoint -> {Cos[t], Sin[t], 1}, SphericalRegion -> True],
 {t, 0, 2 Pi}]

Thanks a lot. But how to have the rotation along different axis without animation?

rotationAxis = {0, 0, 1};
startingPointOfView = {2, 2, 1};
Manipulate[Plot3D[xi + k, {xi, 0.1, 1}, {k, 0.1, 1},
  ViewPoint -> 
   RotationTransform[t, rotationAxis][startingPointOfView], 
  SphericalRegion -> True],
 {t, 0, 2 Pi}]

You are aware that you can rotate the 3D plot interactively with the mouse, right?

Yes, I know. But rotating image using mouse may not result perpendicular rotation very exactly. Hence looking to do it using code.

Start with a 3D plot, for example


Rotate at your will the image with the mouse. Copy the image into the clipboard. Then you can adjust the vertical direction this way:

Show[(*paste here the image to be adjusted*), ViewVertical -> {0, 0, 1}]

Thanks a lot for your valuable advice Sir.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract