Formula for z axe in Inverse Kinematics JavaScript

149 views Asked by At

Formula for z axe in Inverse Kinematics JavaScript

For x axe: x + Math.cos(angle) * segment_length;

For y axe: y + Math.sin(angle) * segment_length;

For z axe: z + ???

1

There are 1 answers

0
Phil H On

If your angle is the angle between a line in the xy plane and the x axis in the xy plane (as it appears), then z is unchanged.

You may want spherical polar coordinates, which involves 2 angles, theta and phi. This wikipedia article explains all: Spherical Polar Coordinates.