Message Boards Message Boards

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

Posted 4 years ago

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.

POSTED BY: Rahul Chakrabory
7 Replies

Thanks a lot for your valuable advice Sir.

POSTED BY: Rahul Chakrabory

Start with a 3D plot, for example

Graphics3D[Cube[]]

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}]
POSTED BY: Gianluca Gorni

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

POSTED BY: Rahul Chakrabory

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

POSTED BY: Gianluca Gorni
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}]
POSTED BY: Gianluca Gorni

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

POSTED BY: Rahul Chakrabory

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}]
POSTED BY: Gianluca Gorni
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract