28
votes
Accepted
How to speed up `RotationMatrix`?
Having this problem so often, I also generated some tools to handle it which I'd like to share. This is the code (along with a usage message which is basically a small modification of ...
26
votes
How to roll a graph on the y-axis
We calculate the tangent vector of parametric curve {t^2,t} and the ArcLength from 0 to <...
16
votes
Accepted
How to animate an impossible image
Edit
To get the original picture orientation,we can add π to θ.
...
14
votes
How to roll a graph on the y-axis
Assuming you mean roll as in the way a circle rolls across the floor, you need a unit speed arc-length parameterization of the curve $(t^2,t)$. Why? Becuase the key behavior of rolling is no ...
13
votes
Generating Mesh of Rotated Graphics
As an alternative you can use BoundaryElementMeshRotate (and a few other Boolean operations) for boundary element meshes that are part of the FEMAddOns paclet. The ...
11
votes
Converting a rotation matrix to a quaternion
I needed to do this recently, so I broke down and decided to write routines for interconverting quaternions and rotation matrices.
I'll give the quaternion to rotation matrix routine first, since it'...
11
votes
Accepted
Solving for Euler Angles
As noted, you can use FindGeometricTransform[] in tandem with EulerAngles[]:
...
11
votes
Generating Mesh of Rotated Graphics
I think the failure to discretize your first Graphics object is a bug.
But, instead of creating graphics objects and then converting them to ...
9
votes
How to rotate 3D ellipsoid with built-in functions?
TransformedRegion[] can quickly determine the rotated ellipsoid:
...
9
votes
How to speed up `RotationMatrix`?
I have previously used the following routine based on ideas by Möller and Hughes in these previous answers, but it would be good to have it as an explicit answer here:
...
9
votes
Accepted
Multiply vectors in a matrix by a matrix
You can actually use Dot directly. It works in unintuitive ways with tensors.
...
9
votes
Why the rotation degree of flow field is different from the angle specified by `RotationMatrix` function
That is not a problem with Mathematica. Rather a fundamental one in your approach: you're not transforming points, but rather vectors:
You need to rotate the input, and then also the output, because ...
9
votes
Accepted
How can I make an animation when using RevolutionPlot3D?
Edit
animate
axis is the rotation axis, we can set axis={0,0,1} or axis={1,0,0} etc.
...
9
votes
Accepted
8
votes
Accepted
Rotating Vectors in space
I think you want a single transformation function for all points, rather than one for each point independently as kglr's answer currently shows.
...
8
votes
Accepted
8
votes
Accepted
The inverse problem of rotation of stress matrix
So the problem is as follows: Given two symmetric matrices A and B, find a rotation R that ...
8
votes
Maintaining shape size while rotating in GraphicsGrid
Translate a circle to the same location. Set the color of the circle to White and you will have what you are looking for. I am sure there are more formal solutions ...
8
votes
Accepted
Reverse the rotation of an animated gif and create a mirror image of it
To keep same speed for GIF import its "DisplayDurations":
dur = Import["/Users/Vitaliy/Desktop/wheel.gif", "DisplayDurations"]
And ...
7
votes
Axis/Angle from rotation matrix
Here is a slightly shorter re-implementation of Jens's method, which uses the "Pixar method" (itself a modification of Frisvad's method) to generate an orthogonal basis:
...
7
votes
Manipulate - performance during 3D rotation
This answers the slowness part.
It is slow because you are using exact numbers for degrees and the matrix was not packed then. Compare the timing:
Before:
After
Just change this one line:
...
7
votes
7
votes
Accepted
What is the meaning of this code section?
This code defines a function,
#4 Boole[Norm[({x, y} - #1).RotationMatrix[#3]/#2]^2 < 1] &
applies it to each element of ...
7
votes
Accepted
Vectors do not define a plane when constructing a RotationMatrix
Edit
Another way is use perturbation.
u = {0, 1, 0};
v = {0, -1, 0};
m = Limit[RotationMatrix[{u, v + t*RandomInteger[20, 3]}], t -> 0]
...
7
votes
Accepted
Maintaining shape size while rotating in GraphicsGrid
The different sizes are created by the unnecessary "GraphicsGrid" that scales the different pictures. Without it:
...
7
votes
Maintaining shape size while rotating in GraphicsGrid
Specify ImageSize in each Graphics using the (still undocumented) syntax ...
7
votes
Accepted
How can I rotate a cube uniformly?
By choosing three uniformly distributed angles for generating the rotation matrix you do not end up with a uniformly distributed rotation matrix. See also this link. You need to choose non-uniformly ...
7
votes
Accepted
How to make a ParametricPlot3D curve rotate smoothly?
The use of Dynamic below keeps the ParametricPlot from reevaluating, which leads to smooth behavior:
...
7
votes
Rotation of area
Method-1
We integrate the circles whose center is on the line y=1 and radius is the distant from the point to the line ...
7
votes
Accepted
How can I get a 3D form when rotate the polygon $ABCD$ around the line $AB$
Similar with https://mathematica.stackexchange.com/a/301459/72111
Calculate the volume.
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
rotation × 172graphics3d × 42
plotting × 37
matrix × 28
graphics × 21
geometric-transform × 18
animation × 12
manipulate × 11
geometry × 11
linear-algebra × 9
coordinate-transformation × 9
regions × 8
list-manipulation × 5
calculus-and-analysis × 5
labeling × 5
vector × 4
differential-equations × 3
performance-tuning × 3
image-processing × 3
random × 3
image × 3
visualization × 3
parametric-functions × 3
ticks × 3
simulation × 3