l

A Reproduced Copy/_/ ...... _-'

OF

l_mxl_ t'or NA$A

NASA s__ a_ T_mW I_nm¢m r_dl_

%

FIMo6n iItt

NASA/USRA

University Advanced Design Program

Three Legged Walking Mobile Platform

Kinematic & Dynamic

Analysis and Simulation

June 1988

Gary V. McMurray

Brice K. MacLaren
A THREE LEGGED WALKER

Georgia Institute of Technology

Atlanta, Georgia

The three lcaged walker is proposed as • mobile work platform for numerous tasks

associated with Lunar Base site prep•ration and construction. It is seen as one of several forms

of surface transportation, each of which will be best suited for its respective tasks.

Utilizing the principle of dynamic stability end taking advantage of the Moon's Gravity, it

appears to be cgpable of walking in any radial direction and rotating •bout a point. Typical

curved path walking could involve some combination of the radial and rotatiomd movements.

Comprised mainly of a body, six actuators, and six moving parts, it is mechanically quite

simple. Each leg connects to the body at a hip joint end has a femur, a knee joint, and • tibia

that terminates at a foot.

Also capable of enabling or enhancing the dexterity of a series of implements, the walker

concept provides a mechanically simple and weight efficient means of drilling, digging, mining.

and transporting cargo, and performing other like tasks.

A proof of principle machine has demonstrated the feasibility of the walking concept.
I II

Table of Content_

I. Abstract ........................................ I

II. Introduction ................................ 1

IIh Motion ........................................ 3

A. Lean ........................................ 3

B. Leap ........................................ 5

C, Crutch Walk ........................... 5

D. Squat ...................................... 8

E. Pivoting ................................. 8

F. Self-Righting Mode ............... 9

IV. Dynamics and Kinematics ......... 10

A. Jump Mode ........................... 10

B. Lean Mode ............................ 15

V. Dynamic Simulation .................. 21

A. Computer Model .................. 21

B. Results ................................ 23

Vh Proof of Principle Model ......... 30

VII. Conclusion ............................... 31

Appendix A - Figures

Appendix B - SKIT_3.D Graphic Simulation, Figures, and Program Listing

Appendix C - SKITTER Dynamics and KinematicsProgram Listing
-IThe Georgia Institute of Technology has been involved in the design of machinery for the

construction of the Lunar Base t'or several years. Becauu of the unique and stringent

constraints imposed upo_ any piece of m qchinery that will operate in the Lunar environment, a

three-legged walking robot, called SKITTER, is being designed and developed. While

SKIRTER hu been initially designed for Lunar applications, it is not solely limited to the

moon. Some terrestrial tppllcations include hazardous environments, military reconnaissance,

underwater operstions, etc. The purpose of this peper is to discuss and detail some of the

initial work leading to the development of the theory of • three-legged walker (l_ts, modes of

operation, kinematics, and dynamics) and the proof of principle model.

The task of designing automated machinery/'or the Lunar environment/s very d//_culL

Besides the intense temperatures and lack of an atmosphere, the one-slxth gravity complicates

the task of moving machinery and cargo. The reduced gravity, while making any payload

lighter, also reduces the normal force at the ground to such • low point that it becomes

extremely difficult to be able to do even the basic task of scraping soil st • construction site.

Even though the weight has been reduced by one-sixth, the inertia has not been similarly

reduced. Thus, it is not • sufficient solution to the problem to add more mass to the vehicle to

generate the required normal force because the power requirements for acceleration and

deceleration ,_vould then rise sharply. Since any construction machine must be able to traverse

all terrain that it might encounter, the decision to use legged locomotion over wheeled vehicles

was justified.

SKITTER is a very simple device from a mechanical point of view. It consists of only six

actuators, six moving parts, and a central body (figs. 1 and 2). The legs are located radially
-2-

through the centerline of the body at 120 degrees apart from the other. The upper part of the

leg, or femur, connects to the body at a hip joint. Connected at the other and of the femur h

the lower leg, or tibia, which terminates u u foot at its end. To move the legs, two actuators

per leg are used. The first actuator rotates the femur about the hinge line formed by the union

of the femur and the central body, while the second actuator rotates the tibia about the hinge

line created by the union of the Femur and tibia. In this way, each leg operates in its own

plane. The centntl body serves s connect point for various implements that may be attached to

the walker and u host for the electronic hardware and power supply.

Thi_ mechanical simpUcity does, however, have its disadvantage in the fact that more

complex controls are needed for machine stability. For stability in motion, the nutin difference

between a three-legged walker and the other walking devices llke the Odetic3 md Ohio State

walking machines is that the Georgia Tech walker depends on dynamic stability to maintain its

motion. It must, and does, operate routinely with less than three legs having contact with the

ground at any particular moment. As the device pushes off from the ground with its legs, the

center of mass undergoes a horizontal and vertical motion. This differs from the previously

mentioned walkers dramatically in that they strive to constantly maintain a level motion of the

center of mass. While it does take energy to move the center of mass vertically, that energy is

recovered when the body and leg are brought back into contact with the ground with no energy

expenditure. Since the walker is not statically stable at 811 times in this motion, the controls

complexity increases dramatically. This situation is similar to the unipod and bipods being

developed at Carnegie Mellon and Clemson Universities, however with two major distinctions.

The first is that while the tripod is not statically stable at all times while in motion, the device

can always return to a statically stable position by simply allowing the leg or legs to return to

the ground provided that the center of mass of the device is still located inside of the triangle

formed by the foot projections on the ground. The second major difference is related to the

first one in that only very small movements of the legs are needed to generate motion of the
platform.

-3-

By taking small steps, the danger of tipping and energy consumption is minimized.

This motion of pushing off from the ground 5o that the foot actually leaves the ground is

also significant from •nother point of view. That it is possible to establish • rocking motion of

the walker such th•t the inertia •nd momentum from the restoration of the leg b•ck to the

ground, •ida in the pushing off from the ground of the other legs. As will be discussed later in

this paper, this type of motion is very similar to that of • man on crutches.

Motlon

Mechanical simplicity is a primary design constraint for SKITI'ER. Although other

walkers incorporate many complex llnJutges tad bearings in their design, SKI3"TER utilizes only

six actuators ( two per leg ) and six hinges ( two per leg ) to generate motion (fig. I and 2).

The femur actuator changes the angular position of the femur relative to the central body, and

the tibia actuator changes the angular position of the tibia rehttive to the femur. By

coordinating the position and velocities of the actuators, • v•riety of platform positions and

motions is achieved.

Lean

SKITTER's basic mode of operation is to reorient its central body or "lean" by

reconfiguring the legs while always maintaining three fixed points of contact with the surface.

To understand the lean sequence as well as the other modes of operation described later in this

section, a fixed axis (X-Y-Z) is established such that the walking surface lies in the X-Z plane

and the positive Y axis is normal to the surface following the right hand rule. SKITTER is

oriented such that the motions of leg A are confined to the X-Y plane and the feet of leg B

and leg C construct a llne parallel to the Z axis known as pivot line A. A second axis (x-y-z)
-4-

may be establishe_l such that the x-z plane lles in the mid-plane of the central body with the

positive x axis in the direction of leg A and the positive z axis parallel to and in the same

direction as the Z axis. The positive y axis is normal to the mid plane and follows the right

han:l rule. Finally, • third axis (x'-y'-z') may also be established on the Femur •t the femur A

- tibia A hinge line such that the positive z" axis is parallel and in the same direction as the

positive Z axis (fig 3).

One possible example of the lean mode sequence is shown in fig 4. Starting with SKITTER

at a static equillbrium position known as the 90-90 configuration ( the femur-tibia and tibiasurface angles are both 90 degrees ), _'emur A slowly rotates cw about the z uis and tibia A

slowly rotates ccw about the z" axis such that foot A never leaves its initial contact point with

the surface. The motion of Femur A and tibia A is ualogus to the motion of • crank and

coupler of a slider crank mechanism discussed in detail in the kinemsties section of" this paper.

The movements of leg A cause the central body and other two legs of SKITTER to route about

pivot line A. As Femur A and tibia A reach • new desired position, the central body has

rotated and translated from its initial position with respect to the X-Y-Z reference Frame.

One interesting motion of the central body is its ability to translate along its local y axis at

an obtainable platform configuration. This can be accomplished by sctuatin8 each lell such that

all three body-femur joints have a velocity vector parallel to the y axis and of equal magnitude.

Therefore, as a drill rig platform, SKITTER eliminates the need for angular positioning and

vertical feed mechanisms by leaning to the correct orientation end then raising and lowering

itself along the drill string path by a series of coordinated actuator movements. The operation

is completed with SKITTER's feet never losing contact with the ground. Also, the platform is

able to achieve a position such that the mid-plane of the central body is parallel to the plane of

its feet by simply making the body-femur angle and the femur-tibia angle of all three legs

equal respectively. The work volume which encloses all of the possible orientations of the
-5-

central body is limited to the rangeof the actuato, and the physical characterhtic_ of the body

and leg components.

Leap

One method for maneuvering around obstacles which might imptlr the movement of

SKITTER such as sail rocks or ditches is to "leap"over them. SKITTER simply reorients its

central body such that the y axis lies in the intended direction of travel. All three legs move

such that the bedy-femur joints of all three lels have • velocity vector of equal magnitude and

parallel to the y axis and supply a sufficient downward force to make SKITTER leap. With

increases in control lo81c and proper freme design, the snganltude of the leap increases 8ivln8

SKITTER the ability to 8chieve hu'gerdistances,stud thus imitating the "skip walk" usedby the

utronauts on the lunar missions. One advantage of the leap mode is that the magnitude of

directions in which SKITTER could translate is limited only by the possible orientations of the

central body;, therefore, with proper design, true omni-directioul motion can be obtained.

Crutch Wsdk

SKITTER's crutch walk mode for translational motion differs dntmstically from most

current walker designs which usually move one or more apoeedsges while keeping at least three

points of surface contact at all times. SKITTER, on the other hand, tries to capitalize off of

its inertial characteristics and dynamic stability to propel itself forward. One inherent fact of st

three legged platform such as SKITTER is that it will always be statically stable as long as all

three feet are in contact with the surface and its center of gravity is positioned over the

uiangle formed by the feet. However, if one of the legs loses contact with the surface, the

platform becomes statically unstable and starts rotating due to gravity about the pivot line

constructed by the feet of the other two legs. By combining this fact with the lean motion,
-6-

SKITTER_n be made to translate over • surface similar to a person "walking with crutches.

For example, starting at the 90-_) equilibrium position, the femur and tibia of leg A begin

the slider crank motion described in the kinematics section of thh paper (fig .5). The central

body starts to rotate •bout pivot line A u in the lean mode; however, this time, femur A end

tibia A hay," acquired enough angular acceleration to suppl7 • sufficient force at the foot and

consequently 8 sufficient torque about pivot line A to (=use foot A to lose contact with the

surface (i.e. foot A pushes off from the surface fig 6). The entire platform contlnues to rotate

about pivot line A until SKFI'FER's potential enerly equals the kinetic energy imparted by leg

A Its it left 0,* surface. At this point, the entire platform rotates about pivot line A in the

opposite direction due to 8rtvlty. While le8 A is sway from the surface, femur A and tibia A

rotate into • new configuration causing foot A to swing towards the central body (fig 6). As

leg A comes back into contact with the surface, the central body is in a new orientation and

foot A has translated to 8 new location on the surface in relation to the X-Y-Z reference frame

(fig v).

The next stage has leg B and leg C moving id_ntlcally in their respective planes of

motion, less B & C reconfigure as shown in figure 7 causing • rotation of the central body in

the X-Y plane about foot A. During their reconfiguration, less B & C acquire adequate

ana,dar acceleration to supply • sufficient force at foot B and foot C, and :'.onsequently

adequate torque about foot A, to cause the feet to lose contact with the surface (fig 8). Again,

the platform will continue to rotate in the X-Y plane about foot A until its potential energy

equals the kinetic energy imparted by legs B & C as they left the surface. At that time, the

platform begins to rotate in the opposite direction due to gravity. While away from the surface

all three less reconfigure to there original 90-90 starting configuration (fig 8). As foot B and

foot C reestablish ccntact with the surface, it is seen that the feet are in a new location and

that the center of gravity has translated (fig 9). It is important to point out that if the roles of
-7-

leg A and less B & C are interchanged (Reversed Crutch Walk mode) then I translation in the

opposite direction occurs giving six radial directions of translation without • required rotation

of the platform.

Surprisingly, it has been found by analysis that it takes little energy to have • leg push off'

from the surface with adequate force to give the leg time to recoafilure into • new position.

Similarly, only • small rotation of the platform •bout the pivot line is needed to give odequute

space for reconfiguratlon of the leg; therefore, the clumces of the platform tipping over are

small.

One important benefit which arises out of the Crutch Wt/k motion h • decrease Ja the

energy input to the system u the phttform pins momentum while it walks. With an increase in

the gala of the crutch walk sequence and the proper control strategy, SKFITER is able to

achieve • stable rocking motion. Just u • person who is walkin8 quickly on crutches uses his

momentum to swing himself forward, SKITTF.R uses its momentum to propel itself" forward.

Therefore, the horsepower to maintain the rocking motion is small since the energy input to the

system only Juts to account for the losses in the system due to SKITTER contacting the

surface.

Slopes can be negotiated quite easily using either the Crutch Walk or Reverse Crutch Wzlk

mode with the requirement that the force vector due to gravity acting through the cg of

SKI'I'I'ER always intersect the triangle formed by the three feet. This requirement insures that

SKITTER will not over turn and can always revert to a statically stable position. The grade of

slope that SKITTER can effectively negotiate is primarily determined by the femur and tibia

dimensions which determine the size of the triangle. A larger foot print triangle results in a

larger margin of safety from over turning and therefore a larger grade of slope can be

negotiated. The platform is able to walk up, down or tact a slope by assuming an optimum
1

-8-

nominal position (i.e. taking the largest step possible without overturning) and proceeding with

one of the sequences described above.

ScltUtt

SKITTER has the ability to lower its central body by having each leg repeat the sequence

of pushing off of the surface, reconfiguring so that the foot swings away from the central body

end landing on the surface to reestablish static equilibrium. If the sequence is carried through

enough iterations, the central body of SKIRTER would come to rest on the surface with the

legs extended outward (fig. 10). This particular position is extremely advantages if the

platform is being used in conjunction with 8 lifting device such am 8 crime, in the squat mode,

the legs form outriuen to counter the weight of the cargo being lifted tad eliminate the need

for counter weights or other stability mechanisms.

?

Pivoting

Although the platform hu six radial directions for translation, there will be situations that

will require for the platform to rotate about the surface Y uh. SKITTER is capable of two

different pivoting modes. The foot pivoting mode allows the platform to pivot ground one foot

while the complex pivot mode allows SKFI'I'EI_ to swing one foot through ac arc in the surface

X-Z plane.

In the foot pivoting mode, Skitter pushes leg A off the surface, and while in the air, leg B

reconfigures resulting in a torque about foot C. The platform will pivot around foot C, and as

leg A contacts the surface, SKITTER will once again be statically stable. Since the hinge lines

of the platform dictate a 120 degree interval between the planes of motion of the legs, the foot

pivoting mode would also require that foot B either slide in a arc about foot C or be away
J ',_t _

From the surface For the rotation to occur.

-9-

In the complex pivoting mode, SKFFTEK pushes leg A off the surface, end white in the

sir, leg B increases its body-femur angle while leg C decreases its body-re,eL, angle. The

reconfiauring of the lep Jn this manner will cause the p1⁄4tform to under 80 rotations around

the surface Y & X axis causing lea A to swing in st arc in the surface X-Z phme while both

leg A and lea B remain Fixed to the ground. Once lea A contacts the ground P.8ain, the

platform becomes statically stable. If the motion is c_ried through (or all three lep,

SKITTER achieves s net rotation about its ¢8. Unlike the Foot pivotinjt mode, the complex

mode does Rot require foot B to slide or leave the surf'lce For the rotation to occur.

Self' Righting Mode

I£, for some reason, the platforn_ tripped or fell dur=l one of the modes of operation, it

has the capability of righting itself since the legs have • rLoge of motion extendin$ above m.J

below the mid-plane of the central body (fig ! !). As in extreme example, if SKITTER

tripped and lande_ completely upside down on the surf'sce, the platform could tuck two less in

toward the central body while the third leg pushed down on the ground to flip the platform

over to the correct orientation (fig. 12). The resulting motion would simulate a person

summersaulting end landing on his feet. This unique fault tolerant capability of SKITTER

makes the platform a valuable remote field roboz.

The movements just discussed were achieved by utilizing the inertia charate,istics of

SKI'|WER in conjunction with the coordinated actions of the six linear actuators. A direct

relation between movement complexity and control comp!exity is apparent: however, the

movements discussed be realized by current control strategies and devices.
-10-

DYNAMICS and KINEMATICS

Of the many possible combinations of motions of the femur and tibia joints, only two

possible combinations of motions exist such that the feet do not slid on the ground. The first

motion is a linear movement of the center of mass as in the jump mode of operation. To

accomplish this, the femur and tibia joints must combine their motions to produce • linear

motion at the each of the hinge lines of the femur and the body. To model this linear motion

of the center of mass, each leg is modeled u an offset slider crank mechanism. If is it desired

for the walker to actually leave the ground, then the device must supply enough force tnat the

walker has sufficient velocity at the end of the leg movements to leave the ground, or jump.

The derivation of this model is developed here and the results of that model presented later.

The second method of motion for the walker is one that produces • rotational displacement

of the center of mass relative to • pivot line, or the lean motion. This lean motion is also the

fundamental motion for the crutch walk discussed earlier. The only difference between the

motion., of the femur and tibia joints in the lean configuration and the crutch walk is that at

the end of the crutch walk motion, the body has enough angular velocity to allow the foot to

leave the ground and this allows the leg to reconfigure while off the ground. To model this

rotational motion of the body, a four-blu" linkage is constructed where the four links are the

ground, the tibia, the femur, and a link that is composed of the rigid structure of the body and

the other two legs. The final link is connected to the hinge of the femur and body of the leg

that is moving and terminates at the pivot line formed by the two feet that do not move.

Derivation of the kinematic and dynamic model is discussed in this section and the results of

the computer simulation is disc_._d in a latter section.

JUMP MODE
II I

-IIThe first motion to be discussed it the jump motion. This motion can be divided into to

distinct phases. The first phue is the acceleration of the body in the local vertical axis to a

prescribed velocity such that during phase two, the jump phase,the body is of/" the ground and

it begins to decelerate under the force of gravity. Since linear motion is required, an offset

slider crank mechanism is used to simulate the motion of the lep (Fi8. 13a). As •

simplification of. the mathematical model, the problem was inverted inch that the body of'

SKITTER was considered to be ground and the foot was constraine_ .o move in the linmu"

fashion. Thus, the femur is considered to be the crank and the f.cot is the slider. A derivation

of that model is presented here along with s measure of the forces, torques, and anauhLr

velocities needed to prociuce this motion.

To conduct this analysis, several pm-smeteramust be defined by the user of the program

developed to model this motion. The first parameter is the verthnd distance, 14, desired for

SKITTER to .jump (Fig. 13c). The second parameter is the vertical distance, D, that the less

are allowed to displace to accelerate the body to the desired veloclty (Fig. 13b). This velocity,

V 0' is obtained using the conservation of"potanthd and kinetic energy theory where the fired

height is the jump distance ,H, and the initial velocity h V. This results in,

v o = (ZsH)_/2

In this equation, g represents the gravitational constant. For simplicity, constant linear

acceleration, A O, is maintained at the center of. mass for the acceleration phase. Thus, the .

acceleration necessary to accelerate the body to the desired velocity, VO, over the linear

distance, D, is,

A0 = V_/2D
-12-

Given the initial joint aniles of the le._ (the angle between the local x axis and the femur

centerline, 01,and the anile between the femur and tibia centerlines, 02), the other critical

angle For the dynamic and kinematic analysis is the angle between the tibia and the vertical

axis, ÷ (Fig. Da). This ugle is determined From the joint anlles to be,

e2 - e! - _/2._

/ The next step is to derive the 8nguhtr velocities For the Femur and tibia finks. The angular

velocity equations ire written nsin8 the standard equations For finding the velocity of • link.

The equations are written from both ends of the link (i.e. one equation relates the velocity of

point B to the 8round, A, and the other relates the velocity of point B to the foot, point C,

where the velocity •t point C b a known parameter). The two equations me,

V b - V a + ._abx Rab

v b - v c + .%cx.Xcb

When the above equations ire evghmted For this particul.'_r geometry, the following equation is

derived,

(-COabLsin(el))i - (-O;abLCOS(e))j. - (-_bcLcos(÷)) i - (V 0 , O_bcl..sin(÷))j

By comparing tl'e i and j_ terms of the above equations, then the mgnitude of the angular

velocities can be derived,

_OabI VoCOS(_)/L(COS(||_4_) )
-13-

w_ = .,abSln(,i)/cos(÷)

Like the velocity equations presented earlier, acceleration equations can be written in •

similar manner.

_b = Aa + -%b x _ab + -_abx (WabX Rab )

A b = A c + =_x _cb + -_lx:x (-wi_ x Rob )

Evaluating the above equations for the Ilmmeu7 of this problem yields,

('%be•in(el) - %b_°S(eS))L +(-%bCoos('i)+ '_.bt_('l)) J."

(-._L.-o,(÷) +_ _(÷)) L+(-^o-,,_c,_(÷)- ,,_c,,o,(÷)) _.

Solving the above equations properly for the magnitude of the angular accelerations gives,

abe - -AoIJin(Ol)-,,_2L2cos(÷)sin(Ol )-_2L2silg÷)cos(Ol )-,,_2bL2/-L2(oos(¢i4J I))

%b "(%c t_°_(÷) "a2L_ia(÷) " %2b_ns('l))/ L*in('l)

For a complete force and torque analysis of the leg motion, it is necessary to obtain the

m

linear acceleration of the center of mass for the tibia, Xc| and Ycg" Using the acceleration

equation for the center of mass relative to the foot gives,

-Acg= -Ac+-%cx _ccg + _bcx (-%cx eccs)
• II II I i

-14-

]Evaluating this equation for the geometry yields.

AC8- (-%:Lcos(*)/2 + _L, in(÷)I2) i. + (-A o - a_:L_i,_(÷)/2- w_:Lco,(÷)/2) J.

Which leads to.

_cg" -a_LcoK4J)/2 + CO2cLsin(6)/2

_cs" "'*'0"a_:L_in(#)/2 - _2Loos(#)/2

Summing the forces for the tibia (note that the force P is the reaction force from the

8round due to the weight ot" SKITTER) enables • determination of the regction forces st point

B|

Xc."

m

_CFy - m t Yc8 " P " Fby " roTS

Solving for the reaction forces,

m

Fbx - mtXcg

Fby - mtYc8÷ mt8 -P

The summation of the moments about points A and B are.

I:Mb " It abc " PLsin(O) - mtgLsin(O)/2 - T t
i II I

-15-

EM a - if nab - FbyLCOS(#l). FbxLSin(01)- mf|Lcog0i)/2. Tf

Thus, the torque needed about the femur and tibia are,

Tt - Itabc - Pl.sin(¢i) + mtgLsin(_)/2

Tf - Ifaab + FbxLSin(tl) + mfliLcos(01)/2 - FbyLCOs(tI)

The calculations for the mass moments of inertia are approximations based upon a rectangular

cross section of the leg. The variable "a"is equal to the length of the leg and the variable "b"is

equal to the width of the cross section of the leg.

!x - roles(a2 + b2) / J2

From the above equations, all the variables are known except for the torques. Therefore,

the torque needed at either the femur or tibia joints is known for any given position of the

less.

These equations were then implemented in • computer program to evaluate the angular

velocity, torque, and horse power requirements for each joint of the leg as it attempts to make

the leg jump the desired distance.

LEAN MOTION

As stated earlier, the lean motion is the foundation of the crutch walk and provides

dexterity to the platform. The kinematic model for this mode of operation is • four-bar
linkage where the four links •re (Fig. 14•).

-16-

• Tibia

• Femur

• l_igid structure consisting of

everything but links one _nd two

• Ground

The lean motion can also be divided into two septrete phases of motion. The tint is the

acceleration phase where the Femur and tibia move in such • Fashion as to impart to the center

of mass n prescribed angular velocity. This •mauler velocity is sufficient to 811ow the foot to

leave the ground after the torc_ have ceased to be applied to the joints.

As in the jump mode analysis, it is necessary to input two parameters into the program to

allow the remainder of the variables to be eel For the leu mode, it is necessary For the user

to define the acceleration angle, 9, which is the anf0e that the center of mass of' SKITTER is

to undergo to obtain the necessary angular velocity (Fig. 14b). The other input parameter is

the angular displacement, @, that the user wants the center of mass to undergo after the foot

leaves the 8round (Fig. 14b).

With these input parameters, an initial angular velocity must be calculated so that the

center of" mass will undergo the desired amount of rotation. This initial angular velocity, _o0, is

calculated from the conservation of"potential and kinetic energy theory where the final angular

velocity is zero and the final height of" the center of" mass is H2, where H 2 is defined as (Fig.

14b):

H 2 = rsin(q,+O)
I I

-17-

Where r is defined as the constant perpendicular distance from the center of mass of SKITTER

to the pivot llne formed by the stationery feet. Thus, the initial 8U:lular velocity must equal:

w0 - (2mgi-_2/l)1/2

For this equation, the m terms refers to the mass of SKFI'F_R and the ! term is the moment of

inertia for SKITTER about the pivot llne.

As with the jump motion, s constant anguhtr 8cce]eration, a0, is assumed over the acceleration

nnjle for the center of mass. This acceleration results In the desired 8ngula_ velocity, _0' at the

end of the acceleration angle, 9.

For this motion, there ere 8 number of geometric psntmeters that must be summarized for

the following analysis to be clear. First, the j:iut angles for the different links are designated

as follows (Fig. 148):

#1: angle between the tibia link 8rid the ground

02: angle between the femur link and

horizontal at the femur-tibia joint

03: angle between the rigid body of

SKITTER and the ground.
-18-

As in the jump motion, all of these ansles are measured in the riaht hand sense. The letters

designate the various joints in thls analy-is. Point A h the hip joint, point B is the knee joint,

point C represents the contact point between the ground nd the tibia, end point D is the

contact point for the line that is perpendicular to the pivot llne and contains the center of mass.

With this variable definition, the Followle8 equations can be written for the velocity of the

points on the links:

Yb" Yc ÷ vbex _cb

-va" -Vb* _abz -_tm

The above equations are evaluated usin8 the followin8 conditions, -Yc " -Yd" 0. With

this above condition and the fact that .Vadis the input velocity f'ollowin8 a prescribed

acceleration profile, then the remsinin8 8nauhu"velocity terms can be ca]cuinted by solving the

above equations for the scalar magnitudes of the ansuinr velocities:

%b = X%d(S_(01"03))/(_(al'eZ ))

_bc = (°JadRsin(#3) = C°abLsin(f2))/Lsin(Pl)

As with the velocity equations, similar equations For the angular acceleration can be

written.

• -Ab = -Ac + _bc x Rcb + -_bc x (-_bc x Rcb)
-19-

A a ,, A b * aabX Rha ÷ Wab x (-_abx Rbs)

'A,= .xd • ._,dz _da ÷ -"edx (-",dx -_d,)

Again applying the boundary conditions of A c - Ad - 0 and the tact that the angular

acceleration, ned, is the a0 calculated earlier, the following magnitudes for the angular

accelerations may be derived.

",b"('.d'_<',-'3)"R'._°°_',"5)•_.b_'2",) "_'-_'," '2)

Up to this point, the angular velocity and angular accehsrations have been calculated For

the various UnkL. To complete the analysis for the forces and torques necom_ to achieve the

input motion, the linear acceleration of the center of' mass for the femur, tibia, and rigid body

must be calculated. Since all the velocities and accelerations are already known, this is very

simple.

m

X.r,cg- Ab,x/2

m

YT.c$" Ab, y/2

XF, c8 " Abx - (aablJin(02) - (¢:bLCO_f2))12

VF, cg " Abx + (_'abLCm(02)" (_:bI'ain(02))12
i i I

m

XBODY, c| - Aa, x/2

m

YBODY, c8 " Aa,_J2

-20-

Now the free body diagrams can be written For this system. Unfortunately, the system h t

coupled one, which means that the input torque, T, about the femur can not be easily solved

for without solving for a eisht other _ritbles at the same.time. These additions1 v_iables 8re

the reaction Forces at the joints and ground. Thus° the equations can be best solved by puttin8

the equations into matrix form and then solving them nsin8 Otussiua elimination with pivotins.

The form of' the equations to be solved is as Follows.

0 0 -1 0 ! 0

0 0 0 -I 0 1

0 0 Lsin(e ) -Lcm(0 ) 0 0

-1 0 ! 0 0 0

0 -I 0 1 0 0

Lsin(I 2) -Lcns(I 2) 0 0 0 0

l 0 0 0 0 0

0 1 0 0 0 0

Rsin(0 3) -Rcos(0 3) 0 0 0 0

0 0

0 0

0 0

0 0

0 0

0 0

1 0

0 1

0 0

earn m

o F,,:

o F.,:

0 Fb,:

0 Fb,,,

0 Fc, ]

I PC,:

0 Fd,:

0 Fd,:

0 T

_.

mTXT, q

mTYT.n

Icabo+ mtsLcns(01)/2

mFXF.n

mFYF.q

Ib%b÷mff co_,2)/2

mBodyXBody.c8

mBodyYBody, cg

Idasd" mBodyg cos(03)/2

From the solution of this matrix for the variable T, the input torque required to have

SKITTER lean and lift off from the ground can be calculated.
Dynamic Simulation

of the Motion of

SKITTER

21

To simulate the motionof SKITTER, the dynamic and kinematic equations were

developed for the basic motions,the jump and the lean motion, and then imp4ementedin a

compoler program. These motionsdo not cover the broad scopa of motions possible,

especially all ,he possible motions cesulting from the non-symmetric configurations of

the legs. However, these two mo_ns do represenl the basic modes of oparat_n for the

machine (the other gaits are a combinationof these two motions). Also Included in this

analysis Is an lictuator sizing routines which allows the user to determine if a given

actuator (rotary or linear) can supply the necessary torque end speed.

The programs developed are wrlllen in a general foanal to allow the user Io vary the

physical parameters of SKITTER as well as modify Its perfommnca parameters. These

performance parameters include the distance that the walker will JumpIn the air, the

distance that the legs accelerate through before they leave the ground, and the actuator

specifications (torque and velocity limitations). The physical panzmsters th_ can be

varied on the model include all of the actuator atlach points, the length of the femur and

tibia, the weight of the femur and tibia (and thus It's Inertia), the weight of SKITTER, the

gravity, and the type of actuator (rotan/or linear).

From the dynamic analysis of the motionof SKITTER, a maximumtorque and angular

velocity about the hip and knee joints of the walker are calculated. If the type of actuator

is a rotary one, then these values are compared againstthe hlput specificationsfor the

actuator to determine if they will suffk'.e. For a linear actualor, the moment arm about

each joint must be calculated for that instantin time. The reason for this is that as the

leg undergoes its motion, a linear actuator will not maintain a constant perpendicular
distancefromthe Joint. Thus, whether a specified actuator will provide the prescribed

motion Is a function of two variables: torque required and perpendicular distance. To

determine if the actuator will work, the two worst cases must be compared the actuator

specif',cations. If the J,ct.ator Is able to provide the nece:sary flnear force and velocity

for the two cases of maximum torque and minimum perpendicular dl;tanca, then the

actuator will work.

The jump motion is described in detail in the another section of this paper and will

not be redefined here. The dynamic model for this motion Is one ;hat provides linear

motion of the hip Joint (and thus the central body) u compared to the fooL Thus, the

kinematic model for this motion is an off.set slider crank mechanism where the Input is

from the hip Joint ind the knee joint is a passive JO;nL

The solution to this kinematic problem was Implemented In a computer program In

order to solve for the angular velocities and accelerations of each JoinL These values

were very Important in order that the dynamic problem could be solved completely. To

accomplish this, the Newlonian Force equations were derlved for the flnkage so that the

torque about each of the joints could be solved foras a functionof its position.

As with the jump motion, the lean motion is described in detail else wher9 in this

paper. For this problem, the mot;on is modeled as a four-bar linkage where the joints

are comprised of:

1) Tibia

2) Femur

22
3) Rigid struclure consisting of everything but links 1 and

