Questions tagged [angle]

A shape, formed by two lines or rays diverging from a common point (the vertex).

Angle is also used to designate the measure of an angle or of a rotation. This measure is the ratio of the length of a circular arc by its radius. In the case of an angle (figure), the arc is centered at the vertex and delimited by the sides. In the case of a rotation, the arc is centered at the center of the rotation and delimited by any point and its image by the rotation.

Source: mathopenref wikipedia

1421 questions
30
votes
5 answers

Getting angle back from a sin/cos conversion

I want to reverse a sin/cos operation to get back an angle, but I can't figure out what I should be doing. I have used sin and cos on an angle in radians to get the x/y vector as such: double angle = 90.0 * M_PI / 180.0; // 90 deg. to rad. double…
Eric Fortier
  • 760
  • 1
  • 7
  • 16
29
votes
8 answers

Calculate angle (clockwise) between two points

I have been not using math for a long time and this should be a simple problem to solve. Suppose I have two points A: (1, 0) and B: (1, -1). I want to use a program (Python or whatever programming language) to calculate the clockwise angle between…
Eric
  • 303
  • 1
  • 3
  • 6
27
votes
6 answers

Rotating Image on A canvas in android

I want to Rotate Image according to a specific angle in android ,some thing like a compass... I have this code...it works on drawPath() but i want to replace the path and the Drawing thing with image.. I tried to create a bitmap image…
Reham
  • 1,916
  • 6
  • 21
  • 45
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
3 answers

Determine angle of view of smartphone camera

I'm trying to determine the degree size of the field-of-view of a Droid Incredible smartphone's camera. I need to know this value for an application that I'm developing. Does anyone know how I can find out/calculate it programmatically?
GobiasKoffi
  • 4,014
  • 14
  • 59
  • 66
24
votes
15 answers

Convert DD (decimal degrees) to DMS (degrees minutes seconds) in Python?

How do you convert Decimal Degrees to Degrees Minutes Seconds In Python? Is there a Formula already written?
David
  • 241
  • 1
  • 2
  • 4
23
votes
2 answers

What's a quaternion rotation?

Is quaternion rotation just a vector with X,Y,Z which the object will rotate towards, and a roll which turns the object on its axis? Is it that simple? Meaning if you have X=0, Z=0 and Y=1 the object will face upwards? And if you have Y=0, Z=0 and…
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607
22
votes
8 answers

Fastest way to sort vectors by angle without actually computing that angle

Many algorithms (e.g. Graham scan) require points or vectors to be sorted by their angle (perhaps as seen from some other point, i.e. using difference vectors). This order is inherently cyclic, and where this cycle is broken to compute linear values…
MvG
  • 57,380
  • 22
  • 148
  • 276
20
votes
1 answer

How to calculate in JavaScript angle between 3 points?

I want to get angle between 3 points in JavaScript. If I have points A(x1,y1), B(x2, y2) and C(x3, y3), I want to get angle that is formed with lines AB and BC. let A = {x:x1, y:y1}, B = {x:x2, y:y2}, C = {x:x3, y:y3}
DejanG
  • 525
  • 1
  • 10
  • 17
18
votes
3 answers

Calculating angles between line segments (Python) with math.atan2

I am working on a spatial analysis problem and part of this workflow is to calculate the angle between connected line segments. Each line segment is composed of only two points, and each point has a pair of XY coordinates (Cartesian). Here is the…
Alex Tereshenkov
  • 3,340
  • 8
  • 36
  • 61
17
votes
12 answers

Decimal Degrees to Degrees Minutes And Seconds in Javascript

Im trying to write a function that takes my decimal degrees (lat or long) and converts them to DMS degrees minutes seconds. I know I am meant to times the decimal point number by 60 then it's decimal again. But am a noob. Would I split the…
Christopher
  • 12,057
  • 9
  • 31
  • 37
16
votes
3 answers

How to find x and y coordinates on a flipped circle using javascript methods

I am trying to find the X, Y points on a circle where 0 degrees starts at the top of the circle and moves clockwise. Typically, to find the x, y coordinates on a circle with a known radius and angle you could simply use the formula x =…
gwydion93
  • 1,681
  • 3
  • 28
  • 59
16
votes
8 answers

Inner angle between two lines

I have two lines: Line1 and Line2. Each line is defined by two points (P1L1(x1, y1), P2L1(x2, y2) and P1L1(x1, y1), P2L3(x2, y3)). I want to know the inner angle defined by these two lines. For do it I calculate the angle of each line with the…
osanchezmon
  • 544
  • 1
  • 4
  • 18
16
votes
1 answer

calculating angle between two points on edge of circle Swift SpriteKit

How would you calculate the degrees between two points on the edge of a circle in Swift.
PoKoBros
  • 701
  • 3
  • 9
  • 25
16
votes
1 answer

Math Calculation to retrieve angle between two points?

Possible Duplicate: How to calculate the angle between two points relative to the horizontal axis? I've been looking for this for ages and it's just really annoying me so I've decided to just ask... Provided I have two points (namely x1, y1, and…
Luke Joshua Park
  • 9,527
  • 5
  • 27
  • 44
1
2
3
94 95