## Resolved: Rotate point around another point. COS / SIN not working?

In this post, we will see how to resolve Rotate point around another point. COS / SIN not working? Question: So, my goal is to rotate one point around another point, which shouldn’t be hard. I found some code answers ...

## Resolved: Calculating the 2D turn movement required given an incoming and outgoing direction

In this post, we will see how to resolve Calculating the 2D turn movement required given an incoming and outgoing direction Question: Consider a 2D square tiled grid (chess board like) which contains conveyor belt like structures that can curve ...

## Resolved: How do you calculate the x,y points of all corners of a square from two only a pair of x,y points (see pic)

In this post, we will see how to resolve How do you calculate the x,y points of all corners of a square from two only a pair of x,y points (see pic) Question: I have the green x,y points, how ...

## Resolved: How to move a robot arm in a circle

In this post, we will see how to resolve How to move a robot arm in a circle Question: I have a 6 joint robot arm, and I want to move it in a circle. I want parameters to choose ...

## Resolved: Numerically stable way to compute (x-sin(x))/x^3

In this post, we will see how to resolve Numerically stable way to compute (x-sin(x))/x^3 Question: I’m looking for a very fast way to compute (x-sin(x))/(x^3) for all x using IEEE floating point arithmetic and standard trigonometric functions. At 0, ...

## Solved: An algorithm from the Jean Meeus book

Question: I am writing a simple program to calculate the phases of the moon; I use the algorithms presented in Jean Meeus’ book “Astronomical algorithms” 2nd edition. On p. 350 (chapter 49) he writes: Calculate […] the following angles, which ...

## Solved: How to use the PI constant in C++

Question: I want to use the PI constant and trigonometric functions in some C++ program. I get the trigonometric functions with include <math.h>. However, there doesn’t seem to be a definition for PI in this header file. How can I ...

## Resolved: Get the points for the corners of a rectangle

Question: I’m given an array of points for a rectangle, sorted from top-left position onwards to each corner clockwise. I need to find the start and end points for a line of each specific corner length from the corner to ...

## Resolved: Given a position and rotation, how can I find a point that extends X distance from it?

Question: I have a point in 3D space, and that point has an orientation. I want to get the end point of a line X distance from the origin point, following in orientation. How would I do this? The answer ...

## Resolved: Given the line between points 1 and 2, what is the change in angle to point 3?

Question: I have polylines in an Oracle 18c table. Using SQL, I want to determine what the “change in angle” is from point to point. Question: How can I calculate the angles between points? In other words, given a line ...