2 (the rest of SKI,'FI'ER)

4) Ground

The kinematic solution to this problem Is also well known but with one small

difference: the Input to the system undergoes a constanl acceleration. While this is not a

drastic "change In the problem, it does considerably complicate the solution. With th_

accomplished, the next task was lo derive the dynamic solution lo determine the inpul

torque needed to generale the angular velocities calculated by the kinematic equations as

necessary to move SKITTER. Again using Newtonian mechanics and the angular

accelerations and velodties from the kinematic problem, a syslem matdx of rank

was derived that had to be solved to determine the input torque. The system matrix, wh:le

not Iriangular, was solvable using Gausslan elimination with row pivoting to obtain a

solution to the Input torque needed at the hip Joint to provide the desired motion.

Ba.cv.LU

23

Presented below are the results of the numerical calculations and simulation.,;

performed under this contract. All of the number represent the power requirements of

SKITTER while operating on earth and with a weight of three hundred pounds.

Sample data presented below is from'the computer simulation of the dynamics of

SKITTER. The family of curves shown below is for a variety of jump heights and

acceleration distances. The physical parameters for the SKITTER model were deterr_ned

from the envisioned SKI'I-I'ER II model. The values shown are the requirements for each
24

leg as it attempts to jump. The total system requires three times as much torque and

horse power to Jump the distance desired.

The first plot shows a family of curves for the input torque at the hip Joint at various

Jump distances and acceleration distances.

24O

220

IS 20O

i 180

160

Jump Mzztlon TOrque Fendly

140 I , I I I I I

0 1 2 3 4 § 6

A_odemU_n_ I_

7

The following plot shows required maximum angular velocity at the hip joint to

acclerate $K,'TTER to jump various heights through diff,:rent acceleration distances.
3

mug. M_ v,,xi_yF,u,_

•,ump Du_,_

a

.4. 21nd_

; q m m " '4" 3inch

-e- 4Inch

4'

-e- 6inch

a m • • 6 tllr_

I I I ,,| I I , I

0 1 2 3 4 I e 7

Aa:d_n_lonZX/n_ Ant

25

As can be seen from these plots, the requirements to Jump ere not as stmneoua as

originally thought. Sizing actuators to meet these specificationsIs not difficult and a

vendor has already been Identified that can meet these requirements. The Helac

Corporation makes a series of planetary rotary actuators that are capable of suppling

4300 inch-pounds of torque with a full 360 degrees of rotation In the JoiN, while

weighing only 24 pounds. These actuators will be ideal choice for use on SKITTER II.

/,dtna_/4nJ_n

For the lean motion, a family of curves was generated for various angles of

acceleration (this is the angle that SKITTER accelerates through tJUIt reaches the desired

angular velocity to lift off from the ground) and ground clearances (the distance that the
26

foot is from the ground at its maximum point). It is Important to note that this

simulation is for the case where one leg Is providingthe force to rotate SKITTER about the

other two legs. In the crutch walk motion described earlier, It Is also desired for the

other two legs to push off from the ground and rotate about the stationary third leg during

part of its motion. For this case, the angular velocity about each of the moving legs hip

Jointis the same whether one or two legs is pushing, but the torque can be divided

between the two legs. Thus, the angular velocity requirementsstay the same for this

motion, but the torque requirementsare divided between" the two legs.

The first plot illustrates the family of curvos relaUng the maximum Input torque at

the hip Joint for a variety of accleration angles and ground ciumncee (the cl_stancethat

the foot of SKITTER leaves the groundduring the rotationmotion).
27

The next plo! relates Ihe maximum angular velo_ty at the hip Jointand a family of

acceleration angles and groundclearance.
4

J

2

9 16

Leen I_Uon ¢unme

Gro_d Cleenu_'e (H=t

2.75 inches

.4- 3.3 Inches

"" 3.85 inchel _,_

4.4 Inch,, _-

--- 4..

I I I I I I

10 11 12 13 14 15

28

The data presented here has bean checked In various manners. For the lean motion,

graphical techniques were used to verily the angular velocities and accelerations

generated by the computer program. Since these numbers are then used to determine the

Input torque, this number is believed Io be correct also.

The work compleied under this convact to develop kinematic and dynamic equations

for the motions of SKITTER has been completed. Actuator sizing programs have been

developed so that the designer can vary the size of the structural members and optimize

t_e power consumption for a given size actuator. The joint angles from the jump and lean

motions can also be written to a file so that the graphical simulation program can display
29

• the motionsof SKITTER in 3-D. The next step in this process is to improve the computer

models end Incorprate in the program a control algorithm lind inefftclanck)sIn the powtr

transmission. This will give the most accurate computer simulalion of what the actual

SKITTER II will be like when It eventually Is built. Again, by using the computer

simulations, the designer Is able to optimize the design before any hardware Is built.

This allows the best prototype Io be built.
PROOF OF M_INCIPLE MODEl.

-30-

To test the theory on the motion of • three-leaned wtlkor, s proof of principle workin8

model wes constructed. The walker wes• oneotenth scale model of' the conceptual desi|n of

the Lunu model s_d its purpose wes only to obtain some trenststory motion. This model,

which weighed epproximstely al|hty-flve pounds and _ completely self-contained, was

demonstrated to NASA on severtl occuions where it fuU"dled its intended 8eel sad also

demonstrated sevend other of the modes of operation dis_med eurlier.

The SKITTER proof of principle model wes pneumatically nctusted for cost effective

reasons. A small scuba _ wes attached to the underside of the model to serve u • hi8h

pressure reservoir of sir. With • pneum•tlc •clue•ion system, each 8ctuator was only able to

move the joint into two discrete positions, either the u,'tuttor wes all the way in or all the way

out (as comp•red to hydruUc or electromechaniad actuators that am reach 8n infinite number

of positions over its stroke lens•h). Since the orl|ins/design ailed for two actuators per lea,

this results in four positions of the foot. To improve on this, the design for the prototype was

modified such that each joint cousisted of two actuators, four •Clusters per leg, sad the

actuators were connected by • free floatin$ member. This I_ve each joint four possible

positions that it could obtain sad thus the foot could obtain sixteen different positions.

To control the actuation of the joints, e small computer was located aboard the model.

Since no usable position or velocity feedback can be obtained from • pneumatic actuator, the

computer was programed with • series of commands that controlled the actuators and therefore

the walker could demonstrate the modes of operations discussed earlier.

There are a number of fundamental differences between the proof of principle model and

the SKITTER proposed for use on the moon. The first difference is that the prototype

operated outside of its intended environment on the moon where the gravity is one-sixth's of
-31-

theearth's$ntvity. Thus,thepowerrequirement5weremuch hi|her on the prototype u

compared to • comparable SKITTER on the moon. The second difference is that the prototype

used • discrete actuation system that allows the feet to be In only sixteen discrete motions. Of

those positions, only certain movements from these discrete positions allowed the prototype to

move u dasi|ned. The final difference was that no cuntmi strut•By could be implemented to

provide smooth motion of the legs ben•use of the pneumatic 8ystem's lack of useful feedbsck.

The fact that • successful prototype was built and ciemonstntted with these nest•lye

factors inhlbitin8 its performance, shows that the idea is feasible and much easier to implement

than orisianlly thousht. With the 8ddltion of servo-actuators, the motion can only be

improved, but the Fundamental ooncepts on the model of' opmatlon of • three-lellSod wnlk_

have already been proved correct.

With • successful proof of principle model developed, the Gcorlgla Institute of Technolosy

is continuing the development of the fluee-leUed walker. SKITTER. To further • complete

understanding of the dynamics and kinematics of the walker, computer simulation is being

written to incorporate the equations of motion and display 8rtphiceUy SKITTER as it moves.

Once this work has been completed, • control strategy and hardware (act•aeon and sensors) will

be incorporated into the computer mode: to provide • realistic simulation of the next generation

prototype. This model can then be evaluated and modified by the user before any hardware is

actually built.

The next version of SKITI'ER, or SKITTER II, will have servo-actuators at the joints to

allow feedback of the position and velocity of the joint so that the motion of the legs can be

accurately controlled throughout the range of their motions. This new model will be capable of

all the gaits and modes of operation described previously, but it will have much greater range
-32-

of motion end • much smoother motion. This next 8•nero•ion SKITTEg model will 8dso be

comp•red •sales• other welkin8 and wheeled vehicles for overall efficiency, u well u the

accuracy of"the computer models.
Appendix

Figures

A

SKITTER 2

.WALKING MOBILK PLATPORM

30

20C

10 - BODY

20 - LEG

30 - FEMUR

40 - TIBIA

42 - FOOT

50 - ACTUATOR

52 - HIP JOINT

54 - KNEE JOINT ?0

I0

52
ORIGINAL PAGE IS --

OF POOR QUALITY
Y

>-

NL \

\

\

\

\

\

\

\

\

\

III

IL

Cq

t9

a

Ii

b

ORIGINAL PAGE ISOF POOR QUALITY
W00EZ

_J

_1

\\\\\\\

Z0

14 Z0U

In

Z _t

I1.

L
! o

1

r_l

I-- D

EE

[3

\\\\\

Z0

I-I

j I-,_

I1: Z0

t.)
!

•

IDDI|D

\\\\\\\\

WE0H

b.Z00W

rr

0E

b.

11.

U.0ID

0WJ

T

l-- HW0

b_

[[

®H

b.

0WJ

0H

11.
W U

O

Z

m

Z m

.¢ _ Ix

W

J W '

j

Z H

H I U.

@ h

W H

m

I I

W

U

<

E

rr

_)

m

0

FZ

rr

h

I,i

rr

<

Ix

I-I

b.
\\\\\

b_E

t_H

b.Z00

bJ

t)

,(mW0

.J

.J

.J

.JZHZ0Z0

IZ0H

III

::)

I-I

LLZ00

t9H

b.

\\\\\\\

0E

LL0

]:

]:H tJ

bJ

t3

b.ED

ta

t_ t_

IllH

.J LL
D

\\\\\\\\\\\\\\\\\\

_ _,_ ''_ _'I "_

\\\\\\\\

tJ

b,.

I]: Z

I:1:

:::)

Ittl

I]:

O) H

tl.
Z

I- H

'¢ I-

_ 0

0.
Q00

Z0H

W_

h.J 0

_0

Z

I]:

Hm

1-1

t-

%

%

s

s

J

J
l

_o_

ZH

Z0QWQNmMm

zNNQ

m
p

Z0M0X0

1,4 MW0
ORIGINAL PAGE IS

OF POOR QUALITY
;c

ZM

t-t Z<

3: UWZZ<UI

n_0

t-t

.Jm

Z0H0Z0

LL

Z0H

1-1 ZH

hi 0W

.Jm<

t,.t

Q: <>

U

fJ

t-t

b.

ORIGINAL PAGE IS

OF POOR QUALITY
J

\\\
\

m 1.1

\\, i \

\\\

JO

I=,I

tl.

ORIGINAL PAGE IS

OF POOR QUALITY
D

D

D

|

Appendix B

SKIT_3D Graphic Simulation

Figures and Program Listing
I I III III

SKIT..3D

Three Dimensional Graphic Simulation Program

Computer graphic simulation is an excellent engineering IDol for analyzlng and

designing spatial mechanisms. SKIT_3D Is a three dlmenelonal grephic simulation

program which allows the user to visualize SKITTER's spatial configurations by

controlling system, leg segment, or :crueler movements of a screen representation of the

platform. User input Is in the form of Incremental positioning, direct positioning° or

time based data files which can be used for platform animation. Output is directed to a

screen, plotter, or dump device.

SYSTEM REQUIREMENTS:

Computer: Hewlett-Packard 200 or 300 series computer with Input knob

present on the key board.

Mass Storage: One 3.5" 720 kbyte disc drive.

Software: HewJett.P_,ckard Basic 40 or greater with the Knob..20 bin

loaded.

Options: Hewleit-Packard Graphics Language (HPGL) plotter.

Hewlelt.Packard LaserJet printer (or equivalent).

LOADING THE PROGRAM:

To load the program:

1) Boot the computer into the Basic System environment.

2) Make the disc drive the default mass storage device by using the Mass

Storage Is command.

3) Insert Ihe SKIT._3D disc into the disc drive.

4) Type load "SKIT_.3D" <cr>.
5) Hit <RUN> key,

6) Program will be01n.

USING THE PROGRAM:

The Program can be divided into two dltferenl sections depending on the _/pe of

data Input. The Manual Mode of operation allows me user to Inputdata dlreclly or vie the

keyboard knob to control SKITTER's movementswhile the Data File Mode accepts time

based data files for animating platformpositionsequences. All movements tw the

platform are relative to a local coordinate system on SKITTER, Figure 3 shows the

orientation of the coordinant system (x-y-z) relative to the Initial smaen display.

Main Menu:

The initial display shows a Z axis view of SKITTER with the main menu

appearing at the bottom ol the soreen. The menu items can be accessed by pressingthe

corresponding function keys on the key board. Definition of the keys are as follows

SYSTEM: Allows the user to reodent the entire platform.

PIVOT LINES: Allows the user to pivot the entire platform about a line

constructed by any two feet of SKITTER.

ACTUATORS: Allows the user to reorient either a leg segment or the enlire

plaIform by engaging a particular actuator.

EXIT: Allows the user to exit the program.

OUTPUT: Allowsthe user to output the screen display to either a plotter or

dump device.

MOVIE: Allowsthe user to enter DATA FILE Mode.
ATTRIBUTES:AllowsIheusertochange views, window parameters, and

output devices.

WHAT: Allows the user Io view screen, output device, and platform

parameters.

or along all three axis.

follows:

Rotate X:

&.Y.SZFJL;

The SYSTEM function allows the user to mtSte or _ranaletethe entire platform about

When the key is pressed. | new menu will appear and is defined as

Rotates the platform Incrementallyabout the X axis when the knob

Is turned.

Rotate Y: Rotates the platform incmmenUdlyabout the Y axis when the knob

is lumed.

Rotate Z: Rotates the platform Incrementally about the Z axis when the knob

is turned.

Rotation Angle: Rotates the platform about the last rotation axis by a user

defined angle (<cr> quits).

Knob Increment: Allows the user to Input a new knob increment.

Translate X: Translates the platform incrementally along the X axis when

the knob is turned.

Translate Y: Translates the platform incrementally along the y axis when

the knob iS lurned.

Translate Z: Translates the platform incrementally along the z axis when

the knob is turned.

Trans Vector: Translates the platform along a user defined vector (<cr> to

quit)

Main Menu: Returns the user to the main menu.
EI,ttC.UJu_

The PIVOT UNES function allowl the user to pivot the entire platform about a line

constructed by two of SKITTER's feel When the key hi dq)reesed, • new menu will iq3pear

and is defined as follows:

Leg A: Pivots the platformabout the leg a pivot line constructed by the feet

of legs b & c.

Leg B: Pivots the platform about the leg b pivot line constructed by the feet

oflegsa&¢.

Leg C: Pivots the platformabout the leg e pivot line constructed by the feet of

legsa& b.

Main Menu: Returns the user to the main menu.

The ACTUATORS funclionkey allowsthe user to reodenl a leg segment or the entire

platform by engaging a particularactuator. When the key is depresseda new menu

appears and is defined as follows:

Femur A:

Femur B:

Femur C:

Engages the femur a actuator and will incrementallychange the

femur a-body angle when the knob is turned.

Engages the femur b actuator and will incrementally change the

femur b-body angle when the knob is turned.

Engages Ihe femurc actualor and will incremenlally change lhe

femur c-body angle when the knob is turned.
Fixed/Free:AToggle swilch which allows the user to move the platform

with either its legs always in contact with the ground (fixed)

or unconstrained by the ground (free).

Knob Increment: Allows the user to define a new knob increment.

Tibia A: Engages the tibia A actuator and will Incrementallychange the

tibia-femur angle of leg a when the knob Is turned.

Tibia B: Engages the tibia b actuatorlind will incrementally change the

tibia.femur angle of leg b when the knob Is turned.

Tibia C: Engages the tibia c actuator and will incrementally change the

tibia-femur angle of leg c when the knob is turned.

Main Menu: Returns the user to the rnaln menu.

The OUTPUT function key allows the user to send the screen displayto a plotteror a

dump device. When the key is pressed,a new menu wiltappear and Is defined as follows:

Plotter: Outputs the screen display to the designated plotter.

Raster Dump: Outputs the screendisplay to the designated clump device.

Main Menu: Returns the user to the main menu.

63ztg.e..v,z.u 

The ATTRIBUT[=S key allows the user to de/ine views, windowparameters, and output

devices. When the key is pressed, a new menu will appear and is defined as follows:

View: Allows the user to define a new view. When this key is depressed, a

new menu will appear and is defined as follows:

X Axis: Changes the usersview to lookingdown the X axis.

Y Axis: Changes the users view to looking down the Y axis.

Z Axis: Changes the users view to lookingdown the Z axis.
QuiI: Returnstheuserto the ATTRIBUTES menu.

Window: Allows the user to change windowparameters. When this key is

pressed, a new menu will appear and is definedas follows:

Zoom: Allows the user to zoom in and out from the current window.

Pan X: Allows the user to pan horizontally.

Pan Y: Allows the user to pan vertically.

i

Input Data: Allows the user to Inpul specific window coorcllnanls.

Quit: Returns the userto theATTRIBUTES menu.

Dlsp Quantities: Displays current positions end incremental changes of the

entire systemor body segmentsas they are moved.

Dump Device: Allows the user to spedfy a new dump device.

Plotter Port: Allows the user to specify a new plotter port.

Main Menu: Returns the user to the main menu.

The WHAT function key allows the userto view the values of all parameters such as

joint angles, output devices, window variables, and current view. To exit to the main

menu, simply hit <cr>.

DATA FILE MOOE

The MOVIE key accessibleon the main menuallows the user to enter DATA FILE

MODE. This mode of operalion accepts time based data filescreated previouslyby the

user and determines the transformationmatrices for each time increment. A new file is

built on Ihe disc drive named SKITWORKS whichconlains theSKITTER positionsequence.
After the SKITWORKS file Is closed the program begins animating the position sequence on

the screen.

The DATA FILE mode is extremely useful for integrating output data files from

kinematic or control programs with computer graphics. The user is able to vary any

particular parameter, such as mass, Inertia, or gravity in his application program,

create a Input daia file, and see graphically the effects on SKITTER as It goes through a

position sequence. Once a theoretical SKITTER model is complete design of the system

components can begin using the model parameters (i.e. control parameters, leg lengths.

weights etc.) as design constraints.

INPUT DATA FILE STRUCTURE

The Input file structure consists of values for time, free or fixed leg segment

movements, and system rotations and translations. The file can be 30 lines long and each

line is arranged as follows:

TIME FREE FEMUR TIBIA FEMUR TIBIA FEMUR TIBIA ROT ROT ROT TRAN TRAN TRAN

A A B B C C X Y Z X Y Z

.2 0 3.2 5 0 0 0 0 15 0 0 0 0 0

This particular example shows that the user wishes to rotate the system around the x

axis 15 degrees, move femur a 3.2 degrees in fixed mode,and tibia a 5 degrees in the fixed

mode at time increment .2.

TIME: Time can have any value; however the value of 999 is reserved as a pointer to

tell the program that it is at the end of the input data file. On the final line of the data file

the user has to make the time value eoual to 999.

FREE: If the value for free equals 0, then the foot will be fixed; however, if the

value for f(ee equals 1 then the foot is free ( see manual mode - actuators menu).

When the MOVIE keys is pressed, the user will be asked :
OO YOU WANT TO RUN AN ALREAOY COMPUTED FILE ? Y OR N

If the user has run the movie functionbefore and as saved a SKITWORKS file, he may

enter Y. However, if this is the first time through for the user or a brand new Input file,

he should enter N.

At the prompt, enter In the name of either the computed file or new input file

depending on your previous answer. The program will proceed and animate the position

sequence. To stop the animationsequence simplyhit <cr>.

Once the animation sequence is stopped,the program will ask the user if he would like

to save the SKITWORKS fileas a computedfileif the inputdata filewas new. If so enter Y

and enter the name of the file at the next prompt.

A sample Input file, SHOW, and a computed file, WALK, are store on the SKIT..3D

discan can be used to demonstratethe DATA FILE modeforthe user.
.3

O.

tr) H

._I

I--4

I-- HZH

J

W

I--

_I

U3Z

rr

I-X

III

l-- J

U3Z

IT

F--
',,I__' _

>-

_J

0.

0

.J

F--

H

Z

_.L./___::.__'__ Y--.5_)

,._ p'.s1_",_-,'_ "-'-_ --'_'_

tilt X

UJ

IF0

n"
.)

,<

IJJ

.J

In

LUZ

I-I

-I

I-0

;>

I-I n

>.-

.J

!/)

I.-I 0J

.<

i,-i

I-.-

i-.i ZM

f

(.9

LU/

U1

I.UZ

I,-I

..I

I-- 0Hn

nn

UJ J

LIJ Z

..J

I,--

1:3

I-i

0..
O.

U) H

_JH

ki-4ZH

n- O

p. U

rrX

tU

C_0

I-
,

,

>. J

131..

I--I

1:3

.J

I-'-- Z

I"-t

ILl H

In

i,-

OC0

_-.

C.J

1.1..I

ILl

t"lr

fr

::D

._-

I.LI

b..

rr0

t'--

:3

.j
\

cn

i-i

^

X

r,,J

>.

._l

O.

U'J

I,-4

...I

I,-t

I.-

I--t Z

i.-4

o-I X

.._

m,l HX

.¢C X

l,t
XZ

a.mX0

amZH0H

\

.
THESE ARE THE CURRENT PARAMETERS:

WINDOW: X MIN - -20

Y MIN - -20

VIEW: LOOKING DOWN Z AXIS

PLOTTER LOACTION: 705

DISPLAY VALUES IS OFF

TRANS (in.} ROT (deg)

X 0.00 0.00

Y 0.00 0.00

Z 0.00 0.00

PIVOT ANG A: 0 PIVOT ANG B: 0

X MAX - 40

Y MAX ,, 40

PRINTER LOCATION: 9

FEMUR ANGLE TIBIA ANGLE

A 0.00 90.00

B 0.00 90.00

C 0.00 90.00

PIVOT ANG C: 0

FORM FEED

SCRATCH

ILASER PRINTER ISCREEN IHARD DISK IDISK DRIVE

ILOAD "" ICATALOG DRIVE ILIST PROGRAM IRE-STORE ""

TYPICAL OUTPUT FROM IWHAT' COMMAND
LO

Z0

10

i0

;0

;1

;2

;3

i4

;5

;0

'0

SO

I1

l0

.00

.10

.20

.30

.40

.41

.42

.50

.51

.52

.53

.54

.55

.60

.70

.80

.90

:00

:10

:20

'.30

40

50

60

70

80

90

00

10

20

30

40

50

60

" 70

80

90

00

10

20

30

,40

/ 50

60

70

]_M_eeeeee_e,e****eeee*****e_e**ee_***Qee****ee,e,e*e*Qe_*t,t**eee***_tte,

SKIT 3D V.10

THREE DIMENSIONAL GRAPHIC SIMULATION PROGRAM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

REM

WRITTEN BY:

BRICE K. MACLAREN

GARY V. MCMURRAY

06/23/88

THIS PROGRAM WILL ACCURATELY DEPICT THE SKITTER MOBILE PLATFORM

AND THE MOTIONS THAT IT IS ABLE TO ACHIEVE BY USING EITHER

MANUAL OR DATA FILE INPUT. USE FUNCTION KEYS AND KNOB FOR INPUT.

HARDWARE: HEWLETT PACKARD 200/300 SERIES COMPUTER

3.51 DISC DRIVE

KEYBOARD WITH KNOB

SOFTWARE: HEWLETT-PACKARD BASIC 4.0 WITH KNOB 20 BIN

OPTIONS: HEWLET-PACKARD (HPGL) PLOTTER

PRINTER

LOADED

REM SKITTER DATA FILE: SEE MANUAL FOR DESCRIPTION OF BODY POINTS

**************************************************************************

DATA

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

D%TA

DATA

DATA

DATA

l

DATA

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

0,0,0,I0 !

6.5482,28.4912,0,-2 ! A

9.1602,20.9817,3.2283,-1 l H

-1.7468,20.9817,9.5688,-1 ! I

-3.2741,28.4912,5.6709,-1 ! B

0,0,0,7

0,0,0,10

-3.2741,28.4912,5.6709,-2 l B

-7.3759,20.9817,6.3188,-1 l J

-7.3759,20.9817,-6.3188,-1 I K

-3.2741,28.4912,-5.6709,-1 ! C

0,0,0,7

0,0,0,i0

-3.2741,28.4912,-5.6709,-2 ! C

-1.7468,20.9817,-9.5688,-1 ! L

9.1602,20.9817,-3.2283,-1 ! G

6.5482,28.4912,0,-1 ! A

0,0,0,7

0,0,0,i0 l

6.5482,13.4722,0,-2 | D

9.1602,20.9817,3.2283,-1 ! H

-1.7468,20.9817,9.5688,-1 ! I

-3.2741,13.4722,5.6709,-I ! E

0,0,0,7

0,0,0,i0

-3.2741,13.4722,5.6709,-2 ! E

-7.3759,20.9817,6.3188.-I ! J

-7.3759,20.9817,-6.3188,-I ! K

UPPER BODY

BOTTOM BODY
d$O

49O

500

SlO

520

53O

560

57O

58O

590

_oo

610

62O

63O

64O

65O

68O

69O

7OO

710

74O

75O

760

77O

78O

_90

800

810

820

83O

84O

1350

B60

970

98O

190

_00

)1o

t20

t30

t40

t50

)60

t70

180

)90

LO00

L010

L020

!o3o

.040

.050

.060

.070

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

DATA

!

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

-3. 2741,13 •4722, -5. 6709, -1

0,0,0,7

0,0,0,I0

-3.2741,13.4722,-5.6709,-2 !

-1.7468,20.9817,-9.5688,-I I

9.1602,20.9817,-3.2283,-1 I

6.5482,13.4722,0,-1 |

0,0,0,7

0,0,0,4

0,0,0,10 !

9.1602,20.9817,-3.2283,-2 !

29.6602,20.9817,'3.2283,-1 !

18.7362,25.0731,0,-I !

0,0,0,7

0,0,0,10

29.6602,20.9817,3.2283,-2 !

18.7362,25.0731,0,-1 !

9.1602,20.9817,3.2283,-1 !

0,0,0,7

0,0,0,I0

9.1602,20.9817,-3.2283,-2

29.6602,20.9817,-3.2283,-1

20.571,16.8903,0,-1

0,0,0,7

0,0,0,i0

29.6602,20.9817,3.2283,-2 !

20.571,16.8903,0,-1 !

9.1602,20.9817,3.2283,-1 !

0,0,0,7

0,0,0,i0

29.6602,20.9817,-3.2283,-2

30.4255,0,0,-1

35.7901,9.2132,0,-i

0,0,0,7

0,0,0,i0

29.6602,20.9817,3.2283,-2

30.4255,0,0,-1

35.7901,9.2132,0,-1

0,0,0,7

0,0,0,4 1

0,0,0,i0 !

-i.7468,20.9817,9.5688,-2 !

-9.3493,25.0731,16.2368,-1 !

-11.9968,20.9817,27.3223,-1!

0,0,0,7

0,0,0,I0

-17.6259,20.9817,24.0723,-2!

-9.3493,25.0731,16.2368,-1 !

-7.3759,20.9917,6.3188,-i !

0,0,0,7

F

F

L

G

D

! RESERVED

G

M

0

FOR PEN

N

O

H

G

M

P

N

P

H

l

l M

l A'

! B'

! N

! A'

l B'

RESERVED FOR PEN

I

S

Q

R

S

J

FEq_/R ONE

TIBIA ONE

FEMUR TWO
11.080

1090

1100

1110

1120

1130

IL140

1150

1160

1170

1180

1190

1.200

1210

1220

1230

1240

1250

 26o

1270

1280

1290

1300

1319

 ]2o

1330

1340

1350

1360

1370

 38o

1390

1400

1410

1420

1430

440

450

1460

1470

1480

1490

 5oo

1510

L520

L530

L540

L550

L560

L570

L580

L590

