1,426
questions
0
votes
2
answers
47
views
Path rotate transformation problem in MAUI
When I change the angle to 90 I expect this:
but I get this instead:
What am I doing wrong?
XAML:
<Grid WidthRequest="100" HeightRequest="100" HorizontalOptions="Start&...
0
votes
0
answers
27
views
How to ensure my CSS animation doesn't restart onClick
I made a small CSS animation of a vinyl record png picture being rotated with the following code:
.vinyl-record-playing {
height: 500px;
width: 500px;
animation: spin 10s linear infinite ...
0
votes
1
answer
64
views
Determining the angle in python turtle graphics [closed]
The task is to draw an equilateral triangle that will be positioned in the first quadrant, so that it is symmetrical with respect to the bisector of the first and third quadrants.
Image of triangle
...
1
vote
1
answer
53
views
Angle wrapping error (mishandling 0, pi, -pi)
I am trying to wrap the angle to be within the range of [-pi, pi]. I have tried many variations of the following code, it should be a very easy task, however, if the angle is already pi, -pi, or 0, it ...
0
votes
1
answer
59
views
Calculating angle between 3 points give weird result according pattern angle
I want to calculate the angle between two segments in 2D space. The two segments are defined by AB and BC.
The result of the calculation seems to vary according to the orientation of the vectors.
...
0
votes
0
answers
25
views
How do i get a useful median for 3D positions?
I have made a useful median for 2D positions by taking the average median of the x positions of the positions rotated in every 360° direction. The angleDiffs are the degrees of freedom, that the ...
0
votes
0
answers
15
views
How to pick a 2D cross-sectional slice out of a 3D array at an angle, using scijs/ndarray?
I understand that using arr.pick() allows you to pick out a subarray along an orthogonal axis, however, how can I pick out an angled (non-orthogonal) slice?
slice = ndarray.pick(5, null, null);
how ...
0
votes
0
answers
69
views
Simple Moving Average Indicator showing angle in degrees
Could you please advise how to write a code to make a 20 period Simple Moving average with showing angle value in degrees between the close price of last 5 (or N) candles close price? i.e. considering ...
0
votes
0
answers
42
views
Cordic Cosine function for AOA estimation. I get the PDOA estimation in terms of degree and would want to find the cosine and arcsine for the AOA
from math import atan, pi
import numpy as np
def cosine_fun(input):
k = 1.646
bitw = 15
inpLUK = np.zeros(bitw + 1)
x = 1/k
y = 0
z = 0
for j in range(bitw):
tmp =...
1
vote
0
answers
35
views
calculate angle and distance between two sets of points [duplicate]
I have a start point (A, B, ...) and several end points (1, 2, 3, ...) connected to the start point, and I want to get the angle between a given start point and its associated end points, and the ...
0
votes
1
answer
30
views
How to find the vector of a camera viewpoint in a 2d space to calculate the angle between the viewpoint and an object?
I'm using Python 3 to create a sound-game where you walk around in a 2D space and hear the objects in the space as you walk around.
I've already figured out how to spatialize the sound using the ...
1
vote
1
answer
90
views
Spawn bullets in different directions (Unity/C#)
I'm trying to create a half circle bullet spread (similar to the illustration attached IMAGE).
I'm not sure how to properly calculate angles. Right now what I have is a gun that can be aimed in any ...
0
votes
1
answer
28
views
FlxRect.getRotatedBounds not getting hitboxes correctly?
I'm making an Undertale damage system but I just can't get it right. What is wrong in this code?
blaster and soul are FlxSprites.
var point1:FlxPoint = FlxPoint.weak(blaster.x, blaster.y + 104 * ...
-1
votes
1
answer
91
views
A function to find the minimum bounding pie slice to enclose a set of points
I have a set of points S that I need to sort based on their angles around a point P. However, I want to avoid specifying a particular starting angle for sorting. My goal is to obtain an ordered set ...
0
votes
0
answers
108
views
YOLO pose estimation Calculate angle position
I cant found a tutorial that teach how calculate angle position between three landmarks in yolo (push-up counter for example)
FYI: i can do it very well on mediapipe
Im installed yolo but i don't know ...
0
votes
0
answers
86
views
im trying to create an energy constraint in surface evolver to enforce an angle on a vertex in string model
i am working with surface evolver string model, i am trying to create a model of two fixed vertices with an arc between them, the arc is at a fixed length energy constraint with symmetric edge ...
0
votes
1
answer
279
views
How can I draw a human skeleton based on joint angles and segment lengths?
I'm working on a project where I need to represent a human skeleton using only angles between segments and the length of those segments. I have detailed information about the angles at the joints and ...
0
votes
1
answer
210
views
Which algorithm is more accurate for calculation of the angle between 3D vectors?
Over the years I've came across a few algorithms to calculate the angle between two 3D vectors. As the image shows I've discarded acos and asin ones for their corner case issues.
I'm now down to two ...
0
votes
0
answers
58
views
How to properly find the average of two angles?
So basically, I’m making a game of golf in Python. This mostly just revolves around the math side of things, but if you really need to know, I’m using python Turtle.
This program is an advanced method ...
0
votes
0
answers
41
views
Limiting Radians (door)
I cant figure out how to limit the radian angle to 90 degrees (~1.5 radians) in both directions from its base starting position
I'm trying to make phasmophobia style door, and expecting for it to ...
0
votes
2
answers
229
views
Nextion: Calculate inverse tan (arctan) without trig functions or floating point
I am programming an interface on this Nextion display. Specifically, I am trying to program a digital dial that rotates around a centre point.
These screens are great, but they don’t have any trig ...
0
votes
0
answers
29
views
How to have 3D rotation of a trajectory line in a 2D Game rotate depending on input position
I've had a codementor try and help me figure out how this game is doing this 3d rotation of their trajectory line but we couldn't get it to work yet in Unity.
Game that does the rotation I'm trying to ...
0
votes
1
answer
81
views
FlxG.overlap doesen't work correctly when changing angle of an object
FlxG.overlap won't work correctly when I change the angle of an object.
The object's hitbox is still where it would have been if it wasn't angled.
I don't know how to fix that.
I tried updating the ...
1
vote
2
answers
354
views
Kalman Filter/Majvik Filter
I have an accelerometer sensor and a gyroscope sensor, both three-axis. I would have to somehow calculate the roll/pitch angles in dynamics according to the accelerometer and gyroscope readings, as ...
3
votes
1
answer
164
views
How to compute the angles of a triangle accurately given squared edge lengths?
Given the squared edge-lengths of a triangle as a, b, c > 0, how can we accurately compute the interior angles?
Kahan's oft cited method which carefully rearranges parentheses assumes (unsquared) ...
0
votes
0
answers
171
views
Calculating Internal Angles of Points Along Edges in a Polygon in Python
I have a polygon that is defined as a list of its vertices in a clockwise direction. For a given point along one of the polygon's edges, I want to calculate the two degrees between which the 180 ...
1
vote
2
answers
82
views
R-question: How to linear interpolate using na.approx() for wind directions (angles) 355 and 5 make 0 instead of 180
I'm trying to linear interpolate a very large dataframe using the na.approx function.
Works very well except for angular data e.g. wind directions. If you linear interpolate e.g. 350 and 10 you would ...
-1
votes
2
answers
87
views
How can I limit the X and Y offsets of a car with a max_speed value while taking its angle into account?
Context :
I have this game where I control a car in a top-down view. I use multiple variables to move it.
The MAX_SPEED is 5. (meaning it can move 5px per tick at most)
The FORWARD_ACC (for ...
1
vote
0
answers
366
views
realsense d415 with yolov8 trained model
I'm trying to detect object and get the depth using realsense d415 and yolov8 trained model.
I've already trained yolov8 and I have best.pt file about it.
So I want to use this best.pt file to put it ...
1
vote
0
answers
35
views
Error ruinning CMOD5.N function with python
i’m having trouble running the function cmod5n_inverse, i’ve inserted the parameters phi(wind direction-azimuth angle), and the incidence angle and sigma0 extracted from SNAP from a Sentinel-1 image, ...
0
votes
2
answers
133
views
Using Trig To Calculate dx,dy From Angle (bullet shot from gun)
For a school project on CMU CS I am trying to use trig to calculate the speed/velocity for the dx and dy in order to make it move in the angle that the gun was pointing when shot. The code below is ...
0
votes
2
answers
49
views
Libgxd: Rotate an object to angle necessary to move to another point
Ok, so I have tried many different approaches and I have landed with one that works some of the time. The idea is to get a bee sprite to move toward a flower sprite, here are the things I have ...
0
votes
0
answers
37
views
Calculating velocity for Cannonball trajectory in AS3
My objective is to create a cannonball type effect for a projectile. Basically, when you click a coordinate, the cannonball will launch and land at that specific coordinate. I know well how to create ...
-1
votes
1
answer
141
views
Calculating a shadow length and angle based on the X/Y offsets
I am working on parsing data from file generated by a program, it can apply a shadow to text. In the UI you simply set an angle, length, and radius
With those values shown in the screenshot, that ...
0
votes
0
answers
96
views
Get camera position and orientation after changing angle 90 degrees
There is an object in space. Currently I can change the view the object by 90 degrees to an x, y, or z axis. However, the user may tip the object or rotate the object. My desire is to change axis by ...
0
votes
1
answer
100
views
I'm using the dot product of these two vectors but its not working as intended
I am using the dot product of the players position and the cursors position and then using the cosign of that value to rotate the player appropriately, but is glitching and acting very strangly, ...
0
votes
1
answer
137
views
How to calculate the L1 and L2 norm of angle values wrt the ground truths (where Angle values have a -180 to 180 period)?
How to calculate the L1 and L2 norm of angle values wrt the ground truths (where Angle values have -180 degrees to 180 degrees period)?
If I have an array of data ip_data[] and an array of ground ...
1
vote
1
answer
273
views
Ploting an angle limited to [0,2pi]
I have a angle 'q' defined by the following equation:
q = 150*(t**2)
I'm trying to plot a graph that contains the variation of q based on the time, but the angle goes further than 2pi if I try to plot ...
-1
votes
2
answers
79
views
Right angle list in swiftui
How do you make a right angle list using List in SwiftUI?
As you see in the image shown below, I add a .stroke() modifier for each row of the list, but the corners are clipped by the List.
struct ...
0
votes
1
answer
80
views
Problem with Multi directional sprites in Monogame
I'm trying to implement multi directional sprites like they are in old FPS Shooters (Wolfenstein 3D or Doom).
My sprite has 8 directions. OffSetX is the offset that gets the right sprite from my ...
1
vote
0
answers
40
views
Divide overlapping angle areas in such a way that individual, non-overlapping angle areas are created (in R)
I´m working in R:
I have a matrix with given starting and ending angles which define an area.
Now there are areas that overlap with one or more other areas.
For further calculations I need non-...
0
votes
2
answers
112
views
python sympy polygon.angles() return wrong values
I have some geometric forms represented by polygons and I m trying to get all angles in each polygone
I am trying to get all angles of a polygon with this code :
polyline=((0,0),(8,8),(15,8),(15,0),(...
1
vote
1
answer
162
views
Getting angle between two points in 2D game, problem when moving camera
I decided to ask question here because I have problem that I think I can't solve myself.
I'm trying to make 2D Game that is RPG, You run around and do stuff.
For that i need to know which direciton ...
0
votes
3
answers
1k
views
Clamp a forward vector to a specific range
Right now, I have a 360 degree camera that rotates around the player. I currently get the angle between the player's forward and the camera's forward and this works correctly. If the camera is ...
0
votes
1
answer
73
views
Having trouble normalizing distance between two 3D points
I have two 3D points and I am trying to get the distance between them. The points lie in the range of -1.0 to 1.0, with 0,0 being the center of the screen.
I know the way to figure out the distance is:...
-2
votes
1
answer
122
views
Why are the angles calculated in c++ not accurate?
I wanted to write a turtle in c++, but the angles at the turn are not accurate.
I tried to create a Koch curve, but the result was bad
Hereis a larger picture of this, it looks like the angles are ...
0
votes
1
answer
244
views
Calculate angle from slope in inverted Y axis
I currently have a series of lines drawn in a football pitch, each one formed by an X and Y point. These lines are the passes of a player and I want to see if it is a backward pass, forward pass, ...
0
votes
1
answer
361
views
Yaw rate calculation from GPS Heading
I have a dual GPS mounted on robot and getting data at 20Hz. I got heading data from GNTRA sentence which gives the heading from dual antenna. I am trying to get yaw rate of vehicle. I am having ...
0
votes
1
answer
20
views
How update intersection when an angle.Value() change
I have a construction that starts with a point and a segment. Later I have an intersection. The correct output of the intersection depend if the 3.rd parameter i is 0 or 1. The point and the line are ...
0
votes
1
answer
537
views
Angle at Intersection of Two Lines
This is a rather simple question, but I'm trying to track down a bug and could use a confirmation of my methods.
Given this example code, how would you calculate the angle at the intersection of the ...