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.
11,614
questions
0
votes
0
answers
20
views
Rotate border of a line
I need some help as I am very new to coding. I am trying to design a website with a Website Builder (Homepage Baukasten) and I had to rotate a line through code as you can see on the image. The ...
0
votes
1
answer
13
views
Rotate an Image inside Button while hovering? [closed]
How would I Smoothly rotate any image inside button 360 Degrees while :hovering the button using CSS?
0
votes
0
answers
28
views
Transform cube so that one face is positioned at x,y,z and the opposite face at x1,y1,z1
So, I'm trying to create a system that renders a "thick" line with OpenGL. What I was wanting to do is generate a transformation matrix for this cube so that given 2 points, one face will be ...
2
votes
1
answer
17
views
Retrieve object rotation from face normal
I would like to rotate an object to match its ground. So i cast 3 Rays (at the corners) to calculate the normal of the plane below.
Now i need to rotate the object accordingly but keep the y rotation (...
0
votes
0
answers
19
views
Coordinate orientation transform using 3D rotation matrix
I have six IMUs and each of them has its own local sensor coordinate. As shown in below:enter image description here
Color code: X -> red, Y -> green, Z -> blue.
Sensor(0) will be my root. ...
1
vote
1
answer
39
views
SVG rotate inside SVG
I'm working on a project that requires to export an SVG image (map) with symbols (also SVGs). I have found a simple library that helps me to do the export to PDF quite simply.
The way it is structures ...
2
votes
1
answer
19
views
Replicate object rotation inside rotated parent in Three.js
I built my 3D globe and placed it into a parent bounding box / pivot like this:
var globe = new THREE.Group();
if (earthmesh) {globe.add(earthmesh);};
if (linesmesh) {globe.add(linesmesh);};
if (...
0
votes
1
answer
34
views
My gun only works horizontally, not vertically [GODOT]
So, My code currently only moves the gun horizontally, but not vertically. I cannot figure this out. Here is my code (Thanks!):
extends Position3D
onready var charCamera = get_parent()
##var direction ...
0
votes
0
answers
21
views
rotate a photo using css and avoid the appearance of margins
in an html page I load a variable number of photos with 16/9 format,
by pressing a button I would like to rotate the photos by 90 degrees, applying the CSS tranform rotate I get the rotation of the ...
0
votes
0
answers
16
views
Coordinate transform using rotation vector produces zero vector
Our goal is to transform a rotation r in XYZ coordinate to XZY.
Now suppose the rotation r = (0.5,0.7,0.7), we will first transform it into a rotation matrix format. Then we will transform it from XYZ ...
2
votes
1
answer
27
views
How to ignore auto rotation when reading videos with ffmpeg python?
When reading a video with ffmpeg-python, if the video metadata contains a "rotate" attribute, it seems that by default ffmpeg transposes the incoming bytes according to the rotation value.
I ...
0
votes
1
answer
84
views
Rotate right in a BST using void
I am not implementing an AVL tree but I need to create a method that would rotate the binary search tree to right, However, I used the following code and the solution is not working.
How do I ...
2
votes
0
answers
43
views
Find absolute world axes rotation angles(x,y,z) from "transform rotation"
We rotated a transform by setting Euler angles at runtime.
obj.transform.eulerAngles = new Vector3(0,270,90);
We are trying to export obj.transform.rotation quaternion rotation information to ...
0
votes
0
answers
19
views
How to create a rotating object in the console?
i was curious as to how people create those spinning 3d objects inside the terminal and was wondering how i could go about creating one of those myself? Is it possible to do such a thing in pure c#? ...
1
vote
0
answers
24
views
Unity Quaternion rotation with rigidbody is influences rotations it shouldn't
Hey fellow programmers,
I have a small problem with Quaternion (who doesn't). I make an airship that is flying using rigidbody. Making it fly forward and turning was not a problem, but now I try to ...
0
votes
1
answer
25
views
Problem with transform.rotation in unity c#
I`ve been doing a game and i got a problem , i tried to do a jumping cube but if you jump a lot the cube can rotate , i tried to restrict rotation by using:
// Update is called once per frame
...
0
votes
1
answer
19
views
Azimuth mirrored after remapping axis coordinate system
I am trying to remap a device that has an alternate coordinate system.
The sensor is reporting values that are rotated 90° around the X axis. The format is a Quaternion in standard Android Rotation ...
0
votes
0
answers
38
views
How do you calculate X and Y offset between two elements with the same rotation, but with different transform origin positions?
I would like to know, how can we calculate the X and Y offset between two equal elements with the same rotation, but with a different transform origin positions.
I've created an example snippet to ...
0
votes
0
answers
20
views
Why does decrease the quality of text when we use transform: rotate?
Why does a decrease in quality?
There's no way to fix it?
.circle1,
.circle2 {
width: 80px;
height: 80px;
border-radius: 50%;
display: flex;
font-family: "Georgia";
overflow: hidden;
...
1
vote
1
answer
61
views
Rotating each page in the PDF using java
Hi folks i have a few use cases i need to cover while rotating the page in the PDF .
I need to check each page rotation value and rotate it to 0 degree.
when i check few docs in Adobe it shows me 90 ...
0
votes
2
answers
28
views
How to rotate a Span in WPF
I have two buttons, each has text and the unicode "Squat Black Rightward Arrow", aka ➧. One one button, the arrow points right, on the other, I want it to point left. (If there was a unicode ...
0
votes
1
answer
24
views
Javascript Canvas Relative Mouse Coordinates on Rotated Rectangle?
I am trying to treat a rectangle in canvas as a piece of paper, and get the same relative coordinates returned when I hover over the same point regardless of scale, rotation, or translation of the ...
0
votes
0
answers
42
views
rotation of a 3d cube relative to a specific point on the canvas
Using certain methods, I drew a 3D cube.
My task is to rotate it around the z axis. I also need to rotate the cube relative to the coordinates (0,0,0) (on my canvas, these will be the coordinates (150,...
0
votes
1
answer
38
views
How do I rotate bvh motion around a given axis?
I am struggling with how to take the rotation vectors defined in the bvh file format and alter them to rotate the skeleton around an axis ( for all frames ).
This suggests that "the values of the ...
-1
votes
0
answers
35
views
little black dot on image after rotation matrix python
I try to rotate and translate an image. But after I apply the transformation matrix and copy pixels to a new array. I got little black dots on the image. Could someone give me some idea why this is ...
1
vote
1
answer
54
views
Pygame Image rotation very wobbly/unstable
I am working on a game, where the player inputs a graph f(x) = ... and it draws the graph. All that works seamlessly. A Rocket should follow this path and rotate, so it stays on it. I am using math....
0
votes
0
answers
34
views
Rotate and translate image from center to all directions one by one in ios swift
I am trying to make a demo of animation for learning but i am having issue regarding coordinate system of apple and how does it work when trying for animations. The issue is i have 6 static images ...
-2
votes
1
answer
38
views
C# Rotate pictureBox , I want to move the bus vertically and I cant, can you help me of coding?
using System.Drawing;
using System.Windows.Forms;
public partial class Form1 : Form {
public bool move_right, move_left, move_up, move_down;
public int speed = 10;
public int score = 0;
...
0
votes
1
answer
36
views
translate an image after rotation without using library
I try to rotate an image clockwise 45 degree and translate the image -50,-50.
Rotation process works fine:(I refer to this page:How do I rotate an image manually without using cv2.getRotationMatrix2D)
...
3
votes
1
answer
56
views
Rotating a bitmap and transform the resulting coordinates in float format back to integer x,y values for pixel array
I am implementing a function which gets a input pixel array containing a bitmap, rotate the bitmap by 50 degrees and writes the result into an output pixel array. The output pixel array is shown on ...
0
votes
1
answer
31
views
Eigen::Quaternion::FromTwoVectors(a, b) * a != b
I am trying to get the quaternion representing the rotation from unit vector a to unit vector b.
As a sanity check this quaternion should garantee this equality q * a = b. The Eigen function ...
0
votes
0
answers
19
views
Unity mobile joystick problems
I am creating a mobile top down shooter with Unity and my problem is that aiming with the joystick feels very stagnant.
It's like the joystick knows about 100 different directions, but I need 1000. I ...
1
vote
1
answer
19
views
How can I rotate a shape and have it move in the same direction that it is facing in Java?
I am rotating a shape in Java using g2D.rotate(Math.toRadians(rotationDegrees), x, y) where the x and the y are the axis that I want the shape to be rotating along. When I try to move the shape with a ...
1
vote
0
answers
24
views
use animation for rotate icon with each click in javascript
i had problem with rotating icon while click on it.
i tried to use key frame for rotating angle icon:
@keyframes rotateAngle {
0%{
transform: rotate(-180deg);
}
}
and i used it in ...
-1
votes
0
answers
12
views
Find GPS coordinates of new location with respect to another GPS location at a range, azimuth and elevation & roll, pitch and yaw
I have GPS coordinates of my quadcopter A - LatA, LongA and HeightA.
My quadcopter attitude is not straight and level, it has current Roll angle - RollA, current Pitch angle - PitchA and Current ...
0
votes
1
answer
28
views
Calculating resizing QTransform of a rotated rectangle
I'm trying to implement some behavior in my Qt application, where the use can resize and rotate elements that appear on the screen. I'm trying to work out how to rotate and resize a rectangle using ...
2
votes
1
answer
38
views
C# Vector3 Quaternion rotating from a direction to the normal direction of surface below but only by a percentage
Im using Unity3D Engine for this project.
My goal is to rotate an object's up direction about half way to the same direction as the surface it is standing on, the grounds normal.
Normally you could ...
0
votes
0
answers
41
views
Rotating from one quarternion to another
Ok so this question might be a little complicated
Basically I have an imu off which I am able to read quartenions, I want to be able to set a quarternion as home, and then from any other quarternion i ...
0
votes
1
answer
20
views
Rotate point A towards point B around point C on a plane
So I am using a DSL that doesn't have stuff like quaternions or matrices, or most any libraries that are common to the answers of questions like this. With all that being said, I'll draw a picture to ...
0
votes
0
answers
21
views
How to add an orbit rotation on this script : smooth zoom and pan (work very well)
i want to use a script that work fine but need something more. This script was publish by Vpellen.
So it works fine, but I want to do something more, because finally we can't turn around the Y axis, ...
0
votes
0
answers
14
views
Rotating an n-dimensional picture using Scipy.ndimage.rotate
I am trying to rotate a picture with 11 channels using scipy.ndimage.rotate.
It is stored as an array in the variable im_arr and I use the following line to rotate it:
im_arr = ndimage.rotate(im_arr,-...
0
votes
0
answers
25
views
ndimage.rotate for rotating a live video makes it very slow (python)
My objective is to have the webcam transmitting live feed and I could rotate the image feed by some degries (this part would be controlled by the values of a gyroscope). The problem is although the ...
0
votes
2
answers
27
views
How can I rotate multiple graphics shapes together in java without changing their position on the frame or their position relative to eachother?
I have used several java.awt.Rectangle, java.awt.Polygon, and java.awt.geom.Ellipse2D shapes together and I want to rotate them with eachother and I also want to have them keep their location on the ...
0
votes
0
answers
17
views
CSS Transform rotate content "jumps"
I'm trying to modify an animation loader to my needs - on the way of modification i'm struggeling with the fact that the dice points "jumps" - it has something to do with the degrees setup ...
0
votes
1
answer
9
views
Updating an intrinsic rotation with an extrinsic rotation
I am trying to model a Rubik's Cube for a personal project, using Zdog for lightweight 3d graphics. Zdog uses a {x,y,z} vector to represent rotation - I believe this is essentially a Tait-Bryan angle.
...
1
vote
1
answer
31
views
css rotate introduces outline when using SVG clip-path or mask
Is there a way to stop this outline in firefox?
#blob { background: red; width: 500px; height: 500px; clip-path: url(#myClip); transform: rotate(20deg);}
<div id="blob"></div>
<svg&...
0
votes
0
answers
15
views
Rotate function causing image to fly off screen [duplicate]
So im wanting a "weapon" to rotate around a specific pivot point which i have save as weapon_x, weapon_y. Then i made a function call rotatepivoted which will rotate an image. I want it to ...
0
votes
0
answers
16
views
How to move a image based off of its rotation [duplicate]
There is probably an answer for this out there somewhere though I am fairly new to coding. I have read most responses to questions like these and I cannot find an answer that I can use in my code. ...
0
votes
0
answers
10
views
How do I make a image move towards another? [duplicate]
I want to have an image move towards another image in a straight line. I originally thought that I could calculate the angle of the path it needs to take, rotate it that way, and then move forward. ...
0
votes
0
answers
22
views
Monogame / Xna basic 3D Vector rotation math
I am struggling with some basic vector rotations in Monogame.
I have a 3D forward facing unit vector (0, 0, -1) and simply want to rotate them 180 degrees around the Y axis (up). Here is the code:
[...