L600

L610

1.62o

L630

L640

.650

.660

.670

!

DATA

DATA

DATA

DATA

DATA

1

DATA

DATA

DATA

DATA

DATA

I

I

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

DATA

i

DATA

DATA

DATA

DATA

DATA

I

DATA

DATA

DATA

DATA

DATA

!

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

DATA

DATA

DATA

!

DATA

DATA

0,0,0,I0

-1.7468,20.9817,9.5688,-2 I I

-i0.2667,16.8903,17.8258,-1! T

-11.9968,20.9817,27.3223,-11 Q

0,0,0,7

0,0,0,10

-17.6259,20.9817,24.0723,-21 R

-10.2667,16.8903,17.8258,-11 T

-7.3759,20.9817,6.3188,-1 ! J

0,0,0,7

0,0,0,I0 I

-11.9968,20.9817,27.3223,-2 ! Q

-15.1940,0,26.3601,-1 ! C'

-17.8763,9.2132,31.0059,-1 ! D'

0,0,0,7

0,0,0,i0

-17.6259,20.9817,24.0723,-2 | N

-15.1940,0,26.3601,-1 l C t

-17.8763,9.2132,31.0059,-i | D I

0,0,0,7

0,0,0,4 l

0,0,0,I0 !

-7.3759,20.9817,-6.3188,-2 1

-9.3493,25.0731,-16o2368,-1|

-17.6259,20.9817,-24.0723,-1|

0,0,0,7

RESERVED FOR PEN

K

W

U

0,0,0,I0

-11.9968,20.9817,-27.3223,-2 I V

-9.3493,25.0731,-16.2368,-1 l W

-1.7468,20.9817,-9.5688,-1 ! L

0,0,0,7

0,0,0,I0

-7.3759,20.9817,-6.3188,-2 | K

-10.2667,16.8903,-17.8258,-1 | X

-17.6259,20.9817,-24.0723,-1 | U

0,0,0,7

0,0,0,i0

-11.9968,20.9817,-27.3223,-2 ! V

-10.2667,16.8903,-17.8258,-1! X

-1.7468,20.9817,-9.5688,-1 | L

0,0,0,7

0,0,0,I0

-17.6259

-15.1940

-17.8763

0,0,0,7

!

,20.9817,-24.0723,-2 ! U

,0,-26.3601,-1 ! E'

,9.2132,-31.0059,-i ! F'

0,0,0,i0

-11.9968,20.9817o-27.3223,-2 ! V

TIBIA TWO

FEMUR THREE

TIBIA THREE
L680

1690

1700

1710

L720

L730

1.731

L732

L733

L734

1735

1740

L750

L760

L770

1.780

L790

L800

L810

L820

DATA -15.1940,0w-26.3601,-1 | E °

DATA -17.8763,9.2132,-31.0059,-1 ! F I

DATA 0,0,0,7

RL_ ****************************************************************

t

I

__***********************************************************************

REM

REM MAIN PROGRAM

REM

*************************************************************************

OPTION BASE 1

REAL Skitter(129,4),Newskit(129,3) | DEFINE VAR

REAL Trans(4,4},Temp(129,4),Tempa_129,4)tTRANSFORMATION MATRIX

REAL Total(4,4},Skitmod(129,4) |TOTAL TRANFORM MATRIX

REAL Femur(31,4),Femurmod(31,4),Femurtemp(31,4)

REAL Tibia(10,4},Tibiatemp(10,4},Tibiamod(10,4)

GOSUB Init ! INITILIZATION ROUTINE

CALL Display_skit(Skitter(*),Newskit(*),Screen_x,Screen_y)

! DRAW SKITTER

L830 Menu:

L840

L850 !

L860

L870

L880

L890

Lg00

L910

L920

L930

L940

L950

L960

L970

L980

L990

!000

).010

!020

!030

!040

!050

!060

!070

_080

!090

_100

_ii0

_120

'.130

140

150

160

170

SELECT Menus

! MENU SELECT

CASE "MAIN"

ON KEY 0 LABEL "SYSTEM" GOTO System

ON KEY 2 LABEL "AC_'ATORS" GOTO Actuator

ON KEY 5 LABEL "OUTPUT" GOTO Output

ON KEY 7 LABEL "ATTRIBUTES" GOTO Attributes

ON KEY 9 LABEL "WHAT ??" GOTO What

ON KEY 4 LABEL "EXIT" GOTO Finished

ON KEY 1 LABEL "PIVOT LINES" GOTO Pivotlines

ON KEY 6 LABEL "MOVIE" GOTO Movie

ON KEY 3 LABEL "" GOTO Main

ON KEY 8 LABEL "" GOTO Main

GOTO 1970

CASE "PIVOTLINES"

ON KNOB .55 GOTO Knob isr

ON KEY 0 LABEL "LEG A_ GOSUB Pivotlega

ON KEY 1 LABEL "" GOTO Pivotlines

ON KEY 2 LABEL "LEG B" GOSUB Pivotlegb

ON KEY 3 LABEL "" GOTO Pivotlines

ON KEY 4 LABEL "LEG C" GOSUB Pivotlegc

ON KEY 5 LABEL "" GOTO Pivotlines

ON KEY 6 LABEL "" GOTO Pivotllnes

ON KEY 7 LABEL "" GOTO Pivotlines

ON KEY 8 LABEL "" GOTO Pivotlines

ON KEY 9 LABEL "MAIN MENU" GOTO Main

GOTO 2100

CASE "SYSTEM"

ON KNOB .2 GOTO Knob isr

ON KEY 1 LABEL "ROTATE Y" GOSUB Rot_y

ON KEY 0 LABEL "ROTATE X" GOSUB Rot x

ON KEY 2 LABEL "ROTATE Z" GOSUB Rot z

ON KEY 5 LABEL "TRANSLATE X" GOSUB Trans x

ON KEY 6 LABEL "TRANSLATE Y" GOSUB Trans_y
)2180

2190

2200

2210

2220

2230

240 !

250

2260

2270

2280

2290

300

310

2320

2330

2340

2350

360

370 I

2380 1

2390

24O0

2410

420

430

2440

2450

2460

2470

480

490

2500

2510 1

2520

2530

2540

 sso

2560

2570

2580

2590

2600

1610

2620

2630

2640

2650

2660 !

ON KEY 7 LABEL "TRANSLATE Z" GOSUB Trans_z

ON KEY 9 LABEL "MAIN MEHU" GOTO Main

ON KEY 8 LABEL "TRANS VECTOR" GOSUB Vector

ON KEY 3 LABEL "ROTATION ANGLE" GOSUB Angle

ON KEY 4 LABEL "KNB INCREMENT" GOTO Increment

GOTO 2230

CASE .ATTRIBUTES"

ON KEY 0 LABEL "VIEWS" GOTO Windowpane

ON KEY 9 LABEL "MAIN" GOTO Main

ON KEY 1 LABEL "" GOTO Attributes

ON KEY 2 LABEL "WINDOW" GOTO Windows

ON KEY 3 LABEL "" GOTO Attributes

ON KEY 4 LABEL "DISP QUANTITY" GOTO Print_flag

ON KEY 5 LABEL "DUMP DEVICE" GOTO Printer

ON KEY 6 LABEL "PLOTTER PORT"GOTO Plotter

ON KEY 7 LABEL "" GOTO Attributes

ON KEY 8 LABEL "" GOTO Attrlbutes

GOTO 2360

CASE "OUTPUT"

ON KEY 0 LABEL "PLOT" GOTO Plot

ON KEY 1 LABEL "" GOTO Output

ON KEY 2 LA_EL "RASTER DUMP" GOTO Dump

ON KEY 3 LABEL "" GOTO Output

ON KEY 4 LABEL "" GOTO Output

ON KEY 5 LABEL "" GOTO Output

ON KEY 6 LABEL "" GOTO Output

ON KEY 7 LABEL "" GOTO Output

ON KEY 8 LABEL "" GOTO Output

ON KEY 9 LABEL "MAIN MENU" GOTO Main

GOTO 2500

CASE "ACTUATOR"

ON KNOB .21 GOTO Knob_leg_isr

ON KEY 0 LABEL "FEMUR A" GOTO Femur a

ON KEY 1 LABEL "FEMUR B" GOTO Femur_b

ON KEY 2 LABEL "FEMUR C" GOTO Femur c

ON KEY 5 LABEL "TIBIA A" GOTO Tibia-a

ON KEY 6 LABEL "TIBIA B" GOTO Tibia-b

ON KEY 7 LABEL "TIBIA C" GOTO Tibia_c

ON KEY 8 LABEL "" GOTO Menu

ON KEY 3 LABEL Freeleg$ GOTO Free_leg

ON KEY 4 LABEL "KNB INCREMENT" GOTO Increment

ON KEY 9 LABEL "MAIN MENU" GOTO Main

GOTO 2640

END SELECT

_670 1

_671 **************************************************************************

_672 REM

!673 REM _OB ISR: KNOB INTERUPT SERVICE ROUTINE. ON KNOB ROTATION, THE

!674 REM APPROIPRIATE FUNTION WILL BE CARRIED OUT BY THE KNOB INCREMENT

!675 REM AMOUNT

!676 REM

!677 **************************************************************************

_680 Knob isr: !

_690 -- Theta=Increment*SGN(KNOBX)

:700 SELECT _irl$
701 ITEM************ SYSTEM ROTATION *********************************** _2702

2710 CASE "ROTATE Y"

2720 Theta--Theta

2730 CALL Rotate y(Skltter(*},Skltmod(*),Total(*),Trans(t},Te

Bp(,),Tempa(,l,SYS rot y,Theta,Prlntflag$)

731 !

740 CASE "ROTATE X"

2750 CALL Rotate_x(Skitter(*),Skitmod(*),Total(*),Trans(*),Te

mp(,),Tempa(,),Sys_rot_x,Theta,Printflag$)

2760 l

2770 CASE "ROTATE Z"

CALL Rotate z(Skitter(*),Skltmod(*},Total(*),Trans(t),Te _780

p(*),Tempa(,),Sys_rot_z,Theta,Prin_flag$)

2790 1

2791 REM**************** SYSTEM TRANSLATION ************************************

2792 !

2800 CASE "TRANSLATE"

_,810 " CALL Translate 3d(Skitter(*),Skitmod(*),Total(*),Tezp(*)

Tempa(,),Trans(,),Sys_trans_x,Sys_trans_y,Sys_trans_z,Way,Theta,Prlntflag$)

2820 l

2821 REM**************** PIVOT LINES *******************************************

2822 |

2830

840

841 !

2842 !

2850

2860

2870

88_0GLE:"; Piv°t-ang-a

2890

2900

2910

CASE "PIVOTLINES"

Theta--Theta

IF Leg_flag$-"FEMURA" THEN

Pivot_ang_a-Pivot_ang_a+Theta

DISP " MODE: ROTATE ABOUT PIVOT LINE A";Theta;" TOTA

Pivotx-(Skltter(96,1)+Skitter(127,1))/2

Pivoty-(Skltter(96,2)+Skitter(127,2))/2

Pivotz-(Skltter(96,3)+Skltter(127,3)}/2

Dist_piv_foot-SQR((Pivotx-Skitter(65,1)}^2+(Pivoty-Sk

itter(65,2))^2+(Pivotz-Skitter(65,3))^2)

2920 CALL Trans_fem_orig(Skltter(*),Skitmod(*),-Pivotx,-P!

_oty,-Pivotz)

Flag-O

CALL Rotate_leg_z(Skitmod(*),Skltmod(*),Leg$,-Theta,P

cALL Trans_fem_orig(Skitmod(*),Skitmod(*),Pivotx,Pivo

MAT Skitter= Skitmod

END IF

2930

2940

rlntflag$,Fem_a_ang,Flag)

2950

4_ '',60Piv°tz)

2970

2980 l

2981 !

2982 !

2990

_ooo

3010

TOTAL ANG:";Pivot_ang_b

3020

3030

3040

Qoso

B BY:";Theta;"

IF Leg_flag$="FEMUR B" THEN

Pivot_ang_b=Pivot_angb+Theta

DISP " MODE: ROTATE ABOUT PIVOT LINE

Pivotx=(Skitter(65,1)+Skitter(127,1))/2

Pivoty=(Skitter(65,2)+Skitter(127,2))/2

Pivotz=(Skitter(65,3)+Skitter(127,3))/2

Dist_piv_foot=SQR((Pivotx-Skitter(96,1))^2+(Pivoty -Sk

itter(96,2))^2+(Pivotz-Skitter(96,3)) ^2)

3060 CALL Trans_fem_orig(Skitter(*),Skitmod(*),-Pivotx,-Pi

voty,-Pivotz)

3070 CALL Rotate_leg_y(Skitmod(*),Skitmod(*),60)
80

go

t£1ag$,Fem._bang,Flag)

O0

10

,Pivotz)

20

3O

4O !

41 |

42 !

5O

60

7O

OTALANG:";Pivot_ang_c

8O

90

00

Fla_0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Theta,Pr

CALL Rotate leg_y(Skitmod(*),Ski_od(*),-60) .

CALL Trans__es_orig(Skitsod(*),Skitmod(*),Plvotx,Pivo

MAT Skitter- Skitmod

END IF

IF Leg_flag$-"FEMUR C" THEN

Pivot_ang_c-Pivot_ang_c+Theta

DISP " MODE: ROTATE ABOUT PIVOT LINE C BY:";Theta;"

Pivotx-(Skitter(65,1)+Skitter(g6,1))/2

Pivoty-(Skitter(65,2)+Skltter(96,2))/2

Pivotz-(Skitter(65,3)+Skitter(96,3))/2

12 Dist-piv- f°°t'sQR((Piv°tx-skitter(127'l)}^2+(Piv°ty-s

tter(127,2))^2+(Pivotz-Skitter(127,3)) ^2)

CALL Trans_fem_orig(Skitter(*),Skitmod(*),-Pivotx,-Pi

CALL Rotate_leg_y(skitmod(*),Skitmod(*},-60)

Flag-0

CALL Rotate_leg_z(Skitmod(*),Skltmod(*),Leg$,Theta,Pr

CALL Rotate leg_y(Skitmod(*),Skitmod(*),60)

CALL Transfemorlg(Skitmod(*),Skltmod(*),Pivotx,Pivo

2O

ty,-Sivotz)

30

40

50

tflag$,Fem_c_ang,Flag)

60

70

,Pivotz)

80

90

00 !

I0

20

30

40

50

60

MAT Skitter- Skitmod

END IF

MAT Tempa(*,1:3)- Skltter(*,l:3)

MAT Temp= Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

END SELECT

CALL Display_skit(Skltmod(*),Newskit(*),Screen_x,Screen_y)

GCTO Menu

70 1

**__************************************************************************

72

73 REM KBOBLEG_ISR: KNOB LEG INTERUPT SERVICE ROUTINE FOR ACTUATOR MENU

74 REM

75 --************************************************************************

76 1

BO Knob_leg_isr:!

_0 Theta=Increment*SGN(KNOBX)

30 SELECT Legs

31!

32

t0

20

30

_0

emur(3,2),-Femur(3,3))

SO

_0

10

Lntflag$,Fem a ang,Flag)

30

CASE "FEMUR A"

Theta--Theta

MAT Femur= Skitter(37:67,*)

CALL Trans_fem_orig(Femur(*),Femurmod(*),-Femur(3,1),

Flag=l

CALL Rotate leg_y(Femurmod(*),Femurmod(*),180)

CALL RotateZleg_z(Femurmod(*),Femurmod(*),Leg$,Theta'

CALL Rotate_leg_y(Femurmod(*),Femurmod(*),180)
• ff

490

,Fomurl3,2l,Femur(3,3))

500

510!

520

530

540

550

560

570

580!

59O

6OO

610

CALL Trans_fem_orlg(Femurmod(*),Femurmod(*),Femur(3,1

MAT Skltter(37:67,*)- Femurmod

IF Freeleg$-"FREE" THEN

MAT Femurtemp(*,1:3)- Femurmod(*,l:3)

MAT Femur- Femurtemp*Total

MAT Skitmod(37:67,1:3)- Femur(*,1:3)

GOTO End_leg

END IF

Pivotx-(Skitter(96,1)+Skitter(127,1))/2

Pivoty-(Skitter(gG,2)+Sk4.tter(127,2))/2

Pivotz-(Skitter(96,3)+Skitter(127,3})/2

620 Dist_piv_foot'SQR((Piv°tx-Skitter( 65,1)}^2+(Piv°ty-Sk

tter(65,2))^2+(Pivotz-Skitter(65,3}) ^2}

630 Dist_y-Pivoty-Skltter(65,2}

_40 Rot ang-ASN(Diety/Dist_plv foot)

bS0 CALL Trans_femorlg(Skitter_*),Skltmod(*),-Pivotx,-Pi

oty,-Pivotz)

660 Flag-0

670 CALL Rotate_leg_z(Skitmod(*),Skltmod(*),Leg$,-Rot_ang

Prlntflag$,Fem_a_ang,Flag)

680 CALL Trans_fem_orlg(Skltmod(*},Skltmod(*),Pivotx,Pivo

y,Pivotz)

690

7O0

710

720

730 !

740 1

750 !

760

770

78O

.Femur(3,2),-Femur(3,3))

790

800

810

Tintflag$,Fem_b_ang,Flag)

820

830

,Femur(3,2),Femur(3,3))

840

850 t

860

870

88O

890

9OO

910

920 !

930

940

950

960

MAT Skitter- Skitmod

MAT Tempa(*,l:3)- Skitter(*,1:3)

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

CASE "FEMUR B"

MAT Femur- Skitter (68 :98, *)

CALL Trans_fem_orig (Femur (*), Femurmod (*), -Femur (3, I),

CALL Rotate_leg_y(Femur_od(*),Femurmod(*),60)

Flag=l

CALL Rotate_leg_z(Femurmod(*),Femurmod(*),Leg$,Theta,

CALL Rotate_leg_y (Femurmod (*), Femurmod (* ), -60 )

CALL Trans_fem_orig (Femurmod (*), Femurmod (*), Femur (3,1

MAT Skitter(68:98,*)- Femurmod

IF Freeleg$="FREE" THEN

MAT Femurtemp(*,l:3)= Femurmod(*,l:3)

MAT Femur- Femurtemp*Total

MAT Skitmod(68:98,1:3)- Femur(*,l:3)

GOTO End leg

END IF

Pivotx=(Skitter(65,1)+Skltter(127,1))/2

Pivoty=(Skitter(65,2)+Skitter(127,2))/2

Pivctz=(Skitter(65,3)+Skitter(127,3))/2

Dist_piv foot=SQR((Pivotx-Skitter(96,1))^2+(Pivoty -$k

tter(96,2))^2+(Pivotz-Skitter(96,_;) ^2)

970 DisS_y=Pivoty-Skitter(96,2)

980 Rot ang=ASN(Dist_y/Dist piv foot)

990 CALL Trans_fem_orig(Skitter(*),Skitmod(*),-Pivotx,-?i
'oty,-Pivotz)

000

010

O2O

Tintflag$,?em_b_ang,Flag)

030

040

y,Pivotz)

O5O

060

O7O

080

090 1

100 !

110

120

130

140

Femur(3,2),-Femur(3,3))

150

160

170

rintflag$,Femo_ang,Flag)

180

190

,Femur(3,2),Femur(3,3))

200

210 !

220

230

240

250

260

270

280 !

290

300

310

CALL Rotate_leg_y(Skitmod(*),Skltmod(*),60)

Flag-0

CALL Rotate leg_z(Skltmod(*),Skltmod(*),Leg$,Rot_ang,

CALL Rotate leg_y(Skitsod(*),Skltmod(*},-60)

CALL Trans__@s_orlg(Skltmod(*},Skltmod(*},Plvotx,Pivo

MAT Skitter- Skltmod

MAT Tempa(*,1:3)- Skitter(*,1:3)

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

CASE -FEMUR C"

Theta--Theta

MAT Femur- Skitter(99:129,*)

CALL Trane_femorig(Femur(*),Femurmod(*),-Femur(3,1),

CALL Rotate_leg_y(Femurmod(*),Femurmod(*),-60)

Flagml

CALL Rotate_leg_z(Femurmod(*),Femurmod(*),Leg$,Theta,

CALL Rotate leg_y(Femurmod(*),Femurmod(*),60)

CALL Trans__em_orig(Femurmod(*),Femurmod(*),Femur(3,1

MAT Skitter(99:129,*)- Femurmod

IF FreelegSm"FREE" THEN

MAT Femurtemp(*,l:3)- Femurmod(*,l:3)

MAT Femur- Femurtemp*Total

MAT Skitmod(99:129,1:3)- Femur(*,1:3)

GOTO End leg

END IF

Pivotx-(Skitter(65,1)+Skitter(96,1)}/2

Pivoty-(Skitter(65,2)+Skitter(96,2))/2

Plvotz-(Skltter(65,3)+Skltter(96,3))/2

320 Diet--PlY--f°°t=sQR((Piv°tx-Skitter(127'l})^2+(Piv°ty-s

Itter(127,2))^2+(Pivotz-Skltter(127,3}) ^2)

330 Dist_y=Pivoty-Skltter(127,2)

340

350

oty,-Pivotz)

360

370

380

rintflag$,Fem._.c_ang,Flag)

39O

4OO

y,Pivotz)

410

420

43O

t40

450 !

460 !

_70 !

;80

190

Rot ang-ASN(Dist y/Diet_ply foot}

CAL_Trans_femorig(Skitter_*},Skltmod(*},-Pivotx,-Pi

CALL Rotate leg_y(Skltmod(*),Skitmod(*},-60}

Flag=0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Rot_ang,

CALL Rotate leg_y(skitmod(*),Skitmod(*),60)

CALL Trans_fem_orig(Skitmod(*),Skltmod(*},Pivotx,Pivo

MAT

MAT

MAT

MAT

skitter= Skitmod

Tempa(*,l:3)= Skltter(*,l:3)

Temp= Tempa*Total

Skitmod(*,l:3}= Temp(*,l:3)

CASE "TIBIA A"

Theta=-Theta
5O0

510

Ttbta(2,2),-Tibia(2,3))

520

530

540

rintflag$,Tib_a_ang,Flag)

55O

560

,Tibia(2,2) ,Tibia(2,3))

S70

580 !

590

500

610

520

530

540

550 !

S60

S70

680

MAT Tibia- Skitter(S8:67,*)

CALL Trann_fem_orig(Tibia(*),Tibiamod(*),-Tibla(2,1),

Flag-i

CALL Rotate_leg_y(Tibiamod(*),Tiblamod(*),i80)

CALL Rotate_leg_z(Tiblamod(*},Tiblamod(*),Leg$,Theta,

CALL Rotate leg_y(Tibiamod(*),Tibiamod(*),i80)

CALL Trans_fem_orlg(Tiblamod(*),Tibiamod(*),Tibia(2,1

MAT Skitter(S8:67,*)- Tiblamod

IF Freeleg$-"FREE" THEN

MAT Tiblatemp(*,1:3)- Tibiamod(*,l:3)

MAT Tibia- Tibiatemp*Total

MAT Skitmod(58:67,1:3)-Tibla(*,l:3)

GOTO End_leg

END IF

Pivotx-(Skitter(96,1)+Skitter(127,1))/2

Pivoty-(Skltter(96,2)+Skltter(127,2))/2

Pivotz-(Skitter(96,3)+Skitter(127,3))/2

S90 Dist_/_iv_f°°t'SQR(( Piv°tx-skitter(65'1))^2+(Piv°ty-sk

tter(65,2))A2+(Pivotz-Skitter(65,3}) ^2)

700 Dist_y-Pivoty-Skitter(65,2)

710 Rot ang-ASN(Dist_y/Dist_piv_foot)

720 CAL_Trans_femorig(Skltter(*),Skitmod(*),-Pivotx,-Pi

:ty,-Pivotz)

730 Flag-0

740 CALL Rotate_legz(Skitmod(*),Skitmod(*),Leg$,-Rot_ang

Frlntflag$,Tib_a_ang,Flag)

750 CALL Trans_femorlg(Skltmod(*),Skitmod(*),Pivotx,Pivo

F,Pivotz)

760

770

780

790

300 t

310 !

320

330

340

FIbia (2,2), -Tibia (2,3) )

350

360

370

:int flags, Tib b_ang, Flag)

380

390

,Tibia(2,2) ,Tibia (2,3))

)00

)10 !

)20

)30

)40

)50

)60

_70

)80 !

_90

MAT

MAT

MAT

MAT

Skitter- Skitmod

Tempa(*,1:3)- Skitter(*,1:3)

Temp- Tempa*Total

Skitmod(*,l:3)- Temp(*,l:3)

CASE "TIBIA B"

MAT Tibia= Skitter(89:98,*)

CALL Trans_fem_orig(Tibia(*),Tibiamod(*),-Tibia(2,1),

CALL Rotate_leg_y(Tibiamod(*),Tibiamod(*),60)

Flag=l

CALL Rotate_leg_z(Tibiamod(*),Tiblamod(*),Leg$,Theta,

C2_LL Rotate leg_y(Tibiamod(*),Tibiamod(*),-60)

CALL Trans_fem_orig(Tibiamod(*),Tibiamod(*),Tibia(2,1

MAT Skitter(89:98,*)= Tibiamod

IF Freeleg$="FREE" THEN

MAT Tibiatemp(*,l:3)= Tiblamod(*,l:3)

MAT Tibia= Tibiatemp*Total

MAT Skitmod(89:98,1:3)= Tibia(*,1:3)

GOTO End_leg

END IF

Pivotx=(Skitter(65,1)+Skitter(127,1))/2
$000 Pivoty-(Skltter(65,2)+Skitter(127,2))/2

5010 Pivotz-(Skitter{65,3)+Skitter(127,3))/2

5020 Dist_piv_foot'SQR((Pivotx-Skltter(96,1))^2+(Piv°ty -Sk

_tter(96,2))^2+(Pivotz-Skitter(96,3))^2)

_030 Disty-Pivoty-Skitter(96,2)

Rot ang-ASN(Disty/Dist ply foot)

CALL Trans_fem_orig(Skitter_*),Skitmod(*),-Pivotx,-Pi

;040

;050

,oty, -Pivotz)

;060

;070

;080

,tint flagS, Tib_b ang, Flag)

;090

;100

:y, Pivotz )

;110

;120

;130

;140

;150 !

;160 !

;170

;180

;190

•Tibia(2,2) ,-Tibia(2,3) )

;200

;210

;220

,rlnt flagS, Tlb_c_ang, Flag)

;230

;240

,Tibia(2,2) ,Tibia (2,3))

;250

;260 l

;270

;280

;290

;300

;310

;320

;330 !

;340

;350

;360

;370

CALL Rotate_leg_y(Skltmod(*),Skltmod(*),60)

Flag-0

