angle

Detected Lines Angle in EmguCV

hi, i used image.HoughLine to find line in my image. i want to know the angle of each line. so i tried : double deltaY = line.P2.Y - line.P1.Y; double deltaX = line.P2.X - line.P1.X; double angle; if (deltaX != 0) angle = Math.Atan2(deltaY, deltaX); else angle = 90; but , it returns 0 and -1 , while the lines in image...

"Mirroring" an angle.

I need to obtain the supplement of an angle. Exactly what I need to do is to implement some kind of code that mirror the angle, let's say, I have 45 degrees -> 135, another example: 80 ->100, 0 degrees -> 180, and so on. Solved: I implemented this just a moment ago, and it worked perfectly, I use 180 - angle if angle < 180, and 360 - a...

How do I get the x or y angle of two vectors?

I know I can get the total angle of two vectors by the dot product of them both, but what if I just want to break down the angle into components of angle by X and angle by Y? ...

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? ...

Calculate arc length / central angle of circle using Gesture Recognizers

I need to rotate a circle by an amount equal to the distance travelled by the users finger... This would equate to the length of the arc moved by the finger... I know the radius of the circle, but need to calculate the central angle and maybe the arc length. Can i do this using any functions in PanGestureRecognizer? translationInView? ...

Interpolating angles

I am trying to do a rotation of a game object by setting a start and end point and X frames to do the movement. Then interpolate start and end angle to get it done. It works well, but I am trying to do the shortest possible route as an option (as opposed to "do the longest route"). In most cases it works, but if the rotation goes above...

Text rotation Flex

How to rotate text (s:label)? I've tried using rotationZ but instead of rotating text it rotates each letter with some weird effect... How to change text angle? ...

Angle between two line start at the same point.

Lets say I am any two points on 2d plane (p1(x1,y1), p2(x2,y1)) and both points forms a line with the center(c(c1,c2)). Therefore I am two lines end at same point. I want to know how can I calculate angle between those two lines. I want to be able to show angle range from 0-2pi. Also 0-(-2pi) which let the line form by p1 and c to be lin...

Asteroids Game Movement In C#

I am trying to make the game Asteroids. My issue I have right now, is if you press the UP Arrow key, it will move the "ship" 10 pixels up. And if you hit the LEFT Arrow key, it will turn the "ship" 5 degrees to the left, the issue I have comes into play when you turn left, or right. And then try to move up. It won't move into the turned ...

How to adjust player sprite speed correctly? (Basically a math question?)

Background: I have a bird view's JavaScript game where the player controls a space ship by touching a circle -- e.g. touch to the left of the circle center, and the ship will move left, touch the top right and it will move to the top right and so on... the further away from the circle center of pseudo joystick, the more speed in that dir...

Calculate correct sprite direction image in bird's view game? (Math here might be speed vector to degrees angle?)

Background: I have 8 images for every sprite in my bird's view JavaScript game, representing top, top-right, right, right-bottom etc., depending on the player's space ship speed. Question: Given the values sprite.speed.x and sprite.speed.y (which could be something like 4 and -2.5, or 2 and 0 for instance), how do I get the correct angl...

How to make CSS - angles-image + background? And height - 100% or auto?

Hello everybody! I have already made CSS a lot of times, but did not work and a lot of glitches ... I will show picture - glitch: See picture - http://beta.areku-developstudio.org.ua/new.png See picture (this is necessary, as better quality): See picture2 - http://beta.areku-developstudio.org.ua/new2.png How to make CSS - angles-image...

Calculate if two 3D triangles are on the same plane

For a 3D game engine I'm working on I need to calculate if two 3D triangles are on the same plane to display it accordingly. How do I calculate the angles of a triangle in 3D space? Would calculating a surface normal and comparing those ever give me 2 equivalent normals? ...

Angle between 2 GPS Coordinates

Hi everybody, I'm working in another iPhone App that uses AR, and I'm creating my own framework, but I'm having trouble trying to get the angle of a second coordinate relative to the current device position, anyone know a good resource that could help me with this? Thanks in advance! ...

c++ calculate all the angles between two angles

I have a set of previously defined float values(a set of angles) I need a function which takes two angles as input and returns all the angles between them. The user first enters a set of angles in float and then the user can enter any two angles(my program should return all the angles between these values) For example 30,310(return all ...

How to create a 3D compass in Android?

I am currently trying to develop a 3D compass myself. I have been trying for almost a week now, and still no luck. So please help me out. This is the code I use for my orientation handler: public void onSensorChanged(int sensor, float[] values) { // azimuth pitch roll if (sensor == SensorManager.SENSOR_ACCELEROMETER) { ...

Direction angle or pointing a 3D angle to a position in space.

Hello. I'm trying to point an entity to a 3D vector. (basically setting an entities angle so it points to a position in 3D space). At the moment, I'm stuck with getting an angle from a vector. //Vectors in the bracket are 3D, first is the entity position, second is a position in space where I want to point at. ( myEntity.Pos - posToPoi...

iOS SDK CGAffineTransform Angle Question

I need to get angle in radians. I have: CGFloat angle = asin(myImage.transform.b); This seems to be not working. I need to extract the angle of 'myImage' at any moment in time. How would I extract this? ...

How to calculate a bezier curve with only start and end points?

I originally posted a much simpler (and less helpful) question, and have edited this to be more specific. This animation from wikipedia shows basically what I want to accomplish, however - I'm hoping to have it flipped around, where it starts progressing more towards the destination and "up" (in this image), and then arcs more directly ...

Calculating angular rate.

Hi, I'm simulating a physical object, using a mass spring system. By means of deltas and cross products, I can easily calulate the up, forward and side vectors. I want to calculate what the angular rate (how fast it's spinning), for the object space X, Y and Z axis. Calculating the world space angle first won't help, since I need the a...