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
26
votes
3 answers

How to create a large (High Quality 300dpi) image from JSON / array of Data (width,height,x,y,angels) using PHP ImageMagic / Imagick

I created a design (270x470) with some pictures and text on Canvas using FabricJs then i export all pictures/text information in JSON format by fabricJS's canvas.toJSON() method And Now i need to Re-Draw that design on a High Quality (2790x4560)…
AZinkey
  • 5,209
  • 5
  • 28
  • 46
26
votes
5 answers

Difference between the two quaternions

Solved I'm making a 3D portal system in my engine (like Portal game). Each of the portals has its own orientation saved in a quaternion. To render the virtual scene in one of the portals I need to calculate the difference between the two…
Tom
  • 1,027
  • 2
  • 16
  • 35
26
votes
4 answers

Calculate the bounding box's X, Y, Height and Width of a rotated element via JavaScript

Basically I'm asking this question for JavaScript: Calculate Bounding box coordinates from a rotated rectangle In this case: iX = Width of rotated (blue) HTML element iY = Height of rotated (blue) HTML element bx = Width of Bounding Box (red) by =…
Campbeln
  • 2,880
  • 3
  • 33
  • 33
25
votes
6 answers

R: using rgl to generate 3d rotatable plots that can be viewed in a web browser?

In the world of the R statistics package, rgl allows me to generate 3d plots that I can rotate with my mouse. Is there a way I can export these plots in a portable format, load them in a web browser or other third party tool and rotate them there? …
Setjmp
  • 27,279
  • 27
  • 74
  • 92
25
votes
3 answers

rotating xticks causes the ticks to be partially hidden

I am creating a plot with names on x axis and time values(minutes) on y axis.The names on x axis are like ['cooking']18:15:27 ,['study']18:09:19,['travel']18:21:34` etc .. where as the y values are 5,1,1 etc.I have given xlabel as 'categories' and…
markjason72
  • 1,653
  • 8
  • 27
  • 47
25
votes
3 answers

EditText doubling out on rotate

I'm having an issue with an EditText control. This issue is only happening on this particular Activity and no other Activities with EditTexts. I have removed all setText calls for this EditText and the problem still persists. I am running Android…
Andrew
  • 20,756
  • 32
  • 99
  • 177
25
votes
2 answers

Calculating X Y movement based on rotation angle?

Say I have an object in 2D space that can rotate and then should move according to its rotation angle. For example: If angle is 0(pointing upwards), then on_timer it should move 1 by Y and 0 by X. If angle is 45, then it should move 1 by Y and 1…
Rob
  • 643
  • 3
  • 8
  • 13
25
votes
2 answers

Rotating a UIButton by 90 degrees every time the button is clicked

How do you rotate a UIButton by 90 degrees each time the button is clicked and also keep track of each rotated position/angle? Here is the code I have so far but it only rotates once: @IBAction func gameButton(sender: AnyObject) { …
nodyor90z
  • 312
  • 2
  • 4
  • 13
25
votes
5 answers

iOS 8 UIActionSheet ignores view controller supportedInterfaceOrientations and shouldAutorotate

I have an application that is configured via the plist file to support portrait, landscape left, and landscape right orientations (i.e. UISupportedInterfaceOrientations is set to UIInterfaceOrientationPortrait, UIInterfaceOrientationLandscapeLeft,…
Awesomeness
  • 652
  • 1
  • 8
  • 14
25
votes
1 answer

Rotate an image X degrees C# wpf

This has been bothering me for ages, I just want a simple method that rotates an image X degrees. (this is for a turret defense game in which the turrets need to shoot a certain direction) I want something like this: public Image…
user3608018
25
votes
7 answers

How to rotate a sprite node in sprite kit?

I am making a game and I'm having troubles with rotating a sprite node, This is the code I have; What do I have to add to turn it, let's say 45 degrees?. SKSpriteNode *platform = [SKSpriteNode…
Vince
  • 648
  • 1
  • 7
  • 17
25
votes
3 answers

Apply one animation to multiple views at the same time

So Id like to rotate a handful of views all at the same time, all using the same rotation specs. The issue is that for some reason the rotation acts differently for the second element. Apparently this has to do with the animation object actually…
Jameo
  • 4,507
  • 8
  • 40
  • 66
25
votes
3 answers

Rotate an YUV byte array on Android

I'm looking to rotate a YUV frame preview recieved from a Preview Callblack, so far I've founded this post which cointains an algorithm to rotate the frame preview but is messing the preview image camera pixels rotated another way to rotate the…
Francisco
  • 253
  • 1
  • 3
  • 5
25
votes
5 answers

why iPhone 5 doesn't rotate to upsideDown

i added the new methods to my code like described at apples iOS 6 Documentations but on the iPhone 5 the App doesn't rotate to upside down. Only the to landscape Ways. Here my Code from the rootViewController: -…
Jeanette Müller
  • 999
  • 1
  • 11
  • 19
25
votes
2 answers

Efficiently rotate a set of points with a rotation matrix in numpy

I have a list of 3D points stored in numpy array A with shape (N,3) and a rotation matrix R with shape (3,3). I'd like to compute the dot product of R.x for each point x in A in-place. Naively I can do this: for n in xrange(N): A[n,:] = dot(R,…
Hooked
  • 84,485
  • 43
  • 192
  • 261