CALL Rotate_leg_z(Skltmod(*),Skltmod(*),Leg$,Rot_ang,

CALL Rotate_leg_y(Skltmod(*),Skitmod(*),-60)

CALL Trans_fem_orlg(Skltmod(*),Skitmod(*),Pivotx,Pivo

MAT Skitter- Skitmod

MAT Tempa(*,l:3)- Skltter(*,l:3}

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

CASE "TIBIA C o'

MAT Tibia- Skltter(120:129,*)

CALL Trans_fem_orig(Tibia(*),Tibiamod(*),-Tibia(2,1),

CALL Rotate_leg_y(Tiblamod(*),Tibiamod(*),-60)

Flag=l

CALL Rotate_leg_z(Tibiamod(*),Tibiamod(*),Leg$,Theta,

CALL Rotate_leq_y(Tiblamod(*),Tiblamod(*),60)

CALL Trans_fem_orig(Tibiamod(*),Tibiamod(*),Tibia(2,1

MAT Skitter(120:129,*)- Tiblamod

IF Freeleg$="FREE" THEN

MAT Tiblatemp(*,l:3)- Tiblamod(*,l:3)

MAT Tibia- Tibiatemp*Total

MAT Skitmod(120:129,1:3)= Tibia(*,1:3)

GOTO End_leg

END IF

pivotx-(Skitter(65,1)+Skltter(96,1))/2

Pivoty=(Skitter(65,2)+Skitter(96,2_)/2

Pivotz=(Skltter(65,3)+Skitter(96,3))/2

Dist ply foot=SQR((Pivotx-Skitter(127,1))^2+(Pivoty-S

:itter(127,2))^2+(Plvotz-Skitter(127,3)) ^2)

;380 Dist_y=Pivoty-Skitter(127,2)

;390

;400

'oty,-Pivotz)

;410

,420

,430

Tintflag$,Tib_cang,Flag)

440

450

y,Pivotz)

460

470

480

Rot ang=ASN(Dist y/Dist piv_foot)

CALL Trans_fem_orig(Skitter(*),Skitmod(*),-Pivotx,-Pi

CALL Rotate_leg_y(Skitmod(*

Flag=0

CALL Rotate_leg_z(Skitmod(*

),Skitmod(*),-60)

),Skitmod(*),Leg$,Rot_ang,

CALL Rotate_leg_y(Skitmod(*),Skitmod(*),60)

CALL Trans_fem_orig(Skitmod(*),Skitmod(*),Pivotx,Pivo

MAT

MAT

MAT

Skitter= Skitmod

Tempa(*,l:3)= Skitter(*,l:3)

Temp= Tempa*Total
lisgO00 MAT Skitmod(*,l:3)- Temp(*,l:3) !

5510 End_leg: |

5520 END SELECT

5530 I

5S40 CALL Dinplay_skit(Skitmod(*),Newskit(*),Screenx,Screen_y)

SO51 REM ********************************************************************** GOTOMonu

5552 REM

5553 REM GOSUB ROUTINES FOR MENU AND KNOB ISR CASE SELECTION

5554 REM

5555 *************************************************************************

60 Main:! 7O

5580

5590 Movie:!

5600

5610

Menu$-"MAIN"

GOTO Menu

CALL Movie

RESTORE 160

GOSUB Init

CALL Display_sklt(Skitmod(*),Newskit(*),Screen_x,Screen_y)

5640 GOTO Menu

5650 Plvotlines:!

5660 M_nu$-"PIVOTLINES"

5670 GCTO Menu

80 !

90 Pivotlega: !

5700 TwirlS-" PIVOTLINES"

5710 Leg_flagS-" FEMUR A"

•5720 RETURN

5730 !

4050 Pivotlegb: TwirlS- ! "PIVOTLINES"

5760 Leg_f Iag$-"FEMUR B"

5770 RETURN

5780 !

5790 Pivotlegc: l

00 TwlrI$-"PIVOTLINES"

i0 Leg_flagS-" FEMUR C"

5820 RETURN

$830 !

5840 System:

5850 Menu$-"SYSTEM"

GOTO Menu 60

70 t

5880 Attributes:!

5890 Menu$-"ATTRIBUTES"

5900 GOTO Menu

5910 l

5920 Output:!

-''_30 Menu$="OUTPUT"

5940 GOTO Menu

5950 t

5960 !

i970 Actuator:!

5980 Menu$="ACTUATOR"

_go GOTO Menu

;000 !

;010 Increment:!

;020 DISP " INPUT NEW INCREMENT

;030 LINPUT IncrementS

CURRENT VALUE: ",Incr amen!;
$04O

$O5O

$060

5070

3080

5090

$100 Free_leg: !

5110

;120

$130

;140

5150

3160

5170

5180

;190 Femur a:!

m

;200

;210

;220

;230 !

_240 Femur b:!

E

_250

;260

;270

1280 1

;290 Femur c: l

;300

3310

5320

5330 l

;340 Tibia a:!

m

;350

_360

;370

;380 1

;390 Tibia b:!

;400

;410

;420

;430 l

;440 Tibia c: !

;450

;460

,470

_480 |

;490 Windows: !

IF IncrementS-"" THEN

GOTO 6090

ELSE

Zncrement-VAL(Zncrement$)

END IF

GOTO Menu

IF Freeleg$-"FIXED" THEN

DISP " LEG IS NOW FREE TO ROTATE"

Free Ieg$-" FREE"

ELSE

DISP " LEG IS NOW FIXED "

Freeleg$-"FIXED"

END IF

GOTO Menu

LegS-"FEMUR A"

DISP " MODE: FEMUR A"

GOTO Menu

LegS-"FEMUR B"

DISP " MODE: FEMUR B"

GOTO Menu

LegS-" FEMUR C"

DISP " MODE: FEMUR C"

GOTO Menu

Leg$-"TIBIA A"

DISP " MODE: TIBIA A"

GOTO Menu

LegS-"TIBIA B"

DISP " MODE: TIBIA B"

GOTO Menu

LegSm"TIBIA C"

DISP " MODE: TIBIA C"

GOTO Menu

;500 CALL Zoom_pan(Window$,Screenx win mln,Screenx win._max,Screeny_wi

L_min,Screeny_wln_max,Skitmod(*),Newskit(*),Screen_x,Screeny_

;510 GOTO Menu

;520 What:!

;530 !

,540

.550

.560

570

580

590

600

610

620

Ap=Screenxwin_min

Bp=Screonx win max

Cp=Screeny_--win_min

Dp=Screeny_win__max

Ep=Sys trans x

Fp=sys_transZy

Gp=Sys trans_z

Hp=Sys rot x

Ip=Sys_rot--y
_630 Kp-Sys_rot_z

6640 Lp-Fe__a_ang

6650 Mp-Fen_b_ang

6660 Np-Fem_c_ang

6370 Op-Tib_a_ang

6680 Qp,,Tlb_b_ang

_690 pp-Tlb_c_ang

6700 Rp-,lncrement

6710 Sp-Pivot_ang_a

6720 Tp-Pivot_ang_b

6730 Up-Pivot_ang_c

6740 CALL What(Ep,Fp,Gp,Hp,ip,Kp,Ap,Bp,Cp,Dp,Prlntflag$,Screenx,Screen_y,Plot_d

_vIce,Dump_devlce,Lp,Mp,Np,Op,QP,Pp,Rp,Sp,Tp,Up)

6750 GOTO Menu

6760 |

6770 Windowpane:!

_780 CALL Windows(Skitmod(*),Newskit(*),Screen_x,Screen_y)

6?90 GOTO Menu

a00 !

_810 Window _limits:!

6820 CALL Window llmits(Skitmod(*),Newskit(*),Screen_x,Screeny.Sc

reenxwin_min,Screenx_win_max,Screeny_winmin,Screeny_win_max)

6830 GOTO Menu

6840 !

;850 Print_flag:! ;860

6870

6880

6890

6900

910

920

6930

6940 Rot_y:!

6950

6960

970

980 I

6990 Rot_x:!

7000

7010

7020

030 l

040 Rot z:!

7050

7060

7070

7080 l

090 Trans_x:!

100

7110

7120

7130

7140 !

150 Trans_y:!

160

7170

7180

7190

7200 !

IF Prlntflag$-"OFF" THEN

DISP " DISPLAY QUANTITIES IS ";CHR$(129);" ON ";CHR$(128)

Printflag$-"ON"

ELSE

DISP " DISPLAY QUANTITIES IS OFF"

Prlntflag$-"OFF"

END IF

GOTO Menu

TwirI$-"ROTATE Y"

_ISP " MODE:";TwirI$

_ETURN

Twirl$-"ROTATE X"

DISP " MODE:" ;Twirls

RETURN

TwirI$="ROTATE Z"

DISP " MODE: ";Twirls

RETURN

Twirl $=.TRANSLATE"

DISP " MODE: TRANSLATE X"

Way=l

RETURN

TWirl$="TRANSLATE"

DISP " MODE: TRANSLATE Y"

Way=2

RETURN
_210 Trans_z:!

7220 TwlrIS-"TRANSLATE"

7230 DISP " MODE: TRANSLATE Z"

7240 Way-,3

7250 RETURN

7260 1

_270 Vector:t

7280 DISP " MODE: VECTOR TRANSLATION"

7290 CALL Vectnr(Skitter(*),Skltmod(*),Temp(.),Tempa(.),Total(,),Tran

e(*),Sys trane x,Sye trans y,Sym tran z,Newsklt(*),Screen x,Screen y,Prlntflag$) 7300 - - -

7310 1

320 Angle:l

330 DISP " MODE:INPUT ANGLE ROTATION"

7340 CALL Angle(Skltter(*},Skltmod(*),Temp(*},Tempa(.},Tota1(.),Trans(,),S

ye_rot.x,Sys rot_y,Sys rot z,Newskit(*),Screen x,Screeny, Printflag$,Twirl$)

7350 -- RETURN- -

7360

 37o I

7580 Plot:l

7381 CALL Plot_it(Plot_device)

7382 PLOTTER IS P1ot_device,"HPGL"

7383 DISP "PLOT BEING GENERATED"

7384 CALL Display_skit(Skitmod(*),Newskit(*),Screen_x,Screen_y)

385 PLOTTER IS CRT,"INTERNAL"

386 PRINT "IN;ROO;IP;UP;SP0;"

7387 PRINTER IS CRT

7390 BEEP 1464.84,.5

7400 DISP " PLOT FINISHED"

7410 GOTO Menu

420 !

430 Dump:!

7431 DISP "GRAPHICS DUMP BEING GENERATED"

7433 DUMP DEVICE IS Dump device

7434 DUMP GRAPHICS

7435 PRINTER IS Dump_device

436 PRINT CHR$(12)

437 PRINTER IS CRT

7440 BEEP 1464.84,.5

7450 DISP " GRAPHICS DUMP FINISHED"

7460 GOTO Menu

7470 1

480 Prlnter:!

490 DISP "WHERE IS THE LOCATION OF THE EXTERNAL PRINTER";

7500 LINPUT Temps

7510 IF TempS="" THEN GOTO 7540

7520 Dump_device-VAL(Temp$)

7530 DISP " PRINTER IS AT ";CHR$(129);Dump_devlce;CHR$(128)

540 GOTOMenu

550 !

7560 Plotter:!

7570 DISP " _mERE IS THE LOCATION OF THE PLOTTER";

7580 LINPUT Temps

7590 IF Temp$_"" THEN GOTO 7620

600 Plot device-VAL(Temp$)

610 DISP " PLOTTER IS AT ";CHR$(129);Plot device;CHR$(128) .

7620 GOTO Menu

7630 !**************************************************************************

7640 !

7641 | INITIALIZATION OF PARAMETERS
7660 |

7670

7680

69o

7700

7710 l

7720

7730 |

7740

if75o |

7760

7770 I

7780

7790 I

7800

4_810 l

820

7830

7840 I

7850

7860 |

1 87o

1_88o |

I 7890

I 7900 !

7910

7920 |

_/930

940 !

7950

7960 !

7970

7980 i

,,?990

18OO0 !

8010

8020 !

8030

8040

ii_050 !

060

8070

8080

8090

8100

110

120 !

8130

8140

8150

8160

i1_170

180

8190 !

8200

8210

8220

DEG

GINIT

GRAPHICS ON

PLOTTER IS CRT,"INTERNAL"

Du=p_device-9

Plot_device-705

READ Skitter(*)

MAT Skitmod- Skitter

MAT Femurtemp- (1)

MAT Tiblatemp- (I)

MAT Trans- IDN

MAT Tempa- (I)

MAT Total- IDN

Menu$-"MAIN"

TwLrI$-"ROTATE Y"

Freeleg$-"FIXED"

Way-1

Printflag$-"OFF"

Increment-5

Rot_increment-3

Screen_x-i

Screen_y-2

Systrans_x=O

Sys trans y=O

Sys_transz-O

Sys_rot_x_-0

Sys_rot_y-O

Sys_rot z=0

Fema_ang=0

Fem_bang=0

Fem_c_ang=0

Tib_a_ang=90

Tib_b_ang=90

Tib c ang=90

Pivot_ang_a=0

Pivot_ang_b=0

Pivot_ang c=0

| SET TO DEGREES

| INITIATE GRAPHICS

I TURN G-PLANE ON

! INIT PLOTTER

I READ SKITTER DATA

! INIT TRANS MATRIX TO IDN

| INIT MAIN MENU

! AXIS OF TRANS X-I,Y-2,Z-3

I TRANS INC.

I INIT VIEW PLANE

! X'I,¥'2,Z'3

! INIT POSITONS OF SYST_

! INIT LEG ANGLES
_8230 !

8240

8250

8260

8270

8280

Screenx wln max-40 I SET WINDOW

Screenx-wln--mln--20

Screeny--wln--max-40

screen _-.l.>in--2 o

SHOW Screenx win_min, Screenx win_max, Screeny_win min, Screeny_win_max

8360 Finished:

8370 GCLEAR

_380 GRAPHICS OFF

8390 CLEAR SCREEN

8400 END

8410 |

8411 |! 8412

414

I 8415

I s416 1

1 8417 1 8420 ||

_84401_430|1"***********************************************************************

8441 SUBROUTINE ROTATE: ROTATES SYTEM ABOUT LOCAL Y AXIS

I 8442 &

8443 *************************************************************************

| 8444 |1

1_450 SUB Rotate y(Skitter(*) ,Skitmod(*) ,Total(*) ,Trans(*) ,Temp(*) ,TeRpa(*) ,Sys r

| "bt_y, Theta, Print flag$)

8460 |

8470 DIM Bogus(4,4)

8480 l

8490 Sys rot y=Sys_rot_y+Theta

500 IF Prlntflag$="ON" THEN

510 DISP " MODE: ROTATE Y BY ANGLE OF ",The,a," TOTAL ANGLE=",Sys rot

Y

8520 END IF

8530 MAT Tempa(*,l:3)= Skitter(*,1:3)

8540 !

550 ! SET UP ROTATION MATRIX

'8560 1

8570 MAT Trans= IDN

8580 Sine=SIN (Theta)

8590 Coslne=COS (Theta)

8600 Trans (1,1) =Cosine

610 Trans (1,3) =Sine

620 Trans (3,1) =-Sine

8630 Trans (3,3) =Cosine

8640 !

8650 !INCREMENT Y ROTATION VARIABLE

8660 !
p670 1

8680

8690

8700

8710

8720 1

d 73o

"8740 I

MAT BogUs- Trans*Total

MAT Total- Bogus

MAT Tamp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

SUBEND

8750 ***************************************************************************

8760 !

8761 I SUBROUTINE ROTATE X: ROTATES SYSTEM ABOUT LOCAL X AXIS

8762 1

_763 **************************************************************************

_764 l

8770 SUB Rotate x(Skltter(*),Skitmod(*),Total(*),Trans(*),Temp(*),Te_pa(.),Sys r

ot_x,Theta,Prlntflag$)

8780 OPTION BASE 1

8790 DIM Bogus(4,4)

800 |

810

8820

8830

x

8840

Sys_rot x-Sys_rot x+Theta

IF Prlntflag$-"ON"-THEN

DISP " MODE: ROTATE X BY ANGLE OF ",Theta,"

END IF

850 MAT Tempa(*,l:3)- Skltter(*.l:3)

860 ! SET UP ROTATION MATRIX

8870 l

8880

8890

8900

1910 1920

8930

8940

8950 !

8960

_970 1

_980

8990

9000

9010

TOTAL ANGLE=",Sysrot_

9020 !

 o3o

_040 |

MAT Tran8- IDN

Slne=SIN(Theta)

Coslne-COS(Theta)

Trans(2.2)-Coslne

Trans(3,3)-Cosine

Trans(2,3)--Sine

Trans(3,2)-Sine

INCREMENT ROATATION VARIABLE

MAT Bogus- Trans*Total

MAT Total- Bogus

MAT Temp- Tempa*Total

MAT Skltmod(*,l:3)= Temp(*,l:3)

SUBEND

9050 **************************************************************************

9060 |

9061 ! SUBROUTINE ROTATE Z: ROTATES SYSTEM ABOUT LOCAL Z AXIS

9062 !

9063 1.************************************************************************

 064 !

9070 SUB Rotate z(Skitter(*),Skitmod(*J.Total(*),Trans(*),Temp(*),Tempa(.),Sys_r

ot z,Theta,Printflag$)

90i0 OPTION BASE 1

9090 DIM Bogus(4,4)

9100 Sys_rot_z=Sys_rot_z+Theta

b110 IF Printflag$="ON" THEN

_120 DISP " MODE: ROTATE Z BY ANGLE OF ",Theta," TOTAL ANGLE=",Sys rot_

z

9130 END IF

9140 MAT Tempa(*,l:3)= Skitter(*,1:3)
)150 !

)160 ! SET UP ROTATION MATRIX

)1"/0 !

)180

)190

)200

)210

)220

)230

)240

)250 i

)270

)280

)290

)300

)310

)320 I

MAT Tranm- IDN

Slne=SIN(Theta)

Coslne-COS(Theta)

Trans(1,1)=Coslne

Trans(1,2)--Sine

Trans(2,1)-Slne

Trans(2,2}-Coslne

_260 ! INCREMENT COUNTER; FIND NEW SKITTER MATRIX

MAT Bogus- Trans*Total

MAT Total- Bogus

MAT Temp= Tempa*Total

MAT Skltmod(*,l:3)- Temp(*,l:3}

SUBEND

)330 **************************************************************************

)340 !

)341 ! SUBROUTINE TRANSLATE 3D: TRANSLATES SYSTEM ALONG A LOCAL X-Y-Z AXIS

)342 !

)343 !*************************************************************************

)344 [

)350 SUB Translate_3d(Skitter (*) ,Skltmod(*) ,Total(*) ,Temp(*) ,Tempa (*) ,Trans(*),S

rs_trans_x,Sys_transy,Sys_trans_z,Way,Theta,Prlntflag$)

)360 OPTION BASE 1

)370 DIM Laurle(4,4)

1380 !

)390 ! SET UP TEMP _J_,Y SO AS NOT TO LOOSE PENS --SKI'I"I'ER(*,4)

)400 !

)410

)420 !

)430 !

)440 !

)450

)460

,470

,480

,490

,500

,510

,arts x

,520-

'530

,540

'550

'560

'570

'580

'590

'600

'an__y

610

620

630

640

650

66O

67O

MAT Tempa(*,l:3)- Skltter(*,l:3)

DETERMINE DIRECTION OF TRANSLATION AND SET UP TRANS MATRIX

IF Way-1 THEN

Sys_trans_x-Systrans_x+Theta

Tx=Theta

Ty=0

TZ-0

IF Printflag$-"ON" THEN

DISP " MODE: TRANSLATE X BY ",Theta,"IN.

END IF

END IF

IF Way=2 THEN

Sys_trans_y=Sys_trans_y+Theta

Tx=0

TyffiTheta

Tz=0

IF Printflag$="ON" THEN

DISP " MODE: TRANSLATE Y BY ",Theta,"IN.

END IF

END IF

IF Way=3 THEN

Sys_trans_z=Sys_trans_z+Theta

Tx=0

Tyffi0

Tz=Theta

TOTAL TRANSLATION-",Sys_t

TOTAL TRANSLATION=",Sys_t
;680

)690

.-anB z

)700

)710

)720

)730

)740

)750

)760 !

IF PTlntflag$-"ON" THEN

DISP " MODE: TRANSLATE Z BY ";Theta,"IN.

END IF

END IF

MAT Trane- IDN

Trane(4,1)-Tx

Trane(4,2}fTy

Trane(4,3)-Tz

TOTAL TRNASLATION--;Sys_t

)770 | FIND NEW SKITTER MATRIX WITH CORRECT PENS

)780 !

)790

)800

)810

)820

)830

)840 !

MAT Laurie- Trans*Total

MAT Total- Laurie

MAT Temp- Tempa*Total

MAT Skltmod(*,l:3)- Temp(*,l:3)

SUBEND

)850 *************************************************************************

)860 !

)870 SUB Scaling_3d(Sx,Sy,Sz,Array(*))

)880 MAT Array- IDN

)890 Array(l,l)-Sx

)900 Array(2,2)-Sy

)910 Array(3,3)-Sz

)920 SUBEND

)930 !

)940 ************************************************************************

)950 l

|951 I SUBROUTINE DISPLAY_SKIT: PLOTS SKITTER TO LOCAL PLOTTING DEVICE

|952 ! OR SCREEN

)953 l

)954 ************************************************************************

)955 !

)960 SUB Display_skit(Skltter(*),Newskit(*),Screen_x,Screen_y)

_970 OPTIO_ BASE 1

_980

,990

.0000

.0010

0020

0030

0040

0050

0060

0070

0080

0090

0100

0110

0120

0130

0140

0150

0160

0170

0180

0190

0200

0210

DATA 1,1,4 ! PEN1

DATA 4,4,4 ! P_N 2

.DATA 8,8,4 ! PEN 3

DIM Peril(l,3) ,Pen2 (1,3) ,Pen3(l,3) ,Temp(l,3)

READ Penl(*),Pen2(*),Pen3(*}

IF Screen_x<>1 AND Screen y<>2 THEN

MAT Temp- Pen2

MAT Pen2- Pen3

MAT Pen3- Temp

END IF

MAT Newsklt(*,l)- Skltter(*,Screenx)

MAT Newskit(*,2)- Skitter(*,Screen_y)

MAT Newsklt(*,3)- Skltter(*,4}

MAT Newskit(37:37,*)= Penl

MAT Newskit(68:68,*)= Pen2

MAT Newskit(99:99,*)= Pen3

CLEAR SCREEN

GCLEAR

FRAME

IF Screen x<>3 AND Screen_y<>2 THEN GOTO 10300

MOVE -100,-.9

RECTANGLE 200,.15

MOVE -100,-.75

RECTANGLE 200,.15

I I
_0220

10230

10240

10250

10260

10270

0280

0290

10300

10310

10320

1O3301

MOVE -100,-.6

RECTANGLE 200,.15

MOVE -100,-.45

RECTANGLE 200s.15

MOVE -100,-.3

RECTANGLE 200,.15

MOVE -100,-.15

RECTANGLE 200#.15

PLOT Nevskit(*)

LINE TYPE 1

SUBEND

103601

10370 SUB Printmat(Array(*))

10380 OPTION BASE 1

10390 FOR Row-BASE(Array, l} TO SIZE(Array,1)+BASE(Array,l)-i

0400 FOR Column=BASE(Array, 2) TO SIZE(Array,2)+BASE(Array,2)-I

0410 PRINT USING "DDDD.DD,XX,#";Array(Row,Column)

10420 NEXT Column

10430 PRINT

10440 NEXT Row

10450 SUBEND

0460 !

0470 [**********************************************************************

10480 !

10481 ! SUBROUTINE TRANS TO VECTOR: TRANSLATES SYSTEM TO A GIVEN POINT

10482 !

10483 ***********************************************************************

10490 SUB Trans to vector(Skltter(*),Skltmod(*),Temp(*},Tempa(*},Total(*},Trans(

hl,Sys_trans_x,Sys_trans y,Sys trans z)

10500 !

10510 OPTION BASE 1

10520 DIM Bogus(4,4)

10530 I SET UP STORAGE ARRAY TO KEEP SKITTER PENS CORRECT SKITTER(*,4)

10540 !

_0550 MAT Tempa(*,l:3)= Skitter(*,1:3)

10560 MAT Trans= IDN

10570 !

10580 ! SET UP TRANS MATRIX

10590 !

10600

 o61o

10620

10630 l

10640 |

10650 !

10660

L0670

L0680

t0690

tO700

/0710 !

L0720 !

Trans(4,1)-Sys_trans_x

Trans(4,2)-Sys trans y

Trans(4,3)-Sys_trans_z

FIND NEW MATRIX

MAT Bogus- Trans*Total

MAT Total= Bogus

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)= Temp(*,l:3)

SUBEND
_i0744 1

0750 SUB Vector(Skltter(*) ,Skltmod(*) ,Temp(*) ,Tempa(*) ,Total (*) ,Trans (*) ,Sys_tr

ans x,Sy8 trans y,Sys trans z,Newsklt(*),Screen_x,Screen y,Prlnflag$) 107_0. - - -

10770 ! ASK FOR INPUT <CR> MEANS LEAVE

10780 |

111_0790 Ask: !

0800 DISP " X COORDINANT RELATIVE TO ",Sys_trans_x;

10810 LINPUT Temps

10820 IF TempS-"" THEN

10830 GOTO Leave

10840 ELSE

0850 X-VAL(Temp$)

0860 END IF

10870 DISP " ¥ COORDINANT RELATIVE TO ",Sys trans y;

10880 LINPUT Temps

10890 IF TempS-"" THEN

10900 GOTO Leave

_0910 ELSE

0920 Y VAL (TempS)

10930 END IF

10940 DISP " Z COORDINANT RELATIVE TO ",Sys_trans_z;

10950 LINPUT Temps

10960 IF TempS-"" THEN

0970 GOTO Leave

0980 ELSE

10o90 Z-VAL(Temp$)

flu00 END IF

110101

11020! VPDATE TRANSLATION COUNTERS

110301

_1040 Systrans_x-Sys_trans_x+X

11050 Systrans_y=Systrans_y+Y

11060 Sys_trans_z-Sys_trans_z+Z

11070!

11080! FIND NEW SKITTER MATRIX

11090!

_1100 CALL Trans to vector(Skitter(*),Skitmod(*),Temp(*),Tempa(*),Total(*),Trans

(,),x,Y,z)

111101

111202 DISPLAY SKITTER

11130 CALL Display_sklt(Skltmod(*),Newsklt(*),Screen_x,Screen_y)

11140 GOTO Ask

11150 Leave:!

11160 SUBEND

11170 !

11180 l

11190 **************************************************************************

11200 !

11201 ! SUBROUTINE WINDOWS: ALLOWS USER TO CHANGE VIEWING AXIS

11202 l

11203 **************************************************************************

11204 l

11210 SUB Windows(Skitmod(*),Newskit(*),Screen_x,Screeny)

11220 IF Screen_x=l AND Screen_y=2 THEN

R1230 DISP " CURRENT WINDOW - X-¥ PLANE"

11240 END IF

11250 IF Screen_x=l AND Screen_y=3 THEN

11260 DISP " CURRENT WINDOW - X-Z PLANE"

11270 END IF

I
.1280

.1290

.1300

.1310 Menu:

.1320

.1330

.1340

.1350

.1360

.1370

.1380 Zy..plane:

.1390

.1400

.1410

1420

IF Screen_x-3 AND Screen_y-2 THEN

DISP " CURRENT WINDOW m Z-Y PLANE"

END IF

t

ON KEY 0 LABEL "X AXIS" GOTO Zy_p1ane

ON KEY 2 LABEL "Y AXIS" GOTO Xz_p1ane

ON KEY 4 LABEL "Z AXIS" GOTO Xy_/)lane

ON KEY 9 LABEL "QUIT" GOTO Leave

GOTO 11360

t

t

Screen_xm3

Screen_y-2

DISP " NEW WINDOW m LOOKING DOWN X AXIS"

CALL Display_skit (Skltmod (* ), Newsklt (* ), Screen x, Screen_y

1430

1440

1450 Xz_plane:

1460

1470

1480

1490

GOTO Menu

l

Screen_x=1

Screen_y-3

DISP " NEW WINDOW - LOOKING DOWN Y AXIS"

CALL Display_skit(Skltmod(*),Newsklt(*),Screen_x,Screeny

1500

1510

1520 Xy_plane:

1530

1540

1550

1560

GOTO Menu

!

!

Screen_xal

Screen_y-2

DISP " NEW WINDOW = LOOKING DOWN Z AXIS"

CALL Display_skit(Skitmod(*},Newskit(*),Screen_x,Screen_y

1570 GOTO Menu

1580 Leave: !

1590 SUBEND

1600!

1610l

1620!

******************************************************************************

16401

1641 ! SUBROUTINE WINDOW_LIMITS: ALLOWS THE USER TO INPUT NEW VIEWING WINDOW

1642 |

1643 *************************************************************************

1644 !

1650 SUB Window limits(Skitmod(*),Newskit(*),Screen_x,Screen_y,Screenxwin_min,

creenx_win_max,Screenywin_mln,Screenywin_max)

1660l

1670!

1680!

1690 DISP " INPUT XMIN --- CURRENT VALUE IS",Screenx_win_min," <CR> TO EXIT";

1700 LINPUT Temps

1710 IF Temps ='' THEN GOTO Leave

1720 DISP " INPUT XMAX --- CURRENT VALUE IS",Screenx_win_max," <CR> TO EXIT";

1730 LINPUT Templ$

1740 IF Templ$="" THEN GOTO Leave

1750 IF VAL(Temp$)>VAL(TempI$) THEN

1760 BEEP 1464.84,.5

1770 DISP " XMIN HAS TO BE LESS THAN XMAX"

1780 WAIT 3

L790 GOTO 11690
1940

1950

1960

1970

1980 ELSE

1990

2O0O

1800 ELSE

1810 Screenx vin_min=VkL (TempS)

1820 Screenx_--win max-VkL (Templ $)

1830 END IF

18401

1850!

1860 !

1870 DISP " INPUT YMIN .... CURRENT VALUE IS",Screeny_win_mln," <CR> TO EXIT";

1880 LINPUT Temps

1890 IF TempS-"" THEN GOTO Leave

1900 DISP " INPUT YMAX .... CURRENT VALUE IS",Screeny wln_max," <CR> TO EXIT";

1910 L!NPUT Templ$

1920 IF Templ$-"" THEN GOTO Leave

1930 IF VAL(Temp$) >VAL(TempI$) THEN

BEEP 1464.84,.5

DISP " ¥ MIN MUST BE LESS THAN Y MAX"

WAIT 3

GOTO 11870

Screeny_wln_mln-VAL (Temps)

Screeny_win max-VAL (Templ$)

2010 END IF

20201

20301

2040 SHOW Screenx win ",.lin, Screenx_win_max, Screeny_w£n_min, Screeny_win_max

2050 CALL Display--skit (Skitmod ( *), Newskit ( *), Screen_x, Screen__,}

20601

2070 Leave: !

2080 SUBEND

20902

_I00 | *************************************************************************

2110!

5111 ! SUBROUTINE ANGLE: ALLOWS TE USER TO ROTATE SYSTEM BY INPUT ANGLE

2112 | ABOUT LAST ROTATION AXIS

2113 1

2114 I***********************************************************************

|115 !

).120 SUB )._gle(Skitter(*) ,Skitmod(*) ,Temp(*) ,Tempa(*) ,Total(*) ,Trans(*) ,Sys_1"ot

¢,Sys rot_ y, Sys_rot_z, Newskit (* ), Screen_x, Screen_y, Pr in, flags, Twirl $ )

|130|

).1401 FIND MODE AND ROTATE ABOUT CORRECT AXIS

).1501

).160 IF TwirlS="ROTATE X" THEN

!170 DISP " INPUT ANGLE TO ROTATE ABOUT X AXIS -- CURRENT ANG=",Sys_rot_x;

!180 LINPUT Temps

!190 IF TempS ='' THEN GOTO Leave

!200 Theta=VAL (Temp$ )

!210 CALL Rotate_x (Skitter (*), Skitmod (*) ,Total(*) ,Trans(*) ,Temp(*) ,Tempa'(*) ,Sy

rot_x, Theta, Print fiag $)

_220 END IF

!2301

:240!

_250 IF TwirI$="ROTATE Y" THEN

_260 DISP " INPUT ANGLE TO ROTATE ABOUT Y AXIS -- CURRENT ANG=",Sys_rot_y;

_270 LINPUT Temps

:280 IF TempS ='' THEN GOTO Leave

:290 Theta=VAL (TempS)

:300 CALL Rotate_y (Skitter (*) ,Skitmod(*) ,Total (*) ,Trans (*) ,Temp (*) ,Tempa (*) ,Sy

.rot_y, Theta, Print flags )

310 END IF

.,J

_2320!

12330!

12340 IF TwirlS-"ROTATE Z" THEN

12350 DISP " INPUT ANGLE TO ROTATE ABOUT Z AXIS -- CURRENT ANGm",Sys_rot_z|

12360 LINIW/_ Temps

12370 IF TempS-"" THEN GOTO Leave

1.2380 Th&ta-VAL(Temp$)

"12390 CALL Rotate z(Skitter(*),Skltmod(*),Total(*),Trans(*},Temp(*),Tempa(*),Sys

_rot_z,Theta,Prlntflag$}

12400 END IF

12410 1

12420 ! OUTPUT NEW PICTURE

1.2430 !

"12440 CALL Display_skit(Sk%tmod(*),Newskit(*),Screen_x,Screeny)

12450 GOTO 12150

12460 !

12470 !

12480 Leave:!

2490 SUBEND

"3.2500 !

12510 *************************************************************************

12511 !

12512 ! SUBROUTINE WHAT. OUTPUTS PROGRAM VARIABLES TO SCREEN

12513 !

"_12520 l

