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

How do I correct the matrix's scaling when rotating when aspect ratio is not 1:1

I have a rotating matrix with a texture on it. When the orthographic scene's aspect ratio is 1:1, like 600px and 600px, it rotates perfectly. But if I increase for example the height to 1200 I get a few problems. It looks as if the matrix's…
Elias
  • 195
  • 2
  • 13
3
votes
1 answer

I can flip images horizontally/vertically, but I can't rotate them with the GD2 library

I am developing a feature to allow an image to be rotated in increments of 90 degrees or to be flipped horizontally or vertically. I have the code working just fine on my own computer, but when uploaded to a live server, the rotate functionality…
JGDev
  • 261
  • 1
  • 4
  • 8
3
votes
1 answer

Apply camera position and rotation with three.js

On a scene I have an object that I'm looking at with a PerspectiveCamera. Using OrbitControls I can move around the object, rotate it, pan it etc. What I want to do is move the object around to a certain location with a certain angle and then get…
Nenad
  • 3,438
  • 3
  • 28
  • 36
3
votes
0 answers

JavaFX: finding the intersections while nodes are rotated

I need to get the coordinates of the intersections between a Line and a Rectangle. This code works, but as soon my lines get rotated, It seems a complete mess. if (l.intersects(enemy.getLayoutBounds())) { Shape collision…
3
votes
1 answer

FileNotFoundException when Using ExifInterface

I have been uploading images to FirebaseStorage, but often they are the wrong way around when displaying them. I have discovered the ExifInterface that can determined the orientation of the image and rotate and flip it if necessary. When selecting…
javacoder123
  • 193
  • 3
  • 17
3
votes
2 answers

How to rotate ellipse in tkinter canvas?

I have a simple ellipse (red) and I want to rotate the ellipse. The following code only return flatten ellipse (blue) but it does not rotate: import tkinter as tk import numpy as np import math def rotate(points, angle): new_points…
Hajar
  • 93
  • 1
  • 6
3
votes
3 answers

Implement Semi-Round-Robin file which can be expanded and saved on demand

Ok, that title is going to be a little bit confusing. Let me try to explain it a little bit better. I am building a logging program. The program will have 3 main states: Write to a round-robin buffer file, keeping only the last 10 minutes of…
ircmaxell
  • 163,128
  • 34
  • 264
  • 314
3
votes
3 answers

How to detect if mouse is moving in clockwise direction

I want to rotate a shape on canvas on mouse move, and I want to detect if mouse is moving in clockwise direction or not, but I do not know how to do that. Here is my code: var canvas = document.getElementById('canvas'); var img =…
Boky
  • 11,554
  • 28
  • 93
  • 163
3
votes
1 answer

Plot vertical graphs, gnuplot. Rotate xlabel and key

First of all I would like to apologize for the text, my English is a bit rusty. So I have a problem plotting a chart and it's been a long time consuming. The chart is below. This graph is generated from a fit of a normal distribution relative to a…
benjamin_ee
  • 153
  • 4
3
votes
1 answer

Javascript click and drag to rotate

I am trying to rotate an element (like a dial) by clicking and dragging. I have the basic concept down but its sligtly glitchy. See my current example here: https://jsfiddle.net/o5jjosvu/ When clicking and dragging inside the element, it judders.…
Levi Cole
  • 3,561
  • 1
  • 21
  • 36
3
votes
0 answers

How to rotate a drawable inside a textView in Android

I have a collapsingToolbarLayout with a calendar inside it. The title of the toolbar is the current month selected. (It's identical to the google calendar mobile app). When swiping from month to month the title changes. I'm doing this with a…
3
votes
1 answer

How to remove fade animation of UICollectionView during rotation time?

I am just trying to adapt animation of CollectionView during rotation time , so that there wouldn't be any fade effects like this Just simple move of the view. So after a small search i found out that I accomplish that effect by just overriding…
3
votes
1 answer

Rotate Parent but not child on hover

The
element should rotate on hover but not its child, the . Using SCSS only.
has a background slightly bigger than so it gives a border effect. .about__image { margin: 4rem; width: 27rem; height: 27rem; …
stemon
  • 599
  • 1
  • 5
  • 23
3
votes
2 answers

How to animate a rolling rectangle

I'd like to animate a rectangle to roll from the left of the screen to the right of the screen. Please notice that the transform-origin point should not be in the center of the rectangle, but in the bottom-right corner, so that it doesn't overpass…
Andrei Rosu
  • 1,169
  • 2
  • 10
  • 26
3
votes
0 answers

Rotate TIFF Image via Orientation tag

I have a TIFF file with the Orientation tag set to TOPLEFT (The 0th row represents the visual top of the image, and the 0th column represents the visual left-hand side). I create a new TIFF and set its Orientation tag to RIGHTTOP (The 0th row…
sterlingberger
  • 63
  • 1
  • 10
1 2 3
99
100