This program uses the following equations. Coordinate conversion:

X = R sin(P) cos(T)

R = X2 + Y2 + Z2

Y = R sin(P) sin(T)

T = arctan (Y/X)

Z = R cos(P)

P = arctan

Z

X2 + Y2

 

 

Vector addition and subtraction:

v1 + v2 = (X + U)i + (Y + V)j + (Z + W)k

v2 – v1 = (U X)i + (V Y)j + (W Z)k

Cross product:

v1 v2 = (YW ZV )i + (ZU XW)j + (XV YU)k

Dot Product:

D = XU + YV + ZW

Angle between vectors (γ):

D

G = arccos R1 R2

where

v1 = X i + Y j + Z k

and

v2=U i + V j + W k

The vector displayed by the input routines (LBL P and LBL R) is V1.

Program Listing:15–2 Mathematics Programs

File name 32sii-Manual-E-0424

 

Printed Date : 2003/4/24

Size : 17.7 x 25.2 cm