12530 SUB What(Sys_trans x,Sys_trans_y,Sya_trans_z,Sya_rot_x,Sya_rot_y,Sys_rot z

,A,B,C,D, PrlntflagS,Screenx,Screeny,Plotd,Dumpd,Fa,Fb,Fc,Ta,Tb,Tc,Inc,Sp,Tp,Up_

12540 !

12550 GRAPHICS OFF

2560 CLEAR SCREEN

"12570 PRINT CHRS(132);"THESE ARE THE CURRENT PARAMETERS:";CHR$(128)

12580 PRINT

12590 PRINT CHR$(129);" WINDOW: ";CHR$(128);" X MIN m ";A;"

";B

12600 PRINT " ¥ MIN - ";C;" Y MAX - ";D

1610 PRINT

XMAXm

2(;20 IF Screenx-1 AND Screeny-2 THEN PRINT CHR$(129);" VIEW: ";CHR$(128);" LOOK

ING DOWN Z AXIS"

12630 IF Screenx-3 AND Screeny=2 THEN PRINT CHR$(129);" VIEW: ";CHR$(128);" LOOK

ING DOWN X AXIS"

12640 IF Screenx=l AND Screeny-3 THEN PRINT CHR$(129);" VIEW: ";CHR$(128);" LOOK

NG DOWN ¥ AXIS"

_2650 PRINT

12660 PRINT "PLOTTER LOACTION:";CHR$(129);Plotd;CHR$(128);" PRINTER LOCATIO

N:.;CHR$(129);Dumpd;CHR$(128)

12670 PRINT

12680 IF Printflag$-"ON" THEN

12690 PRINT " DISPLAY VALUES IS ";CHR$(129);" ON ";CHR$(128}

 27c0

12710 PRINT " DISPLAY VALUES IS OFF"

1272J END IF

12730 PRINT

12740 PRINT TAB(5);CHR$(132);"TR_N3 (in.) ROT (dsg)";CHR$(128);"

";CHR$(132);" FEMUR ANGLE TIBIA ANGLE";CHR$(128}

"2750 PRINT

12760 Brice: IMAGE AA,2X,4D.2D,6X,4D.2D,18X,A,6X,4D.2D,8X,4D.2D

12770 PRINT USING Brice;"X ";Sys_trans x;Sys_rot_x;"A";Fa;Ta

12780 PRINT USING Brice;"Y ";Sys_trans_y;Sys rot y;"B";Fb;Tb

12790 PRINT USING Brice;"Z ";Sys_trans_z;Sys_rot_z;"C";Fc;Tc
II I II I

_2800 PRINT

12810 PRINT "PIVOT ANG A:"ISp_" PIVOT ANG B:";Tp;" PIVOT ANG C:";Up

12820 INPUT "flit <CR> TO CONTINUE",Temp$

12830 CLEAR SCREEN

12840 ALPHA OFF

12850 GRAPflICS ON

1.2860 SUBEND

-12870 !

12880 **********************************************************************

12890 ! • O

12891 ! SUBROUTINE ROTATE LEG Z. R TATES ENTIRE LEG ABOUT Z AXIS

12892 !

_2893 |eeee,,eee,,e,eeee,,**eee,ee*eee***, ee,** **e,,,e,eeeteeee.eeee,,#e

-12894 |

12900 SUB Rotate_leg_z(Femur(*),Femurmod(*),Leg$,Theta,Printflag$,OPTIONAL Femur

a_:ot,Way)

12910 OPTION BASE 1

12920 DIM Bogus(4,4),Temp(196,4),Tempa(196,4),Trans(4,4}

1.2930 N-SiZE(Femur,I)

"22940 REDIM Tempa(N,4),Temp(N,4)

129502

12960 IF Wayml THEN

12970 Femura_rot-Femura_rot+Theta

12980|

299o

"13000

enura rot

13010-

13020

13030|

3o4o

'13050

130601

13070|

130801

13090

.3110

13120

13130

13140

13150

IF Prlntflag$-"ON" THEN

DISP " MODE: ";LegS;"

END IF

END IF

MAT Tempa- (1)

MAT Tempa(*,l:3)- Femur(*,l:3)

SET UP ROTATION MATRIX

MAT Trans- IDN

Slne-SIN(Theta)

Coslne-COS(Theta)

Trans(1,1)-Coslne

Trans(l,2)--Sine

Trans(R,1)-Sine

Trans(2,2)-Cosine

THROUGH ANGLE OF ";Theta;" TOTAL ANGLE-",F

31so_

"13170i FIND NEW SKITTER MATRIX

13180|

13190 MAT Temp- Tempa*Trans

13200 MAT Femurmod(*,l:3)- Temp(*,l:3)

13210 SUBEND

,m13220!

wl,***!***********************************************************************

13240!

13241

13242

13243

13244

q3250

13260

13270

13280

13290

! SUBROUTINE TRANS FEM ORIG: TRANSLATES LEG TO ORIGIN

!

***********************************************************************

|

SUB Trans_fem_orig(Femur(*),Femurmod(*),X,Y,Z)

|

OPTION BASE 1

DIM Bogus(4,4),Tempa(196,4),Temp(196,4),Trans(4,4)

N=SIZE(Femur,1)
I i I III

_1.3300

13310

13320

13330 t

13340

13350

_13360

3370 I

13380 t

13390 !

13400

13410

_13420

3430 !

1344O !

13450 !

13460

13470

j_3480

3490

13500

13510

REDIM Tempa(N,4),Temp(N,4)

l

! SETUP STORAGE ARRAY TO KEEP SKITTER PENS CORRECT

MAT Tempa- (I)

MAT Tempa(*,l:3)- Femur(*,l:3)

MAT Trans- IDN

SET UP TRANS MATRIX

Trans (4, I )-X

Tran8 (4,2) my

Trans (4,3) mZ

FIND NEW MATRIX

SKITTER(*,4)

MAT Temp- Tempa*Trans

MAT Femurmod(*,l:3)- Temp(*,l:3}

SUBEND

t

!

13511 ! SUBROUTINE ROTATE LEG Y: ROTATES LEG ABOUT Y AXIS

13520

13530

13540

13550

SUB Rotate leg_y(Femur(*) ,Femurmod(*) ,The!a)

l

OPTION BASE 1

DIM Bogus(4,4),Temp(196,4),Tempa(196,4),Trans(4.4)

N-SIZE(Femur,I)

REDIM Tempa(N,4),Temp(N,4)

)_3560

3570

13580!

13590

13600

13610!

_1_3620!

3630!

13640

13650

13660

13670

3680

3690

13700

13710!

13720!

137301

3740

3750

13760

13770!

13780i

MAT Tempa- (1)

MAT Tempa(*,l:3)- Femur(*,1:3)

SET UP ROTATION MATRIX

MAT Trans- IDN

Sine-SIN(The!a)

Coslne-COS(Theta)

Trans(1,1)-Coslne

Trans(l,3)-Sine

Trans(3,1)--Slne

Trans(3,3}-Coslne

FIND NEW SKITTER MATRIX

MAT Temp- Tempa*Trans

MAT Femurmod(*,l:3)= Temp(*,l:3)

SUBEND

*******************************************************************************

138001

_3801 ! SUBROUTINE ZOOM PAN: ALOOWS USER TO PAN OR ZOOM WINDOW

13802 !

13803 ************************************************************************

13804 !

13810 SUB Zoom_pan(Window$,Xmin,Xmax,Ymin,Ymax,Skitmod(*),Newskit(.),Screen_x,Sc

)
:een....y)

L3820 ON ERROR GOTO Brice

L3830|

L3840 DISP " YOUR CURRENT WINDOW VALUES ARE XMIN:n;Xmln;. XMAX:"IXmax;" YM

CM:n;YnLn;" YMAX:";Ynax

L3850 Menu: !

_3860 ON KNOB .15 GOTO Knob Lmr

;3870 ON KEY 9 LABEL "QUIT"-GOTO Leave

.3880 ON KEY 0 LABEL "ZOOM" GOTO Zoom

.3890 ON KEY 1 LABEL I:- GOTO 13970

.3900 ON KEY 2 LABEL "PAN X" GOTO Pan_x

.3910 ON KEY 3 LABEL "" GOTO 13970

.3920 ON KEY 4 LABEL "PAN Y" GOTO Pan_y

.3930 ON KEY 5 LABEL "" GOTO 13970

.3940 ON KEY 6 LABEL "INPUT DATA " GOTO Input_data

.3950 ON KEY 7 LABEL "" GOTO 13970

.3960 ON KEY 8 LABEL "" GOTO 13970

.3970 GOTO 13970

.3980 |

.3990 Pan x:!

.4000 Window$-"PAN X"

.4010 GOTO Menu

.4020 Pan_y:|

.4030 Window$m"PAN Y"

.4040 GOTO Menu

.4050 Zoom:!

.4060 Window$-"ZOOM"

.4070 GOTO Menu

.4080 Knob isr:!

.40902

.4100

.4110

.4120

.4130

.4140

.4150

4160

4170

41801

4190!

4200

4210

4220

4230

4240

4250

4260

_270!

4280!

4290

4300

4310

4320

4330

4340!

4350]

4360

_370

_380

|390

Theta-KNOBX

IF Window$-"ZOOM" AND Theta>0 THEN

Xmin-Xmin-5

Xmax-Xmax+5

Ymln-Ymln-5

Ymax-Ymax+5

SHOW Xmln,Xmax, Ymln,Ymax

END IF

IF Window$-"ZOOM" AND Theta<0 THEN

Xmin-Xmin+5

Xmax_X_ax-5

Ymln-Ymin+S

Ymax-Ymax-5

SHOW Xmln,Xmax,Ymln,Ymax

END IF

IF Window$="PAN X" AND Theta<0 THEN

Xmin=Xmln+5

Xmax=Xmax+5

SHOW Xmin,Xmax,Ymin,Ymax

END IF

IF Window$="PAN X" AND Theta>0 THEN

Xmin=Xmin-5

Xmax=Xmax-5

SHOW Xmin,Xmax,Ymin,Ymax
Z4400

144101

14420!

14430

14440

14450

 446o

14470

14480!

14490!

14500

14510

14520

14530

L4540

L4550!

L4560

14570

14580 !

14590

END IF

IF Window$-"PAN Y" AND The,a>0 THEN

YBin-Ymln+5

Ymax-Ymax+5

SHOW Xmin,Xmax,Ymln,Ymax

END IF

ZF WindowS-"PAN Y" AND The,a<0 THEN

Ymln-Ymln-5

Ymax-Ymax-5

SHOW Xmin,Xmax,Ymln,Ymax

END IF

CALL Display_skit(Skitm_d(*),Newskit(*),Screen_x,Screeny)

GOTO 13840

L4600 Input_data:!

L4610

L4620

L4630

L4640

L4650

L4660

L4670

L4680

L4690

L4700

L4710

L4720

L4730

L4740

L4750

L4760!

L4770!

L4780!

L4790

L4800

L4810

L4820

L4830

L4840

L4850

L4860

_4870

.4880

.4890

.4900

.4910

.4920

.4930

.4940!

.4950!

4960

4970

4980

4990

DISP " IHPUT XMIN --- CURRENT VALUE IS",Xmln," <CR> TO EXIT";

LI N _'-0TTemps

IF TempS-"" THEN GOTO Leave

DISP " INPUT XMAX --- CURRENT VALUE IS",Xma_," <CR> TO EXIT";

LINPUT Templ$

IF Templ$-"" THEN GOTO Leave

IF VAL(Temp$) >VAL(TemplS) THEN

BEEP 1464.84,.5

DISP " XMIN HAS TO BE LESS THAN XMAX"

WAIT 3

GOTO 14610

ELSE

Xmin-VAL (Temps }

Xmax-VAL (Tempi $ )

END IF

DISP " INPUT ¥MIN .... CURRENT VALUE IS",Ymin," <CR> TO EXIT";

LINPUT Temps

IF TempS-"" THEN GOTO Leave

DISP " INPUT YMAX .... CURRENT VALUE IS",Ymax," <CR> TO EXIT";

LINPUTTempl$

IF Templ$-"" THEN GOTO Leave

IF VAL(Temp$)>VAL(TempI$) THEN

BEEP 1464.84,.5

DISP " Y MIN MUST BE LESS THAN Y MAX"

WAIT 3

GOTO 14790

ELSE

¥min-VAL(Temp$)

Ymax=VAL(Templ$)

END IF

SHOW Xmin,Xmax,Ymin,Ymax

CALL Display skit(Skitmod(*),Newskit(*),Screen_x,Screen_y)

GOTO Menu

!
I_15000 Brice: iI F 5010 ERRN-31 THEN

15020

15030

15040

15050

Jl_5060

5070

15080

15090

15100

15110

5120

5130

DEEP 1464,.5

DZSP " THIS IS AS FAR AS YOU CAN GO

WAIT 2

XmLn-Xmin-S

iilliltlilliltlill"

XmaxmXam+5

Ym/n-Ymin-5

YmaxmYmax+5

SHOW Xmln,X_ax,Ymln,Ymax

CALL Diaplay_aklt(Skltmod(*),Newsklt(*),Screen_x,Screeny)

GOTO 13840

END IF

Le_ve:l

SUBEND

15220 Quad=l

15230 ELSE

15240 Quad=VAL(Quad$)

15250 END IF

5200 LINPUT Quads

5210 IF QuadS-"" THEN

DEFAULT-I";

15280

15290

15300

15310

15320

k533o

15340

15350

15360

15370

15380

1539o

15400

15410

15420

15430

5260 IF Quad-I THEN GOTO Label

5270 IF Quad<>l AND Quad<>2 AND Quad<>4 THEN

BEEP 1464,.5

GOTO 15190

END IF

DISP " WHICH SQUARE DEFAULT-I";

LINPUT What$

IF What$-"" THEN

What-I

ELSE

What-VAL (What $ )

END IF

IF What<>l AND What<>2 AND What<>3 AND What<>4 THEN

BEEP 1464,.5

GOTO 15310

END IF

i

!

15440 Label: |

k5450 DISP " INPUT ANY LABELS

15460 LINPUT L$

15470 IF L$="- THEN GOTO P1

15480 PI: I

15490 PRINTER IS Plot device

m

15500 IF Quad=l THEN

|5510

15520

15530

15540

15550

DEFAULT= NONE" ;

PRINT "IN;IP;SPI;SI .5,.5;PA 425,1000,LB";L$;CHR$(3);";SP0;,,

END IF

IF Quad=4 THEN

IF What=l THEN

PRINT "IN;IP250,596,5250,4196;SP1;SI;PA 425,900,LB";L$;CHR$(3);";S

15164 1

15170 SUB Plot It(Plot device)

15180 DIM L$[32]

15190 DISP " HOW MANY QUADRANTS 1,2 OR 4

15161 ! SUBROUTINE PLOT IT: SETS UP PLOTTER PARAMETERS FOR HARD COPY

 5162 t

_5163 *************************************************************************
_0; w

15560

15570

15580

";BPO;"

15590

5600

5610

;SPO;"

15620

15630

15640

I";SPO;" .5650

15660

15670 IF

15680

15690

END IF

IF What-2 THEN

PRINT "INIIP5250,596,10250,4196;SP1;SI;PA 5425,900, LB'_ ; L$; CHR$ (3) ;

END IF

IF What-3 THEN

PRINT "IN;IP250,4196,5250,7796;SP1;SI;PA 425 4500,LB";L$;CHR$(3);"

END IF

IF Wharf4 THEN

PRINT .IN;IP5250,4196,10250,7796;SPl,SI,PA 5425, 4500,LB";L$;CHR$(3

END IF

END IF

Quad-2 THEN

IF What-2 THEN

PRINT "IN;RO90;IP;IW;IPI54,244,7354,5122;SPI;SI .35,.35;PA 600,6

0;LB";L$;CHR$(3);";SP01"

5700 ELSE

15710 PRINT "IN;RO90;IP;IW;IP154,5122,7354,10244;SP1;SI

,5478;LB";L$;CHR$(3);";SP0;"

15720 END IF

15730 END IF

5740 Leave: |

5750 SUBEND

15751 !

15752 !

15753 !

15754

 5755 1

_5756 !

15757 !

15758 !

15759 !

15760 !

5761 |

5763 SUB Movie

15770 REM

15780 DATA

15790 DATA

15800 DATA

5810 5820 DATA

15830 DATA

15840 !

15850 DATA

15860 DATA

15870 DATA

_5880 DATA

15890 DATA

15900 DATA

15910 !

15920 DATA

15930 DATA

_5940 DATA

15950 DATA

15960 DATA

15970 DATA

15980 !

.35, .35;PA 600

SUBROUTINE MOVIE: ALLOWS USER TO INPUT DATA FILES FOR ANIMATION

OF POSITION SEQUENCES

0,0,0,10 !

6.5482,28.4912,0,-2 ! A

9.1602,20.9817,3.2283,-1 ! H

-1.7468,20.9817,9.5688,-1 ! I

-3.2741,28.4912,5.6709,-1 ! B

0,0,0,7

UPPER BODY

0,0,0,i0

-3.2741,28.4912,5.6709,-2 ! B

-7.3759,20.9817,6.3188,-i ! J

-7.3759,20.9817,-6.3188,-i ! K

-3.2741,28.4912,-5.6709,-1 ! C

0,0,0,7

0,0,0,I0

-3.2741,28.4912,-5.6709,-2 ! C

-1.7468,20.9817,-9.5688,-1 ! L

9.1602,20.9817,-3.2283,-1 ! G

6.5482,28.4912,0,-I ! A

0,0,0,7
_15990 DATA

6000 DATA

16010 DATA

16020 DATA

16030 DATA

16040 DATA

6050 1

6060 DATA

16070 DATA

16080 DATA

16090 DATA

16100 DATA

_6110 6120 DATA

16130 DATA

16140 DATA

16150 DATA

16160 DATA

6170 DATA

6180 DATA

16190 !

16200 DATA

16210 DATA

16220 DATA

6230 DATA

6240 DATA

16250 DATA

16260 !

16270 !

16280 DATA

6290 DATA

6300 DATA

16310 DATA

16320 DATA

16330 1

16340 DATA

16350 DATA

 636o DATA

16370 DATA

16380 DATA

16390 !

16400 DATA

16410 DATA

_6420 DATA

16430 DATA

16440 DATA

16450 1

16460 DATA

16470 DATA

_6480 DATA

16490 DATA

16500 DATA

16510 1

16520 DATA

16530 DATA

16540 DATA

16550 DATA

16560 DATA

14570 !

16580 DATA

l

0,0,0,I0

6.5482,13.4722,0,-2

9.1602,20.9817,3.2283,-1

-1.7468,20.9817,9.5688,-1

-3.2741,13.4722,5.6709,-1

0,0,0,7

0,0,0,I0

-3.2741,13.4722,5.6709,-2 I

-7.3759,20.9817,6.3188,-1 I

-7.3759,20.9817,-6.3188,-1 I

-3.2741,13.4722,-5.6709,-1 !

0,0,0,7

0,0,0,10

-3.2741,13.4722,-5.6709,-2 I

-1.7468,20.9817,-9.5688,-1 !

9.1602,20.9817,-3.2283,-1 |

6.5482,13.4722,0,-1 1

0,0,0,7

0,0,0,4

0,0,0,I0 1

9.1602,20.9817,-3.2283,-2 1

29.6602,20.9817,-3.2283,-i I

18.7362,25.0731,0,-1 !

0,0,0,7

0,0,0,I0

29.6602,20.9817,3.2283,-2 !

18.7362,25.0731,0,-1 !

9.1602,20.9817,3.2283,-1 1

0,0,0,7

0,0,0,i0

9.1602,20.9817,-3.2283,-2 l

29.6602,20.9817,-3.2283,-I l

20.571,16.8903,0,-1 l

0,0,0,7

0,0,0,i0

29.6602,20.9817,3.2283,-2 !

20.571,16.8903,0,-1 l

9.1602,20.9817,3.2283,-I l

0,0,0,7

0,0,0,I0

29.6602,20.9817,-3.2283,-2

30.4255,0,0,-1

35.7901,9.2132,0,-1

0,0,0,7

0,0,0,i0

29.6602,20.9817,3.2283,-2

30.4255,0,0,-1

35.7901,9.2132,0,-1

0,0,0,7

0,0,0,4

1

1 D

I H

l I

l E

E

J

K

F

F

L

G

D

1 RESERVED FOR PEN

G

M

0

N

0

H

G

M

P

N

P

H

1

l M

! A'

l B'

l N

! A'

l B'

! RESERVED FOR PEN

BOTTOM BODY

FEMUR ONE

TIBIA ONE
65_0 DATA

_26600 DATA

16610 DATA

16620 DATA

16630 DATA

16640 I

6650 DATA

6660 DATA

16670 DATA

16680 DATA

16690 DATA

16700 |

6710 DATA

6720 DATA

16730 DATA

16740 DATA

16750 DATA

16760 |

6770 DATA

6780 DATA

16790 DATA

16800 DATA

16810 DATA

16820 1

16830 !

_.6840 DATA

16850 DATA

16860 DATA

16870 DATA

26880 DATA

16890 |

q69oo DATA

16910 DATA

16920 DATA

16930 DATA

16940 DATA

16950 !

_6960 DATA

26970 DATA

16980 DATA

16990 DATA

27000 DATA

17010 DATA

It7o2o i

17030 DATA

17040 DATA

17050 DATA

17060 DATA

17070 DATA

17o8o !

17090 DATA

17100 DATA

17110 DATA

17120 DATA

17130 DATA

a7140 |

17150 !

17160 DATA

17170 DATA

17180 DATA

0,0,0,10 !

-1.7468,20.9817,9.5688,-2 l I

-9.3493,25.0731,16.2368,-1 | S

-Ii.9968,20.9817,27.3223,-1! Q

0,0,0,7

0,0,0,I0

-17.6259,20.9817,24.0723,-21 R

-9.3493,25.0731,16.2368,-1 ! S

-7.3759,20.9817,6.3188,-i ! J

0,0,0,7

0,0,0,I0

-1.7468,20.9817,9.5688,-2 ! I

-10.2667,16.8903,17.8258,-1| T

-11.9968,20.9817,27.3223,-11 Q

0,0,0,7

0,0,0,I0

-17.6259,20.9817,24.0723,-2! R

-10.2667,16.8903,17.8258,-I! T

-7.3759,20.9817,6.3188,-1 ! J

0,0,0,7

0,0,0,10 !

-11.9968,20.9817,27.3223,-2 ! Q

-15.1940,0,26.3601,-1 ! C °

-17.8763,9.2132,31.0059,-1 ! D °

0,0,0,7

0,0,0,10

-17.6259,20.9817,24.0723,-2 ! N

-15.1940,0,26.3601,-1 | C'

-17.8763,9.2132,31.0059,-1 ! D °

0,0,0,7

0,0,0,4 l RESERVED FOR

0,0,0,10 !

-7.3759,20.9817,-6.3188,-2 l K

-9.3493,25.0731,-16.2368,-i[ W

-17.6259,20.9817,-24.0723,-11 U

0,0,0,7

0,0,0,i0

-11.9968,20.9817,-27.3223,-2 ! V

-9.3493,25.0731,-16.2368,-1 l W

-1.7468,20.9817,-9.5688,-1 | L

0,0,0,7

0,0,0,i0

-7.3759,20.9817,-6.3188,-2 l K

-10.2667,16.8903,-17.8258,-1 i X

-17.6259,20.9817,-24.0723,-1 ! U

0,0,0,7

0,0,0,10

-11.9968,20.9817,-27.3223,-2

-10.2667,16.8903,-17.8258,-1!

l V

X

PEN

FEMUR TWO

TIBIA TWO

FEMUR THREE
Q17190 DATA

27200 DATA

17210 !

17220 DATA

17230 DATA

17240 DATA

7250 DATA

7260 DATA

17270 |

i 17280 DATA

I 17290 DATA

I 17300 DATA

7310 DATA

"17320 DATA

17330 REM

17340 |

17350 !

17360

' 7370

! 17390

17400

17410

17420

_17430

!_7440

17450

17460!

17470

17480

17490

e 75ooi

17510

17520

17530

17550

17560

Q.7561

17562

17570

17580

17590

17600

 761o

17620

17630

17640

17650

7660

7670

17680

17690

17700

17710

17720

q!773o

17740

17750

17760

17770

-I.7468,20.9817,-9.5588,-I

0,0,0,7

! L

0,0,0,10 !

-17.6259,20.9817,-24.0723,-2 ! U

-15.1940,0,-26.3601,-1 ! E*

-17.8763,9.2132,-31.0059,-1 ! F I

0,0,0,7

TIBIA THREE

0,0,0,I0

-ii.9968,20.9817,-27.3223,-2 ! V

-15.1940,0,-26.3601,-i | E*

-17.8763,9.2132,-31.0059,-I | F'

0,0,0,7

****************************************************************

OPTION BASE 1

REAL Skitter(129,4),Newsklt(129,3) I DEFINE VAR

REAL Trans(4,4),Temp(129,4),Tempa(129,4)|TRANSFORMATION MATRIX

REAL Total(4,4),Skitmod(129,4) |TOTAL TRANFORMMATRIX

REAL Femur(31,4),Femurmod(31,4),Femurtemp(31,4)

REAL Tibia(10,4),Tibiatemp(10,4),Tiblamod(10,4)

INTEGER Penl(l,3),Pen2(l,3),Pen3(l,3)

GOSUB Init [ INITILIZATION ROUTINE

CALL Display_skit(Skltter(*),Newsklt(*),Soreen_x,Screeny)

! DRAW SKITTER

DATA 1,1,4 !PEN1

DATA 4,4,4 !PEN2

DATA 8,8,4 IPEN3

Start:I

DISP "DO YOU WANT TO RUN AN ALREADY COMPUTED FILE

LINPUT Ans$

INPUT DATA FILE

IF Ans$-"Y" THEN

DISP "NAME OF COMPUTED FILE";

LINPUT Names

IF NameS:"" THEN

GOTO 17520

ELSE

Skitwork$:Name$

File flag:l

GOTO-Movie

END IF

END IF

!

IF Ans$:"N" TH_N

DISP "INPUT MOVIE FILE";

LINPUT Files

IF FileS:"" THEN

GOTO 17700

ELSE

Skitwork$=-SKITWORK"

END IF

CREATE BDAT Skitwork$,400

Y OR N";

o
_7780 ASSIGN @Path1 TO Skitwork$

27790 ASSIGN QPath2 TO Files

17800 END IF

178101

17820 READ Penl(*),Pen2(*),Pen3(*)

17830t

_7840 Top:

7850 |ENTER @Path2;Tim, Free,Fadat,Tadat,Fbdat,Tbdat,Fcdat,Tcdat,Xr,Yr,Zr,Tx

17853 I DETERMINE TRANFORMATION MATRICES FOR EACH TIME UNIT

 7854 !

--3.7855 **************************************************************************

17856 l

17860

17870

17880

IJl_7890

7900 I

17910

17920

17930

17940

IlJJ_7960

7970

17980

17990

18000 1

18010

1_8020

8030

18040 1

18050

18060

18070

18080

 .8o9o

18100 l

18110

18120

18130

18140

 815o

18160

18170

18180

18190 !

18200

 821o

18220

18230 !

18240

18250

8260

8270

18280

18290 !

18300

18310

IF Tim-999 THEN GOTO Movie

N-N+1

IF Free-0 THEN Freeleg$-"FIXED"

IF Free-I OR Free-2 THEN Freeleg$-"FREE"

IF Fadat<>0 AND Fadat<>999 THEN

LegS-"FEMUR A"

IF Free-2 THEN

Leg_ElagSm"FEMUR A"

END IF

Theta-Fadat

GOSUB Leg isr

END IF

IF Fadat-999 THEN

Leg_flag$-"FEMUR A"

END IF

IF Tadat<>0 THEN

Leg$-"TIBIA A"

Theta-Tadat

GOSUB Leg_isr

END IF

IF Fbdat<>0 AND Fbdat<>999 THEN

LegSm"FEMUR B"

IF Free-2 THEN

Leg_flag$="FEMUR B"

END IF

Theta-Fbdat

GOSUB Leg_Isr

END IF

IF Fbdat:999 THEN

Leg_flag$:"FEMUR B"

END IF

IF Tbdat<>0 THEN

Leg$:"TIBIA B"

Theta=Tbdat

GOSUB Leg_isr

END IF

IF Fcdat<>0 AND Fcdat<>999 THEN

Leg$="FEMUR C"
L8320

L8330

L8340

L8350

L8360

L8370

L8380 1

L8390

L8400

L8410

L8420 1

L8430

.8440

.8450

.8460

,8470

.8480 !

;8490 1

.8500

.8510

.8520

.8530

.8540

.8550 1

.8560

.8570

.8580

.8_30

.8600

.8610 1

.8620

.8630

.8640

.8650

.8660

.8670 1

.8680

.8690

.8710

.8720

8730

.8740 1

.8750

.8760

8770

8780

8790

88O0

8810

8820

8830

8840

8850

8860

887O

8880

8890

8900

8910

8920

IF Free-2 THEN

Leg_Elag$-"FEMUR C"

END IF

Theta-Fcdat

GOSUB Leg_Lsr

END XF

IF Fcdat-999 THEN

Leg flag$-"FEMUR C'

END IF

IF Tcdat<>O THEN

Leg$-"TIBIA C"

Theta-Tcdat

GOSUB Leg_Isr

END IF

IF Yr<>0 THEN

TwlrI$-"ROTATE Y"

Theta-Yr

GOSUB System isr

END IF

IF Xr<>O THEN

TwirI$-"ROTATE X"

Theta-Xr

GOSUB System_Isr

END IF

IF Zr<>0 AND Free<>2 THEN

TwLrI$-"ROTATE Z"

Theta-Zr

GOSUB System isr

END IF

IF Zr<>0 AND Free-2 THEN

TwlrI$-"PIVOT"

Theta-Zr

GOSUB System isr

END IF

IF Tx<>0 THEN

Way-1

Theta-Tx

TwirI$-"TRANSLATE"

CALL Printmat(Total(*))

GOSUB Syste__isr

END IF

IF Ty<>0 THEN

Way=2

Theta=Ty

TwlrI$="TRANSLATE"

GOSUB System isr

END IF

IF Tz<>0 THEN

Way=3

Theta=Tz

TwirI$="TRANSLATE"

GOSUB System_isr
S930 END IF

_18940 !

18950 l

18960 !

18970

18980

8990

9000

MAT Tempa(*,X:3)- Skltter(*,l:3)

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

MAT Newsklt(*,l)- Skitmod(*,Screen x)

19010 MAT Newekit(*,2)- Skitmod(*,Screen_y)

19020 MA_ Newsklt(*,3)- Skitmod(*,4)

19030 MAT Newskit(3_:37,*)- Pen1

19040 MAT Newsklt(68:68,*)- Pen2

MAT Newskit(99:99,*)- Pen3

OUTPDT @Pathl;Newskit(*)

19070 GOTO Top

19080!

190901

19100 Movie:!

ASSIGN @Path1 TO *

ASSIGN @Path2 TO *

19130 CALL Display movle(N,Skitwork$)

19140 IF File_flag-1 THEN GOTO Finished

19150 !

19160 Save_tile:!

DISP "DO YOU WANT TO SAVE THE WORK FILE ¥ OR N";

LINPUT Ans$

IF AnsS<>"¥" AND Ans$<>"N" THEN GOTO 19170

9050

9060

9110

9120

9170

9180

19190

19200

19210

19220

9230

9250

19260

19270

19280

19290

9300

9310

19320

19330

19340

19350

19360

IF Ans$-"N" THEN GOTO Delete

IF AnsS-"Y" THEN

DISP "NAME OF FILE TO SAVE UNDER";

LINPUT Names

Where$-Name$

RENAME Skitwork$ TO Where$

DISP "FILE SAVED UNDER";Where$

GOTO Finished

END IF

Delete:!

PURGE Skitwork$

GOTO Finished

System_isr: !

SELECT _virl$

CASE "ROTATE ¥"

CALL Rotate_y(Skitter(*),Skitmod(*),Total(*),Trans(*),_.e

_p(*l,Tempa(*},Sys rot_y,Theta,Printflag$)

19370 CASE "ROTATE X"

19380 CALL Rotate x(Skitter(*),Skitmod(*),Total(*),Trans(*),T_

mp(*),Tempa(*),Sys rot_x,Theta,Printflag$)

19390!

19400 CASE "ROTATE Z"

_9410 Theta=-Theta

19420 CALL Rotate_z(Skitter(*),Skitmod(*),Total(*),Trans(,_,?e

mp(*),Tempa(*),Sys rot_z,Theta,Printflag$)

19430!

19440 CASE "TRANSLATE"

19450 CALL Translate 3d(Skitter(*),Skitmod(*),Total(*),Temp(*)

|Tempa(*),Trans(*),Sys_trans_x,Sys_trans y,Sys_trans z,Way,Theta,Printflag$)

19460!

19470 CASE "PIVOT"

19480 IF Leg_flag$="FEMUR A" THEN

19490 Theta=-Theta

)
I

I ,9,00 ,9510

19520

19530

Pivotx-(Skitter(96,l)+Skitter(127,1))/2

Pivoty-(Skitter(96,2)+Skitter(127,2))/2

Pivotz-(Skitter(96,3)+Skitter(127,3)}/2

Diat_plv_foot-SQR((Pivotx-Skltter(65,1))^2+(Pivoty-Sk

Itter(65,2))A2+(Pivotz-Skitter(65,3))*2)

19540 CALL Trans_femorlg(Skitter(*),Skitmod(*),-Pivotx,-Pi

oty,-Pivotz)

9550

19560

Intflag$,Fema_ang,Flag)

19570

ty,Pivotz)

Flag-0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Theta,Pr

CALL Trans_fem_orig(Skltmod(*),Skitmod(*),Pivotx,Pivo

MAT Skitter- Skitmod

END IF

.;958o

w!9590

196O0!

19610

19620

19630

1.9640

wJ.9650

itter(96,2)jA2+(Pivotz-Skitter(96,3})^2)

19660 CALL Trans_femorig(Skitter(*),Skitmod(*),-Pivotx,-Pi

voty,-Pivotz)

19670

968o

_J.9690

Intflag$,Fem_b_ang,Flag)

