德博士的 Notes About Circles, ज्य, & कोज्य

What in the world is a hacovercosine?

Historically, a multitude of functions that can be derived from sine and cosine were provided in tables along with their logarithms for early global navigators. Today with the help of electronic computing, most of these are derived directly from sine and cosine (ज्य "jyā" and कोज्य "kotijyā") when needed, or as complex exponentials e.

AX=sin=sine AY=cos=cosine AT=tan=tangent AC=cot=cotangent
CF=sec=secant TF=csc=cosecant ET=exs=exsecant NC=exc=excosecant
XE=ver=versine YN=cvs=coversine XW=vcs=vercosine YS=cvc=covercosine
HR=hav=haversine HU=hcv=hacoversine HL=hvc=havercosine HD=hcc=hacovercosine
E͡A=arc=angle AE=crd=chord MG=sag=sagitta MO=apo=apothem
Unit Circle Trigonometry A unit circle with the trigonometric functions labeled Image Steven G. Johnson, 德 Shaneyfelt, Limaner, Verdy p, Taktoa, Wikipedia image/svg θ ½ 1 O A V M G X Y E N W S C T F H R L D U arc crd sin cos tan cot sec csc exs exc ver cvs hav hcv vcs cvc hvc hcc

A hacked over cosine is a sine wave that oscillates between zero and one. Here it is on the unit circle and unit square with hcc and 19 of its trigonometric relatives. (Actually hacovercosine is short for halved-co-versed-co-sine, but hacked-over cosine seems to describe it more colorfully )


Sines and cosines marking the coordinate of a point on a unit circle corresponding to a given angle measured in radians (i.e. arclength on a unit circle) can be expressed through Taylor series expansion. When the imaginary number i is used to represent an imaginary unit orthogonal to one, (which when squared is equal to -1), the complex exponential emerges from Taylor expansion.

e iθ =  ∑ n=0 (iθ) n n!  =  1  +  i θ1 1!  -  θ2 2!  -  i θ3 3!  +  θ4 4!  +  i θ5 5!  -  θ6 6!  -  i θ7 7!  + ... cosθ  + i sinθ
where i2 = -1
with a repeating pattern that repeats in circles like:
ei0 = i0 = 1
eiπ/2 = i1 = i
eiπ2/2 = i2 = -1
eiπ3/2 = i3 = -i

eiπ4/2 = i4 = 1
eiπ5/2 = i5 = i
eiπ6/2 = i6 = -1
eiπ7/2 = i7 = -i

eiπ8/2 = i8 = 1
eiπ9/2 = i9 = i
eiπ10/2 = i10 = -1
.
.
.

or if you're an engineer, avoid i by using j, (since the letter i is used for intensité de courant in engineering)

e jθ =  ∑ n=0 (jθ) n n!  =  1  +  j θ1 1!  -  θ2 2!  -  j θ3 3!  +  θ4 4!  +  j θ5 5!  -  θ6 6!  -  j θ7 7!  + ... cosθ  + j sinθ
where j2 = -1

Just because both i2 = -1 and j2 = -1 does not mean i and j are the same imaginary number. In fact, we can multiply i and j together to get a different value than multiplying them together in reverse order.

ij= -ji

So what is ij ? It is yet another complex unit distinct from both i and j. When you work with these complex numbers i, j, and ij together, they are hypercomplex numbers called quaternions.

ijij = -jiij = -j(i2)j = -j(-1)j = j2 = -1

For convenience, k is defined as ij, and symetrically, it behaves exactly like i and j, mutatus mutandus.

Using imaginary values i,j, and k individually with real numbers constructs complex numbers. Using them together constructs hypercomplex numbers called quaternions. Quaternions are nice for representating rotations in 3 dimensional space for robotics, or virtual reality and other 3D rendering applications. They can also be used for representing composite color. In either application, the "complex" parts are more related to real-life quantities than the so-called "real" parts... so maybe they should have been named the other way around.


I used quaternions for color object recognition that I use for feedback for a crane robot in simulation. It's fairly easy to calculate inverse kinematics to determine the length that you want the ropes to be to control the robotic crane, but the calculations are more involved when you want to determine the position of the platform from the lengths of the ropes. Fortunately that doesn't need to be calculated to control the robot, but I looked into how to do it anyway.

A horizontal beam runs s0 units between two points P1 on the left, and P2 on the right. String S1 of length s1 is attached at its upper end to P1, and string S2 of length s2 is attached at its upper end to P2. The two strings are connected together at their lower ends to a heavy object at point to Z to keep them taut, and creating a swing. The swing has radius r along a circle about point Q on the horizontal beam.

Brahmagupta's Formula calculates the area of a cyclic quadrilateral, given the side lengths:

K4 = ( s 2 ) 2 + 8 s - 2 s 4 4 or Heron's a for cyclic triangle K3 = ( s 2 ) 2 - 2 s 4 4

The radius of the swing then is the height of the triangle

r = 2 K3 s0 = 2 ( s 2 ) 2 - 2 s 4 4s0

The distance P1Q and the distance P2Q are

dk = PkQ = s0 sk 2 - 4 K3 2

Three such swings, joined at the endpoints of their beams to form a horizontal equilateral triangle P1P2P3 mutatus mutandus to form swing traingles P1Z1P2, P2Z2P3, and P3Z3P1. The beams have a common size, s0s, but the string lengths s1 and s2 are independently variable, having s11 and s21 for the first swing, s12 and s22 for the second swing, and s13 and s23 for the third swing. The swinging points Z1,Z2,Z3 are constrained to be equadistant from one another, connecting them with straight line beams of length one results in another equilateral triangle similar in configuration to an inverted Stewart platform, or a NIST RoboCrane®. Here is a diagram showing circles of swing of one such a robotic crane.

The forward kinematic problem is reduced to finding the set of three points (x1,y1,z1), (x2,y2,z2), (x3,y3,z3) lower than the support such that the distance separating each pair of points one. Then since x=Tx0, and x0 is known at the zero-reference pose of the platform, then then

X0 = x10 x20 x30 y10 y20 y30 z10 z20 z30
X = x1 x2 x3 y1 y2 y3 z1 z2 z3
X = TX0
T = X X0-1

The 8th order direct kinematic solution was published by Nanua, Waldron, and Murthy (1990). Yes, after deriving all of that, I found it was already done, for it is written: ט מַה-שֶּׁהָיָה, הוּא שֶׁיִּהְיֶה, וּמַה-שֶּׁנַּעֲשָׂה, הוּא שֶׁיֵּעָשֶׂה; וְאֵין כָּל-חָדָשׁ, תַּחַת הַשָּׁמֶשׁ. (What has been will be again, what has been done will be done again; there is nothing new under the sun.)