Mathematica animation animate

In summary, the conversation discusses plotting a sphere with one quadrant cut out using Mathematica 7 and how to animate it by rotating around the body diagonal of the bounding box. The solution is to use SphericalRegion->True and the option DisplayAllSteps -> True for smoother animation.
  • #1
n00dle0
5
0
Hi!

Here is the code in Mathematica 7.

Code:
sphere = RegionPlot3D[(x^2 + y^2 + z^2  <= 1) && (x < 0 || y < 0 || 
     z < 0), {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, Mesh -> False, 
  Boxed -> False, Axes -> True, AxesOrigin -> {0, 0, 0}, 
  AxesLabel -> {X, y, Z}, PlotPoints -> 50, 
  ColorFunctionScaling -> False, 
  ColorFunction -> 
   Function[{x, y, z}, ColorData["Rainbow"][1 - (x^2 + y^2 + z^2 )]], 
  ViewPoint -> {1, 1, 1}, ViewVertical -> {1, 0, 0}, 
  ViewCenter -> {0, 0, 0}]


Animate[Show[sphere, ViewVertical -> {Cos[v], Sin[v], 0}, 
  ViewCenter -> {1, 1, 1}], {v, 0, 2 Pi, Pi/20}]

This plots a sphere with one of the quadrants cut out. I wish to animate this plot by rotating about the body diagonal of the bounding box. With the above Animate, I get te subsequent frames to jump around. How can that be fixed.

Ultimately, I would like to make a movie clip out of it, what would be the best way to go about doing that.

Thanks in advance.
- N
 
Physics news on Phys.org
  • #2
Solved! SphericalRegion->True does the job. I think I did try it set to true in the sphere before I posted here, but maybe I was messing things elsewhere.

- N


Code:
Animate[Show[sphere, Axes -> False, SphericalRegion -> True, 
  ViewVertical -> {Sin[v], Cos[v], 0}], {v, 0, 2 Pi, Pi/36}]
 
  • #3
Also, to make it smoother you can use the option:
DisplayAllSteps -> True
 

1. What is Mathematica animation animate?

Mathematica animation animate is a feature of the Mathematica software that allows users to create dynamic animations using mathematical equations and functions.

2. How do I create an animation in Mathematica?

To create an animation in Mathematica, you can use the Animate function and specify the parameters such as the range, speed, and number of frames. You can also use the Manipulate function to create interactive animations.

3. Can I export my animation from Mathematica to other formats?

Yes, you can export your animation from Mathematica to various formats such as GIF, MP4, and AVI. You can also adjust the resolution and frame rate of the animation before exporting.

4. Are there any pre-made animation templates in Mathematica?

Yes, Mathematica has a variety of pre-made animation templates that you can use as a starting point for your own animations. These templates cover a range of topics such as physics, biology, and finance.

5. Can I use Mathematica animation animate for educational purposes?

Absolutely, Mathematica animation animate is a powerful tool for creating visually appealing and interactive educational content. It can be used to demonstrate mathematical concepts, visualize scientific data, or create interactive tutorials.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
504
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
200
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
156
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
849
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
830
Back
Top