19700

19710

ty,Pivotz)

IF Leg_flag$-"FEMUR B" THEN

Pivotx-(Skitter(65,1)+Skltter(127,1))/2

Pivoty-(Skltter(65,2}+Skitter(127,2))/2

Pivotz-(Skitter(65,3}+Skitter(127,3))/2

Dist_piv_foot-SQR((Pivotx-Skitter(96,1))^2+(Pivoty-Sk

CALL Rotate_leg_y(Skltmod(*},Skltmod(*),60)

Flag=0

CALL Rotate_leg_z(Skitmod(*),Skltmod(*),Leg$,Theta,Pr

CALL Rotate_leg_y(Skitmod(*),Skitmod(*),-60)

CALL Transfem_orig(Skitmod(*),SKitmod(*),Pivotx,Pivo

MAT Skitter- Skitmod

END IF

19720

vJ.9730

IF Leg_flag$-"FEMURC" THEN

Pivotx-(Skltter(65,1)+Skltter(96,1))/2

Pivoty-(Skitter(65,2}+Skitter(96,2))/2

Pivotz-(Skitter(65,3}+Skitter(96,3))/2

Dist_piv_foot-SQR((Pivotx-Skitter(129,1))A2+(Pivoty-S

19740J

19750

19760

19770

i_.9780 .9790

kitter(129,2))^2+(Pivotz-Skitter(129,3))*2)

19800 CALL Trans_fem_orlg(Skitter(*),Skltmod(*),-Pivotx,-Pi

CALL Rotate_leg_y(Skitmod(*),Skltmod(*),-60)

Flag:0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Theta,Pr

CALL Rotate_leg_y(Skltmod(*),Skitmod(*),60)

CALL Trans_fem_orig(Skitmod(*),Skitmod(*),Pivotx,Pivo

MAT Skitter= Skitmod

END IF

voty,-Pivotz)

19810

19820

GJ.9830

Intflag$,Fem_c_ang,Flag)

19840

!q850

ty,Pivotz)

19660

&987o

198801

_9890

19900

19910!

19920 Leg_isr:!

4L993o

19940

19950

19960

END SELECT

RETURN

SELECT LegS

CASE "FEMUR A"

MAT Femur= Skitter(37:67,*)

CALL Trans_fem_orig(Femur(*),Femurmod(*),-Femur(3,1),

-Femur(3,2),-Femur(3,3))
,7o52o CALL Rotate_leg_y (Skitmod ( *), Skitmod (*), 60)

w20530

2054O

Prlntflag$, Fem bang, Flag)

20550 - -

20560

Aty, Pivotz)

_20570

20580

20590

20500

20610 1

20620 !

 o53o

20540

20650

-Femur(3,2).-Femur(3,3))

20550

20670

_0580

Prlntflag$,Femc_ang,Flag)

20590

20700

),Femur(3,2),Femur(3,3))

20710

_0720!

20730

20740

20750

20760

20770

Qo78o

20790!

20800

20810

Flag=0

CALL Rotate_leg_z(Skitmod(*),Skltmod(*),Leg$,Rotang,

CALL Rotate leg_y(Skltmod(*).Skitmod(*),-60)

CALL Tra.sfem_orlg(Skltmod(*),Skltmod(*),Pivotx,Pivo

MAT

MAT

MAT

MAT

Skitter- Skitmod

Tempa(*,l:3)- Skitter(*,1:3)

Temp- Tempa*Total

Skltmod(*,l:3)- Temp(*,l:3)

CASE "FEMUR C"

MAT Femur- Skitter(99:129,*)

CALL Trane_fem_orlg(Femur(*),Femurmod(*),-Femur(3,1),

CALL Rotate_leg_y(Femurmod(*),Femurmod(*),-50)

Flag-i

CALL Rotate_leg_z(Femurmod(*),Femurmod(*),Leg$,Theta.

CALL Rotate_leg_y(Femurmod(*),Femurmod(*),60)

CALL Trans_fem_orig(Femurmod(*),Femurmod(*),Femur(3.1

MAT Skitter(99:129,*)- Femurmod

IF Freeleg$-"FREE" THEN

MAT Femurtemp(*,l:3)- Femurmod(*,l:3)

MAT Femur- Femurtemp*Total

MAT Skltmod(99:129,1:3)- Femur(*,1:3)

GOTO End leg

END IF

Pivotx-(Skitter(65,1)+Skitter(96,1))/2

Pivoty=(Skltter(65,2)+Skitter(96,2))/2

20820 Pivotz=(Skltter(65,3)+Skitter(96,3))/2

20830 Diet_ply foot=SQR((Pivotx-Skitter(127,1))^2+(Pivoty-S

tltter(127,2))^2+(Pivotz-Skitter(12_,3))^2)

20840

20850

20850

voty,-Pivotz)

20870

eo88o

20890

Prlntflag$.Fem_c_ang,Flag)

20900

20910

ty,Pivotz)

e0920

20930

20940

20950

20960!

Dist_y-Plvoty-Skitter(127,2)

Rot_ang=ASN(Disty/Dist_piv foot)

CALL Trans_femorig(Skitter_*),Skltmod(*),-Pivotx,-Pi

CALL Rotate_leg_y(Skitmod(*),Skltmod(*),-60}

Flag=0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Rot_ang,

CALL Rotate_leg_y(Skitmod(*),Skitmod(*),60)

CALL Trans_fem_orlg(Skitmod(*),Skitmod(*),Pivotx,Pivo

MAT

MAT

MAT

MAT

Skitter= Skitmod

Tempa(*,l:3)= Skitter(*,1:3)

Temp= Tempa*Total

Skitmod(*,l:3)= Temp(*,l:3)
/

ll_09?O !

0980 !

20990

21000

21010

-Tibia(2,2),-Tibia(2,3))

1020

1030

21040

Printflag$,Tib_a_ang,Flag)

21050

21060

.) .Tibia (2,2), Tibia (2,3) }

1070

21080!

21090

21100

21110

j_ll20

1130

21140

21150!

21160

21170

21180

It119o

itter

21200

21210

21220

CASE "TIBIA A"

MAT Tibia- Skitter(S8:67,*)

CALL Trans_fem_orig (Tibia (*), Tibiamod (*), -Tibia (2, I),

Flag-1

CALL Rotate_leg_y(Tibiamod(*),Tlbiamod(*),180)

cALL Rotate_leg_z(Tiblamod(*},Tiblamod(*},Leg$,Theta,

CALL Rotate_leg_y(Tlbiasod(*),Tlbia=od(*),lS0)

CALL Trans_fem_orig(Tiblamod(*),Tiblamod(*),Tibla(2,1

MAT Skitter(58:67,*)- Tibiamod

IF Freeleg$-"FREE" THEN

MAT Tlbiatemp(*,l:3)- Tlblamod(*,l:3)

MAT Tibia- Tiblatemp*Total

MAT Skltmod(58:67,1:3)- Tibla(*,l:3)

GOTO End_leg

END IF

Pivotx-(Skitter(96,1}+Skitter(127,1))/2

Pivoty-(Skitter(96,2}+Skltter(127,2})/2

Pivotz-(Skittar(96,3)+Skittar(127,3))/2

Diet _Iv foot-SQR((Pivotx-Skitter(65,1))^2+(Pivoty-Sk

(65,2}}^2+(Pivotz-Skitter(65,3_)*2}

Dist y-Pivoty-Skltter(65,2)

Rot ang-ASN(Dist_y/Diet_piv foot}

CALL Trans_fem_orlg(Skitter_*),Skltmod(*},-Pivotx,-Pi

voty,-Pivotz)

t1230 Flag-0

21240 CALL Rotate_leg_z(Skltmod(*),Skltmod(*),Leg$,-Rot_ang

,Pzlntflag$,Tib_a_ang,Flag)

21250 CALL Trans_fem_orig(Skitmod(*},Skitmod(*),Pivotx,Pivo

ty,Pivotz)

21260

R12_0

21280

21290

213001

21310!

21320

t1330

21340

-Tibia(2,2),-Tibia(2,3))

21350

21360

21370

BTintflag$,Tib_b_ang,Flag)

21380

21390

},Tibla(2,2),Tibia(2,3))

21400

21410!

|1420

21430

21440

21450

21460

MAT Skitter- Skitmod

MAT Tempa(*,l:3)- Skitter(*,1:3)

MAT Temp= Tempa*Total

MAT Skitmod(*,l:3)- Tamp(*,1:3)

CASE "TIBIA B"

MAT Tibia- Skltter(89:98,*)

CALL Trans_fem_orig(Tibia(*),Tibiamod(*),-Tibia(2,1),

CALL Rotate_leg_y (Tib iamod (* ), Tlbiamod (* ), 60 )

Flag-1

CALL Rotate_leg_z (Tib lamod (*), Tibiamod (* ), LegS, Theta,

CALL Rotate_leg_y(Tiblamod(*),Tiblamod(*),-60)

CALL Trans_fem_orig(Tibiamod(*},Tibiamod(*},Tibla(2,1

MAT Skitter(89:98,*)= Tibiamod

IF Freeleg$="FREE" THEN

MAT Tibiatemp(*,l:3)- Tibiamod(*,l:3)

MAT Tibia= Tibiatemp*Total

MAT Skitmod(89:98,1:3) = Tibia(*,1:3)

GOTO End_leg

|
1470

1480|

21490

21500

21510

21520

tter

1530

21540

21550

voty,-Pivotz)

21560

i_1570

1580

END IF

Pivotx-(Skitter(65,1)+Skitter(127,1))/2

Pivotym(Skitter(65,2)+Skitter(127,2))/2

Pivotzm(Skitter(65,3)+Skltter(127,3))/2

DIRt_pivfoot-SQR((Pivotx-Skltter(96,1})^2+(Pivoty-Sk

(96,2))^2+(Pivotz-Skitter(96,3}}^2}

Disty-Pivoty-Skitter(96,2)

Rot ang-ASN(Disty/Dist_piv foot}

CALL Transfemorig(Skitter_*},Skltmod(*},-Pivotx,-Pi

Prlntflag$,Tib_b_ang,Flag)

21590

21600

t¥, Pivotz)

1610

1620

21630

21640

216501

21660!

1670

1680

21690

-Tibla(2,2),-Tlbia(2,3))

21700

21710

21720

_rtntflag$,Tib_cang,Fla_)

21730

21740

),Tibia(2,2),Tibia(2,3))

21750

21760!

e1770

21780

2179O

21800

21810

21820

e183o!

21840

21850

21860

21870

CALL Rotate_leg_y(Skltmod(*),Skitmod(*),60)

Flag-0

