Questions tagged [rotation]

A rotation is a circular movement of an object around a center (or point) of rotation. On a mobile device, it indicates the change of orientation.

A three-dimensional object rotates always around an imaginary line called a rotation axis. If the axis is within the body, and passes through its center of mass the body is said to rotate upon itself, or spin. A rotation about an external point, e.g. the Earth about the Sun, is called a revolution or orbital revolution, typically when it is produced by gravity.

Mathematically, a rotation is a rigid body movement which, unlike a translation, keeps a point fixed. This definition applies to rotations within both two and three dimensions (in a plane and in space, respectively.)

A rotation is commonly represented using , a rotation or .

On a mobile device, it indicates the change of orientation.

12013 questions
105
votes
5 answers

Rotate mp4 videos without re-encoding

I'm looking for a way to rotate videos shot with my Nexus 4 on my Debian Wheezy sytem. The videos are shot in portrait mode and I would like to rotate them to landscape mode. Preferably the rotation is command-line driven. I have found several…
stedes
  • 1,481
  • 3
  • 13
  • 17
104
votes
6 answers

Statically rotate font-awesome icons

I'd like to statically rotate my font-awesome icons by 45 degrees. It says on the site that: To arbitrarily rotate and flip icons, use the fa-rotate-* and fa-flip-* classes. However, doing
user592419
  • 5,103
  • 9
  • 42
  • 67
97
votes
12 answers

OpenCV Python rotate image by X degrees around specific point

I'm having a hard time finding examples for rotating an image around a specific point by a specific (often very small) angle in Python using OpenCV. This is what I have so far, but it produces a very strange resulting image, but it is rotated…
Mike
  • 967
  • 1
  • 6
  • 8
97
votes
11 answers

HTML5 Canvas Rotate Image

jQuery('#carregar').click(function() { var canvas = document.getElementById('canvas'); var image = document.getElementById('image'); var element = canvas.getContext("2d"); element.clearRect(0, 0, canvas.width, canvas.height); …
Max William Vitorino
  • 1,200
  • 2
  • 11
  • 19
90
votes
4 answers

Rotate an image in image source in html

Is there a way I could add in the source of my image codes that could rotate my image? Something like this: I'm making my images dynamic, so I was wondering if I could append some extra code to…
marchemike
  • 3,179
  • 13
  • 53
  • 96
88
votes
7 answers

CSS rotation cross browser with jquery.animate()

I'm working on creating a cross-browser compatible rotation (ie9+) and I have the following code in a jsfiddle $(document).ready(function () { DoRotate(30); AnimateRotate(30); }); function DoRotate(d) { $("#MyDiv1").css({ …
frenchie
  • 51,731
  • 109
  • 304
  • 510
86
votes
11 answers

Rotation of 3D vector?

I have two vectors as Python lists and an angle. E.g.: v = [3,5,0] axis = [4,4,1] theta = 1.2 #radian What is the best/easiest way to get the resulting vector when rotating the v vector around the axis? The rotation should appear to be counter…
Mads Skjern
  • 5,648
  • 6
  • 36
  • 40
85
votes
5 answers

React Native: How do you animate the rotation of an Image?

Rotation is a style transform and in RN, you can rotate things like this render() { return ( ); } However, to animate…
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
82
votes
12 answers

Calculate Bounding box coordinates from a rotated rectangle

I have the coordinates of the top left point of a rectangle as well as its width, height and rotation from 0 to 180 and -0 to -180. I am trying to get the bounding coordinates of the actual box around the rectangle. What is a simple way of…
coulix
  • 3,328
  • 6
  • 55
  • 81
78
votes
2 answers

iOS: How to run a function after Device has Rotated (Swift)

I have one UIView which is not using Auto-Layout and some components are displayed based on their percent of X and Y co-ordinates from the main view. Previously I would have run a function to update their positions in…
Richard
  • 1,688
  • 3
  • 16
  • 21
77
votes
5 answers

CSS3 transform: rotate; in IE9

I have an element that needs to be vertical in a design I have done. I have got the css for this to work in all browsers except IE9. I used the filter for IE7 & IE8: progid:DXImageTransform.Microsoft.BasicImage(rotation=3); This however seems to…
wilsonpage
  • 17,341
  • 23
  • 103
  • 147
77
votes
2 answers

Rotating a Vector in 3D Space

I am making an android project in opengl es that uses accelerometer to calculate change in specific axes and my aim is to rotate my spacecraft-like object's movement vector. The problem is that i can't understand the math behind rotation matrices.…
deniz
  • 2,427
  • 4
  • 27
  • 38
76
votes
13 answers

Rotating a view in Android

I have a button that I want to put on a 45 degree angle. For some reason I can't get this to work. Can someone please provide the code to accomplish this?
Matthew
  • 761
  • 1
  • 6
  • 3
74
votes
6 answers

How can you rotate text for UIButton and UILabel in Swift?

How can you rotate text for UIButton and UILabel? 90 degrees, 180 degrees. Note: Before you mark this as a duplicate, I am intentionally modelling my question as a Swift version of this one: How can you rotate text for UIButton and UILabel in…
Suragch
  • 484,302
  • 314
  • 1,365
  • 1,393
73
votes
7 answers

CSS rotate property in IE

I want to rotate the DIV to a certain degree. In FF it functions but in IE I am facing a problem. For example in the following style I can set rotation=1 to 4 filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1); This means that the…
user160820
  • 14,866
  • 22
  • 67
  • 94