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
3
votes
1 answer

What kind of rotation unit is used by this game?

I am observing a rotation value of a character in a game, and its value confuses me. I am wondering, what kind of unit is used here? It does not seem to be radian or degrees. When the character faces... north, rotation = 0.014887573 north-east,…
Tom
  • 8,536
  • 31
  • 133
  • 232
3
votes
2 answers

Rotating sprite with finger in Cocos2d

I need help figuring out the rotation of a sprite with my finger. The sprite is rotating fine but on the initial touch of my finger it somehow rotates by a few degrees by itself. Also the rotations only work when the finger is rotated around the…
tbag
  • 1,268
  • 2
  • 16
  • 34
3
votes
2 answers

Rotating text onto a line on a log scale in Matplotlib

Problem I am working with data on a logarithmic scale and would like to rotate it to fit a line. I know the model but am unsure quite what angle I should be plugging into transform_angles to recover the correct rotation. After a bit of trial and…
oliversm
  • 1,771
  • 4
  • 22
  • 44
3
votes
0 answers

Coordinate system transformation in 3D

I have a point cloud of a scene in which one object of interest is present along with some other points. I also know the coordinates of the eight corners of the 3D bounding box which happens to be a cuboid. Now I have a use case where I need to…
3
votes
2 answers

Duplicated text in all EditTexts after OnRetainCustomConfigurationInstance

When I use onRetainCustomNonConfigurationInstance to save the text contained inside my custom EditTexts, after I rotate the device the text contained in the last EditText gets duplicated to all the others in the target layout. While debugging with…
Whole Brain
  • 2,097
  • 2
  • 8
  • 18
3
votes
1 answer

One finger zoom + rotate in Android

I was developing a zoom control in android based on the tutorial: Android one finger zoom tutorial public abstract class Dynamics { /** * The maximum delta time, in milliseconds, between two updates */ private static final int MAX_TIMESTEP =…
Sourav
  • 1,214
  • 14
  • 24
3
votes
1 answer

How to zoom an entire div?

I'm fooling around with a function right now on this page. If you click the "who" section the div rotates. I'd like it to zoom and consume the page. Is this possible? How can this be done?
Greg
  • 567
  • 2
  • 14
  • 31
3
votes
2 answers

Relative rotation between pose (rvec)

I want to find the relative rotation angles between two Aruco markers, using python and cv2. I'm referring to my markers as the "test" marker and the "reference" marker. I have successfully retrieved the pose of the markers using…
Steve Osborne
  • 680
  • 4
  • 12
3
votes
2 answers

C++, left/right rotation of std::list

Is there any way how to use std::rotate for the list std::list v = { 0,7, 1,2 }; since these left/right rotations std::rotate(v.begin(), v.begin() + 1, v.end()); std::rotate(v.rbegin(), v.rbegin() + 1, v.rend()); work for the…
justik
  • 4,145
  • 6
  • 32
  • 53
3
votes
1 answer

Rotating points and drawing with cv2.polylines

I have a problem with getting the rotation around a point right. What I want to achieve is a function that rotates 4 corners of a square around its centre. I then display the rotated square. I need this for testing of some other functions. What…
marlot
  • 33
  • 3
3
votes
1 answer

Canvas - How to rotate vertical/horizontal image correctly?

I've looked at many of the rotate canvas/scaling canvas resolved issues, but the solutions didn't really solve this issue, so still unsure how to get it to work correctly with canvas. There is a vertical fixed dimensions rectangle 100w × 150h, shown…
Wonka
  • 8,244
  • 21
  • 73
  • 121
3
votes
2 answers

3D Z-Y-X rotation of vector

I'm trying to rotate a vector in 3 dimensions by creating a rotation matrix from the world to the new rotation. I do the rotation by first rotating around the Z axis, then the Y axis and lastly the X axis using right hand notation. The matrix I use…
DaedalusAlpha
  • 1,610
  • 4
  • 20
  • 33
3
votes
1 answer

Android RotateDrawable: Doesn't correctly work for Vector Drawables

Was observed a WONDERFUL issue when using a Vector Drawable in a RotateDrawble, two times per each full cycle (0° to 360° / level: 0 → 10000)! First about 90° (level: 2500) and another about 270° (level: 7500). See below test: My RotateDrawable…
Mir-Ismaili
  • 13,974
  • 8
  • 82
  • 100
3
votes
2 answers

Rotate rectangle on an Image Swing

I have an Image on a JPanel. I'm then drawing a rectangle on top of the image like this: Graphics2D image = (Graphics2D) g; image.drawRect(......); //create image code here. image.rotate(1.5); image.drawImage(....); Problem is that when I rotate…
Marquinio
  • 4,601
  • 13
  • 45
  • 68
3
votes
2 answers

How can I rotate a rectangle using a matrix and get the modified rectangle?

I have searched all the links for rectangle rotation, but nothing seems to apply to my problem. I have a RectangleF structure and wish to feed it into a rotation matrix. Then use resulting RectangleF to pass into some other function. The reason for…