CALL Rotate_leg_z(Skltmod(*),Skltmod(*),Leg$,Rot_ang,

CALL Rotate_leg_y(Skitmod(*},Skitmod(*),-60)

CALL Transfem_orig(Skitmod(*},Skitmod(*),Pivotx,Pivo

MAT Skitter- Skitmod

MAT Tempa(*,l:3)- Skltter(*,l:3)

MAT Temp- Tampa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

CASE "TIBIA C"

MAT Tibia- Skltter(120:129,*)

CALL Trans_femorig(Tlbia(*),Tiblamod(*),-Tibia(2,1),

CALL Rotate leg_y(Tibiamod(*),Tibiamod(*),-60)

Flag-i

CALL Rotate_leg_z(Tibiamod(*},Tibiamod(*},Leg$,Theta,

CALL Rotate leg_y(Tiblamod(*),Tiblamod(*),60)

CALL Trans_fem_orig(Tibiamod(*),Tiblamod(*),Tibia(2,1

MAT Skltter(120:129,*)- Tibiamod

IF Freeleg$-"FREE" THEN

MAT Tibiatemp(*,1:3)- Tiblamod(*,l:3)

MAT Tibia- Tiblatemp*Total

MAT Skltmod(120:129,1:3): Tibia(*,1:3)

GOTO End_leg

END IF

Pivotx:(Skitter(65,1}+Skltter(96,1))/2

Pivoty:(Skitter(65,2)+Skitter(96,2))/2

Pivotz-(Skitter(65,3)+Skitter(96,3))/2

Dist_piv_foot=SQR((Pivotx-Skltter(127,1))^2+(Pivoty-S

kitter(127,2))A2+(Pivotz-Skitter(127,3)}^2}

e1880 Disty-Pivoty-Skitter(127,2)

21890

21900

voty,-Pivotz)

21910

21920

e1930

Prlntflag$,Tib_c_ang,Flag)

21940

21950

ty, Pivotz)

Rot_ang=ASN(Dist_y/Dist_piv_foot)

CALL Trans_fem_orig(Skitter(*),Skitmod(*),-Pivotx,-Pi

CALL Rotate_leg_y(Skitmod(*),Skitmod(*),-60)

Flag:0

CALL Rotate_leg_z(Skitmod(*),Skitmod(*),Leg$,Rot_ang,

CALL Rotate_leg_y(Skitmod(*),Skitmod(*),60)

CALL Trans_fem_orig(Skitmod(*),Skitmod(*),Pivotx,Pivo
•II II I

1960

1970

MAT Skitter- Skitmod

MAT Tempa(**l:3)- Skitter(*,1:3)

MAT Temp- Tempa*Total

MAT Skitmod(*,l:3)- Temp(*,l:3)

221001

22110 Init:

221201

2130

2140

22150

22160

221701

22180

2190!

2200

222101

22220

222301

22240

222501

&226o

222701

22280

22290

22300*

22310

h2320!

22330

22340*

22350

2236O!

22370

m2380!

22390

224001

22410

22420!

22430

p2440!

22450

224601

22470

22480!

22490

p2500

2251O1

22520

22530

22540

DEG

GINIT

GRAPHICS ON

PLOTTER IS CRT,'INTERNAL"

Dump devlce-9

Plot device-705

READ Skitter(*)

MAT Skitmod- Skitter

MAT Femurtemp- (1)

MAT Tibiatemp= (i)

MAT Trans- IDN

MAT Tempau (i)

MAT Total- IDN

Menu$-"MAIN"

Twirl$-"ROTATE ¥"

Freeleg$-"FIXED"

Way-I

Prlntflag$="OFF"

Incrementn5

Rot increment=3

Screen x=l

Screen y=2

Sys_trans_x=0

Sys_trans_y=0

Sys_trans z=0

! INITIALIZE SCREEN,SKITTER

! SET TO DEGREES

I INITIATE GRAPHICS

I TURN G-PLANE ON

I INIT PLOTTER

I READ SKITTER DATA

I INIT TRANS MATRIX TO IDN

! INIT MAIN MENU

! AXIS OF TRANS X=I,Y=2,Z=3

I TRANS INC.

* INIT VIEW PLANE

I X=I,Y=2,Z=3

! INIT POSITONS OF SYSTEM

21980

21990

22000 !

22010 End_leg:1

_222020 END SELECT

2030 RETURN

22040*

220501

22060 Windows:*

220701 CALL Zoom_pan(Window$,Screenxwln mln,Screenxwlnmax,Screeny_wi

in,Screeny win max,Skitmod(*),Newskit(*),Screen x,Screen y)

80 - GOT* Menu

********************************************************************************
_2550

22560

32570

22580!

2259O

22600

2610

2620

22630

22640

22650!

22660

2670

2680

22690

22700

22710*

22720

- SyI rot X -0

sy _ro o

Sys_rot_z-0

Fe:_a_ang-0

Fem_bangm0

Fem c ang-0

Tib-a-ang-90

Tib-b-ang-90

Tib_o_ang-90

Screenx win max-40

Screenx-win--min--20

| INIT LEG ANGLES

! SET WINDOW

Screeny-win'max-40

Screeny_wln_mln--20

SHOW Screenx.wln..min,Screenx..winmax,Screeny_wlnmln,Screeny_wln_max

RETURN

*******************************************************************************

27401

227501

********************************************************************************

22770*

22780 Finished: ! DONE WITH PROGRAM

2790 GCLEAR

2800 CLEAR SCREEN

22810 SUBEND

228201

22830 SUB Display__ovle(N,Skitwork$)

22840 !

2850 OPTION BASE 1

2860 DIM Newskit(129,3)

22870 ON KBD GOT* Leave

22880 DISP "HIT ANY KEY TO QUIT"

22890 ASSIGN @Pathl TO Skitwork$

22900 ON END @Path1 GOT* Startagaln

22910 ENTER @Pathl;Newskit(*)

_2920 CLEAR SCREEN

22930 GCLEAR

22940 FRAME

22950 AREA INTENSITY 0,0,.2

22960 MOVE -100,-.5

22970 RECTANGLE 200,.5,FILL,EDGE

_2980 PLOT Newsklt(*)

22990 LINE TYPE 1

23000 GOT* 22910

23010 Start_agaln:!

23020 ASSIGN @Path1 TO *

23030 GOT* 22890

R3040 Leave:!

23050 ASSIGN @Pathl TO *

23060 SUBEND
D

D

ID

t

! D

Appendix C

SKITTER Dynamic Simulation

Program Listing
i

_0

2O

30

4O

50

8O

9O

100

110

ti."

140

150

160

170

180

119o

200

210

220

230

240

tso

260

270

28O

290

300

blO

320

330

340

350

360

t?O

380

390

400

410

420

t30

440

450

;60

t70

480

|9O

500

810

320

_30

840

J50

_60

870

_80

_90

REM

THIS PROGRAM WILLALLOWTHE USER

TO DETERMINE WHETHER OR NOT A

PARTICULAR ACTUATOR WILL PROVIDE

SUFFICIENT TORQUE AND ANGULAR

VELOCITY TO HAVE SKITTER JUMP A

TO DOS THIS, A INVERSE SLIDER CRANK

MECHANISM WILL BE SIMULATED. JOINT

ANGLES, VELOCITIES, AND ACCELERATIONS

WILL BE CALCULATED ALONG WITH THE TORQUES.

PROGRAM WRITTEN BY:

BRICE MACLAREN

GARY MCMURRAY

REM

*************************************************************

RAD

OPTION BASE I

REM

DIM

DIM

DIM

DIM

DIM

DIM

DIM

REM

A(4) ,B(4) ,C(4) ,D(4) ,E(4) ,F(4) ,Rotl(4,4),Rot2 (4,4) ,Rot3 (4,4)

Femur (4) ,Foot(4) ,Tibcon(4) ,Oflag(6) ,Transl (4,4),M_trlx(4,4)

Trans2 (4,4 }, Trans3 (4,4), Newfem (4 }, Newtoot (4), Templ (4), Dist (4)

Newb (4), Newd (4), Newe (4 }, Newfem2 (4), Temp2 (4), Temp3 (4)

Ftorque (800), Ttorque (800), Fomega (800}, Tomega (800), Fhp (800), Thp (200)

Origb (4) ,Orlgd (4 } ,Orlge(4), Newfoot2 (4)

Te=p $[8 ]

**************************************************************

REM

REM INITIALIZE VARIABLES

REM

Delstep-1

Gm32.2

Jdlst-6/12

Adist-3/12

wgt-300

Mfemur-10/G

Mtibla-6/G

F1en-20/12

Tlen=20/12

Beta-0

Iota=PI/2

CALL Invar(Mfemur, Ifemur,Flen,Mtibla,Itibia,Tlen)

MAT Trans3- IDN

MAT Trans2= IDN

MAT Transl= IDN

Angf=23.62

Angt=27.5

Aforce=100

Avel=5

Avel=Avel/12

Atorque=100

Aomega=2

REM******************************************************************

REM

REM WHAT FOLLOWS ARE THE ORIGINAL POINT LOCATIONS FOR THE VARIOUS
|_00

10

620

630

640

650

1_60

70

680

690

700

710

720

_3o

740

750

760

770

780

)790

800

810

820

' 830

840

bso

860

87O

88O

89O

90O

1910

920

930

940

950

960

ID70

98O

990

1000

1010

1020

R.030

1040

1050

1060

1070

1080

IL090

REM CONNECT POINTS -- THEY ARE, IN ORDER, PNT.A,B,C,D,E,& F. PLEASE

RE)( THE DOCUMENTATION FOR DEFINITIONS OF THESE POINTS.

REM

__******************************************************************

DATA -1.95,7.5095,0,1

9.576,4.09,0,1

0,0,0,I

11.411,-4.09,0,1

23.714,-11.7685,0,1

DATA

DATA

DATA

DATA

REM

READ

READ

READ

READ

A(*)

B(*)

C(*)

D(*)

READ E(*)

REM

REM" THE NEXT 3 DATA STATEMENTS ARE FOR THE ORIGINAL VECTORS OF THE

REM FEMUR, FOOT, AND THE CONNECTION POINT OF THE ACTUATOR TO THE

REM TIBIA (THE LAST TWO ARE RELATIVE TO THE FEHUR END POINT)

REM

**********************************************************************

DATA 20,0,0,1

DATA -20,0,0,1

DATA 6.95,-11.71,0,1

REM

READ Femur(*)

READ Foot(*)

READ Tibcon(*)

! CONVERT INCHES TO FEET

FOR I=l TO 3

A(I)=A(I)/12

B(I)-B(I)/12

C(I)=C(I)/12

D(I)=D(I)/12

E(I)=E(I)/12

Femur(I)=Femur(I)/12

Foot (I) =Foot (I ) / 12

Tibcon(I)=Tibcon(I)/12

NEXT I

Fla_=n

Simflag=0

Rflag=l

FOR I=l TO 6

Oflag(I)=0 !

NEXT I

l FLAG CONTROLS WHICH MENU YOU GO TO

! FLAG CONTROLS IF SIMULATION FILE IS DESIRED

l FLAG CONTROLS TYPE OF RUN USER DESIRES

OFLAG CONROLS WHETHER DATA GOES TO CRT OR FILE

ELSE

DISP "CHOOSE TYPE OF ACTUATOR"

END IF

REM

REM NOW THE MENUS ARE DEFINED

REM

SELECT Flag

CASE 0

1110

1120

1130

t140

1150

1160

1170

L180

Menu: !

CLEAR SCREEN

CALL Invar(Mfemur,Ifemur,Flen,Mtibla,Itibia,Tlen)

IF Flag<>0 THEN

1100 CALL Printvar(Jdlst,Adlst,Wgt,G,Mfemur,Flen,Mtibia,Tlen,Angf,

_gt,A(*),B(*),C(*),D(*),E(*),Beta,Iota,Aforce,Avel,Actflag, At°r¢lue,A°mega)
i I II

lgO

200

1210

1220

1230

1240

250

26O

1270

1280

1290

1300

310

320

1330

1340

1350

1360

1370

).380

1390

1400

1410

1420

1430

).440

1450

1460

1470

1480

1490

1500

1510

1520

1530

1540

1550

1560

1570

1580

1590

1600

1610

1620

L630

L640

L650

L660

L670

L680

L690

L700

L710

L720

1.730

.740

.750

.760

.770

.780

ON KEY 0 LABEL "ROTARY ACT. " GOTO Ract

ON KEY I LABEL "" GOTO Try

ON KEY 2 LABEL "" GOTO Try

ON KEY 3 LABEL "" GOTO Try

ON _EY 4 LABEL "LINEAR ACT." GOTO Lact

ON KEY 5 LABEL "" GOTO Try

ON KEY 6 LABEL "" GOTO Try

ON KEY 7 LABEL "STOP" GOTO St

ON KEY 8 LABEL "" GOTO Try

ON KEY g LABEL "" GOTO Try

CASE 1

ON KEY 0 LABEL "JUMP DISTANCE" GOTO Jd

ON KEY 1 LABEL "ACCELERATION DIST" GOTO Ad

ON KEY 2 LABEL "LEG PROPERTIES" GOTO Lp

ON KEY 3 LABEL "JOINT LOCATIONS" GOTO Jnt

ON KEY 4 LABEL "ACTUATORS" GOTO Act

ON KEY 5 LABEL "CHANGE ACT" OOTO Cha

ON KEY 6 LABEL "DATA FILES" GOTO Fn

ON KEY 7 LABEL "STOP" GOTO St

ON KEY 8 LABEL "PRINTER IS ?" GOTO Prnt

ON KEY 9 LABEL "RUN DATA" GOTO Rn

CASE 2

ON KEY 0 LABEL "FEMUR MASS" GOTO Fm

ON KEY 1 LABEL "" GOTO Try

ON KEY 2 LABEL "INIT FEMUR ANGLE" GOTO Fang

ON KEY 3 LABEL "" GOTO Try

ON KEY 4 LABEL "LEG LENGTH" GOTO Llen

ON KEY 5 LABEL "TIBIA MASS" GOTO Tm

ON KEY 6 LABEL "" GOTO Try

ON KEY 7 LABEL "INIT TZBIA ANGLE" GOTO Tang

ON KEY 8 LABEL "MAIN MENU" GOTO Mm

ON KEY 9 LABEL "RUN DATA" GOTO Rn

CASE 3

ON KEY 0 LABEL "POINT A" GOTO Bal

ON KEY 1 LABEL "" GOTO Try

ON KEY 2 LABEL "POINT B" GOTO Ba2

ON KEY 3 LABEL "" GOTO Try

ON KEY 4 LABEL "POINT D" GOTO Tal

ON KEY 5 LABEL "" GOTO Try

ON KEY 6 LABEL "POINT E" GOTO Ta2

ON KEY 7 LABEL "" GOTO Try

ON KEY 8 LABEL "MAIN MENU" GOTO Mm

ON KEY 9 LABEL "RUN DATA" GOTO Rn

CASE 4

ON KEY 0 LABEL "FEMUR FILES" GOTO Cf

ON KEY 1 LABEL "" GOTO Try

ON KEY 2 LABEL "TIBIA FILES" GOTO Tibfiles

ON KEY 3 LABEL "" GOTO Try

ON KEY 4 LABEL "SIMULATION " GOTO Simfil

ON KEY 5 LABEL "" GOTO Try

ON KEY 6 LABEL "CLOSE FILES" GOTO Clf

ON KEY 7 LABEL "" GOTO Try

ON KEY 8 LABEL "MAIN MENU" GOTO Mm

ON KEY 9 LABEL "RUN DATA" GOTO Rn

CASE 5

ON KEY 0 LABEL "TORQ VS JDIST" GOTO Ftj

ON KEY 1 LABEL "" GOTO Try

ON KEY 2 LABEL "OMEQA VS JDIST" GOTO Foj

ON KEY 3 LABEL "" GOTO Try

ON KEY 4 LABEL "HP VS JDIST" GOTO Fhj
t

III | III

I III

1_790

800

1810

1820

1830

1840

ill 850

860

1870

1880

1890

1900

1910

Ib92o

1930

1940

1950

1960

li_ 970

980

1990

2000

2010

2020

2030

1 o4o

2050

2060

2070

208O

2090

IRloo

2110

2120

2130

2140

2150

D16o

2170

2180

2190

2200

2210

F22o

2230

2240

2250

2260

2270

F28o

2290

2300

2310

232O

2330

_340

2350

2360

2370

2380

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL .. GOTO Try

ON KEY7 LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOTO Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn

CASE6

ON KEY0 LABEL "TORQ VS JDIST" GOTO TtJ

ON KEYi LABEL "" GOTO Try

ON KEY2 LABEL "OMEQA VS JDIST" GOTO ToJ

ON KEY3 LABEL "" GOTO Try

ON KEY4 LABEL "HP VS JDIST" GOTO ThJ

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL "" GOTO Try

ON KEY "/ LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOTO Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn

CASE7

"ON KEY0 LABEL "MAX FORCE" GOTO Actf

ON KEY1 LABEL "" GOTO Try

ON KEY2 LABEL "MAX VELOCITY" GOTO Actv

ON KEY3 LABEL "" GOTO Try

ON KEY4 LABEL "" GOTO Try

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL "" GOTO Try

ON KEY7 LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOTO Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn

CASE8

ON KEY0 LABEL "MAX TORQUE" GOTO Actt

ON KEY1 LABEL "" GOTO Try

ON KEY2 LABEL "MAX OMEGA" GOTO Acto

ON KEY3 LABEL "" GOTO Try

ON KEY4 LABEL "" GOTO Try

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL "" GOTO Try

ON KEY7 LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOTO Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn

CASE9

ON KEY0 LABEL "CRT" GOTO Pert

ON KEY1 LABEL "" GOTO Try

ON KEY2 LABEL ,,i,GOTO Try

ON KEY3 LABEL "" GOTO Try

ON KEY4 LABEL "LASER" GOTO Las

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL It" GOTO Try

ON KEY7 LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOTO Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn

CASE i0

ON KEY0 LABEL "JUMP DISTANCE" GOTO Jd

ON KEY1 LABEL "" GOTO Try

ON KEY2 LABEL "" GOTO Try

ON KEY3 LABEL "" GOTO Try

ON KEY4 LABEL "ACCELERATION" GOTO Ad

ON KEY5 LABEL "" GOTO Try

ON KEY6 LABEL "" GOTO Try

ON KEY7 LABEL "" GOTO Try

ON KEY8 LABEL "MAIN MENU" GOT0 Mm

ON KEY9 LABEL "RUN DATA" GOTO Rn
2410

2420

2430

2440

450

460

2470

2480

2490

2500

CASE 11

ON KEY 0 LABEL "FIND MAX VALS" GOTO Fmv

ON KEY 1 LABEL "" GOTO Try

ON KEY 2 LABEL "" GOTO Try

ON KEY 3 LABEL "" GOTO Try

ON KEY 4 LABEL "INCREMENTAL" GOTO Inc

ON KEY 5 LABEL "" GOTO Try

ON KEY 6 LABEL "" GOTO Try

ON KEY 7 LABEL "" GOTO Try

ON KEY 8 LABEL "MAIN MENU" GOTO Mm

ON KEY 9 LABEL "RUN DATA" GOTO Rn

END SELECT

510 520 _OTO 2510

2530 | BEGIN SOFTKEY DEFINATIONS

2540 !

2550 Ract: I

2560 Actflag-1

570 Flag-I

580 GOTO Menu

2590 Lact: !

2600 Actflag-2

2610 Flag-I

2620 GOTO Menu

630 Rcond: !

640 Flag-ll

2650 GOTO Menu

2660 Jd:

2670

2680

ACTUATORS WILL BE ROTARY

ACTUATORS WILL BE LINEAR

GO TO RUN CONDITIONS MENU

! INPUT A NEW JUMP DISTANCE

DISP "DISTANCE YOU DESIRE SKITTER TO JUMP (IN INCHES)";

INPUT Jdist

690 Jdist=Jdist/12

700 GOTO Menu

2710 Ad: ! INPUT A NEW ACCELERATION DISTANCE

DISP "ACCELERATION DISTANCE FOR FOOT (IN INCHES)";

INPUT Adist

GO TO LEG MENU

GO TO JOINT MENU

GO TO ACTUATOR MENU

CHANGE TYPE OF ACTUATORS

CHANGE PRINTER

2720

2730

2740 Adlst-Adlst/12

2750 GOTO Menu

4h76o Lp: i

2770 Flag=2

2780 GOTO Menu

2790 Jnt: l

2800 Flag-3

2810 GOTO Menu

_820 Act: !

2830 IF Actflag=l THEN

2840 Flag=8

2850 ELSE

2860 Flag=7

2870 END IF

1880 GOTO Menu

2890 Cha: !

2900 Flag=O

2910 GOTO Menu

2920 Prnt: l

2930 Flag=9

e940 GOTO Menu

2950 Try: !

2960 DISP "BAD CHOICE -- TRY AGAIN"

2970 GOTO Menu

2980 Fn: !

UNDEFINED SOFTKEY CHOOSEN, TRY AGAI:;

GO TO DATA FILE MENU
i)90 Flag,,4

000 GOTO Menu

010 St:: !

020 PRINTER IS CRT

030 CLEAR SCREEN

040 DISP "PROGRAM TERMINATED"

50 WAIT 1 60 DZSP "OR IS IT????"

070 STOP

080 Rn: !

090 Flag-ll

100 GOTO Menu

110 Fro: !

120 DISP "FEMUR WEIGHT (IN POUNDS FORCE)

130 INPUT Mfemur

140 Mfemur_Mfemur/G

150 GOTO Menu

EXIT THE PROGRAM

RUN PROGRAM WITH DATA AS IT IS

INPUT WEIGHT OF FEMUR

n •

#

160 L1en_ 1

170 DISP "LEG LENGTH (IN INCHES)";

180 INPUT Flen

190 Flen-Flen/12

200 Tlen-Flen

210 GOTO Menu

220 Tm: |

230 DISP "TIBIA WEIGHT (IN POUNDS FORCE)

240 INPUT Mtlbla

250 Mtlbia-Mtlbia/G

260 GOTO Menu

INPUT LENGTH OF LEGS

INPUT WEIGHT OF TIBIA

#

270 Fang: ! INPUT INITIAL ANGLE OF FEMUR

280 DISP "INITIAL ANGLE BETWEEN FEMUR _D HORIZONTAL (IN DEGREES)";

290 INPUT Beta

300 Beta-Beta*PI/180

310 GOTO Menu

320 Tang: l INPUT INITIAL ANGLE BETWEEN

330 ! FEMUR AND TIBIA

340 DISP "INITIAL ANGLE BETWEEN FEMUR AND TIBIA (IN DEGREES)";

350 INPUT Iota

360 Iota-Iota*P_/180

370 GOTO Menu

180 Mm: ! GO BACK TO MAIN MENU

190 Flag=l

i00 GOTO Menu

|I0 Bal: ! CHANGE PNT. A

|20 DISP "POINT A - X COORDINATE (DEFAULT = ",A(1)*I2,"IN.)";

i30 LINPUT Temps

i40 IF TempS="" THEN

i50 ELSE

_60 A(1) =VAL (TempS)

170 A(1) =A(1)/12

L80 END IF

190 DISP "POINT A - Y COORDINATE (DEFAULT = ",A(2)*I2,"IN.)";

;00 LINPUT Temps

;10 IF TempS="" THEN

;20 ELSE

;30 A (2 )=VAL (TempS)

;40 A(2) =A(2)/12

;50 END IF

;60 DISP "POINT A - Z COORDINATE (DEFAULT = ",A(3)*12,"IN.)";

70 LINPUT Temps

80 IF Temps ='''' THEN
1590

1600

1610

i620

1630

s640 Be2 :

:650

;660

;670

;680

;690

_700

z710

;720

;730

;740

;750

;760

,770

;780

,790

800

;810

,820

,830

;840

;850

;860

;870 Tal:

:880

,890

;900

910

920

930

940

95O

960

970

980

990

000

010

020

030

O40

050

060

070

080

090

I00 Ta2 :

110

120

130

140

150

160

170

180

ELSE

A (3 )-VAL (Temps)

A(3) -A(3)/12

END IF

GOTO Menu

! CHANGE PNT. B

DISP "POINT B - X COORDINATE (DEFAULT - ",B(1)*12,"IN.)";

LINPUT Temps

IF TempS-"" THEN

ELSE

B (i) -VAL (TempS)

B(1)-B(1)/12

END IF

DISP "POINT B - ¥ COORDINATE (DEFAULT- ",B(2)*I2,"IN.)";

LINPUT Temps

IF TempS-"" THEN

ELSE

B (2) =VAL (Temp$ )

B(2) -B(2)/12

END IF

DISP "POINT B - Z COORDINATE (DEFAULT- ",B(3)*12,'tIN.)";

LINPUT Temps

IF TempS-"" THEN

ELSE

B (3 )-VAL (Temps)

B(3)=B(3)/12

END IF

GOTO Menu

! CHANGE PNT. D

DISP "POINT D - X COORDINATE (DEFAULT = ",D(1)*12,"IN.)";

LINPUT Temps

IF Temps =''' THEN

ELSE

D(i) =VAL (TempS)

D(1) =D(I)/12

END IF

DISP "POINT D - Y COORDINATE (DEFAULT = ", D(2)*12,"IN. )" ;

LINPUT Temps

IF Temps ='''' THEN

ELSE

D (2) =VAL (TempS)

D(2) =D(2)/12

END IF

DISP "POINT D - Z COORDINATE (DEFAULT- ",D(3)*12,"IN.)";

LINPUT Temps

IF TempS="" THEN

ELSE

D (3 )=VAL (TempS)

D(3) =D(3)/12

END IF

GOTO Menu

! CHANGE PNT. E

DISP "POINT E - X COORDINATE (DEFAULT = ",E(1)*12,"IN.)";

LINPUT Temps

IF Temps =''' THEN

ELSE

E (i) =VAL (TempS)

E(1)=E(1)/12

END IF

DISP "POINT E - Y COORDINATE (DEFAULT = ",E(2)*12,"IN.)";
o

4210

4220

4230

4240

4270

4280

4290

4300

4330 Cf:

4340

4350

1.JNPUTTemp$

IF T==p$-"" THEN

ELSE

(2) -VAL (TempS)

E(2)-E(2)/12

END IF

DISP "POINT E - Z COORDINATE (DEFAULT - ",E(3)*12,"IN.)";

LINPUT Temps

IF TempS-"" TI'EN

ELSE

E(3)-VAL(Temp$}

E(3)-E(3)/12

END IF

GOTO Menu

I CREATE DATA FILES FOR FEMUR

Flag-5

GOTO Menu

4360 Tibfiles:

70 _80

4390 Clf:

4400

4410

4420

30

40

4450

4460

4470

4480

ql_ 9°

00

4510 Simfil:

4520

4530

4540

4550

q_60

4570

4580

4590 FtJ:

4600

i0

20

4630

4640

4650

4660 FoJ:

_i_ 7°

80

4690

4700

4710

4720

4730 Fhj:

_4o

4750

4760

4770

4780

| CREATE DATA FILES FOR TIBIA

Flag-6

GOTO Menu

! CLOSE ALL DATA FILES

ASSIGN @Pathl TO *

ASSIGN @Path2 TO *

ASSIGN @Path3 TO *

ASSIGN @Path4 TO *

ASSIGN @Path5 TO *

ASSIGN @Path6 TO *

ASSIGN @Pathsim TO *

FOR I-i TO 6

Oflag(I}=0

NEXT I

GOTO Menu

! THIS CREATES A BDAT FILE THE OUTPUT OF THE

! ANGLES FOR THE SIMULATION OF SKITTER

DISP "FILE NAME FOR THE SIMULATION FILE ";

LINPUT SimS

CREATE BDAT SimS,200

ASSIGN @Pathsim TO Sims

Simflag=l

GOTO Menu

! CREATE TORQUE vs JUMP DISTANCE FILE FOR FEMUR

DISP "FILE NAME FOR TORQUE VS JUMP DISTANCE ";

LINPUT TvJ$

CREATE ASCII Tvj$,25

ASSIGN @Pathl TO TvJ$

Oflag(1)=l

GOTO Menu

| CREATE OMEGA vs JUMP DISTANCE FILE FOR FEMUR

DISP "FILE NAME FOR OMEGA VS JUMP DISTANCE ";

LINPUT ovjS

CREATE ASCII Ovj$,25

ASSIGN @Path2 TO Ovj$

OElag (2) =I

GOTO Menu

! CREATE HP vs JUMP DISTANCE FILE FOR FEMUR

DISP "FILE NAME FOR HORSE POWER VS JUMP DISTANCE ";

LINPUT HvJ$

CREATE ASCII Hvj$,25

ASSIGN @Path3 TO Hvj$

Oflag(3)=l

O
1_479°

8oo :

4810

4820

4830

4840

85O

'60

4870 ToJ:

4_80

4890

4900

910

920

4930

4940 ThJ:

4950

4960

--4970 1 98o

49_0

500O

5010 Actf:

5020

5050 Actv:

5060

5070

5080

5090

e5100 Actt:

5110

5120

5130

5140 Acto:

5150

 16o

5170

5180 Pcrt:

5190

5200

5210

_220 Las:

5230

5240

5250

5260 Fmv:

5270

a15280

5290

5300

5310

5320

5330 Inc:

9_340

5350

5360

5370 Rest:

5380

GOTO Menu

! CREATE TORQUE vs JUMP DISTANCE FILE FOR TIBIA

DISP "FILE NAME FOR TORQUE VS JUMP DISTANCE ";

LIN 'T TvJS

CREATE ASCII TvJ$,25

ASSIGN ePath4 TO TvJ$

Oflag(4)-I

GOTO Menu

| CREATE OMEGA vs JUMP DISTiu_CE FILE FOR TIBIA

DISP "FILE NAME FOR OMEGA VS JUMP DISTANCE ";

ovJ$

CREATE ASCII 0vj$,25

ASSIGN @Path5 TO OvJ$

Oflag(5)-i

GOTO Menu

| CREATE HP vs JUMP DISTANCE FILE FOR TIBIA

DISP "FILE NAME FOR HORSE POWER VS JUMP DISTANCE ";

LINPUT HvJ$

CREATE ASCII HvJ$,25

ASSIGN @Path6 TO HvJ$

Oflag(6)-i

GOTO Menu

! INPUT MAXIMUM FORCE ACTUATOR CAN EXERT

DISP "MAXIMUM FORCE ACTUATOR CAN EXERT (IN POUNDS FORCE} "I

INPUT Aforce

GOTO Menu

l INPUT MAXIMUMVELOCITY ACTUATOR CAN ACHIEVE

DISP "MAXIMUM ACTUATOR VELOCITY ACHIEVE (IN IN/SEC) "I

INPUT Avel

Avel=Avel/12

GOTO Menu

| INPUT MAXIMUM TORQUE ACTUATOR CAN EXERT

DISP "MAXI,_UMTORQUE ACTUATOR CAN EXERT (IN FT-LBS} ";

INPUT Atorqu3

GOTO Menu

| INPUT MAXIMUM VELOCITY ACTUATOR CAN ACHIEVE

DISP "MAXIMUM ACTUATOR OMEGA ACHIEVE (IN RAD/SEC) ";

INPUT Aomega

GOTO Menu

! MAKE PRINTER CRT

PRINTER IS CRT

Flag-1

GOTO Menu

| MAKE PRINTER THE LASER JET

PRINTER IS 9

Flag=l

GOTO Menu

| RUNS THE PROGRAM TO FIND MAX TORQUE & OMEGA

DISP "NUMBER OF STEPS PER INCH OF ACCELERATION ";

INPUT Delstep

Delstep-1/Delstep

Rflag=2

Flag=l

GOTO Rest

!

Rflag=l

Flag=l

GOTO Rest

!

Flag=l

RUNS THE PROGRAM ON AN INCREMENTAL SETTING

RUN THE PROGRAM WITH THE VALUES AS SET
390

00 !

5410

5420

5430

5440

5470

5480

5490

5500

10

2O

55:30

5540

5550

55(50

70

80

5590

5600

;610

CLEAR SCREEN

! IF NO FILE ASSIGNMENTS HAVE BEEN MADE, THEN OUTPUT IS TO THE CRT

!

IF Oflag(1)-0 THEN

ASSIGN ePathl TO CRT

END IF

IF Oflag(2)-0 THEN

ASSIGN @Path2 TO CRT

END IF

IF Oflag (3)-0 THEN

ASSIGN @Path3 TO CRT

END IF

IF Oflag(4)-0 THEN

ASSIGN @Path4 TO CRT

END IF

IF Oflag(5)-0 THEN

ASSIGN @Path5 TO CRT

END IF

IF Oflag(6)-0 THEN

ASSIGN @Path6 TO CRT

END IF

| *******************************************************************

$620

163o !!

N40 !

5650

5660

$670

J680

3690

BOO

_710

3720

;730

;740

;750

J760

;770

;780

;7g0

;800

;810

1820

START THE PROGRAM

!ee**ee*e*e*ee*eeee*eeee,e,ee,ee,e,ee***ee,e**e,e**e*********e,ee***

l

t

! DEFINE YOUR END CONDITIONS

!

Maxvel-SQR(2*G*Jdlst)

Totaltlme-ABS(2*Adlst/Maxvel)

Acce1-Maxvel/Totaltlme

i

! DETERMINE ANGLES FOR THIS POSITION OF THE FOOT

!

CALL Findfoot(-l*Beta,Iota,Femur(*),Foot(*),Newfoot(,),Newfem(,))

1

!

! DEFINE ORIGINAL L_CATION OF ACTUATOR CONNECT POINTS FOR THIS

! CONFIGURATION OF THE I_:G3

!

CALL Rot(-l*Beta,Transl(*))

,830 MAT Origb- Transl*B

,840 MAT Origd- Transl*D

,850 MAT Temp2- E-Femur

860 Temp2(4)-I

870 MAT Templ- Trans3*Temp2

BSO Xnew_Newfoot(1)

890 Ynew=Newfoot(2)

900 Lac=SQR(Xnew^2+(Ynew)^2)

910 CALL Sss(Tlen,Lac,Flen,A3)

920 A3nA3-PI/2

930 CALL Rot(A3,Trans2(*))

P40 CALL Trans(Newfem(*),Trans2(_))

950 MAT Orige= Trans2*Templ

960 !

970 ! SET END POINTS FOR LOOPING OVER SLIDER CRANK

980 !
99O

000

6010

6020

6030

6040

0S0

O60

60?0

6080

1-1 ! COUI_F.R

IF R£lag-I THEN

Delstep,,l

¥0-Delstep

ELSE

YO-Dolatep

END IF

Endpnt-_dlst* 12

Theta2--l*Beta

Iota2-Iota

6090 !

6100 | BEGIN LOOP OVER ACCELERATION DISTANCE

_6110 !

_120 FOR Y-Y0 TO Endpnt STEP Delstep

6130 YI-Y/12

6140 T-ABS(SQR(2*Y1/Accel))

6150 V-Accel*T

6160 I _6170

_180 t

6190

6200

6210

6220

230

240

6250

6260

6270

6280

6290

 ]oo

6310

6320

6330

6340

6350

Q_6o

6370

6380

6390

6400

6410

S42o

6430

6440

6450

6460

6470

8480

6490

6500

6510

6520

6530

S540

6550

6560

hi))))

6570

DETERMINE JOINT ANGLES

Xnew-Newtoot (i )

Ynew-Newfoot (2 )

Lac-SQR (Xnev^ 2+ (Ynew- (Y1)) ^2 )

Psi-ATN ((Ynew- (YI))/Xnew)

CALL Sss (F1en, Tlen, Lac, A3)

IF Psi<O. THEN A3--I*A3

Theta-Psi-A3

IF Psi>0. T}IEN

Gamma-PI/2-Psi

ELSE

Gamma-Psi+PI/2

END IF

CALL Sss(Lac, Flen,Tlen,A3)

IF Gamma>O. THEN

Phi-Gamma-A3

ELSE

Phi-A3-Gamma

END IF

l

l

!

IF

NOW OUTPUT ANGLES FOR SIMULATION IF SIMFLAG-I

Simflag-1 THEN

CALL Sss(Tlen,Lac,Flen,Iotal)

Thetal-Theta

Angle1-(Thetal-Theta2}*180/PI

Angle2-(Iota1-Iota2)*lS0/PI

Free-2.0

OUTPUT @Pathslm;T

OUTPUT @Pathsim;Free

OUTPUT @Pathslm;Anglel

OUTPUT @Pathslm;Angle2

Theta2=Thetal

Iota2=Iotal

END IF

!

! NOW CALCULATE THE PHYSICAL PARAMETERS

!

Fomega(I)=ABS((V*COS(Phi))/(Flen*(COS(Theta)*COS(Phi)-SIN(Theta)*SIN(p

Tomega(I)=ABS((Fomega(I)*SIN(Theta))/COS(Phi))
80 Numbbc--1*Accel*Tlen*SIN(Theta)-Tomega(I)^2*Tlen^2*(COS(Phl)*SIN Theta

÷SIN cPhil*COSlThetall+Fomega(ll^2*Flen^2*lCOSlThetal^2-SlNlTheta)^2) (

6590 Talpha-Numbb¢/(-l*Tlen^2*(COS(Phl}*COS(Theta)+SIN(Phl}*SIN(Theta)))

|6600 Falpha-(Talpha*Tlen*COS(Phi)/2-Tomega(I}^Z*Tlen*SIN(Phl)+Fomega(I)^2*F

|Ion*COS(Theta))/(Tlen*SIN(Theta))

|6610 Axtlbla--l*Talpha*Tlen*COS(Phi}/2+Tomega(I}^2*Tlen*SIN(Phi)/2

620 Ayt_bla--l*Accel-Talpha*SIN(Phi)*Tlen/2-Tomega(I)^2*Tlon*COS(Phi)/2

VlS30 Fbx-Mtlbia*Axtlbia

6640 Fby-Wgt/3-Mtlbla*Aytlbla-Mtlbia*G

6650 Ftorque(I)-ABS(Ifemur*Falpha+Fbx*Flen*SIN(Theta)+Mfemur*G*Flen,COS(The

ta)/2-Fby*Flen*COS(Theta))

6660 Ttorque(I)-ABS(-l*Itlbla*Talpha-Mtlbla*G*Tlen*SIN(Phl)/2+Wgt*Tlen*SIN(

hl)/2)

IRe70 Fhp (I; -ABS (Ftorque (I )*Fomega (I )/550)

6680 Thp (I) -ABS (Ttorque (I) *Tomega (I)/550)

6690 !

6700 ! IF ACTUATOR IS A LINEAR ONE, THEN CALCULATE THE MOMENT ARM

6710 ! IF IT IS A ROTARY ONE, THEN COMPARE TORQUE°S AND OMEGA'S NEEDED

1720 ! WITH THE ONES YOU CAN SUPPLY "

_30 !

6740 Cnt-O !CNT COUNTS THE NUMBER OF LINES PRINTED ON THE SCREEN SO THAT

6750 | SCROLLING OF THE SCREEN CAN BE PREVENTED

6760 IF Actflag-2 THEN

6770 !

1780 l NOW, CALCULATE THE MOMENT ARM FOR THE LINEAR ACTUATOR

V/90 1

6800

6810

6820

6830

6840

qhso

6860

6870

6880

6890

6900

4blo

6920

6930

6940

6950

6960

DTO

6980

6990

7000

7010

7020

D3o

7040

7050

7060

7070

7080

Ip9o

7100

17110

7120

7130

MAT Trans3- IDN

MAT Trans2- IDN

CALL Rot(Theta,Trans3(*))

MAT Newfem- Trans3*Femur

MAT Newb- Trane3*B

MAT Newd- Trans3*D

MAT Temp2- E-Femur

Temp2(4)-i

MAT Templ- Trans3*Temp2

CALL Sss(Tlen,Lao,Flen,A3)

A3-A3-PI/2

CALL Rot(A3,Trans2(*))

CALL Trane(Newfem(*),Trans2(*))

MAT News- Trans2*Templ

CALL Eqllne(A(*},Newb(*),C(*},Farm)

CALL Eqline(Newd(*),Newe(*),Newfem(*),Tarm}

A3-A3+PI/2

CALL Rot(A3,Trans2(*))

MAT Templ- Trans3*Foot

MAT Newfoot2- Trans2*Templ

CAN GIVEN ACTUATOR SUPPLY POWER?

Test=ABS(Ftorque(I)/Farm)

Test2=ABS(Fomega(I)*Farm)

Testf-ABS(Ttorque(I)/Tarm}

Testv=ABS(Tomega(I)*Tarm)

IF Test>Aforce THEN

IF Rflag=l THEN

PRINT CHR$(129)

PRINT "FEMUR ACTUATOR IS NOT GOOD ENOUGH - FORCE NOT ENOUGH!!!"

PRINT CHR$(128)

Minarm=Ftorque(I)/Aforce

PRINT USING "29A,DDDDD.DD";"MINIMUM MOMENT ARM NEEDED IS ";Minarm*l
0IN'" PRINT USING "29A,DDD.DD";"PRESENTLY, HAVE MOMENT ARM - ";Farm*12;"

IN."

7150 PRINT USING -30A,DDDDDD.DD,17A,DDDDD.DD";"OR INCREASE ACTUATOR FORC

E TO ";Test;" LBFo INSTEAD OF ";Aforce;" LBF"

7160 PRINT

Cnt-Cnt+7

ELSE

7190 Femfflag-2

7200 END IF

7210 END IF

7220 IF Test2>Avel THEN

IF Rflag-1 THEN

PRINT CHR$ (129)

PRINT "FEMUR ACTUATOR IS NOT GOOD ENOUGH - VELOCITY NOT ENOUGHIII"

7260 PRINT CHR$(128)

7270 Maxarm-Avel/Fomega(I)

7280 PRINT USING .49A,DDD.DD';"MAXIMUMMOMENT ARM POSSIBLE FOR THIS ACTU

ATOR IS -;Maxarm*12;" IN."

_290 PRINT USING "29A,DDD.DD";"PRESENTLY, HAVE MOMENT ARM_ ";Farm*12;"

IN."

7300 PRINT USING "33A,DDD.DD,19A,DDD.DD";"OR INCREASE ACTUATOR VELOCITY

TO .;Test2*12;" IN/SEC INSTEAD OF ";Avel*12;" IN/SEC"

PRINT

Cnt-Cnt+7

ELSE

Femvflag-2

END IF

END IF

IF Cnt>9 THEN

DISP "HIT ANY KEY TO CONTINUE";

ON KBD GOTO 7410

GOTO 7400

Cnt-0

CLEAR SCREEN

END IF

IF Testf>Aforce THEN

IF Rflag-i THEN

PRINT CHR$ (129)

PRINT "TIBIA ACTUATOR IS NOT GOOD ENOUGH - FORCE NOT ENOUGH!!I"

PRINT CHR$(128)

Minarm-Ttorque(I)/Aforce

PRINT USING "29A, DDD.DD";"MINIMUM MOMENT ARM NEEDED IS ";Minarm*12;

I 7230

ei24o

7250

7310

7320

 330

7340

7350

7360

7370

7380

er39o

7400

7410

7420

7430

7440

e45o

7460

7470

7480

7490

7500

IN."

7510

IN."

PRINT US ING "29A, DDD. DD" ;"PRESENTLY, HAVE MOMENT ARM " " ;Tarm* 12 ;"

7520 PRINT USING -30A,DDDDDD.DD,17A,DDD.DD";"OR INCREASE ACTUATOR FORCE

TO ";Testf;" LBF. INSTEAD OF ";Aforce;" LBF"

7530 PRINT

_540 Cnt-Cnt+7

7550 ELSE

7560 Tibfflag =2

7570 END IF

7580 END IF

7590 IF Cnt>9 THEN

e600 DISP "HIT ANY KEY TO CONTINUE";

7610 ON KBD GOTO 7630

7620 GOTO 7620

7630 Cnt =0

7640 CLEAR SCREEN
65O

S60

670

SS0

sg0

7O0

710

72O

END IF

IF Testv>Avel THEN

IF Rflag=l THEN

PRINT CHR$(129}

PRINT "TIBIA ACTUATOR IS NOT GOOD ENOUGH - VELOCITY NOT ENOUGH2||"

PRINT c_m$ (128)

Maxarm-Avel/Tomega(I)

PRINT USING "49A,DDD.DD";"MAXIMUM MOMENT ARM POSSIBLE FOR THIS ACTU

150

760

770

780

790

300

310 !

320 !

330 !

rOR IS "$Maxarm*121" IN."

730 PRINT USING "29A, DDD. DD" ;"PRESENTLY, HAVE MOMENT ARM m - ;Tarm*12 ;"

740 PRINT USING "33A, DDD. DD, 19A, DDD. DD" ;"OR INCREASE ACTUATOR VELOCITY

) ";Testv*12;" IN/SEC INSTEAD OF ";Avel*12;" IN/SEC"

PRINT

CntmCnt+7

ELSE

Tibvflag-2

END IF

END IF

NOW, FOR A ROTARY ACTUATOR

340 ELSE

350 IF Ftorque(I}>Atorque THEN

360 IF Rflag-i THEN

370 PRINT CHR$ (129)

380 PRINT "FEMUR ACTUATOR IS NOT GOOD ENOUGH - TORQUE NOT ENOUGH"

390 PRINT CHR$(128)

)00 PRINT USING "ISA, DDD.DD,35A,DDD.DD";"NEED TORQUE OF ";Ftorque(I);

_-LBS,BUT ACTUATOR ONLY SUPPLIES ";Atorque

)I0 PRINT

)20 Cnt=Cnt+5

)30 ELSE

)40 Femfflag=2

)50 END IF

)60 END IF

)70 IF Fomega(I)>Aomega THEN

)80 IF Rflag=l THEN

)90 PRINT CHR$(129)

)00 PRINT "FEMUR ACTUATOR IS NOT GOOD ENOUGH - OMEGA NOT ENOUGH"

)I0 PRINT CHR$(128)

)20 PRINT USING "I4A,DDD.DD,36A,DDD. DD";"NEED OMEGA OF ";Fomega(I);" RA

tSEC,BUT ACTUATOR ONLY SUPPLIES ";Aomega

)30 PRINT

)40 Cnt=Cnt+5

