Tag Info

New answers tagged

1

data = {150, 148, 145, 144, 143, 80, -80, -81, -82, -83}; omega = Interpolation[data, InterpolationOrder -> 4]; omegaIntegrate := Integrate[omega[s], s]; Animate[Graphics3D[{Cuboid[{-20, -20, -1.01}, {20, 20, -1}], GeometricTransformation[{Green, Tube[{{0, 0, 0}, {0, 0, 0.15}}, {1.25, 0}], Cylinder[{{0, 0, 0}, {0, 0, 1}}, 1/4], Blue, ...


1

Manipulate[ VectorPlot3D[{a x, y, z}, {x, -1, 1}, {y, -1, 1}, {z, -1, 1}, VectorScale -> {Large, Automatic, Sqrt[#1^2 + #2^2 + #3^2 ] &}], {a, 0, 1, .1}]


2

Please take a sheet of paper and draw a circle at the position {f1[t], f2[t]}. Do it now! I guess you are asking how on earth you should know the exact coordinates on the paper without knowing what f1 and f2 is, right? Mathematica is basically asking the same question about your functions Xx, Yy, and Zz because it just cannot transform a graphical object ...


1

Windows users can use my MathMF package for this. There's no need to export the frames as images, you just write them directly to a video stream as you create them. It doesn't have the flexibility of third party tools like ffmpeg but it's good for a quick and easy video export without storing all frames in memory. Example code: Needs["MathMF`"] {w, h} = ...


4

Just for fun. This could made much more concise but I am time poor: Manipulate[ ParametricPlot[{{Cos[t], Sin[t]}, {1, 0} + {t, Sin[t]}, {Cos[t], t}}, {t, 0, 2 Pi}, PlotRange -> {{-1.5, 2 Pi + 1}, {-1.5, 2 Pi}}, Epilog -> {EdgeForm[Black], Yellow, Disk[{Cos[p], Sin[p]}, 0.1], Disk[{p, Sin[p]} + {1, 0}, 0.1], Disk[{Cos[p], p}, 0.1], Black, ...


10

The way I typically handle this type of situation is to export the individual images, then have software like FFmpeg handle the conversion to video. FFmpeg in particular is an extremely powerful tool (and is available for Windows, OS X, and most Linux distros). First download the appropriate binary for your system. I placed the ffmpeg binary in the ...


5

to draw dotted lines between the corresponding red points on the circle and their periodic curves First, create graphics objects showing only the axes for the three plots, and translate and scale the second and third ones by appropriate amounts: ax1 = FullGraphics[ParametricPlot[{{Cos[t], Sin[t]}, {-Sin[t], Cos[t]}}, {t, 0, 2 Pi}, PlotRange -> ...


0

You can also RotateRight the Texture image to get the same visual effect: im = ExampleData[{"TestImage", "Lena"}]; dim = ImageDimensions[im][[1]]; imdt = ImageData@im; Animate[ParametricPlot3D[{Sin[t], Cos[t], u}, {t, 0, 2 Pi}, {u, -10, 0.02}, PlotStyle -> FaceForm[Yellow, Texture[Image[RotateRight[#, r] & /@ imdt]]], SphericalRegion -> ...


2

RevolutionPlot3D will distort the texture badly. Things will look much better if you use ParametricPlot3D. Here is an example. Animate[ParametricPlot3D[{Sin[t], Cos[t], u}, {t, 0, 2 Pi}, {u, -10, 0.02}, PlotStyle -> Texture[ExampleData[{"TestImage", "Lena"}]], SphericalRegion -> True, Mesh -> None, Boxed -> False, Axes -> ...


0

If you want to view the cylinder from different directions: Animate[ ParametricPlot3D[{Cos[\[Theta]], Sin[\[Theta]], h}, {\[Theta], 0, 2 \[Pi]}, {h, 0, 5}, PlotPoints -> 50, ViewPoint -> {2 Cos[\[Phi]], 2 Sin[\[Phi]], 3}], {\[Phi], 0, 2 \[Pi], .1}]


0

http://demonstrations.wolfram.com/RestrictedThreeBodyProblem/ http://demonstrations.wolfram.com/RestrictedThreeBodyProblemIn3D/ are also related to this question.


3

What about this?: wave[x_, t_, k_, ω_, ϕ_] := Sin[ω*t + k.x + ϕ]; Animate[Plot3D[wave[{x, y}, t, {1, 1}, 1, 0], {x, 0, 3}, {y, 0, 3}], {t, 0, 10}] where {x,y} or x in the wave function definition is a 2D vector (in order to be able to draw it; in reality, x is a 3D vector and there would be no way to plot), k is the wave vector (I just used {1, 1} for ...


25

Generally always check Demonstrations site for good code. I cannot not mention an excellent "classic" of planar three body problem by Stephen Wolfram and Michael Trott. Code is short and I verified it runs in the latest M10.1. I slightly changed variable labels so code parses better here, removed MaxRecursion -> ControlActive[3, 9] from plot option and ...


1

Another way is just to render the frames first and then use ListAnimate, (BTW I set y0 to -0.1, since its definition is missing) mypara[\[Alpha]_] := ParametricPlot[{{Cos[\[Theta]], Sin[\[Theta]]}, {2 Cos[\[Alpha]] + Cos[\[Theta]], 2 Sin[\[Alpha]] + Sin[\[Theta]]}, {r, 0}}, {\[Theta], 0, 2 \[Pi]}, {r, 1, 2}, PlotRange -> 3, Frame -> False] ...



Top 50 recent answers are included