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

1278 questions
13
votes
3 answers

Average of two angles with wrap around

Possible Duplicate: How do you calculate the average of a set of circular data? I have two angles, a=20 degrees and b=350 degrees. The average of those two angles are 185 degrees. However, if we consider that the maximum angle is 360 degrees and…
Mizipzor
  • 45,705
  • 20
  • 92
  • 136
12
votes
3 answers

start and end angle of UIBezierPath?

I have coded as below for half circle in iOS using UIBezierPath and CAShapeLayer. clockWiseLayer = [[CAShapeLayer alloc] init]; CGFloat startAngle = -M_PI_2; CGFloat endAngle = M_PI + M_PI_2; CGFloat width = CGRectGetWidth(imageView.frame)/2.0f +…
Sam Shaikh
  • 1,486
  • 6
  • 28
  • 51
12
votes
4 answers

Calculate direction angle from two vectors?

Say I have two 2D vectors, one for an objects current position and one for that objects previous position. How can I work out the angular direction of travel? This image might help understand what I'm after: (image)…
ingh.am
  • 24,319
  • 41
  • 126
  • 176
12
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
  • 8,659
  • 5
  • 22
  • 41
12
votes
4 answers

Calculate rotations to look at a 3D point?

I need to calculate the 2 angles (yaw and pitch) for a 3D object to face an arbitrary 3D point. These rotations are known as "Euler" rotations simply because after the first rotation, (lets say Z, based on the picture below) the Y axis also rotates…
Robin Rodricks
  • 99,791
  • 133
  • 372
  • 575
11
votes
10 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
  • 8,739
  • 8
  • 28
  • 37
10
votes
2 answers

Quaternions vs Axis + angle

I have been trying to find the difference between the 2 but to no luck minus this The primary diff erence between the two representations is that a quaternion’s axis of rotation is scaled by the sine of the half angle of rotation, and instead…
Chris Condy
  • 596
  • 1
  • 9
  • 24
10
votes
1 answer

get tilt angle Android

I'm trying to get the tilt angle, roll angle from my sensors from my android phone but with no success so far, when I click on my button which should give me the 3 angles, I get "results: 0.0 -0.0 -0.0" package com.example; import…
Mike Bryant
  • 2,345
  • 8
  • 36
  • 58
10
votes
3 answers

Given start point, angles in each rotational axis and a direction, calculate end point

I have a start point in 3D coordinates, e.g. (0,0,0). I have the direction I am pointing, represented by three angles - one for each angle of rotation (rotation in X, rotation in Y, rotation in Z) (for the sake of the example let's assume I'm one of…
Nick Udell
  • 2,306
  • 5
  • 41
  • 81
10
votes
3 answers

Sorting list of two-dimensional coordinates by clockwise angle using Python?

I have a set of points with x and y coordinates that can be seen in the figure below. The coordinates of the 9 points were stored in a list as follows: L = [[5,2], [4,1], [3.5,1], [1,2], [2,1], [3,1], [3,3], [4,3] , [2,3]] The idea is to sort the…
Jayme Muzzi
  • 103
  • 1
  • 1
  • 8
10
votes
3 answers

Plot angle between vectors

I am searching for quite a while already now for a function that plots the angle between two arrows / line segments. e.g.: (source: matrix44.net) Can this be done easily or do I have to find the function of a segment of a radius? I am surprised…
pthesling
  • 241
  • 1
  • 7
10
votes
3 answers

Calculating angle between two points - java

I need to calculate the angle in degrees between two points, with a fixed point that is connected with the given two points by a line. Here is an image that illustrates what I need: Here is what I have tried so far: public static float…
David Lasry
  • 1,229
  • 4
  • 24
  • 39
10
votes
3 answers

Angle gradient in canvas

I'm looking for a code that permits to have this effect on a canvas' stroke. I've already got an animated circular stroke, I only need to get the ANGLE gradient, not linear and not radial. I've got only 3 colours. The existing one is available here…
AndrePliz
  • 259
  • 2
  • 11
10
votes
3 answers

Continous angles in C++ (eq unwrap function in matlab)

I guess it is not that hard, but I have been stuck on that one for a while. I have a joint that can rotate both direction. A sensor gives me the angle of the joint in the range -pi and +pi. I would like to convert it in the range -infinity and …
Vince
  • 3,251
  • 8
  • 28
  • 57
10
votes
5 answers

Calculating Standard Deviation of Angles?

So I'm working on an application using compass angles (in degrees). I've managed to determine the calculation of the mean of angles, by using the following (found at…
snotyak
  • 3,596
  • 5
  • 31
  • 52
1 2
3
85 86