150 ELSE

160 Femtflag=2

170 END IF

,80 END IF

,90 IF Ttorque(I)>Atorque THEN

,00 IF Rflag-I THEN

i0 PRINT CHR$(129)

20 PRINT "TIBIA ACTUATOR IS NOT GOOD ENOUGH - TORQUE NOT ENOUGH"

30 PRINT CHR$(128)

40 PRINT USING "I5A, DDD. DD,35A, DDD.DD";"NEED TORQUE OF ";Ttorque(I);"

_LBS,BUT ACTUATOR ONLY SUPPLIES ";Atorque

50 PRINT

60 Cnt=Cnt+5

70 ELSE

80 Tibfflag=2
El_slg°

200

8210

8220

8230

8240

25O

260

8270

8280

82g0

8300

310

32O

END IF

END IF

IF Cnt>11 THEN

DISP "HIT ANY KEY TO CONTINUE";

ON KBD GOTO 8250

GOTO 8240

Cntm0

CLEAR SCREEN

END IF

IF Tomega(I)>Aomega THEN

IF Rflag-I THEN

PRINT CHR$ (129)

PRINT "TIBIA ACTUATOR IS NOT GOOD ENOUGH - OMEGA NOT ENOUGH"

PRINT CHR$(128)

8330 PRINT USING "I4A,DDD.DD,36A, DDD.DD";"NEED OMEGA OF ";Tomega(I);. RA

D/SEC, BUT ACTUATOR ONLY SUPPLIES ";Aomega

8340 PRINT

8350 Cnt-Cnt+ 5

ELSE

Tibvflag-2

8380 END IF

8390 END IF

8400 END IF

360

370

8410 I 8420 LOOP BACK FOR ACCELERATION DISTANCE

08430 |

8440 IF Rflag-I THEN

8450 CALL Outdata(Jdist,Adlst,Ftorque(*),Ttorque(*),Fomega(*),Tomega(,),Fhp

(*),Thp(*),@Pathl,@Path2,@Path3,@Path4,@PathS,@Path6,Oflag(*),Y,Cnt,I)

8460 END IF

8470 I-I+l

148o NEXT Y

8490 !

8500 l WRITE LINE TO END SIMULATION FILE

8510 1

8520 IF Simflag-1 THEN

8530 Endnum=999.0

08540 OUTPUT @Pathslm;Endnum

8550 OUTPUT @Pathsim;Free

8560 OUTPUT @Pathsim;Free

8570 OUTPUT @Pathslm;Free

8580 END IF

8590 !

_600 l NOW CALCULATE THE STROKE LENGTH FOR THE ACTUATOR

8610 |

8620 FsI=AES (SQR( (Origb (i) -A(1) )^2+ (Origb (2) -A(2) )^2) -SQR((Newb(1) -A(1) }*2+ (New

b(2)-A(2) ) ^2) )

8630 TsI=ABS (SQR((Origd(1) -Orlge(1) ) ^2+(Orlgd(2) -Orlge (2)) ^2) -SQR( (Newd (I) -Newe

_ *2+(Newd(2)-Newd(2))^2))!

8650

8660

8670

8680

8690

1_7oo

8710

8720

8730

8740

CLEAR SCREEN

!

! IF THE MAXIMUM VALUES WERE DESIRED, THEN THIS SECTION

! DETERMINES THE MAXIMUM TORQUE AND ANGULAR VELOCITY

!

IF Actflag=2 THEN

PRINT USING "22A,DD.DD";"FEMUR STROKE LENGTH - ";Fsl*12;"

PRINT USING "22A,DD.DD";"TIBIA STROKE LENGTH = ";TsI*I2;"

PRINT

END IF

IN • i!

IN •"
7So

6O

I1"

8770

8780

87g0

8810

8820

NT 11"

8830

_40 ;50

IF Femfflag-2 THEN

PRINT "FEMUR ACTUATOR NOT GOOD ENOUGH I1

END IF

IF Femvflag-2 THEN

PRINT "FEMUR ACTUATOR NOT GOOD ENOUGH I!

JOINT 11"

END IF

IF Tibfflag-2 THEN

PRINT "TIBIA ACTUATOR NOT GOOD ENOUGH I|

END IF

IF Tibvflag-2 THEN

PRINT "TIBIA ACTUATOR NOT GOOD ENOUGH l!

8860

8870

8880

190 )00

8910

8920

8930

8940

ABOUT JOINT !!"

END IF

PRINT

MAT SEARCH Ftorque,MAX;Maxft

MAT SEARCH Ttorque,MAX;Maxtt

MAT SEARCH Fomega,MAX;Maxfo

MAT SEARCK Tomega,MAX;Maxto

MAT SEARCH Fhp,MAX;Maxfhp

NEED MORE TORQUE ABOUT JOI

NEED MORE ANGULAR VELOCITY

NEED MORE TORQUE ABOUT OOI

NEED MORE ANGULAR VELOCITY

MAT SEARCH Thp,MAX;Maxthp

PRINT USING -3SA,DDDD.DDO';"MAXIMUM TORQUE ABOUT THE FEMUR WAS ";Maxft;"

)150

)160

1170

1180

Itgo

_200

1210

'220

'230

1

| THIS SUBROUTINE SIMPLY PRINTS THE VARIABLES THAT THE USER CAN

1 CHNAGE TO THE SCREEN

!

PRINT "HERE ARE THE PRESET PARAMETERS:"

PRINT " "

PRINT "INITAL ANGLE FEMUR AND HORIZONTAL = ";Beta*ISO/PI;"DEG"

PRINT "INITAL ANGLE FEMUR AND TIBIA - ";Iota*180/PI;"DEG"

PRINT "JUMP DISTANCE = ";Jdist*12 ;"IN."

50 LBS" PRINT USING "45A,DD.DDD";"MAXIMUM ANGULAR VELOCITY ABOUT THE FEMUR WAS

";Maxfo;°' RAD/SEC"

8960 PRINT USING "35A, DDDD. DD" ;"MAXIMUM TORQUE ABOUT THE TIBIA WAS ";Maxtt;"

FT -LBS"

9970 PRINT USING -45A,DD.DDD";"MAXIMUM ANGULAR VELOCITY ABOUT THE TIBIA WAS

";Maxto;" RAD/SEC"

_80 PRINT USING .42A,D.DDD";"MAXIMUM HORSE POWER ABOUT THE FEMUR WAS - ";Ma

Kfhp;" Hpo'

8990 PRINT USING "42A,D. DDD" ;"MAXIMUM HORSE POWER ABOUT THE TIBIA WAS - ";Ma

xthp;" HP"

%000 DISP "HIT ANY KEY TO CONTINUE";

)010 ON KBD GOTO 9030

_20 GOTO 9020

)030 1

)040 I LOOP BACK TO THE MENU

)050 1

)060 GOTO Menu

)070 !

11080 1 STOP PROGRAM

)090 1

)I00 END

)110 1

)120 !

)130 1

_.40 SUB Printvar(Jdlst,Adist,Wgt,G,Mfemur,Flen,Mtlbla,Tlen,Angf,Angt,A(*) ,B(*)

.C(*) ,D(*) ,E(*), Beta, Iota,Aforce,Avel,Actflag,Actt,Acto)
240 PRINT "ACCET_-,RATZON DISTANCE m -/Adist*12;.ZN.-

250 PRINT "WEIGHT OF SKITTER _ "lWgt;"LBF"

9260 PRINT NFEMUR°S WEIGNTm "IHtomur*G_"LBF"

9270 PRINT "FEMURIS LENGTH _ ",Flen*121"IN."

9280 PRINT "TIBIA*S WEIGHT _ ";Mtlbla*G;"LBF"

9290 PRINT "TIBIAtS LENGTH _ "lTlen*12;"IN."

300 IF Actflag_2 THEN

310 PRINT USING "37A,DDD.DD,2X,DDD.DD, 2X,DDD.DD";"POINT A COORDINATES ARE

(IN INCHES)_ "IA(1)*I2,A(2)*I2#A(3)*I2

9320 PRINT USING "37A,DDD.DD,2X,DDD. DD,2X, DDD. DD#;"POINT B COORDINATES ARE

(IN INCHES): ";B(1)*I2,B(2}*I2,B(3)*I2

9330 PRINT USING "37A,DDD.DD,2X, DDD.DD,2X, DDD.DD";"POINT C COORDINATES ARE

_IN INCHES): ";C (1) "12 ,C (2)'12 ,C(3 )'12

_2340 PRINT USING "37A,DDD.DD,2X,DDD.DD,2X,DDD.DD";"POINT D COORDINATES ARE

(IN INCHES): ";D(1)*I2,D(2)*I2,D(3)*I2

9350 PRINT USING "37A,DDD.DD,2X,DDD.DD,2X,DDD.DD";"POINT E COORDINATES ARE

(IN INCHES}: ";E(1)*12,E(2)*Z2,E(3)*I2

9360 END IF

370 IF Actflag-2 THEN

380 PRINT USING "ITA, DDDD.DD";"ACTUATOR FORCE _ ";Aforce;" LBF"

9390 PRINT USING "20A,DDD.DD";"ACTUATORVELOCITY _ ";Avel*12;" IN/SEC"

9400 ELSE

9410 PRINT USING "I8A,DDDD.DD";"ACTUATOR TORQUE m ";Actt;" FT-LBS"

9420 PRINT USING "17A, DDD.DD"I"ACTUATOR OMEGA _ ";Acto;" RAD/SEC"

430 END IF

440 !

9450 ! END SUBROUTINE

9460 |

9470 SUBEND

9480

,._49o _

_500 !

9510 SUB Invar(Mfemur, Ifemur, Flen,Mtlbla,Itlbia,Tlen)

9520 I 9530 THIS SUBROUTINE DEFINES THE VARIABLES THAT NEED BE CALCULATED

9540 ! FROM OTHER INPUT VARIABLES

9550 !

_560 Ifemur-.O252+Mfemur*(Flen/2)^2

9570

95_0

9590

9600

9610

I)620

9630

9640

9650

hp(*) ,

Itlbla-.01495+Mtlbia*(Tlen/2)^2

!

! END SUBROUTINE

J

SUBEND

!

I

!

SUB Outdata(Jdist,Adlst,Ftorque(*),Ttorque(*),Fomega(*),Tomega(*),Fhp(*),T

@Pathl,@Path2,@Path3,@Path4,@PathS,@Path6,Oflag(*),Y,Cnt,I)

9660

D67o

9680

9690

9700

9710

9720

t730

9740

9750

9760

9770

J

! THIS SUBROUTINE OUTPUTS THE DATA

!

Temp-0

FOR J-I TO 6

IF Oflag(J)-0 THEN Temp=l

NEXT J

IF Cnt>13 THEN

DISP "HIT ANY KEY TO CONTINUE";

ON KBD GOTO 9770

GOTO 9760

Cnt=0

D
ip78o _DCIFL_ SCREEN

I-::_ ° IF Temp-1 THEN

| 9810 PRINT USING "DDD.D,32A"IY/(Adist*12)*100;. % 'I_IROUGH ACCELERATION DISTA

| NCZ"

I 982o PRINT

83o PRINT

19840 Cnt-Cnt+3

9850 END IF

9860 IF Cnt>14 THEN

9870 DISP "HIT ANY KEY TO CONTINUE";

9880 ON KBD GOTO 9900

,,mq890 GOTO 9890

'9900 Cnt-O

9910 CLEAR SCREEN

9920 END IF

9930 IF Temp-1 THEN

9940 PRINT USING "I6A,DDD.DD";"JUMP DISTANCE m "iJdlst*12;" IN."

950 PRINT USING "24A,DDD.DD";"ACCELERATION DISTANCE - ";AdLst*12;" IN"

"9960 CntmCnt+2

9970 END IF

9980 IF Oflag(1)-I THEN

9990 ELs_UTPUT @Pathl;Jdlst*12,Ftorque(I)

I0000

OOlO

"10020

10030

10040

10050

10060

I oo,o .0080

10090

IF Cnt>lS THEN

DISP "HIT ANY KEY TO CONTINUE";

ON KBD GOTO i0050

GOTO 10040

Cnt-0

CLEAR SCREEN

END IF

PRINT USING "I5A,DDDDDD.DD";"FEMURTORQUE - ";Ftorque(I);" FT-LBCnt-Cnt+l

I0100 END IF

10110 IF Oflag(2)-I THEN

10120 OUTPUT @Path2;Jdist*12,Fomega(I)

_0140 10130 ELS_F Cnt>15 THEN

10150 DISP "HIT ANY KEY TO CONTINUE";

10160 ON KBD GOTO 10180

10170 GOTO 10170

10180 Cnt-O

10190 CLEAR SCREEN

_0200 END IF

10210 PRINT USING "I4A,DDDD.DD";"FEMUR OMEGA - ";Fomega(I);" RAD/SEC"

10220 Cnt:Cnt+l

10230 END IF

10240 IF Ofl_g(3)=l THEN

10250 OUTPUT @Path3;Jdist*12,Fhp(I)

Io26o

10270 IF Cnt>15 THEN

10280 DISP "HIT ANY KEY TO CONTINUE";

10290 ON KBD GOTO 10310

10300 GOTO 10300

10310 Cnt=0

Q0320 CLEAR SCREEN

10330 END IF

10340 PRINT US_:;G "11A,DDDD.DD";"FEMUR HP = ";Fhp(I);" HP"

10350 Cnt:Cnt+l

10360 END IF
0370 IF Oflag(4)-I THEN

0380 OUTPUT 0Path4;Jdist*12,Ttorque(I)

10390 ELSE

10400 IF Cnt>15 THEN

10410 DISP "HIT ANY KEY TO CONTINUE";

10420 ON KBD GOTO 10440

0430 GOTO 10430

0440 Cnt-0

10450 CLEAR SCREEN

10460 END IF

10470 PRINT USING "I5A,DDDD.DDDD";"TIBIA TORQUE - ";Ttorque(I);" FT-LB"

10480 Cnt-Cnt+l

0490 END IF

0500 IF Oflag(5)-I THEN

10510 OUTPUT _PathS;Jdlst*12,Tomega(I)

10520 ELSE

10530 IF Cnt>15 THEN

10540 DISP "HIT ANY KEY TO CONTINUE";.

0550 ON KBD GOTO 10570

0560 GOTO 10560

10570 Cnt-0

10580 CLEAR SCREEN

10590 END IF

10600 PRINT USING "14A,DDDD.DDDD";"TIBIA OMEGA - ";Tomega(I);" RAD/SEC"

0610 Cnt-Cnt+l

0620 END IF

10630 IF Oflag(6)-i THEN

10640 OUTPUT @Path6;Jdlst*12,Thp(I)

10650 ELSE

10660 IF Cnt>15 THEN

0670 DISP "HIT ANY KEY TO CONTINUE";

0680 ON KBD GOTO 10700

10690 GOTO 10690

10700 Cnt-O

10710 CLEAR SCREEN

10720 END IF

0730 PRINT USING "IIA,DDDD.DDDD";"TIBIA HP m ";Thp(I);" Hpn

0740 CntuCnt+l

I0750 END IF

10760 |

I0770 IF Temp-i THEN

L0780 DISP "HIT AN¥ KEY TO CONTINUE";

L0790 ON KBD GOTO 10810

L0800 GOTO 10800

tO810 CLEAR SCREEN

L0820 END IF

L0830 !

L0840 | END SUBROUTINE

L08S0 !

L0860 SUBEND

L0870 !

L0880 !

L0890 !

k0900 SUB Rot(Angle,Matrix(*))

t0910 |

t0920 ! THIS SUBROUTINE FORMS THE TRANSFORMATION MATRIX FOR A ROTATION

L0930 ! ABOUT THE Z-AXIS. THE MATRIX IS A 4x4.

.0940 !

.0950 OPTION BASE 1

.0960 Matrix(l,l)=COS(Angle)
_970 Natrix(2,2)-COS(Angle)

10980 Matrix(1,2)--l*SIN(Angle)

10990 MatrlX(2el)-SZN(Angle)

11000 FOR 'I-1 TO 4

11010 FOR J-I TO 4

11020 IF ABS(Matrlx(I,J))<.0000001 THEN Matrlx(I,J)-0.

030 NEXT J

040 NEXT I

11050 !

11060 | END SUBROUTINE

11070 |

11080 SUBEND

_090 l! 100

11110 !

11120 SUB Trans(Dist(*),Matrix(*))

11130 1 11140 THIS FORMS A TRANSLATION MATRIX. THAT OFFSETS A ROT_TIONMATRIX

_15o l

1-116o OPTION BASE 1

11170 Matrix(1,4)-Dist(1)

11180 Matrix(2,4)-Dist(2)

11190 Matrlx(3,4)-Dist(3)

11200 1

_210 END SUBROUTINE

I_220 !

11230 SUBEND

11240 SUB Flndfoot(Beta,Iota,Femur(*),Foot(*),Newfoot(*),Newfem(*))

11250 1 11260 THIS SUBROUTINE WILL FIND THE FOOT POSITION GIVEN THE ANGLES

_270 ! BETWEEN THE FEMUR & THE HORIZONTAL & THE ANGLE BETWEEN THE FEMUR

F1280 ! AND THE TIBIA

11290 !

11300 OPTION BASE 1

11310 DIM Transl(4,4),Trans2(4,4),Templ(4)

11320 MAT Transl- IDN

330 MAT Trans2- IDN

340 CALL Rot(Beta,Transl(*))

11350 MAT Newfem- Transl*Femur

11360 MAT Templ- Transl*Foot

11370 CALL Rot(Iota,Trans2(*))

11380 CALL Trans(Newfem(*),Trans2(*))

390 MAT Newfoot- Trans2*Templ

400 |

11410 | END SUBROUTINE

11420 !

11430 SUBEND

11440 !

450 !

460 !

11470 SUB Sss(S1,S2,S3,A3)

11480 |

11490 ! THIS SUBROUTINE DETERMINES ANGLE 3 FOR A TRIANGLE WHERE YOU

11500 ! KNOW THE 3 SIDES

11510 !

_520 P- (SI+$2+$3)/2

11530 Temp=SQR(P*(P-S2)/(SI*S3))

11540 IF ABS(Temp)>I.0 THEN

11550 PRINT "IMPOSSIBLE POSITION TO REACH!!!"

I1560 ELSE
1.1570

L1580

L1590

L1600

L1610

:1620

;1630

.1640

.1650

.1660

.1670

.1680

.1690

.1700

.1710

.1720

.1730

.1740

.1750

.1760

.1770

.1780

.1790

.1800

.1810

A3-2*ACS (Temp)

END IF

!

I END SUBROUTINE

!

SUBEND

!

l

SUB Eqline(J(*) ,K(*) ,L(*) ,Matin)

l

I THIS SUBROUTINE DETERMINES THE MOMENT ARM

!

OPTION BASE 1

DIM R(4)

M-(J(2)-E(2) )/(J(1)-K(1) )

BI-J (2)-M*J (i)

B2-L(2) +L(1)/M

R(i) 'I(B2-BI) / (M+I/M)

R(2)-M*R(1) +BI

Marm=SQR((R(1)-L(1) )^2+(R(2)-L(2) )^2)

END SUBROUTINE

SUBEND
30

30

40

50

80

90

100

110

140

150

160

170

i(o

200

210

220

230

260

270

280

290

320

330

340

350

360

380

390

400

410

420

44O

450

460

470

48O

500

510

520

530

540

560

570

580

590

!

! THIS PROGRAM WILL DETERMINE THE TORQUE NEEDED TO LEAN

| SKITTER THROUGH A DESIRED NUMBER OF DEGREES

t

! THE NECESSERY TORQUE AND ANGULAR VELOCITY AT THE HIP

!

| PROGRAM WRITTEN BY:

! BRICE MACLAREN

! GARY MCMURRAY

t

I_ *********************************************************************

OPTION BASE I

RAD

DIM A(9,10),B(9),X(9}

t

! THIS DATA DEFINES THE SYSTEM MATRIX THAT

! MUST BE SOLVED IN THE DYNAMICS TO CALCULATE THE

! INPUT TORQUE.

!

DATA 0,0,-I,0,I,0,0,0,0,0

DATA 0,0,0,-i,0,1,0,0,0,0

DATA 0,0, I,-I,0,0,0,0,0,0

DATA -i,0,i,0,0,0,0,0,0,0

DATA 0,-1,0,1,0,0,0,0,0,0

DATA 1,-1,0,0,0,0,0,0,1.0

DATA 1,0,0,0,0,0,i,0,0,0

DATA 0,I,0,0,0,0,0,I,0,0

DATA -1,-1,0,0,0,0,0,0,0,0

N-9

!

! USER PROPMTED FOR VARIABLES

!

DISP "INPUT ANGLE OF ROTATION IN DEGREES";

INPUT Rotangle

Rotangle-Rotang le * PI/180

DISP "INPUT ACCELERATION ANGLE IN DEGREES";

INPUT Aangle

Aangle=Aangle*PI/180

t

! DEFINE LINK LENGTHES OF 4-BAR

!

R=SQR( ((9. 1602+15. 194)/12) ^2+ (20/12) ^2}

RI=44.35

R2=R*I2

R3=20

R4=20

Tlen=20/12

Flen=20/12

L=Flen

G=32.2

Mfemur=3/G

Mtibla=2/G

Wgt=100

Mbody-_85/G

!

! DEFINE INERTIA'S

t

CALL Invar (MfePur, I femur, Flen, Mtib ia, Itibia, Tlen, R, Mbody, Ibody)
oo ! CAr_.-OLATENECESSS_RYANGUL_ VELOCITES ANDACCELERATION

1

_630 Phi-_SN (20/(R'Z2) ) ....

I640 H.R.SIN(Rotangle+Phi+Aangle)-R*SIN(Ph2+AangLe)

• 650 Finalonegaad--l*SQR(2*Wgt*_/Ibody)

Totaltlme-ABS(Finalomegaad/Alphaad)

580 I

690 I DEFINE INITIAL ANGLES

700 1

710 Theta4-PI-ASNf20/fR*I2))

_20 PRINT nINITIALTHETA4 -";Theta4*180/PI 30 CALL Findthetas(RI,R2,R3,R4,Theta2,Theta3,Theta4)

740 Inlttheta4-Theta4

750 Inlttheta3-Theta3

760 Inittheta2-Theta2

770 Finalangle-Theta4-Rotangle-Aangle

| BEGIN LOOPING OVER THETA4

!

• 810 Deltatheta-Aangle/10

• 820 FOR Temp-(Inlttheta4-Deltatheta) TO (Inlttheta4-Aangle) STEP

• 830 Theta4-Temp

89O

920

930

940

950

UPDATE ANGLES

CALL Findthetas(RI,R2,R3,R4,Theta2,Theta3,Theta4)

CALCULATE TIME

T-SQR(ABS((Temp-Inittheta4)*2/Alphaad))

!

I CALCULATE ANGULAR VELOCITIES

l

Omegaad_Alphaad*T

-lwDeltatheta

I_$_ Omegaab-R*Omegaad*SIN(Theta3-Theta4}/(L*SIN(Theta3-Theta2)) Omegabc-(Omegaad*R*SIN(Theta4)-L*Omegaab*SIN(Theta2))/(L*SIN(Theta3))

• 980 t

• 990 l CALCULATE ANGULAR ACCELERATIONS

• lOOO !

• 1010 Numl-R*Alphaad*SIN(Theta3-Theta4)-R*(Omegaad^2)*COS( Theta4-Theta3}+L*(

megaab^2)*COS(Theta2-Theta3}+L*(Omegab¢^2)

020 Alphaab-Numl/(L*SIN(Theta3-Theta2))

1030 Num2-Alphaad*R*SIN(Theta4)+Omegaad^2*R*COS(Theta4)-Omeg abc^2*L*cOS(The

ta3)-Alphaab*L*SIN(Theta2)-Omegaab^2*L*COS(Theta2)

1040 Alphabc-Num2/(L*SIN(Theta3))

CALCULATE CENTER OF MASSES ACCELERATIONS

1050

1060

IboTo

1080

1090

1100

1110

1120

_.13o

1140

1150

1160

1170

Accelbx=-l*Alphabc*L*SIN(Theta3)-Omegabo^2*L*COS(Th eta3 )

Accelby-Alphabc*L*COS(Theta3)-Omegabo^2*L*SIN( The!a3 )

Accelax--l*Alphaad*R*SIN(Theta4)-Omegaad^2*R*COS(Th eta4)

Accelay-Alphaad*R*COS(Theta4)-Omegaad^2*R*SIN(Th eta4)

Acceltlbx-Accelbx/2

Acceltlby-Accelby/2

Accelfemx=Accelbx-Alphaab*L*SIN(Theta2)/2-Omegaab^2*L*COS(Theta2)/2

Accelfemy-Accelby+Alphaab*L*COS(Theta2)/2-Omegaab^2*L*SIN(Theta2)/2

Accelbodx=Accelax/2

Accelbody=Accelay/2
I

|1210 READ A(*)

1220 A(3,3)mLeABS(SIN(Theta3))

1230 A(3,4)--I*L*ABS(COS(Theta3) )

11_2ii A(6,1)-L*ABS(SIN(Theta2)} A ( 6,2 ) -_I*L*AP 3 (COS (Theta2) )

A(9,1)- I*ABS(R*SZN(Theta4) )

|1270 A(9,2)--I*ABS(R*COS(Theta4) )

|1280 B (1) -Mtlbla*Acceltlbx

|1290 B(2)-Mtlbta*Acceltlb¥+Mtibia*G

B ( 4 ) -M fomur*Acceltemx

1320 B(S)-Mfemur*Accelfemy+Mfemur*G

1330 B(6)-Ifemur*Alphaab+Mfemur*G*Flen*COS(Theta2)/_

1340 B(7}-Mbody*Accelbodx

1350 B(8)-Mbod¥*Accelbod¥+Mbod¥*G

_60 f(9)-Ibody*Alphaad-Mbody*R*COS(Theta4)/2

1380 CALL Gausm(N,A(*),B(*),X(*))

1390 !

1400 Power-X(9)*Omegaab

1410 Hp-Power/550

1440 |

1450 END

1460 :

1470

1,48o

lq90 !

STOP PROGRAM

SUB Gauss(N,A(*),B(*),X(*))

1500 i THIS SUBROUTINE PERFORMS GAUSSIAN ELIMINATION

i1510 !

1520 OPTION BASE 1

1530 _

_540 FIRST, REPLACE THE LAST COLUMN OF THE A MATRIX WITH THE

_50 J B MATRIX

1560 !

i1570 FOR I-i TO N

1580 A(I, lO)-S(I)

1590 NEXT I

1600 !

_10 FOR K_I TO N-1

1620 JJ'K

1630 Btg-ABS (A(K, K) )

1640 Temp2-K+l

1650 FOR I-Temp2 TO N

1660 AbmABS(A(I,K))

170 IF Big-Ab<0 THEN

1680 Big=Ab

1690 Jj =I

1700 END IF

1710 NEXT I

1720 IF JJ-K<>0 THEN

_30 FOR J:K TO N+I

1740 Temp:A(Jj,J)

175o A(Jj, J ) -A (K, J)

1760 A(K,J)-Temp

1770 NEXT J
1830 NEXT 3

t84o NEXT z

'm1850 FOR I-Tamp2 TO N

1860 A(I,K)-O.

1870 NEXT I

1880 NEXT K

1890 X (N)-A (N, N+I)/A (N,N)

1900 FOR Nn-1 TO N-1

1'1910 Su=l-0

1920 I-N-Nn

1930 Zpl-I+l

1940 FOR J-Ipl TO N

1950 Suml-Suml+A (I, J) *X (J)

960 NEXT J

970 X(I)-(A(I,N+I)-Suml)/A(I,I)

1980 NEXT Nn

1990 SUBEND

2000 2010

i. o2o t

1 o3o

12o40 12050 1

12o60 !

/ 2070

2100

2110

2120

2130

140

150 !

2160

2170

2180

2190

2200

Q21o

2220

2230

2240

2250

2260

Q27o

2280

2290

2300

2310

2320

Q330

2340

2350

2360

2370

SUB Prlntmat (Array (*))

THIS SUBROUTINE PRINTS OUT THE INPUT MATRIX

OPTION BASE 1

FOR Row-BASE(Array, I) TO SIZE(Array,!)+BASE(Array, I)-1

FOR Column-BASE (Array, 2) TO SIZE (Array, 2 )+BA_E (Array, 2 )-2

PRINT USING "DDD. DD,XX, #" ;Array(Row,Column}

NEXT Column

PRINT

NEXT Row

SUBEND

!

SUB Invar(Mfemur,IEemur,Flen,Mtibla,Itibia,T1en,R,Mbody, Ibody)

!

! THIS SUBROUTINE DETERMINES THE INERTIA FOR THE VARIOUS MEMBERS

! ABOUT THEIR AXES

!

Ifemur-.0252+Mfemur*(Flen/2)^2

Itibla-.01495+Mtibla*(Tlen/2)^2

!

! IBODY IS DETERMINED ASSUMING THE BODY OF SKITTER IS SPHERICAL

! AND THAT THE LEGS DO NOT CONTRIBUTE SIGNIFICANTLY TO THE INERTIA

!

:bodym2*Mbody*(9.16/12)^2/5+Mbody*((15.194/12)^2+(20.9817/12)*2)

!

! RETURN TO PROGRAM

!

SUBEND

l

!

SUB Findthetas(Ri,R2,R3,R4,Theta2,Theta3,Theta4)

!

! THIS SUBROUTINE FINDS THE OTHER JOINT ANGLES GIVEN ONE ANGLE
i II

I oR^

2400 L_SQR (RI^2+R2^2-2*RI*R2*COS (PI-Theta4))

2410 Beta-ACS ((RI^2÷L^2-R2^2) / (2*RI*L))

2420 PsI-ACS ((R3^2+L^2-R4^2}/(2*R3*L} }

2430 Lamda-ACS ( (R4^2+L^2-R3^2 }/ (2*R4*L} }

I_440 IF Theta2--l* (PI-Theta4)>-O(Psi-Beta} AND (PI-Theta4}<-PI THEN

2460 Theta3-Pl- (PI-Lamda-Beta }

2470 ELSE

2430 Theta 2-- i* (Ps i+ Beta )

90 Theta3-Pl- (PI-Lamda+Beta)

O0 END IF

10 !

20 ! RETURN TO PROGRAM

2530 !

2540 SUBEND
0D