1994 Afstudeerverslag IPO

92
t(i3 TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde & Informatica AFSTUDEERVERSLAG Tactile Fields and Target Acquisition in the User Interface door Guido Leenders augustus 1994 Afstudeerdocent dr. L.J.A.M. Somers Technische Universiteit Eindhoven Begeleider M.Sc. D.V. Keyson Instituut voor Perceptie Onderzoek

Transcript of 1994 Afstudeerverslag IPO

Page 1: 1994 Afstudeerverslag IPO

t(i3 TECHNISCHE UNIVERSITEIT EINDHOVEN Faculteit Wiskunde & Informatica

AFSTUDEERVERSLAG

Tactile Fields and

Target Acquisition

in the User Interface

door

Guido Leenders

augustus 1994

Afstudeerdocent dr. L.J.A.M. Somers Technische Universiteit Eindhoven

Begeleider M.Sc. D.V. Keyson Instituut voor Perceptie Onderzoek

scaniv
Text Box
Page 2: 1994 Afstudeerverslag IPO

Abstract

The research discussed in this thesis was aimed at the extension, both in width and depth, of the knowledge on tactile feedback as an information channel for user interfaces. A trackball was used as a research tool. This trackball had been extended by an electrical motor on each axis as a mean of transporting tactile information. Three areas were studied: modelling the tactile feedback as produced by the input device, effects of tactile target forms and force levels in target acquisition, and effects of an interfering target, visual workload and relation between input device movement and displayed movement (DC-gain).

Tactile fields were modelled based on gravity and friction functions. Results from experiments indicated that the addition of tactile feedback can decrease time for target acquisition tasks of approximately 900 ms by 150 ms, dependent on tactile type and strength. This gain is composed of decreases in both reaction time and movement time towards the target. Reaction time seems to have decreased through a more simple relation between stimulus and response, whereas the decrease in movement time for tactile feedback was contributed to the awareness of subjects that tactile feedback would catch the pointer inside the target. The performance improvement for tactile feedback in time for target acquisition was found to be reduced by the presence of an interfering target and increased visual workload. The performance improvement by the introduction into a visual target acquisition task with constant DC-gain of tactile feedback and variances in DC-gain, based upon the muscular effort associated with the tactile feedback, was shown to be independent of the employed fixed DC-gain.

Keywords: tactile feedback, navigation, user interface, models, target acquisition, DC-gain, con­textual DC-gain, interfering targets, workload.

Page 3: 1994 Afstudeerverslag IPO

Contents

1 Introduction 1.1 Organisation ............... . 1.2 Available Hardware and Knowledge Base 1.3 Problems and Approaches . . . . . . . . .

2 Hardware Description 2.1 IPO-trackball .... 2.2 Force Measurement Device

3 Software Description 3.1 Introduction . . . . . . . . . . . . . . . . . 3.2 Limitations of OOP with Borland Pascal . 3.3 Modules . . . . . . . . . . . . . . . . . . . 3.4 User Interface Class Hierarchy Motivation

4 Models for Tactile Fields 4.1 Introduction ..... 4.2 Literature Overview 4.3 General Model . . 4.4 Subspaces . . . . . 4.5 Desktop Subspace 4.6 Heights . . . . . . 4. 7 Static Graphical Subspace Representation 4.8 Negative Friction 4.9 Conclusions ................. .

5 Performance Effects of Type of Tactile Feedback 5.1 Introduction ..... 5.2 Literature Overview . . . . . . 5.3 Field Study . . . . . . . . . . . 5.4 Description of the Experiment . 5.5 Data Collection . 5.6 Results . . . 5.7 Discussion . 5.8 Conclusions

6 DC-gain, Interfering Targets and Visual Workload 6.1 Introduction ..... 6.2 Literature Overview ..... . 6.3 Goals ............. . 6.4 Description of the Experiment . 6.5 Data Collection . 6.6 Results . . . . . . . . . . . . . .

1 1 1 2

5 5 7

11 11 12 13 17

19 19 19 21 22 22 23 24 24 25

27 27 28 29 29 32 32 34 38

39 39 39 43 44 48 48

Page 4: 1994 Afstudeerverslag IPO

II CONTENTS

6.7 Discussion . . 52 6.8 Conclusions 54

References 57

A Tactile Fields 61 A.l Constants 61 A.2 Functions 62

B Analysis of Variance 65 B.l Introduction . 65 B.2 Definition .. 65 B.3 Notation ... 66 B.4 Requirements 66

c Source code 67 C.l Expl.pas 67 C.2 Exp2.pas 70 C.3 LihglO.pas . 77 C.4 LibvarlO.pas. 79 C.5 LibuilO.pas 81 C.6 Convgraf. pas 86

Page 5: 1994 Afstudeerverslag IPO

Preface

This report describes my graduate project at the Institute for Perception ResearchfiPO ('Stich­ting Instituut voor Perceptie Onderzoek'). The IPO constitutes a cooperation between Eindhoven University of Technology (BUT) and Philips Research Laboratories, Eindhoven. The initial as­signment was to develop and test an application for a trackball with contextual tactile feedback, developed at the IPO. This trackball can influence the movements of the ball by means of two electrical motors to inform the user of events.

However, soon after the start of this project it became clear that this project was not feasible, unless some preparatory studies were completed. During my time at the IPO two experiments were conducted to consider in depth the performance implications of the application of tactile feedback in target acquisition tasks.

In chapter 1 an introduction and some background is given. Chapter 2 and 3 discuss the hardware and software used for the experiments. Chapter 4 provides a mathematical model for describing and implementing tactile feedback. This model is used to model the tactile feedback tested with the experiments described in chapters 5 and 6. These experiments tested the perfor­mance effects of various types of tactile feedback and various aspects of user interfaces, such as the presence of an interfering target. The appendices give a mathematical description of the tactile fields tested, an introduction to analysis of variance and the source code to the programs used to run the experiments.

I would like to thank the IPO and BUT for this great opportunity to merge computer-science, experimental psychology and human factors into one synergetic approach towards user interfaces and input devices. This thesis could not have been written without the continuous support of David Keyson and Lou Somers. Several other people supported the work in various fashions: Don Bouwhuis, who reviewed my complete thesis; Cynthia Grover, who enthousiasticly reviewed the second experiment; Aad Houtsma, who advised me on the collection and interpretation of subjective measures; Don Bouwhuis, who also advised me on the complete design of the second experiment and especially on the design of the visual search task; Teddy McCalley, who reviewed the discussion and conclusions sections; Scott MacKenzie, who advised me on applications of Fitts' law; Jim Juola, who advised me on the visual search task of the second experiment; Bob Solso, who reviewed the design of the second experiment; Rudi van Hoe from whom I learnt more about statistics than I ever knew before; Rudi van der Made and Paul Beerkens with whom I discussed my experimental designs from an engineering view; Jane Boulton, who advised me for the explanation of an unexpected trend; Marielle Leenders, who advised me on the force measurement method, and Tanja Middelkoop who gave the necessary support at the home-front.

Guido Leenders, August 1994

III

Page 6: 1994 Afstudeerverslag IPO

Chapter 1

Introduction

In this chapter a short introduction to the research on tactile feedback will be given. Tactile feedback is a process by which information about the results of an action are communicated through the tactile senses. The tactile senses are located in the skin and contain receptors for vibration and pressure on the skin (Krueger, 1982). Common examples of tactile feedback include a felt click in switches and the feeling of a door handle after the hand was laid on it. Tactile feedback is often accompanied by proprioceptive feedback, which communicates the position of the body in space, based on receptors in muscles, tendons, joints and the vestibular system. Sometimes a differentiation is made between two types of touch perception: haptic and tactile perception. Haptic perception refers to exploratory touching objects, whereas tactile perceptions is caused by objects moving along touch senses, which are held at a fixed position.

In the first two sections the institute and the available hardware-base for tactile research inside the institute are discussed. In the third section the problems and the approaches are stated. No theoretical background is given in this chapter. Each major topic in this thesis includes a separate literature overview where all theoretical backgrounds, necessary to understand the topic on hand, are discussed.

1.1 Organisation

The foundation Institute for Perception Research/IPO ('Stichting Instituut voor Perceptie On­derzoek') constitutes since 1957 a cooperation between Eindhoven University of Technology and Philips Research Laboratories, Eindhoven. Within the Research Laboratories, the IPO forms part of the Information & Software Technology Division. On the EUT side, the institute resides under the Perception Studies Department of the Faculty of Philosophy and Social Sciences. Around 100 people work at the IPO.

In general IPO research is concerned with sensory and cognitive information processing and communication by humans interacting with flexible information systems. There are six (overlap­ping) main streams in IPO research: hearing and speech, vision, cognition and communication, language, information ergonomics and communication resources. The first four streams are dis­cipline groups. They study questions derived from gaps in existing knowledge. Their aim is to develop and broaden theories. The last two streams apply knowledge from the discipline groups to questions from practical fields and consider possible applications for existing know-how. Research on tactile feedback is conducted inside the cognition and communication stream.

1.2 Available Hardware and Knowledge Base

The IPO has made available three PC-based systems for tactile research. Two PCs are each connected to a two-dimensional trackball with force feedback and one PC is connected to an one­dimensional turning-knob with force feedback for research on movement-prediction. The trackball

1

Page 7: 1994 Afstudeerverslag IPO

2 CHAPTER 1. INTRODUCTION

Figure 1.1: The trackball with contextual force feedback. A slightly modified version of the depicted trackball was used for the experiments.

(depicted in figure 1.1) is built of standard components, except that for force feedback two electro­motors have been attached along the x- and y-axis. These electro-motors can influence the actions of the user. For example, a user might experience a dip when the pointer passes an icon in a graphical user interface. The turning-knob gives force feedback by a motor, attached on the knob axis.

The main goal of the research on the tactile senses is to study the influence of tactile feedback on user interface navigation. User interface navigation consists of low level aspects, such as pointer movement, and high level aspects, such as an internal model of the interface's workings. Two research themes are currently being addressed (Keyson, 1994):

• How can movements in the user interface be assisted efficiently by tactile feedback during one or more tasks?

• How can tactile information be used to build a spatial and contextual understanding of the workspace?

1.3 Problems and Approaches

The research, described in this thesis, tackled three issues to advance research involving the IPO­trackball. The issues were addressed in the following order:

Design of models: A model was designed to simplify communication and reproduction of all types of tactile feedback that the IPO-trackball can generate. Two models were developed. The general model captured all possible types of tactile feedback by enumeration over the mechanical attributes of the IPO-trackball. The subspace model simplified design and com­munication further, while being able to express only part of the types of tactile feedback that can be described by the general model.

Performance eff~c;ds of different types of tactile feedback: It was determined whether different types of tactile feedback have a different influence on performance in target acquisi­tion tasks. A target acquisition task is a task where the user has to select items on the screen (such as icons). The influences of both strength and shape of tactile feedback on objective performance and user satisfaction were investigated. This was accomplished by an experiment which took the shape of a target acquisition task.

Performance effects of DC-gain, interfering targets and visual workload on tactile and visual performance: The relation between motoric and displayed movement (DC­gain), the presence of an interfering target and visual workload were considered as potential

Page 8: 1994 Afstudeerverslag IPO

1.3. PROBLEMS AND APPROACHES 3

candidates, which might cause invalidation of experimental results for application in user interfaces. The presence and size of these effects in a target acquisition task were studied for the visual-only condition, the combined tactile/visual condition and their interaction.

Page 9: 1994 Afstudeerverslag IPO

4 CHAPTER 1. INTRODUCTION

Page 10: 1994 Afstudeerverslag IPO

Chapter 2

Hardware Description

2.1 IPO-trackball

The complete hardware environment used to develop and run applications with the IPO-trackball consists of the following components {depicted in figure 2.1):

• a PC,

• a RTI 815 I/O-card,

• a Quadrature I/O-card,

• an amplifier and

• an IPO-trackball.

The PC is an off-the-shelf PC with !SA-bus, including VGA-card and colour monitor. Two I/O-cards have been added to enable two-way communication with the trackball. A RTI 815 I/O-card is included to convert the digital motor currents into the appropriate analog equivalents for both x and y direction. Another function of this card is to transport the status of the button. The button is located at the bottom-left of the cover, making the system only applicable for right­handed users. The (low power) analog motor current from the RTI card is fed to an amplifier, whose output is connected to the motors located along the x- andy-axis of the trackball (a detailed picture is shown in figure 2.2). Two wheels with rubber rings transport the motor movement to the ball. Changes in the position of the ball are sensed by two optical sensors, located on the shaft of the motors. These sensors have a resolution of approximately 1060 dpi (dots per inch).

An alternative design is available, using two separate optical sensors instead of the support wheels. This design decreases the device's sensitivity for slip between the driving shaft and the trackball. The alternative design uses also a Teflon surface to reduce the effect of irregularities in the movement, caused by the bearing which is underneath the ball in the used design. However, both the static and dynamic friction (respectively, friction to overcome when starting a movement and friction felt during movement) are drastically larger for the alternative design. The alternative design was not used for the research described in this thesis since the profits of low friction were considered more important than the disadvantages of increased slip. Only a low friction level enables ballistic (throwing) movements of the ball.

The optical sensors generate a number of cycles proportional to the size of trackball move­ments. These cycles, indicating relative movements, are integrated into 24-bit absolute position coordinates by the Quadrature I/O-card. The current position can be read by the CPU at any time. This mechanism does not require interrupt-handlers, thereby eliminating disturbances in the real-time behaviour of the system.

For each motor a. feed-forward circuit is implemented within the amplifier-casing to reduce the induction current from hand-induced ballmovements which increase the experienced friction

5

Page 11: 1994 Afstudeerverslag IPO

6

position x y '

(digital)

PC

buttonstatus

(digital)

motorcurrents x, y

(digital)

CHAPTER 2. HARDWARE DESCRIPTION

position changes x, y

Quadrature

I/O-card

RTI &15

UO-card

motorcurrents x, y

(analog)

(digital)

buttonstatus

(digital)

Amplifier

Trackball

motorcurrents x, y

(analog)

Figure 2.1: The components of the system used to develop and run applications with the IPO­trackball.

rubber ring

motor

suppon wheel

button

Figure 2.2: Detailed picture of the trackball.

Page 12: 1994 Afstudeerverslag IPO

2.2. FORCE MEASUREMENT DEVICE 7

Newton-meter

force

Figure 2.3: A device to measure the force on the surface of the trackball.

when moving the ball. These circuits can be adjusted individually. Ideally, these feed-forward circuits will eliminate the induction current completely (Moolhuysen, 1991). However, the current design only allows for partial compensation, since total compensation at low ball speeds creates overcompensation ("stampede") at high ball-velocities.

2.2 Force Measurement Device

To measure the force on the surface of the trackball a force measurement device has been designed (depicted in figure 2.3). It consists of a precision Newton-meter and a small iron frame, attached to the trackball-device and the Newton-meter. A special ball with a small hole is required to perform the measurements. It can only be used offline, i.e. when nobody is interacting with the trackbalL

Before this device was built, the actual force on the surface of the ball was unknown. It was not possible to calculate the force from the few known constants of the input-device since documentation was lacking and non-linear effects occurred. Two important reasons for the actual force to be measured were:

• reproduction of tactile feedback between experiments and

• communication of findings on tactile feedback towards people without access to the IPO­trackball.

A method was developed to derive a formula for the force, generated by the motors, on the surface of the ball, given the digital output force. This method requires a large number of measurements with this device.

The method assumes a linear relationship between the force on the ball and the digital output. This assumption has been verified by analysis of the measurements, indicating a reasonable fit of the measurements to a linear function with a correlation coefficient of 94.6% and significance smaller than 0.01 %. However, the size of systematic errors remains unknown and should be studied. The method consists of the following steps for the motors on both axes:

Page 13: 1994 Afstudeerverslag IPO

8 CHAPTER 2. HARDWARE DESCRIPTION

pin

Figure 2.4: Position of the pin before a measurement.

Foroe (mN} 550.

500

450

400

350

300

250.

200

150

100

50

0 I I I

0 50 100 150 200 250 300 350 400 450 500 550

Digital output (-)

Figure 2.5: Plot of a possible table of measurement results.

• Before attaching the force measurement device to the trackball and replacing the ball, the static friction ko along the axis is measured. ko is measured as the average digital output value at which the ball starts to roll. k0 is reduced by 20 to obtain a safely low approximation, resulting in k1 .

• Next, the device is attached to the device and the ball is replaced by the ball with hole. For several digital output values several measurements each are made.

• At the start of each measurement a null value is output to the aropliaer. The ball is then rotated till the iron pin barely touches the edge of the hole on the opposite side as the movement ·will be directed at (figure 2.4). Next, a known value d, increased by k1, is output. After two seconds, the known value d and the value f on the Newton meter are registered.

• From the final table of tuples (d, f) (an example is shown in figure 2.5), all entries with f 0 are eliminated. Otherwise, these items will influence the fitting of the table to a linear function.

• This table is then matched to a linear function f = r * (d - k2 ) using linear regression. Generally, the measured static friction k2 is larger than k0 . This increase in static friction is caused by the addition of the force measurement device.

Page 14: 1994 Afstudeerverslag IPO

2.2. FORCE MEASUREMENT DEVICE 9

• The function is then translated along the x-axis by -20 - k2 to obtain a new function. This relation describes ball force in mN as a function of digital output value, relative to kt = ko- 20.

The difference between dynamic and static friction is neglected in this method. A necessary and sufficient assumption is that dynamic friction is equal to a constant times the static friction. Replication is achieved by measuring the static friction k1 of the IPO-trackball when starting an application and applying the mentioned relation. Correct replication is guaranteed since the usage of a different reference point than k1 during measurements and the running of applications results in an equal force on the ball.

However, communication might be hindered, since the actually experienced forces might be higher when in motion. Lacking knowledge, this calls for further study. Given the assumption, all forces actually experienced are a constant larger than the forces based on a static friction reference point. In the forthcoming, communication of force levels will be based on a static friction reference point.

Page 15: 1994 Afstudeerverslag IPO

10 CHAPTER 2. HARDWARE DESCRIPTION

Page 16: 1994 Afstudeerverslag IPO

Chapter 3

Software Description

3.1 Introduction

Several researchers (Moolhuysen, 1991; Goossens, 1992; Keyson & Houtsma, 1994) worked with the hardware setup described in the previous chapter. The software development took place using the Borland Pascal development environment (Borland, 1992) under MS-Dos. These researchers developed or bought several software modules. They applied an object oriented approach (for an introduction into object oriented programming refer to (Robson, 1981; Meyer, 1988; Meyer, 1992; Cox, 1986)), but the degree of adaptation towards the concept of OOP varied. The same development environment was used for the work described in this thesis.

The development of experiments takes a magnitude more of iterations over the development­phases than conventional software, since a complete functional specification has to be found by testing. Conventional methods, such as the waterfall-method, do not excel in support for such a development-trajectory. Instead, a less structured method has been applied, consisting of three stages/ documents:

• a short requirements document, containing the hypothesis to be tested,

• a precise description in natural language of the experimental setup and

• an implementation conforming to the description.

To increase ease of adaptation of the implementations towards updated requirements, a strict coding scheme, requiring modular programming, and strict usage of the key principle "avoid du­plication of constants" were combined with au OOP (object oriented programming) approach. An effort was made to combine the potential benefits of OOP with the limitations of the im­plementation of this concept in Borland Pascal. These limitations will be discussed in the next section.

Historically, the software was divided over several modules (depicted in figure 3.1}. Several elements of these modules are redundant. However, the modules have not been revised since all future development wilJ take place in a C++ environment. This decision was made because of

• the advantages of C++ over Borland Pascal for the development of object-oriented software and

• the higher speed of C++ executables.

For the design and evaluation of the experiments described herein, several new modules and object-definitions have been added on top of this set of modules. All new modules have been named 'LIBname'. In section 3.3, the relevant parts of the set of modules and the objects they define will be discussed. The source code is listed in appendix C.

11

Page 17: 1994 Afstudeerverslag IPO

12 CHAPTER 3. SOFTWARE DESCRIPTION

Experiment

I

I I I LIBVAR LIBG LIBUI

I I I

Leg en da l!~;:,j INP_DEV3

D newm odule "' D oldmodule

[J bought module

Figure 3.1: New and old modules used for the development of the experimental software.

3.2 Limitations of OOP with Borland Pascal

Borland Pascal and its predecessor, Turbo Pascal with Objects, are not particularly well suited for OOP programming, as was already motivated by Leenders et al. (1992). The prime concepts of OOP, encapsulation and inheritance, are hindered by several limitations of Borland Pascal. C++, another commercially available language, designed by Stroustrup (1986), places less limitations on OOP programming. Since both have a large installed base, the limitations of Borland Pascal over C++ will be discussed.

Some might argue that an OOP approach can not be hindered by the choice of implementation language, since the design is independent of programming language. Even when a language must be used which only implements part of the necessary support for OOP, it is beneficial to use an object­oriented design. However, the program code is the ultimate embodiment of the specification, so the way in which it is written is important for maintainability and extensibility. It requires greater care and discipline to preserve the object-oriented structure of the program when the language has only small or no support for OOP. Also, the language does not support the programmer in finding violations (Rumbaugh et al., 1991). The following disadvantages can be noticed for the implementation of an OOP design when considering the limitations of Borland Pascal, compared to C++:

• No overloading of operators: operators such as'+' and '>'can not be assigned new functiona­lity when applied to classes such as matrices or complex numbers. This leads to the addition of methods to these classes, hindering readable functional programming. An expression on complex numbers, such as

would have to be coded in Borland Pascal as

cl.multiply( c2.im).

Page 18: 1994 Afstudeerverslag IPO

3.3. MODULES 13

Even more restrictive is the lack of possibilities for overloading when operations such as writing to streams are considered. To write a complex number and a string to a stream, C++ employs a construct such as

stream << c1 << sl

with the << operator representing the output of a type on a stream. However, the same functionality can only be achieved in Borland Pascal by:

cl. write( stream); sl.write(stream);

or

stream.write(cl.string_representation).write(sl.string_representation)

• No automatic conversion between classes: Borland Pascal offers no functionality to enable automatic conversion between new classes. The C++ expression

rl.Im(cl)

with rl a real and c1 a complex number would be coded in Borland Pascal as

ReaLTo_Complex(rl).multiply(cl.im).

• No multiple inheritance: Pascal offers no functionality to easily combine a class for linked lists with a class for complex numbers into a class for linked lists of complex numbers.

• No automatic initialisation and destruction when coming into focus: objects within Borland Pascal need to be initialised and destroyed manually. Neglecting to do so can be the cause of irritating and hard to find bugs and memory leaks.

Of course is C++ not a complete implementation of the OOP concept. For example, it lacks aspects such as garbage collection, class variables and passivation/activation (dumping and re­trieving objects to files) which can be found, for example, in Eiffel. A practical study of the OOP approach in several high level languages, including C++, Eiffel, Turbo Pascal and Ada, is discussed by Floyd (1993).

3.3 Modules

The software is distributed among several modules. The classes defined by these modules are depicted using the Object Modelling Technique (OMT}. In OMT, classes are represented by boxes. Lines represent relations between classes. The class name, its (derived) attributes and methods are listed in the box. A complete description of this method is given by Rumbaugh et al. (1991). The modules written for this thesis have been named 'LIBname', whereas the older modules are named 'INP ..DEV3' and 'PCR-SUP'. The description of a small conversion tool is included in the following discussion of these modules:

LIBG10: This module implements various useful routines, such as conversion between various number formats and their string representations, and arithmetic functions. All these function are implemented in a way which is not OOP conform, since a handy OOP-implementation requires overloading of operators which is at present not available for Borland Pascal. The source code can be found in appendix C.3.

LIBVAR10: Four separate object classes are defined in this module: Log, Timer, Image and Tactile Mem (figure 3.2). Their functions are as follows:

Page 19: 1994 Afstudeerverslag IPO

14 CHAPTER 3. SOFTWARE DESCRIPTION

TactileMem Log

Memory: array

Init Init(Name)

Done Done

Assign(x,y ,TactCon,Fx,Fy) Log( txt)

Get(x,y): TactCon,Fx.Fy Flush

Image Timer

Image: record Elapsed: real

Width: integer Split Time: real

Height: integer I nit

I nit Done

Done Reset

Drop Start

Get(x l,y l,x2,y2) Stop

Put(x,y,BitBit)

Save(f: file)

Load( f: file)

Figure 3.2: The OMT representation of the Log, Timer, Image and Tactile Mem classes. They are defined in the LIBVAR10 module.

Page 20: 1994 Afstudeerverslag IPO

3.3. MODULES 15

Log: this class defines an interface for the handling of log files.

Timer: a normal PC software timer has a resolution of circa 55 ms, which is too imprecise for the collection of data on movement time. This class implements a timer with a resolution smaller than 1 microsecond and is based on code from the SWAG-collection. Functions are available for resetting (Reset), starting (Start) and stopping the timer (Stop). If the timer is running, intermediate times can be determined using Split Timer. After the timer has been stopped, the total elapsed time is available through Elapsed.

Image: the creation (Get), handling (Put) and storage in files (Load, Save) of bitmap pictures is simplified by this class. A utility (CONVGRAF, discussed below) is available to convert graphics, matching a limited set of the PCX-standard (documented by Rimmer (1993)), into the custom format used by this class. This class is based on code from the SWAG­collection.

Tactile Mem: this class was created to increase the frequency with which the position of the trackball can be read and the tactile feedback can be updated. An increase was necessary to avoid oscillation problems with the trackball-device. Oscillation occurs when the motor force changes much repeatedly and rapidly. The class enables the storage (Assign) and fast retrieval (Get) oftactile force fields. This is implemented by calculating the tactile force vector required for every discrete position inside every possible target and storing these values in an array. Retrieval of the tactile forces is done by look-ups instead of computational extensive operations. Tactile Mem was not integrated with the ur class since it is not generally applicable because of the 64 Kb limit on the size of segments.

LIBUI10: The user interface with all its I/0 aspects, such as pointer and keyboard input, and visual, audio and tactile output, is handled by this module. The hierarchy of the interface is depicted in figure 3.3. This hierarchy was designed to ensure that the natural view on user interfaces was combined with an elegant interface towards the applications. A complete motivation for the chosen hierarchy is given in the next section.

The user interface consists of an aggregation of classes across several levels into the Ul class. The first level below the UI class is made up of input devices (Keyboard, Pointer) and output devices (Tactile, Audio, Visual). These classes and their children will be discussed next:

UI: the interface is initialised by Init which takes the pointer type as an argument. Two pointers are available: a small square for experiments with two-dimensional screen layout and a rectangle with small width and large height for experiments with one-dimensional screen layout. Callback functions are provided by the Pointer and Tactile classes for updates of the screen pointer position and the tactile feedback. These allow the experimental software to control directly the relation between motoric movement and the screen pointer position and the tactile feedback. These callback functions are activated after the function Update Pointer And Tactile notices a trackball movement.

Keyboard: the Keyboard class only offers functionality for delaying until a key is pressed (Wait For Key).

Pointer: the screen pointer and its movement are implemented in this class. Besides regular functions such as switching the pointer on or off (Switch On, Switch Off) and position­ing (Warp To New Position), hooks are offered where user-supplied functions can be inserted. The relation between displayed and motoric movement can be influenced by the application using Set Gain Function and Set Contextual Gain. A function can be supplied (Set Update Target Function) to calculate which target is currently un­derneath the pointer. Finally, a function is available to activate these callback functions {Update). Two classes have been aggregated into this class:

Button: indicates the status of the button through Pushed.

Page 21: 1994 Afstudeerverslag IPO

16 CHAPTER 3. SOFTWARE DESCRIPTION

!

Keyboard Input I Ul Audio Output

Is Off: boo!

lnit 0 lnii(Pointtr type) A Current Frequency: real i

v Done

I Done Swi11:h: {off. on}

Wait ForKey Update Pninter And Tactile Stored Stations: array

I !nil( Address)

Done

t

Set Audio(Vol, Bal. Treble, Bass)

l Set Fn:quency(Fn:q)

Store Station(Nr, Fn:q)

Tactile Output Pointer Input Select Station(Nr)

Is On: bool Swill:hOff

I nit X position: int Swill:hOn

Done Y position: int

Set Function X(l) Last Move X: int

Set Function Y(l) Last Move Y: int

l Get Force X(d,x,y): int Rerum Pos: position

Get Force Y(d,x,y): int lnit(Type)

Update Force(dX, dY, X, Y) Done Visual Output

I Switch Off

Switch On I nit

Warp to New Position(Pos) Done

Motor Output Set DC Gain X( Gain) Clear

Static Friction X: int Set DC Gain Y(Gain) Draw Centered Box X(x,w)

Static Friction Y: int Update Draw Centered Box XY(x,y,w,h)

lnit Set Contextual Gain(Type) o- Draw Box XY(xl,yl,x2,y2)

Done Set Gain Function(fx,fy) Save Stare

Set Force X(Fx) Set Update Target Function(!) Restore Slate

Set Force Y (Fy) 0 Set Color(i)

Calibmtellterations) Set Fill Color(i)

I Out Text XY(x,y,txt}

Out Text XY Righl(x,y,txt}

Buuon Input Out Text XY Right Erase(x,y,txt}

Input Devlee (INP _DEV3) Pushed: bool Out Text XY Center(x,y.txt)

Is Button Down: bool 0 !nit Fill Ellipse(x.y,rx.ry)

Get Ball Position X: int Done Not Filled Ellipse(x,y,rx,ry)

Get Ball Position Y: int Circle(x,y,rad)

I nit

Read Position TrackbaU Input

Reset Force A X position: integer v

,___ Add Force(Fx,Fy) Y position: integer

Actuate Momrs I nit

, Read Push Button Done

Figure 3.3: The OMT representation of the class hierarchy of the user interface. The small diamonds indicate that an object from the class at the side of the diamonds is assembled of object(s) from the other class(es).

Page 22: 1994 Afstudeerverslag IPO

3.4. USER INTERFACE CLASS HIERARCHY MOTIVATION 17

Trackball: returns the current x- and y-position of the trackball through X position and Y position.

Tactile: tactile feedback is implemented by this class. It offers callback functions (Set Function X, Set Function Y), thereby enabling the application to freely shape the type and strength of the tactile feedback. The force in a certain position is returned by Get Force X and Get Force Y. Finally, a function is available to activate the callback function (Update Force). The motor control is done by the Motor class:

Motor: besides offering functionality for calibration of the static friction (Calibrate), it offers two functions to set the motorforce (Set Force X, Set Force Y). These two functions compensate static friction by enlarging the forces by a component of the static friction found during the calibration phase.

Audio: the Audio class integrates a radio I/O-card into the user interface. Operations on this radio include switching on or off (Switch On, Switch Off), the selection of a frequency (Set Frequency) and setting of audio parameters (Set Audio). It is possible to store stations (Store Station) and recall a previously stored station {Select Station).

Visual: this class covers several graphical primitives such as the drawing of circles (Circle) and text (Out Text XY). Included are methods that save (Save State) and restore (Restore State) the graphics state.

The Motor, Button and Trackball class rely on the Input Device class, defined in INP -DEV3, for correct low-level driver implementation.

INP -DEV3: INP -DEV3 and its child modules take care of the low-level calls to the trackball hardware. Its responsibilities include: setting the hardware-port such that a certain force is generated and reading the value of the position as indicated by the sensors on the trackball.

PCR..SUP: This module supports the low-level control of a radio-card. Initially, auditory feedback was chosen to be part of the research. Later, decision was made against auditory feedback, since auditory and visual feedback spread the workload over two modalities. A high visual workload was necessary to simulate a normal user interface where the emphasis is on visual feedback.

CONVGRAF: Although CONVGRAF is a program and not a module, it is discussed here since it is used in combination with the Image class. It is capable of converting graphics, matching a limited set of the PCX-standard, into the custom standard employed by the Image class. The program can handle only one bit deep (two colour) PCX-files with either none or runlength encoding and a ma.'<imum size of 640 pixels width and 480 pixels height.

3.4 User Interface Class Hierarchy Motivation

The hierarchy of the UI class was based on a natural view towards the user interface, combined with an elegant interface towards applications. The user interface is seen as composed of many input and output media. Possible input media are keyboards, pointing-devices such as mice and trackballs, and gesturing devices such as datagloves and touchscreens" A complete classification of input devices is given by Mackinlay et al. {1990), whereas Buxton (1986) demonstrates the various important aspects of input devices. All regular input devices are controlled by muscular movement. Output media include screens, speakers and tactile pads. Normally, output is given through the visual, acoustic or tactile modality·(respectively, sight, hearing and touch).

The only input media in the user interface for the experiments are the pointer, controlled by trackball movements, and the keyboard. Output media are limited to one audio device, one screen and one trackball with tactile output. Of course, many more attachments such as touch pads or support for multiple screens could have been added, but their addition was not necessary. Only when the need arose, a new input or output device was added. The user interface class was

Page 23: 1994 Afstudeerverslag IPO

18 CHAPTER 3. SOFTWARE DESCRIPTION

constructed in such a way that it is easy to add new devices, an approach also followed by the X Window System (Nye, 1988).

Several frameworks exist for the presentation of applications to the user, acceptation of input and invocation of functions (Dodani et al., 1989). Most frameworks separate the application's func­tionality {interior) from its appearance (exterior). Such an approach avoids massive code changes when the interface changes. A common framework is the model-view-controller framework which separates the interior (model) from the exterior (view). The controller manages communication between these two layers, driven by input of the user.

Since the software for the experiments tries to test hypotheses regarding such a user interface framework, the software must be able to control the framework itself. This hinders an implemen­tation of the user interface along a standard framework, such as MVC. It is even such that the model (functionality) of the application includes the view and control aspect.

Currently, the UI class integrates the input and output devices and does not take care of the control and view aspect. For example, the appearance of objects and the movement of the visual output of the pointer are controlled by the software using the user interface class. One might argue that the UI class is just a graphics package, providing the facilities to manipulate the basic elements of in- and output. However, it provides several possibilities for callback functions for updates of the visual and tactile output of the pointer. These callback functions, realising part of the controller, make the class more than just a graphics package.

Also, one might argue that a pointer is not an input medium. The relative position sensors and the button should be considered as input media instead and be made members of the user interface. However, the only part of the user interface influenced by this pointing and selection device is the pointer, so that the pointer and pointing device can be identified as one separate system that acts as an input device.

Another argument against this hierarchy is that the pointer normally is part of the visual part of the user interface. In this hierarchy, the pointer's position can be translated in parallel by all three output media into a signal in the appropriate modality. Another possibility could have been to insert the pointer class as a common child of these output media. However, it is the responsibility of the top layer of the user interface, and not of an output medium (view), to define the functionality of a pointing action (control), as is defined by the model-view-controller concept of SmallTalk.

Page 24: 1994 Afstudeerverslag IPO

Chapter 4

Models for Tactile Fields

4.1 Introduction

A general model was developed on unambiguous mathematical terms and physical foundations in order to systematically define and evaluate the tactile fields using subjective and objective human performance data. The model includes all known physical parameters of the IPO trackball which control and elicit the tactile feedback and includes dependencies based upon external forces such as hand pressure.

Theoretically the general model could have been based on haptic shape perception rather than mechanical attributes of the device, however there is a lack of empirically based data on the dis­crimination of static shapes for complete modellation. The available literature in general discusses the difference between active and passive touch and scanning directions (Gibson, 1962; Magee & Kennedy, 1980; Heller & Boyd, 1984; Heller et al., 1989). Some progress has been made on the discrimination of static objects (Kappers et al., 1992; Kappers et al., 1993). Furthermore, studies on haptic perception typically do not account for factors such as movement velocity which can influence perception of tactual forms.

While the general model can account for a large range of tactile fields, a submodel was derived to capture intuitive concepts, such as friction and gravity, in simple terms. Secondly, the submodel enabled the visualisation of the tactile fields. Thirdly, the submodel simplifies the integration of tactile feedback in the design of graphical user interfaces whereby objects can have multiple physical attributes (e.g., colour, roughness, and pitch) across modalities (e.g., visual, tactile, and auditory).

4.2 Literature Overview

A common approach in modelling tactile feedback is to represent the amount of tactile feedback as a gravity force, based on a function of pointer-position (Minsky et al., 1990; Atkinson et al., 1977). .

Minsky et al. (1990) used a heightmap to simulate different types of texture. Given a height map, and the cursor-position on this map, the tactile feedback was computed using gradients (figure 4.1). Tactile feedback was given in two dimensions, x andy, as the device was a joystick with force feedback. The computed two-dimensional force-vector F, based upon the height map,

19

Page 25: 1994 Afstudeerverslag IPO

20 CHAPTER 4. MODELS FOR TACTILE FIELDS

h

X

Figure 4.1: A plot of a heightmap and the gravity force for several positions. Extension to two dimensions is trivial.

can be described as

f = ( oh~; v), oh~~ y)) with

F : tactile feedback force h : heightmap x : current x-position y: current y-position

(4.1)

In addition to modelling the tactile forces of the device, the response of the human arm to radial (forward/backward) and tangential (left/right) motion was considered for an optimal representa­tion of perceived texture.

In the model presented by Atkinson (1977), tactile feedback was determined based on the position, using the three-dimensional Cartesian coordinate system. The device, 'Touchy Feely', consisted of a pyramid with four faces (tetrahedron) with shaft encoders and torque motors at each of the four vertices. Attached to the shaft of each motor is a take-up drum for a steel cable tied to a small ball at the centre of the pyramid. The operator grasps the ball and controls its position within the tetrahedron, while the computer controls the force on the ball via the torques on the motors.

The values from the four position sensors were translated into the three-dimensional Cartesian position. The three-dimensional tactile force vector was computed from the x, y and z-position and a mapping function. The computed tactile force vector was then mapped and communicated to the four motors. The used model for tactile feedback can be described by:

with

F = f(x,y,z)

F : force for tactile feedback x : current x-position y: current y-position z : current z-position

Atkinson also notes in his article that additional input-variables for the tactile force function f (e.g., velocity or time) can extend the range of possible feedback.

Page 26: 1994 Afstudeerverslag IPO

4.3. GENERAL MODEL 21

4.3 General Model

4.3.1 Device Characterisation

The IPO-trackball consists of a conventional trackball with two servo motors, positioned along the x- and y-axis of the ball, which generate tactile feedback. Two optical position sensors, one on each motor shaft, are used to monitor ball position. A PC is used to evaluate the information from the position sensors and control the servo motors. Altogether, the state of this device can be characterised by four scalars:

• The x- andy-position, expressed as rational numbers {R) using the metric scale. This can be noted as:

xEX yE y X,Y=R

• The total force exerted on the trackball along x- and y-axis, expressed in Newton using rational numbers. This two-dimensional force vector f is taken from the set of possible force vectors F, equal to R 2

. This force is equal to the addition of the force exerted by the motors (Fmotor} plus the force exerted by the user of the device (Fuser}·

In the sequel, the following conventions will be used:

• units such as Newton are to be understood implicitly,

• the x- andy-component of a force F will be noted as Fp, with p equal to 'x' or 'y',

• for both position (x and y) as force (F., and Fy} the upper-right quadrant is associated with positive values,

• ball position is identified with pointer position.

4.3.2 Model Derivation

The smallest spawning space S of all positions of the ball and forces on the ball is the Cartesian product of the domains of these:

S=XxYxF (4.2)

All possible states of the trackball are in Sand vice versa: if s E S, then s constitutes a possible state of the trackball.

The system (in this case a PC) can control only the force exerted by the motors (Fmotor) directly. Determination of x- and y-position is straightforward since the trackball is equipped with two independent position-sensors for the x- and y-axis. However, it is more difficult to determine the force exerted by the user (Fuser ), since it is not measured. Instead, Fuser has to be derived by physical formulas from knowledge inside the system. This knowledge should include, besides a mechanical model of the device, the previous x- andy-positions of the trackball and the Fmotor applied.

The tactile response of the system can be modelled by a function f that defines the general model for tactile fields generated by the IPO-trackball:

Fmotor = f(x, y, m}

with

x x-position y y-position m internal state of the system

(4.3)

Page 27: 1994 Afstudeerverslag IPO

22 CHAPTER 4. MODELS FOR TACTILE FIELDS

Figure 4.2: The relation between the general and submodel. The general model enables expression of tactile fields using a complete enumeration of all possible combinations of all known physical parameters. The submodel contains some of these tactile fields and none not also included in the general model.

m can hold older values of x, y and Fmotor• as well as the time at which these values occurred. Fuser•

velocity, acceleration and other derived measures present in m might also be used for determination of Fmotor·

4.4 Subspaces

The function f of equation 4.3 can easily be executed by a computer. However, a tactile feedback­class designer will have troubles interpreting and manipulating f To reduce the complexity of j, they should have the opportunity to work with (graphical representations of) subspaces of the space occupied by the model. These subspaces could be mapped into f Such interactions with simple subspaces allows designers to intuitively manipulate the tactile feedback, without losing the capability to manipulate fat the most complex level. This approach has the advantage that if more knowledge on tactile perception comes available, a new subspace can be added to the available subspaces. The subspace could take into account these new insights, without requiring a massive overhaul of the design-software.

4.5 Desktop Subspace

In the following, a simple and powerful subspace will be discussed. Its relation to the general model is depicted in figure 4.2. This subspace will be called the 'desktop subspace' since it is a simple subspace that can model the tactile properties of objects found on an office desktop. A similar approach has been used for the visual properties of the ViewPoint user interface of the Xerox Star (Smith, 1985; Johnson, 1987; Johnson et al., 1989).

The subspace can be graphically represented on a colour screen, as will be shown in subsec­tion 4.7. Another advantage of a submodel for tactile feedback, based on the desktop metaphor, is easy future integration with a visual user interface, also based on this metaphor. To reduce the number of variables involved in determining Fmoton the complex system state m will be replaced by the direction of ball movement d. This is possible since:

• Models for the design of graphical user interfaces in general separate the static design from the creation and destruction of objects (icons). Applications for a tactile user interface should take care of the creation and destruction 1 of tactile fields and should not rely for this on the definition of the tactile field.

1 Many relevant operations on tactile fields can be simulated by creation and destruction. E.g. movement of a tactile field is equal to the destruction of the tactile field and recreation at the new position.

Page 28: 1994 Afstudeerverslag IPO

4.6. HEIGHTS 23

• The major tactile forces are those created by gravity for heightdifferences ( Fgravity) and friction (Frriction)· dis a sufficient parameter for friction and gravityforce.2

• Strictly necessary dependencies of tactile fields on parameters only contained in m can be realised as described before.

When m is replaced by d, the function for motorforce becomes:

Fmotor = f' (X, y, d) · (4.4)

The gravity (Fgravity) and friction (Frriction) force can be be extracted from f', leading to two new functions f~ and iJ for, respectively, the gravity and friction force:

Fgravity=/~(x, y, d) Frriction=fJ(x, y, d)

The motorforce then equals3

Fmotor = Fgravity- Frriction

with

- J Frriction = Frriction * jdj ·

Note that

Fgravity + Frriction -:f. f' (X, Y, l) •

(4.5)

{4.6)

(4.7}

(4.8)

Please also note that the friction can be larger than the gravity force. Normally, the amount of friction is smaller than or equal to the sum of all other forces. If necessary, this restriction can be implemented. However, it increases the number of tactile feedback types that are described by the model, without increasing the difficulty of understanding the model.

4.6 Heights

Function f~ offers more freedom than the gravityforces possess as we experience them in ev­eryday life. For example, f~ can define a tactile field that rotates around an origin, as shown in figure 4.3. The complexity contained in this freedom is very hard to understand and interact with. A constraint is imposed on f~ to allow only gravity fields that can occur in everyday physics. A function h is introduced which maps coordinates to height:

h : X x Y --+ Z with Z in meters. (4.9)

Gravityforce Fgravity can be expressed as the gradient of the heightmap:

(4.10)

with c a constant (c ~ 0) representing the weight of the object whose gravityforce is calculated. The minus-sign is present since a positive gradient of the heightmap should create a negative force and vice versa.

20f course is texture another important parameter for tactile perception. However, it can be implemented by friction and gravity

3 Formula 4.6 does not capture the resulting function completely as will be explained in the forthcoming.

Page 29: 1994 Afstudeerverslag IPO

24 CHAPTER 4. MODELS FOR TACTILE FIELDS

t y

x-

Figure 4.3: A rotating tactile gravity field.

4. 7 Static Graphical Subspace Representation

It is trivial to represent the gravityforce as a static 3D-picture on a screen. The height-function uniquely determines the gravityforce using three dimensions. A visual representation might map the x and y-position on the x- andy-axes and h(x, y) on the z-axis. To enable easy visualisation of a complete tactile field, it is desirable that friction is included in the same picture. However, only colour is left as an easily perceived dimension, whereas friction requires three dimensions, namely those of J and fJ.

Since the scalar friction requires itself one dimension for presentation, the function for friction can only include x, y and h(x, y) as parameters. To ensure easy interaction with tactile fields presented in the submodel, friction and gravity should be independent. This motivation leads to a new function fJ, depending only on x and y:

Frriction = fJ(x, y) {4.11)

f 1 can not express all the functionality of physics such as materials with different kinds of friction, depending on the direction of movement. But also note that this function maps to a superrange of the range of friction in physics! The function fJ does not assume that the friction is restricted to positive values. Negative friction is a powerful extension, introducing very little extra complexity in understanding and interaction with tactile forces depicted using the subspace. This extension compensates to some degree the deletion of l from fJ, as will be explained in the next section.

4.8 Negative Friction

Using negative friction, a designer can create tactile fields of the subspace with areas where Fmotor

differs (possibly both in sign and size) depending on the approach angle. Normally, the total motor force is always reduced by friction. However, when the sign (and direction) of Frriction changes, friction is able to increase motor force. For example, in figure 4.4 two one-dimensional functions for Fgravity and Frriction are plotted for positions on a line, with Fgravity = ! and Frriction = t. When the points on the line are approached from the left, the resulting motor force is equal to L whereas the force is zero when approached from the right (figure 4.5}. The inclusion of negative

Page 30: 1994 Afstudeerverslag IPO

4.9. CONCLUSIONS 25

Fgravity

~--------------------------------

0 ~------------------------------~ X

~------------------------------Ffriction

-l ~ ~---------------------------------

Figure 4.4: Gravity and friction force for positions on a line.

friction enlarges the subspace with some of the capabilities of function 4.5, where friction was direction dependent.

When friction would be constrained to positive values or zero, only the size and not the direction of Fmotor would be subject to change. A tactile force function as described above can not be constructed without negative friction. This can be proven as follows:

Suppose

Frriction ?: 0. (4.12)

and

Fmotor = IFmotorl

Fmotor for a movement from left to right should be 1. However, Fmotor for a movement from right to left should be 0. Given

F motor = Fgravity - Frrictlon (4.13)

leads to the following equations for movements, respectively, from left to right and right to left:

l=Fgravity - IFrrictionl

O=Fgravity + IFrrictionl

Some calculus leads to a unique solution:

Frriction = -1/2 1\ Fgravity = 1/2

(4.14}

( 4.15}

This solution is in contradiction with equation 4.12. It completes the proof that allowing negative friction increases the number of tactile feedback types that are contained in the desktop-subspace.

4.9 Conclusions

The two models, described by equation 4.3 and the combination of equations 4.10 and 4.11, offer, respectively, a general model and a submodel for the IPO-trackball. The general model can represent all possible tactile stimuli that can be generated by the IPO-trackball and provides an excellent starting-point for smaller and less complex models. The submodel is a simple model, based on the general model, that adds friction to the models of Minsky et al. (1990) and Atkinson (1977). One of its attracting features is that ·tactile fields, modelled with this model, can be depicted by a static graphical representation on a colour-screen since the parameters stem from a four-dimensional space. Also, this model has been proven to describe an interesting range of categories of tactile fields, as was proven by Minsky et al.

However, the submodel, inspite of being comprehensive and powerful, will probably not stand the test of time, as more and more research is conducted on the tactile senses. In time, a complete

Page 31: 1994 Afstudeerverslag IPO

26 CHAPTER 4. MODELS FOR TACTILE FIELDS

Figure 4.5: The resulting motorforce when moving along the line, respectively, from left to right and from right to left.

model will be made up that includes the human point of view, thereby making the submodel obsolete for the design of tactile fields. The desktop model will be used as a basis for further research on tactile senses because of its comprehensiveness and probably more limited range of factors affecting tactile feed back.

Page 32: 1994 Afstudeerverslag IPO

Chapter 5

Performance Effects of Various Types of Tactile Feedback

5.1 Introduction

Recently, there has been more research into the use of tactile feedback in relatively simple and inexpensive input devices such as the joystick and the mouse. While previous studies demonstrated performance gains when adding tactile feedback to visual feedback (e.g., Goossens (1992), Gilson & Fenton (1974), Keyson (in press) and Akamatsu et al. (in press)) the qualitative and quantitative aspects of the tactile feedback were not addressed. For example, the strength of the tactile force or form may influence performance in simple target acquisition tasks (i.e. selection tasks). This study was conducted to explore the performance effects of various types of tactile feedback in a target acquisition task using a trackball with tactile feedback.

Similar to the design of visual interfaces, tactile displays can be constructed using a combination of physical attributes. While guidelines and handbooks exist for the evaluation and design of visual user interfaces such materials are lacking in the construction of tactile interfaces. For example, visual attributes can be shape, colour, size and layout. Mayhew (1992) lists several guidelines for optimising the design of a visual interface.

Among the many objects that make up a visual user interface are icons; graphical conveyers of information with behavioural and intrinsic properties (Johnson et al., 1989). An icon is defined by a set of visual attributes and its behaviour. The behaviour determines the response of an icon to user input, time or machine state. Both the visual attributes and behaviour of icons have been systematically studied and demonstrated in terms of combined effects on human performance (Gittins, 1986; Brems & Whitten II, 1987).

A user interface with tactile feedback can be composed of tactile fields, some of which are global and provide a common context, while others may be object-like tactile conveyers of information. A visual analogy here would be a desktop background image versus an icon. The term 'tactile field' was used to refer to tactile objects which can be manipulated and convey information. Similar to icons, a tactile field can be defined by a set of physical attributes and their behaviour. For example, one physical attribute of a tactile field may be its degree of roughness. The behaviour could be the amount of roughness felt, depending on user movement speed.

The input device used in the current study is a trackball with tactile feedback developed at IPO. To support the target acquisition task several tactile fields were modelled and evaluated. The fields were designed to represent a range of felt dips on a flat surface, varying in force level and form. The fields remained static and did not change as a result of user interaction.

In the next section an overview of relative literature pertaining to the mechanical modelling and human evaluation of tactile feedback is given. Section 5.3 discusses the results from a preliminary field study, followed in section 5.4 by a description of the design of the experiment conducted. The remaining sections give the results, discussion and conclusions.

27

Page 33: 1994 Afstudeerverslag IPO

28 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

5.2 Literature Overview

5.2.1 Background

Little research has been reported that addressed the quantitative and qualitative aspects of tactile feedback. Typically, studies involving tactile feedback (Gilson & Fenton, 1974; Hinton, 1993; Akamatsu et al., in press; Goossens, 1992) contrast tactile versus visual or audio feedback. The form and force level of the tactile feedback is not generally stated nor defined. The lack of modeling techniques for tactile input devices reflects the approach which researchers, such the above, have taken. Secondly, as a result of the tactile versus no tactile feedback approach, there exists a lack of research pertaining to the subjective and objective evaluation of various types of tactile feedback.

5.2.2 Tactile Feedback and Simple Navigation

The potential benefits of tactile feedback in a simple navigation task such as in a point~and~select task have been demonstrated under a range of human performance measures. However, there appear to be differing results for the same measure across similar studies.

The time needed to complete a maze task and number of errors, using a trackball with force feedback was investigated by Goossens (1992). Addition of tactile feedback to visual feedback significantly decreased the time needed to complete a maz~tracking task by 34% and the number of errors by 76%.

Goossens also considered the bandwidth of human performance in a target acquisition task. Bandwidth (Fitts, 1951) can be described as a measure for the amount of information a person processes per second in a target acquisition task. Bandwidth is typically calculated from the time needed to complete the task, the distance to the target and the width of the target. A higher bandwidth indicates a higher performance level in terms of movement time and accuracy. Goossens found that the bandwidth increased by approximately 50% (from 6.4 to 9.83 bitsfs) by the addition of tactile feedback to a target acquisition task.

In a study on target acquisition by Akamatsu et al. (in press), using a mouse with a pin for tactile feedback, bandwidth, response time and error rate remained constant under conditions of tactile and no tactile feedback. However, reaction time, defined as the time between entering the target region and selecting the target, did vary as a factor of tactile feedback. Reaction time decreased from 298 ms in the visual feedback condition to 237 ms in the combined tactile/visual feedback condition.

The effectiveness of tactile feedback appears to be related to the extent in which the visual and possibly other modalities (i.e. a human sensory mechanism, for example sight or hearing (Berchem-Simon, 1982)) are loaded as well as the degree of required skill. For example, Gilson (1974), using a control stick with tactile feedback, found that in a highly structured approach and landing task comparable results were obtained by using either visual or tactile feedback for presenting critical plane control information. But, in a task requiring the pilot to make tight turns about a point, Gilson found a significant decrease of deviation in the desired angle of attack when tactile feedback was provided. Additionally, tactile feedback decreased the variations in the maximum altitude and speed. The approach and landing task did not put a high burden on the visual modality, since it was highly structured. However, the turning task created much more arousal on the visual modality, thereby enlarging the performance impact of tactile feedback.

5.2.3 Subjective and Objective Performance Measures

The use of subjective and objective human performance measures in the study of human-computer interaction has been widely discussed by a number of authors (e.g., Leep (1963) and Nielsen (1993}). In exploring the use of tactile feedback as a relatively new and as yet not clearly un­derstood modality for human-computer communication, the use of subjective measures plays an important role. While objective measures such as reaction time, movement time and number of errors can be recorded, one may question whether such parameters can fully characterise and

Page 34: 1994 Afstudeerverslag IPO

5.3. FIELD STUDY 29

predict human performance. In the current study subjective measures, such as quality of a tactile field, were used to complement the objective measures.

5.3 Field Study

A preliminary field study (unpublished) indicated that the objective and subjective performance depended indeed on type and strength of tactile feedback. This field study took the form of a target acquisition game with tactile feedback. This game was played by approximately 300 children during an open house of the Eindhoven University of Technology.

However, this study did not give sufficiently valid and significant results on performance dif­ferences between differences types of tactile feedback, since the environment was insufficiently controlled and the IPO-trackball contained too much friction. The trackball was modified to run more smoothly and a slightly modified version of the experiment was rerun under a laboratory condition.

5.4 Description of the Experiment

An exploratory study was conducted to consider the degree to which various aspects of human performance in a target acquisition task are influenced by different tactile forms and forces in order to optimise tactile feedback. To evaluate human performance both subjective and objective measures were used.

5.4.1 Apparatus

The setup consisted of the original IPO trackball with force feedback (Engel et al., 1994) connected to a PC (Dell 433/M) with a 14" VGA colour screen (Philips Brilliance 1410) at 640x480 pixels. The trackball was used to move a pointer on the screen and to generate tactile stimuli. Two servo motors positioned on the x- and y-a:x.es had been added to transport tactile information. Exact ball position was monitored by two optical sensors on the motor-axes. The DC-gain, defined as the displayed movement divided by the control movement, was fixed at 20 em movement on the screen for each em of control movement of the ball. The cover of the device consisted of a 4 mm thick Plexiglas surface with a 53 mm diameter hole. The ball itself had a diameter of 57 mm and extended 8 mm above the Plexiglas.

5.4.2 Subjects

To control for handedness factors (Varney &: Benton, 1975) right-handed subjects were chosen with normal or corrected-to-normal vision. Twelve subjects participated, ranging in age from 21 to 33, with a mean age of 24. With the exception of three subjects, none of the subjects had previously used the IPO trackball. All subjects participated on a voluntary basis.

5.4.3 Procedure

The experiment consisted of 36 blocks with 25 trials (each consisting of one target acquisition task) per block. The experiment was concluded by a subjective questionnaire. Each block represented a unique feedback condition using four tactile force levels, three tactile forms and three levels of target difficulty. All variables will be described in the following subsections. Using a repeated measures design each subject completed the blocks in random order over two sessions with a five minute break between sessions.

Each subject was seated alone in a quiet room in front of the monitor with the keyboard on their left and IPO-trackball on their right. The seat had elbow-rests to avoid fatigue. The upper and lower arm were at an angle of approximately 90 degrees. Subjects were told to keep their

Page 35: 1994 Afstudeerverslag IPO

30 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

Table 5.1: Index of difficulty ID, distance A and width W of the tested targets.

ID (-) A (mm) W (mm) 1.3 23.4 16

35.0 24 46.7 32

1.8 39.7 16 59.5 24 79.4 32

2.2 57.4 16 86.2 24

114.9 32

hand level with the trackball and to maintain control of the trackball with a grasp-like gesture of the hand. Their progress and performance were remotely monitored.

Prior to running the experiment, each subject was given an oral explanation of the test proce­dure and the follow-up questionnaire. The instructions were also given on paper to the subjects. Subjects were instructed to acquire the target (a circle) as fast and accurately as possible once the target appeared on the screen.

Each trial began with a random delay from 250 ms to 1250 ms to avoid an effect whereby subjects would move according to a rhythm while selecting targets. A 25 ms-500 Hz beep was given to signal the target appearance and beginning of the trial. At this time a 2.0 mm square­pointer appeared in the centre of the screen. The angle of the target in relation to the centre of the screen varied across trials on a random basis. The subject pressed the space bar to acquire the target. If the pointer was over the target when the space bar was pressed, a high, 25 ms-500 Hz beep was given to acknowledge successful acquisition. If the target was missed a low, 25 ms-250 Hz beep was given.

5.4.4 Target Difficulty

The size and the distance from the centre of the screen for each target was based upon three levels of target acquisition difficulty as defined by Fitts' law (Fitts, 1954; Fitts & Peterson, 1964). According to Fitts' law the difficulty in selecting a target, as measured by total response time, is based upon a positive, linear relation between total response time and a function of the width W and the distance A of the target. The inverse of the slope in this relation is called 'bandwidth' and represents performance. Difficulty is expressed according to the index of difficulty (I D) by the following formula:

ID =2 1og(AJW + 1)

This slightly modified version of the original formula was derived by Shannon (1949). It is used since it provides a slightly better fit with observations, exactly mimics the information theorem underlying Fitts' law and always gives a positive rating for the index of difficulty (MacKenzie, 1989; MacKenzie, 1992). Using three levels of difficulty on Fitts' ID index, nine combinations of target distance and width were tested (table 5.1).

5.4.5 Tactile Form

Three different circular tactile forms were contrasted. \Vhen approached from any direction, the forms were felt. as a dip towards the centre of the target. The tactile forms corresponded in surface area to the visual targets. For reference the three tactile target forms are referred herein as the 'fiat', 'hole' and 'combined' form. The flat form was felt as constant force, the hole form was felt

Page 36: 1994 Afstudeerverslag IPO

5.4. DESCRIPTION OF THE EXPERIMENT 31

Height Height Height

Figure 5.1: The heightmaps of the contrasted tactile forms 'fiat', 'hole' and 'combined' along any arbitrary axis through the center of the tactile field.

Force Force Force

Figure 5.2: The forcemaps of the contrasted tactile forms 'fiat', 'hole' and 'combined'. Force was directed towards the centre.

as a diminishing force towards the centre and the combined form was felt as a constant force in the outer area of the form and a diminishing force towards the centre in the inner area.

The heightmaps for each of the forms are illustrated in figure 5.1. In figure 5.2 a three dimen­sional view of the forms is given, showing the level of force towards the centre of the form as a function of horizontal (x) and vertical (y) position. The mathematical description of the tactile forms can be found in appendix A. To prevent ball oscillations, the inner 4% of the circular area within the centre of target contained a zero force level. This was necessary given the hardware limitations of the current device.

5.4.6 Maximum Tactile Force Level

The maximum force levels applied to the ball, independent of the hand, were 0 mN for the no tactile feedback condition and 100, 225 and 350 mN for the tactile feedback conditions. In the case of the flat form the force level was always equivalent to the maximum force level up to the centre area of the target. From herein, force level will always refer to maximum tactile force level.

5.4. 7 Questionnaire

After completion of all blocks, the subject was confronted with a screen depicting 36 different target conditions at random in a six times six matrix. Three different possible target diameters (16, 24 and 32 mm) were shown, combined with. the different force levels and forms. The subjects were instructed to feel all of the targets and rate each one individually in terms of strength and qualitative feeling for tactile feedback. The subjects rated the targets using a matrix form which matched the layout of the screen. Each target was rated for tactile strength and quality using a five point scale. The perceived presence of tactile feedback was rated from "bad" (1) to "good" (5). Tactile quality was rated from "unpleasant" (1} to "pleasant" (5).

Page 37: 1994 Afstudeerverslag IPO

32 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

5.5 Data Collection

The following measures were recorded for each trial:

tmav: movement time, i.e. time (since the start of the trial) at which the target was entered for the final time,

trea.ct: reaction time, i.e. difference between the time at which the target was entered for the final time and the time at which the spacebar was pressed

Oversh: whether an overshoot occurred. An overshoot occurred when the target was entered at least twice.

A serie of pilot tests using three subjects was conducted to assess the face validity of these measures. Secondly, the pilot data confirmed the settings for target force, target difficulty and tactile form in terms of having an influence upon performance. Two of the pilot subjects indicated that they overshot the target more often when no tactile feedback was given. This lead to the addition of the Oversh measure. The subjects from the pilot experiment did not participate in the actual experiment.

5.6 Results

All data were analysed for statistical measures and significance levels using SAS (SAS Institute Inc., 1990}. Results from the 25 trials per block indicated that performance in the first trial across all blocks showed no correlation with the remaining trials. Given that subjects were unaware of the feedback condition when beginning a new block, the first trial was omitted from the data analysis. Trials which were completed while the pointer was outside the target area, were not analysed. Extremely low or extremely high scores, across all objective dependent variables, were defined as those which fell into the bottom or top 2.5% of the variable's distribution. Extreme scores were removed from the analysis to eliminate time rounding errors of the data collection software and unrealistic bad performance.

A MAN OVA analysis for main effects indicated that movement time was significantly affected by all of the target variables: target difficulty, target form and target force level. Reaction time was significantly affected by target force level. The subjective measures and percentage of overshoots also showed similar trends, but were not analysed for significance level. The analysed dataset with the stochastic variable movement time contained 9595 samples, the dataset of reaction time contained 9592 samples and the dataset of overshoot contained 9830 samples. For each of the subjective variables 432 samples were coJJected and analysed.

5.6.1 Target Difficulty

The influence of target difficulty on movement time was highly significant {F(2, 10} = 340.60, p = 0.0001].1 With increasing target difficulty, movement time increased from 504 ms to 685 ms. A contrast of means (table 5.2) indicated that each individual target difficulty level was significantly different compared to the other levels [F(1, 11) = 312.14 ... 703.24, p = 0.0001]. The percentage of overshoots also tended to increase linearly with target difficulty at an average rate of 4. 7% per unit of target difficulty. Reaction time was not significantly influenced by target difficulty and averaged 337 ms.

The data on total response time have been tested for congruence with Fitts' law for all force levels and forms. 2 The resulting bandwidths indicated the same trends as movement time and reaction time (table 5.6). However, bandwidth will not be listed in the forthcoming analysis and discussion to enable analysis of significance.

1 Please refer to appendix B for an explanation on this notation. 2 A good fit (p > 0.96) of the data to Fitts' law was found when a zero intercept was used. However, when a

free intercept was used, the fit was poor (0.24 < p < 0.45). This supports the findings of MacKenzie (1989) that the intercept should be zero or sma.ll.

Page 38: 1994 Afstudeerverslag IPO

5.6. RESULTS 33

Table 5.2: Means and standard deviations of movement time, reaction time and overshoot per-centage by index of difficulty.

trnov {ms) treact {ms) Oversh (%) ID (-) mean sd mean sd mean sd

1.3 504 130 335 98 3.7 5.5 1.8 598 149 330 96 6.4 7.2 2.2 685 174 347 105 7.9 9.1

Table 5.3: Means and standard deviations of movement time, reaction time, percentage of over­shoots, perceived presence of tactile feedback and tactile quality by visual-only and combined tactile/visual feedback.

Feedback visual tactile f visual

tmov {ms} mean sd

636 191 583 158

5.6.2 Tactile Feedback

treact {ms) mean sd

371 124 327 88

Oversh (%) mean sd

13.4 9.9 3.5 4.5

Presence (-) mean sd

1.4 0.8 3.6 1.3

Quality(-) mean sd

2.7 0.9 3.2 1.3

Movement time and reaction time were significantly affected by the addition of tactile feedback to the targets [F(l, 11) = 82.36, p = 0.0001 and F(1, 11} = 20.15, p = 0.0009 respectively]. Both movement time and reaction time decreased by approximately 50 ms with the addition of tactile feedback.

5.6.3 Tactile Force Level

Both reaction and movement time were lower across all force levels compared to the no tac­tile feedback target condition. A main effect for tactile force level occurred by movement time [F(3, 9) = 30.80, p = 0.0001] and reaction time [F(3, 9) = 8.40, p = 0.0056]. The changes in movement time and reaction time between the tactile force levels were smaller than the observed differences between tactile and no tactile feedback (table 5.4). The difference in movement time between the 100 and 350 mN level was significant [F(1, 11) = 10.21, p = 0.0085], as well as the difference in reaction time between the 100 and 225 mN level [F(1, 11) = 5.36, p = 0.041]. Additionally, the percentage of overshoots decreased with increasing force level from 4.4% to approximately 3.0%. Subjective quality was highest at the 225 mN level.

Table 5.4: Means and standard deviations of movement time and reaction time by tactile force level.

tmov (ms) treact (ms} . Oversh (%) Presence (-) Quality(-} Force (mN) mean sd mean sd mean sd mean sd mean sd

100 591 158 332 88 4.4 4.9 2.4 1.2 3.1 1.1 225 582 159 319 84 3.0 4.6 3.8 1.0 3.6 1.3 350 576 158 329 92 3.1 4.0 4.5 0.7 2.9 1.3

Page 39: 1994 Afstudeerverslag IPO

34 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

Table 5.5: Means and standard deviations of movement time and reaction time by forms with tactile feedback.

tmov (ms) treact (ms) Oversh (%) Presence (-) Quality(-) Form mean sd mean sd mean sd mean sd mean sd flat 580 156 323 92 2.5 4.1 4.0 1.2 2.7 1.4 hole 572 151 324 83 3.2 4.6 3.2 1.3 3.4 1.1 combined 596 167 334 89 4.8 4.7 3.6 1.3 3.5 1.1

~~~S) ~----------------------------------------------~ 650

620

610

600

590

580

570

- .... combined •M•M•K• hole

+-+-·+ flat ----- overall

-·­ ·--~-- ......... ___ .. _._ ·- ......

----·------............ ")« ............... ~~~.~~~~.~:-~ ....

580 T---------------~--------------~--------------~ 0 100

Max. fofce (mN)

Figure 5.3: Movement time (tm.ov) by form and total average across force level.

5.6.4 Tactile Form

The tactile form of the target had a significant effect on movement time [F{2, 10} = 20.61, p = 0.0003]. Depending on the tactile target form, movement times varied from 572 ms to 596 ms, (table 5.5). The movement times with the combined form differed significantly with the performance of the flat [F(l, 11) = 9.90, p = 0.0093] and hole form [F(1, 11) = 35.81, p = 0.0001]. The hole form scored 3.4, the combined 3.5 and the flat 2.7 on subjective quality. Form also had an influence on the percentage of overshoots, which ranged from 2.5% for the flat from to 4.8% for combined form. Reaction times were not influenced by the form of the tactile target.

5. 6. 5 Tactile Form and Force Level

Tactile form and force level interacted to affect movement and reaction times (tables 5.6 and 5.7, figure 5.3-5.7}. To consider the overall performance of each tactile form, at a given force level, performance on ea.ch of the objective and subjective measures was considered. The hole tactile fields at the 225 and 350 mN level were found to perform best. The combined tactile fields performed significantly worse on the objective performance measures. The flat tactile fields and the hole tactile field at the 100 mN level scored more than half a point lower on subjective quality.

5. 7 Discussion

The observed results supported the hypothesis that qualitative and quantitative differences in perceivable-tactile feedback can influence performance in a target acquisition task. The tactile

Page 40: 1994 Afstudeerverslag IPO

5. 7. DISCUSSION

Reaction lime (ms) 380

370

380

350

340

320

310

Tadt1e form

0 100

-· 225

Max.force(mN)

............. flat ---overall

-· . ...-· ... -·-

Figure 5.4: Reaction time (trea.cd by form and total average across force level.

~~~~) r--------------------------------------------, 4

3

2

0

0 100

Taclile loon

225

Max. fon::e (mN)

+·+·+- llal -overall

350

Figure 5.5: Overshoot percentage by form and total average across force level.

35

Page 41: 1994 Afstudeerverslag IPO

36 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

Table 5.6: Means and standard deviations of movement time, reaction time, overshoot percentage, perceived presence and quality of tactile feedback by force level F and form. Bandwidth BW is also listed, but not further considered.

tmov (ms) treact (ms) Oversh (%) BW (-) Presence (-) Quality(-) F mN) Form(-) mean sd mean sd mean sd mean mean sd mean sd

0 fiat 635 184 367 123 13 10 1.81 1.3 0.7 2.7 1.1 hole 642 190 376 131 14 10 1.77 1.4 0.9 2.9 0.9 combined 630 200 369 118 13 10 1.80 1.4 0.9 2.6 0.8

100 flat 583 152 327 91 3 5 1.99 2.9 1.1 3.2 1.2 hole 581 156 331 88 4 5 1.99 2.0 1.1 2.9 1.1 combined 607 164 338 86 6 5 1.92 2.3 1.2 3.2 l.l

225 flat 585 161 312 85 3 5 2.01 4.3 0.8 3.1 1.5 hole 566 148 320 76 3 5 2.04 3.3 1.1 3.8 1.1 combined 593 167 326 91 3 4 1.97 3.9 0.8 3.8 1.0

350 flat 570 157 329 99 1 2 2.00 4.7 0.5 1.8 0.9 hole 570 148 321 85 3 4 2.02 4.3 0.7 3.6 1.1 combined 588 169 338 89 5 5 1.95 4.4 0.8 3.4 1.2

Table 5.7: F(l, 11)-levels of movement time and reaction time between the combined form at various force levels and the hole form at the 225 mN force level. A • footnote mark indicates p::;; 0.01, whereas a+ footnote mark indicates p::;; 0.05.

Force (mN) 100 225 350

tmov (ms) 20.75* 5.47+

treact (ms) 11.92*

~(-) .---------------------------------------------------. 5

4

3

2

0

Taelile form

100

-...,.. oomb'ned ·)f • M • K' hole

Max lOree (mN)

350

Figure 5.6: Perception of presence of tactile feedback on a 5 point rating scale by form and total average across force leveL

Page 42: 1994 Afstudeerverslag IPO

5. 7. DISCUSSION 37

Qumey(-) ~-------------------------------------------------------, 4

........... ""'-'": ':...:..,·: :..:...· .......

3

2

lllctile form

0 100 350

Figure 5. 7: Quality of tactile feedback on a 5 point rating scale by form and total average across force level.

force level, as a quantitative parameter, affected reaction times and movement times, while the tactile form, as a qualitative variable, affected movement times. The subjective perception of tactile quality was also influenced by combinations of tactile force level and tactile form. The hole and flat form enabled subjects to decrease both movement times and reaction times across force level as compared to the combined form. However, the hole and combined form were generally preferred above the flat form on quality of tactile feedback.

The differences between tactile form and tactile force level, in terms of the former having an affect only on movement times, can be attributed to adaptations in movement behaviour, as contrasted to a combination of adaptation in movement behaviour and simple stimulus-response reactions. Depending on the tactile form and force level, subjects were able to recognise that the tactile field in the target area had the effect of 'catching' the pointer. Subjects appeared to adapt their behaviour to take advantage of this phenomenon. By assessing movement times and percentage of overshoots, it was concluded that the flat and hole form caught the pointer significantly better than the combined form.

The fact that reaction times were not significantly influenced by the tactile form, yet were influenced by tactile force, suggests that reaction times may reflect a simple stimulus response relationship, as contrasted to a change in the user's behaviour. A fast information processing channel for responding to a tactile stimulus, which requires minimal interpretation, was observed by Frith & Done (1986). They found that subjects could react faster to tactile stimuli if only the presence of a stimulus needed to be registered, than if the stimulus type defined the reaction. However, the fast reaction to registration of stimulus occurrence required focussed attention, whereas the conditional reactions did not.

In the current study, subjects had to press the space bar once they felt they were in the target area. This simple judgement appeared to be made on the basis of recognising that the target border area was crossed as contrasted to feeling the entire tactile form. Furthermore, the time in performing a judgement appeared to be influenced by the tactile force level.

The flat form, which had a maximum force at the target border area, performed well on the reaction time measure. However, the combined form, which also had a strong force at the target border area, performed significantly worse. The combined form might have confused subjects since two target entry points could be felt: one on the actual border and one on the transition from the flat shape towards the hole shape. This form might have caused delays in reaction times and limited the perception of a catching force, thus increasing movement times compared to the hole

Page 43: 1994 Afstudeerverslag IPO

38 CHAPTER 5. PERFORMANCE EFFECTS OF TYPE OF TACTILE FEEDBACK

and flat form. The hypothesis that reaction time is related to a simple-stimulus response mechanism and that

movement times reftect a change in behaviour caused by direct intervention of the user's move­ment through force feedback, may explain some of the findings in the study on target acquisition using a mouse with a tactile feedback pin by Akamatsu et al. (in press). Total response time (and bandwidth) did not vary significantly across the tactile and visual-only feedback conditions. However, reaction times varied significantly between combined tactile/visual and visual-only con­ditions. Although the mouse enabled a simple stimulus response relationship for target acquisition by rising the tactile feedback pin, changes in behaviour as measured by movement time, were not found. The pin did not have the effect of grabbing the pointer and thus movement times were not influenced.

5.8 Conclusions

The two primary properties of tactile fields examined, tactile force level and tactile form, signifi­cantly influenced movement times, reaction times and percentage of overshoots. Both tactile force level and form were found to inftuence movement behaviour since subjects were aware that the pointer would be 'caught' into the target to some degree, depending on tactile force level and form. Additionally, reaction times were found to be dependent on tactile force level.

The changes in performance measures varied, based upon tactile force level, tactile form and their combination. This suggests that tactile feedback, when used to improve performance in a target acquisition task, should be optimised in terms of at least two physical properties, namely tactile force level and tactile form. The present study demonstrated that the submodel, as discussed in the previous chapter, contains a range of tactile fields that can influence objective performance and subjective perception of tactile feedback. As such, the submodel can serve as a starting point for further research into the relationships of modelled tactile fields and the inftuences of these relations upon performance.

The distinction made in the present study between changes in behaviour versus changes in the stimulus-response relationship suggest that tactile feedback can further improve performance beyond simple reaction time gains. The direct intervention of tactile feedback with the subject's movements was found to improve performance on movement trajectories without tactile feedback. To take advantage of this performance gain, future input devices with tactile feedback should include features which can directly inftuence the user's movements.

However, the direct intervention of the user interface with the user's movements might decrease performance when intervention occurs at undesired moments. For example, the presence of other (interfering) tactile fields around the target might hinder a user's movement towards the target. The possible presence of such a factor is very important to the !PO-trackball since tactile feedback, given by the device, is intimately coupled to the intervention with the user's movements.

Further research is needed to develop user interfaces which can optimally take advantage of direct tactile intervention while limiting such undesired effects. Secondly, the performance gains of tactile feedback for a task should be considered in relation to optimised visual feedback conditions, i.e. when visual movement feedback is optimised, including the pointer speed and the visual feedback in the target area.

Page 44: 1994 Afstudeerverslag IPO

Chapter 6

Performance Effects of DC-gain, Interfering Targets and Visual Workload

6.1 Introduction

Recently, there has been more research into the use of tactile feedback in relatively simple and inexpensive input devices such as the joystick and the mouse. Previous studies demonstrated performance gains when adding tactile feedback to visual feedback (e.g., Goossens (1992), Gilson (1974), Keyson (in press) and Akamatsu et al. (in press)). Tactile feedback was found to improve performance for target acquisition task in an open navigation environment. A target acquisition task involves a pointing and selection action which is aimed at a target. An open navigation environment allows users free navigation in the interface without restraining the user to certain paths through the interface, e.g. by using menus. Open navigation is an important property of stateless user interfaces such as MS-Windows.

Recent insights indicate that studies on these performance improvements can contain exper­imental design factors that might (unintentionally) favor the conditions with tactile feedback. This study was conducted to improve the validity of forthcoming studies on (both objective and subjective) performance with tactile and visual feedback in target acquisition tasks with open navigation.

The presence of an interfering target, the workload and the relation between control movement of the input device and displayed movement will be discussed in the following literature overview as factors that might influence the validity of a study on performance, concluded with a discussion of literature on the importance of performance feedback. ·

6.2 Literature Overview

6.2.1 Presence of an Interfering Target

The validity of an experiment on tactile feedback in user interfaces is compromised when no con­ditions involving multiple targets are considered. Existing user interfaces display simultaneously many possible targets for selection. For example, an application such as the file manager of Sun OS (depicted in figure 6.1) contains many candidates for selection that are all likely to be selected. Generally, it is almost impossible to determine,· before any movement takes place, which target is going to be selected next. Once a certain part of the movement is known, it is possible to indicate to some degree in which area the movement will end.

Vander Made (1993; 1994) studied one-dimensional movements of a rotary dial, aimed at known targets. A large variability in movement parameters such as position, velocity and acceleration was found. The tested distance/width ratios for targets were 2, 4 and 8. Several formulas were derived

39

Page 45: 1994 Afstudeerverslag IPO

40 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

I!J file ..._. \13 (tiona] : /biiiJift~eenders

(File v)(VIow 'D(Edit v)(Props v}(coto: v

~ t

= D D LJ LJ LJ LJ

<..b18.bpi c...h18.bp1 cadappl cadbin cadinc cadlib

[i1 LJ LJ D LJ LJ core cursus doc d...,i.doc- exp1 exp2

LJ D LJ It] ll LJ ... 111<03 exo_tue_aPen> forces forward h\8.gif ii)O .

D D ~ LJ LJ lib 1i terature2. > log_ it m2 man mo:e

LJ [i ~ I D D new new_trackbal ::new_trackbal ~ notes notitie oohalen

g LJ LJ D ~ LJ papers.call private radio radlobras S'"'1'1e.au suuser

r<:. n """"' r<:. r<:. ...... =

Figure 6.1: The file manager of SunOS contains many candidates for selection that are all likely to be selected.

from theoretical backgrounds. Using the first quarter of the actual movement, these formulas tried to predict the intended end position of the movement. Even the best fitting formula could not predict for 75% of the cases, whether the end position was inside the known target.

Experiments on the gains of combined tactile/visual feedback can be invalidated when the number of targets in the desired application user interface is not considered. For example, tactile feedback might employ very strong forces that catch the pointer inside a target, thereby making it hard to overshoot a possible target. This will improve performance when only one target is present. However, consider a user interface with multiple possible targets. Some of these will have to be passed during the selection of the intended target and might interfere with the movement. If all targets share the same tactile behaviour, performance might be hindered by the tactile fields of targets passed. It is suggested that experiments on addition of tactile feedback to visual interfaces should include conditions where multiple similar targets are present and subjects are required to pass a target frequently. A target which might interfere with the movement towards another target will be called 'interfering target'.

6.2.2 Workload

To increase the validity of experiments on tactile feedback in user interfaces several levels of workload should be studied, whereby workload is defined as the level of activity required of a human operator to meet the performance requirements (Berchem-Simon, 1982). When several levels of workload have been studied, a better prediction can be given of the impact of tactile feedback in user interfaces.

The difficulty of an activity, and therefore the load on the modalities (i.e. human sensory mechanisms, for example sight or hearing (Berchem-Simon, 1982)), can be altered by changing the task difficulty and adding a secondary task. Addition of a secondary task can deteriorate or improve performance. This twofold outcome on performance by the addition of a secondary task is predicted by the theory of arousal (Duffy, 1962; Stennett, 1957). A relationship was shown between arousal and performance which is shaped as an inverted U as shown in figure 6.2. Arousal is defined as 'operator arousal', which refers to the amount of brain activity (Oborne, 1987). According to this theory, people perform best when moderately aroused. Bother under and over arousal reduce performance.

Page 46: 1994 Afstudeerverslag IPO

6.2. LITERATURE OVERVIEW 41

High

Performance

Low

Low Arousal High

Figure 6.2: The inverted-U relationship between arousal and performance (Oborne, 1987).

Another variable which influences task performance is SR compatibility. SR compatibility is a phenomenon thought to determine the complexity of the transformation (number of recodings} between a stimulus (S) and a response (R) (Rogers, 1979). People tend to perform less well on tasks that have a complex relation between stimulus and response as on tasks that have a simple relation. The complexity of the transformation is determined by several variables, including the relation between the stimulus and response channel and the complexity of the function through which the appropriate response is generated for the stimulus. For example, a simple function would be to turn the steering-wheel right for making a right turn. A more complex function would require the steering-wheel to be turned left for a right turn. The relation between stimulus and response channel might be more direct by enabling the driver to look in the desired direction, thereby equating the channels for stimulus (recognising a right turn) and response (looking at the turn}.

As is discussed by Keyson (in press}, Greenwald (1972) demonstrated that subjects could ef­ficiently say the word 'left' or 'right' while hearing it and at the same time move a switch in response to a visual arrow pointing either left or right. Error rates and reaction times were higher when the subjects had to respond motorically and verbally to a verbal stimulus and visual cue respectively. The effect of incompatible situations where the response direction is counter to the stimulus direction has been shown in several sense modalities. Fitts and Seeger (1953) demon­strated SR compatibility with visual stimuli, Broadbent and Gregory (1965) with tactile stimuli, and Simon, Hinrichs and Craft (1970) with auditory stimuli.

Another influence on secondary task performance has been identified, beside the level of arousal and SR compatibility. The utilisation of an extra modality was found to enable the human system to process more information. Burke (1980) tested two simultaneous single-dimensional compensatory tracking tasks, one with the left hand and one with the right hand. The primary task was performed with the left hand using a visual display or a quickened kinesthetic-tactual (KT) display (also employed by Gilson (1974)). The right-handed tracking was carried out only with a visual display. Although in the single-t~k condition performance of the two hands was equal, in the dual-task condition usage of the KT display resulted in more accurate and faster total task performance. This effect can not be attributed to SR compatibility since the increase in performance was not present in the single-task condition. The utilisation of the tactile modality beside the visual modality enabled the human system to process more information.

A similar result was found by Keyson (in press). Keyson tested the replication of movement

Page 47: 1994 Afstudeerverslag IPO

42 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

by means of the !PO-trackball. The movement was offered through the visual or tactile modality. The performance effect of a visual searching task was studied. The findings were that the addition of a visual searching task on a visual movement replication task decreased performance, measured by response times, more than the addition of the secondary task to a tactile movement replication task. Keyson concluded that the attention between the two tasks was more efficiently distributed over two modalities than over only one.

The level of arousal for current user interfaces varies from medium (e.g., when typing) up to very high (e.g., when concurrently dragging a visual colour slider and visually matching an object controlled by this slider to another object). Since the level of arousal when using user interfaces is generally quite high, addition of an extra task in general leads to a performance decrease.

6.2.3 Relation between Control and Displayed Movement

The relation between display (output) and control (input) movement was found to be a factor in objective performance (Trankle & Deutschmann, 1991; Arnaut & Greenstein, 1986; Arnaut & Greenstein, 1987; Arnaut & Greenstein, 1990; Buck, 1980) and thereby is important for the validity of experiments on tactile feedback in user interfaces. This relation between display and control movement is called 'DC-gain'. DC-gain became relevant when input devices became available with a free relation between display and control movement (e.g., mouses). Before, studies on human performance generally involved devices with a fixed relation. For example, Fitts based Fitts' law on experiments using the human band both as an input and output device. Two types of DC-gain are frequently used in user interface navigation:

fixed DC-gain: a fixed control movement distance always results in a fixed displayed movement,

speed-dependent DC-gain: a fixed control movement results in a small displayed movement when the input device velocity is low to enable accurate target selection. However, when the input device is moved at high speed, the same control movement results in a large displayed movement, thereby requiring fast and small device movements for large displayed movements.

Speed-dependent DC-gains are often implemented in graphical user interfaces since they decrease the movement distance for large screen distances, without losing movement accuracy at low input device velocity. However, recently it was shown by Triinkle and Deutschmann {1991) that a speed-dependent DC-gain actually decreases performance for mouses. Their findings indicate that a speed-dependent DC-gain reduces the SR compatibility between mouse movement and cursor movement, since the proportionality of stimulus (mouse movement distance) and response (pointer movement distance) is violated. Since a trackball is similar to a mouse, speed-dependent DC-gains will not be considered in the forthcoming.

DC-gain might also be based on the context of the pointer position. For example, the DC-gain might be lower in some areas of the screen where accurate positioning is more important than fast movement. A possible application of such a contextual DC-gain (as opposed to a fixed/non­contextual DC-gain) might be the maze design, tested by Goossens (1992). In this design with fixed DC-gain, the IPO-trackball was employed to compare a visual-only and a combined tactile/visual feedback condition in a maze tracking task. The findings were that the subjects performed worse in the visual-only condition for both time to complete the maze and number of errors. An error was defined as crossing a wall of the maze.

The design of the maze experiment required extra muscular effort to cross a wall in the combined tactile/visual feedback conditions, since the tactile feedback made the pointer avoid the nearest wall. Subjects could rely on the tactile feedback for accuracy of movement and concentrate on the movement through the maze. However, the muscular effort was independent of the pointer position in the normal visual condition, either when the nearest wall was approached or avoided. The muscular effort in the visual condition could be made more similar to the muscular effort in the combined condition by reducing the DC-gain when approaching the nearest wall (requiring extra long movements, thereby simulating muscular effort) and enlarging the DC-gain when moving away from the wall. Both error rate and time to complete the maze might be reduced, since it

Page 48: 1994 Afstudeerverslag IPO

6.3. GOALS 43

would become much harder (but not impossible) to cross a wall. Such behaviour can be induced by contextual DC-gain.

A similar approach on changing the feedback in a visual-only condition was taken by Flach, Hagen and O'Brien (1990) by mapping a large virtual space into a smaller visual space. This mapping was optimised for performance by making the target and its vicinities visually larger than the rest of the virtual space. This is an example of contextual DC-gain, since the motoric size of the target and its vicinities was increased as compared with the size in virtual space. Three different mappings were tested: an one-to-one mapping, a mapping with a fixed zoom for the target area and a mapping with a continuously varied zoom. Usage of the second mapping enabled the subjects to perform best, especially for small targets, while the subjects performed worst for the mapping with a continuously varied zoom. It is suggested that the usage of the mapping with a continuously varied zoom confused the subjects. The relation between stimulus (control movement) and response (displayed movement) might have been not intuitively clear, since the relation varied continuously.

The contextual DC-gain type described before also might influence the SR compatibility between trackball movement and pointer movement. However, the changes in DC-gain depend on the functionality of the interface (e.g., the DC-gain changes based on the functionality associated with the object under the pointer), which might be clearer to the average user than speed-dependent DC-gain.

DC-gain could be used as a possible metric for optimising objective user interface performance in visual and tactile feedback conditions. However, several recent studies (Triinkle &:. Deutschmann, 1991; Arnaut & Greenstein, 1986; Arnaut &:. Greenstein, 1987; Arnaut & Greenstein, 1990; Buck, 1980) showed that DC-gain alone is an insufficiently powerful metric for optimising a user interface on a target acquisition task. For example, Buck (1980) found that the time to target depends upon the motoric (input device) width and not on visual target width. The overshoot rate was found to be a function of motoric and visual target width. Arnaut & Greenstein suggest the usage of a combination of DC-gain and Fitts' index of target difficulty as a metric for maximising performance. Such a combination should integrate both the influences of the control (motoric) and display side of the targets' width and distance in a target acquisition task in order to allow evaluation of performance.

6.2.4 Knowledge of Results

Knowledge of results was shown to be of importance for subject's performance. It is important to give subjects feedback on their performance during the experiment, since they are accustomed to receive performance feedback continuously during their work with normal user interfaces.

Wilkinson (1961; 1963) found an interaction between knowledge of results and error rate in a selection task. Wilkinson gave feedback every five minutes and in one study feedback was also given after every selection. The error rate decreased significantly because of the feedback of results.

Knowledge of the results neither improves nor decreases monitoring performance when a tracking and monitoring task are combined, as is discussed by Wiener (1975}. Wiener suspects that tl1e potential loss in task performance due to the increased perceptual demand for the processing the feedback on results, is compensated for by the performance improvement for knowledge of results.

6.3 Goals

Based on these considerations, the study tests the presence and size of differences in performance between all possible combinations of visual-only or combined tactile/visual feedback, target se­lection tasks with or without a simulated interfering target, medium and high visual workload and several contextual and non-contextual DC-gain values. Several hypotheses were formulated regarding experimental conditions of studies on the performance improvements of adding tactile feedback to visual·only target acquisition tasks, whereby performance is defined as the degree to which users were able to complete their task in a fast and accurate way while being pleased by

Page 49: 1994 Afstudeerverslag IPO

44 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

the completion of the task. These hypotheses addressed the expected impact of the factors that might influence the validity of such experiments, as discussed in the literature overview:

• The presence of an interfering target is expected to influence performance during the combined tactile/visual feedback conditions more strongly than for the visual only conditions since the IPO-trackball catches the pointer inside a target. The interfering target might hinder movements.

• The addition of tactile feedback to a visual feedback condition should improve performance not only by an improved SR compatibility, but also through an increased information processing capacity. This extra capacity can be shown to exist if the addition of a secondary visual task results in a larger performance decrease in the visual only feedback condition than in the combined tactile/visual condition.

• The DC-gain values which result in maximum performance for the target acquisition task should be the same in the visual only and combined tactile/visual conditions.

• Contextual DC-gain should be able, by adapting the distances required to select the target, to (partially) compensate the gains in objective performance, caused by the variances in muscular effort associated with tactile feedback. As such, the addition of contextual DC-gain to visual-only feedback conditions should decrease the time between the start of the trial and target selection.

6.4 Description of the Experiment

An exploratory study was conducted to consider the degree to which human performance in a visual-only and combined tactile/visual target acquisition tasks is influenced by different DC­gains, the presence of an interfering target and visual workload. To evaluate human performance both subjective and objective measures were used. For this research, a combination of several DC­gains and target difficulties was tested to ensure that the results for DC-gain would hold across a large range of target difficulties, as suggested by Arnaut & Greenstein. Subjects were given immediate feedback on their results to improve performance.

6.4.1 Apparatus

The setup consisted of the original IPO trackball with force feedback (Engel et al., 1994) connected to a PC (Dell 433/M) with a 21" VGA colour screen (Philips Brilliance 2110) at 640x480 pixels, each sized 0.6 * 0.6 mm. The trackball was used to move a pointer (a square, sized 3 * 3 mm} on the screen and to generate tactile stimuli. Two servo motors positioned on the x- and y-a.'Ces had been added to transport tactile information. Exact ball position was monitored by twq optical sensors on the motor-axes. The cover consisted of a 4 mm thick Plexiglas surface with a 53 mm diameter hole. The baH itself had a diameter of 57 mm and extended 8 mm above the Plexiglas. The input device was equipped with a button on the bottom-left of the cover.

6.4.2 Subjects

To control for handedness factors (Varney & Benton, 1975) right-handed subjects were chosen. Sixteen subjects participated, ranging in age from 21 to 35, with a mean age of 24. With the exception of one subject, none of the subjects had previously used the IPO trackball. All subjects participated on a voluntary basis.

6.4.3 Procedure

The experiment consisted of 24 blocks with 40 trials (each consisting of one target acquisition task) per block. Each block was followed by a subjective questionnaire. A block represented a

Page 50: 1994 Afstudeerverslag IPO

6.4. DESCRIPTION OF THE EXPERIMENT 45

unique feedback condition using three DC-gain values, either contextual or non-contextual, two visual workloads and two tactile feedback levels. Each block contained ten test conditions, formed at random by having a target displayed with or without a simulation of an interfering target with five possible combinations of size and distance for the targets. Each of these variables will be described in the following subsections. Using a repeated measures design each subject completed the blocks in random order over four sessions with a five minute break between sessions.

Each subject was seated alone in a quiet room in front of the monitor with the IPO-trackball on their right. The seat had elbow-rests to avoid fatigue. The upper and lower arm were at an angle of approximately 90 degrees. Subjects were told to keep their hand level with the trackball and to maintain control of the trackball with a grasp-like gesture of the hand. Their progress and performance was remotely monitored.

Prior to running the experiment, each subject was given an oral explanation of the test proce­dure. The instructions were also given partially on paper and completely on the screen, combined with trials exercising relevant conditions. Subjects were instructed to acquire the intended target (a circle) as fast and accurate as possible once the target appeared on the screen. Each trial took the following form:

• Each trial began with a random delay, varying between 250 ms to 1250 ms to avoid an effect whereby subjects would move according to a rhythm while selecting targets.

• The beginning of the trial was indicated by the appearance of the target(s) and the pointer. The pointer appeared in the centre of the screen. The angle of the intended target, a circle, in relation to the centre of the screen across trials was chosen at random from all eight compass­directions. In 50% of all trials, an interfering target would be simulated by a ring appearing with its centre coinciding with the centre of the circle. The targets were light grey with solid outlines and filled for 6.25% with homogeneously distributed points of one pixel-square. Both had the same width, where width of the ring was defined as the distance between any point on the outermost outline and the nearest point on the inner outline.

• To acquire the target the subject moved the pointer over the circle using the trackball and pressed the button. If the condition involved a secondary task to increase the workload, this task took the form of a visual searching task: a light grey character might appear during the movement. The time of appearance was chosen at random from a range based on the expected performance of the subject under the current condition. The expected performance was determined based on Fitts' law (explained below) and data from previous trials.

• If the pointer was over the circle when the button was pressed, one to three points were given to the subject. A lower time to successful selection gave more points. The number of points depended on the difference between the actual and expected performance of the subject under the current condition.

• If the subject scored any points, the total number of points in the block and the high score for the subject over all blocks were displayed in the upper-right corner. The number of points scored were added to the total score, one by one. Each point was indicated by a 150 ms tone, followed by a 75 ms pause. The pitch of the first tone was 500 Hz and was multiplied by 1.5 for every extra point. A delay of 750 ms was introduced when all points had been added to the total score .

• If the condition involved a visual searching task and the circle was successfully selected, a three-choice screen was presented to the subject. Possible answers were: no character seen, a 'b' seen and a 'h' seen. If the subject choose the correct answer, the number of points scored in the trial was doubled. If an incorrect choice was made, the subject lost all points scored in the triaL

• If the number of points for the trial wa..c; doubled, the extra points were added to the total score in the same way as the points for circle-acquisition were added. However, the tones were replaced by equally long-lasting delays.

Page 51: 1994 Afstudeerverslag IPO

46 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

Table 6.1: Index of difficulty (JD), target width (W), circle distance (A) and ring diameter (D) of the tested combinations.

ID (-) W (mm) A (mm) D (mm) 2.37 14.4 60 60 2.37 28.8 120 120 3.22 14.4 120 60 3.22 14.4 120 120 3.75 9.6 120 120

• If the circle was missed, no points were given. Normally, the experiment would continue with the next triaL However, in the visual searching task a message appeared to ensure that the number of times the button had to be pressed during a trial was constant.

6.4.4 Target Difficulty

The size and the distance from the centre of the screen for each target was based upon three levels of target difficulty as defined by Fitts' law (Fitts, 1954; Fitts & Peterson, 1964). According to Fitts' law the difficulty in selecting a target, as measured by time to target, is based upon a logarithmic relationship between the width W and the distance A of the target. Difficulty is expressed according to the index of difficulty (ID) by the following formula:

ID log(A/W + 1) (6.1)

This slightly modified version of the original formula was derived by Shannon (1949). It is used since it provides a slightly better fit with observations, exactly mimics the information theorem underlying Fitts' law and always gives a positive rating for the index of difficulty (MacKenzie, 1989}.

To derive several levels of difficulty on Fitts' ID index, five combinations of target width W, circle distance A and ring diameter were chosen which are listed in table 6.1. The ring diameter was defined as the average of the diameter of the inner and outer outline circles. The resulting indices of difficulty were 2.37, 3.22 and 3.75.

6.4.5 Presence of an Interfering Target

Half of the trials were a target acquisition task with the intended target (a circle) and an interfering target. All other trials featured only the circle. The interfering target was simulated by a ring positioned around the circle to ensure that subjects always would have to pass a disturbance, similar to the passing of a target, at a fixed distance towards the intended target. The fixed distance towards the circle guarantees that subjects have an approximately constant speed when passing the ring, independent of angle of attack. The ring always had the same width as the circle to ensure that the motoric widths were approximately equal when attacked from a straight line, leading to the perception of two targets.

6.4.6 Maximum Tactile Force Level

The maximum force levels applied to the ball independent of the hand were 0 mN for the no tactile feedback condition and 225 mN for the tactile feedback condition. The tactile field associated with the circle was the hole form (depicted in figure 6.3), whereas the tactile field associated with the ring (depicted in figure 6.4) was derived from the hole form, such that it consisted of many small, slightly overlapping, tactile hole forms.

When approached from any direction, the circle form was felt. as a dip towards the centre of the circle, with a diminishing force level towards the centre. The ring form was felt, when approached

Page 52: 1994 Afstudeerverslag IPO

6.4. DESCRIPTION OF THE EXPERIMENT 47

Force

Figure 6.3: The tactile field used for the circle. Force was directed at the centre.

Force

Figure 6.4: The tactile field used for the ring. The left image gives a complete overview of the forces associated with the tactile field, where force was directed at the center of the small holes. The number of small holes, with a diameter equal to the width of the ring, inside the ring varied as a power· of two to ensure that the ring was symmetric in the tested compass directions and completely filled with slightly overlapping tactile fields. The right image describes a small part of the tactile field using colors. Brighter colors indicate stronger forces, whereas black indicates a zero force level.

from any direction, as many adjacent dips in the surface of the ring. The tactile forms closely corresponded in surface area to the visual targets.

The hole form and the 225 mN level of feedback were chosen since the combination had proven (see previous chapter) to pair good objective and subjective performance in terms of movement time towards target, reaction time and quality of feeling. The ring form was made up of many hole forms, equally sized as the circle form, to simulate the tactile perception of an interfering target on the path towards the target circle. Both tactile forms are mathematically described in appendix A.

6.4.7 Visual Workload

A medium and high visual workload level were tested. The visual workload was increased by r:.:ombining the target acquisition task with a visual search task. The subjects were instructed to look for the appearance of the character 'b' or 'h', simultaneously with the acquisition task. After successful selection of the circle, they had to indicate whether a 'b', a 'h' or no character at all had been visible.

These two characters were chosen to increase task difficulty since they are likely to be confused. Bouma (Bouma, 1971) demonstrated that 'b' and 'h' (Courier font, 10 pt) are easily confused with each other when displayed for 200 ms at a distance of 50 em in a range of 33 degrees, both horizontal and verticaL When a 'h' was shown, a 'b' was perceived with a probability of 14%. A

Page 53: 1994 Afstudeerverslag IPO

48 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

'h' was perceived with a probability of 27% when a 'b' was shown. The characters appeared in a square area of 62.4 * 66 mm around the pointer. The characters

were positioned in such a way that the characters were never drawn over the pointer. They were chosen from the Adobe Courier font-family and had dimensions of 7.8 mm height times 6 mm width. The characters were visible for at least 50 ms and at most 67 ms, with the far largest distribution around 51 ms. The variance was caused by delays up to 2 ms in the software and delays up to 17 ms induced by the monitor beam which operated at 60 Hz.

6.4.8 Value and Type of DC-gain

Two types of DC-gain were tested as described before: non-contextual or fixed DC-gain and con­textual DC-gain. Three different DC-gain values were tested: 15.1, 21.4 and 30.2. The contextual DC-gain is calculated by doubling the DC-gain value, as opposed to the non-contextual DC-gain, when approaching the centre of the target. When moving away from the centre, the DC-gain was 2/3 times the normal DC-gain. This behaviour made the contextual motoric width equal to the normal motoric width when the target was completely passed to ensure that the subject's was not directly influenced. Outside the target, the DC-gain behaviour of the contextual DC-gain was non-contextual.

6.4.9 Questionnaire

After a block had been completed, a questionnaire was presented to the subject. Subjects were required to rate their impression of tactile quality and pointer tracking speed for the last block. These subjective measures were rated on a five point scale using the trackball. The perceived quality of tactile feedback was rated from "unpleasant" (1) to "pleasant" (5). Pointer tracking speed was rated from "too slow" {1) to "too fast" (5).

6.5 Data Collection

The following measures were recorded for each trial:

tresp: total actual response time, i.e. the difference between the time at which the pointer had been moved for more than 3.0 em in total and the time at which the button was hit,

tm0 ,,: actual movement time, i.e. the difference between the time at which the pointer had been moved for more than 3.0 em in total and the time at which the target was entered the final time, and

Err: whether the subject missed the circle.

A series of pilot tests using four subjects was conducted to assess the face validity of these measures. Secondly, the pilot data confirmed the settings for the presence of an interfering target, target difficulty, DC-gain values and contextual DC-gain type in terms of having an influence upon performance. Based on the results from the pilot, the contextual DC-gain type during the experiment was such that the motoric width of a target with contextual DC-gain was equal to the motoric width with fixed DC-gain. The subjects from the pilot experiment did not participate in the actual experiment.

6.6 Results

All data were analysed statistically using SAS (SAS Institute Inc., 1990). Results from the 40 trials per block indicated that performance in the first trial across all blocks showed no correlation with the remaining trials. Given that subjects were unaware of the feedback condition when beginning a new block, the first trial was omitted from the data analysis. Trials which were completed while

Page 54: 1994 Afstudeerverslag IPO

6.6. RESULTS 49

Table 6.2: Means and standard deviations of total actual response time by tactile force level and visual work load.

tresp (ms) Workload (-) Force (mN) mean sd low 0 895 248

225 786 242 high 0 933 263

225 840 259

the pointer was outside the target area were used only in the analysis of the number of errors. Extremely low or extremely high scores across all objective dependent variables were defined as those which fell into the bottom or top 2.5% of the variable's distribution. Extreme scores were removed from the analysis to eliminate time rounding errors of the data collection software and unrealistic bad performance.

Total actual response time was analysed instead of the total time between start of the trial and target selection to remove the effects of a decrease in target identification time which were caused by the visual presence of the ring. A MAN OVA analysis for main effects indicated that total actual response time was significantly affected by all of the target conditions: visual workload, target force level, DC-gain type, DC-gain value and and the presence of an interfering target. Combined effects were found for the presence of an interfering target and target force level, and the presence of an interfering target and DC-gain value. A second measure for objective performance, actual movement time, was studied for the performance characteristics of DC-gain type. The analysed dataset of the stochastic variable total actual response time contained 13754 samples, whereas the set of actual movement time contained 13753 samples. The sets of tactile quality and pointer tracking speed contained 1536 samples. The following sections will focus on results from the objective measures since the results from the questionnaire did not show trends in general.

6.6.1 Visual Workload

As expected, visual workload had a significant influence on total actual response time [F(1, 15) = 9.50, p = 0.0076], 1 which increased from 840 to 886 ms by the addition of the visual searching task. However, the cost of the visual search task was significantly less [F(1, 15) = 49.81, p = 0.0001] for the no tactile feedback condition (38 ms, table 6.2) than for the combined tactile/visual feedback condition (54 ms) which is in contradiction with the hypothesis that the addition of a secondary visual task should result in a larger performance decrease in the visual-only feedback condition than in the combined tactile/visual condition. The presence of an interfering target was not of influence on the 54 ms increase in total actual response time for the combined tactile/visual feedback condition [F(1, 15) = 1.45, p = 0.2478].

No character was shown in 11.3% of all trials with the secondary task. A 'b' was shown in 44.0% and a 'h' in 44.7% of all trials. The percentages errors in character recognition were 15.8% for the 'b' and 13.4% for the 'h'. When no character was shown, the percentage error in recognition was 12.0%.

6.6.2 Target Force Level

Total actual response time decreased significantly by increasing target force level [F(1, 15) = 89.07, p = 0.0001]. The addition of tactile feedback to the visual-only feedback conditions led to a decrease in total actual response time from 914 ms to 813 ms. The percentage of errors decrea:sed from 4.5% for the visual-only condition to 1.8% for the combined tactile/visual condition. Quality

1 Please refer to appendix B for an explanation on this notation.

Page 55: 1994 Afstudeerverslag IPO

50 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

Total actual response lime (ms)

1000

975

950

925

900

875

850

825

800

775

750

951

15.1 21.4 30.2

I-- 0 ------1 15.1 21.4 30.2 Gain value (-)

r----- 225 ---{ Force level (mN)

Figure 6.5: Total actual response time by DC-gain value and target force level.

Table 6.3: Means and standard deviations of quality of feeling and pointer tracking speed on a 5 point rating scale by DC-gain value.

Quality(-) Speed(-) DC-gain (-) mean sd mean sd

15.1 3.04 0.55 3.20 1.09 21.4 3.01 0.49 3.19 1.11 30.2 2.83 0.70 2.86 1.18

of feeling varied by target force level from an average of 2.62 on a 5 point scale for the visual-only conditions, to an average of 3.55 for the combined tactile/visual conditions.

6.6.3 DC-gain Value

As expected, the addition of tactile feedback had a constant effect on performance across DC­gain values as demonstrated in figure 6.5 [F(2, 14) = 0.656, p = 0.9368]. DC-gain value had a main effect [F(l, 15) = 9.9432, p = 0.0021] on total actual movement time (figure 6.6). In general, subjects performed best at the lowest DC-gain value. Higher DC-gain values enabled three subjects to improve their performance. The optimum DC-gain value for total actual response time was 21.4 when only one target was present. Addition of the ring changed the optimum DC-gain to 15.1. This effect occurr~d for both target force levels. A combined effect on total actual response time (figure 6.7) was found for DC-gain value and the presence of an interfering target [F(2, 14) = 33.24, p = 0.0001]. irrespective of target force level. Both pointer tracking speed and quality of feeling increased with decreasing by DC-gain value (table 6.3}. Quality of feeling increased from 2.83 to 3.04 and pointer tracking speed from 2.86 to 3.20 with decreasing DC-gain.

6.6.4 DC-gain Type

Contextual DC-gain was predicted to decrease the time between the start of the trial and target selection in the visual conditions. Indeed, total actual response time decreased by 35 ms from 931

Page 56: 1994 Afstudeerverslag IPO

6.6. RESULTS

Ttllal actual response time (ms)

1000

975

950

925

900

875

850

825

eoo ns 750

15.1 21.4 30.2

Gain value (-)

Figure 6.6: Total actual response time by DC-gain.

Total actual response time (ms)

950

925

900

875

850

825

eoo 15.1 21.4 30.2 15.1 21.4 30.2

J-- no1 present --I 1---- presem --1 De-gain

lntelfering Target

51

Figure 6.7: Total actual response time by DC-gain value and the presence of the interfering target.

Page 57: 1994 Afstudeerverslag IPO

52 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

Table 6.4: Means and standard deviations of total actual response time by DC-gain type and DC-gain value.

tresp (ms) DC-gain Type (-) DC-gain value (-) mean sd non-contextual 15.1 851 232

21.4 864 260 30.2 908 299

contextual 15.1 830 226 21.4 838 246 30.2 888 280

Table 6.5: Means and standard deviations of actual movement time by DC-gain type and target force level.

tmov (ms) Force (mN) DC-gain Type (-) mean sd

0 non-contextual 554 51 contextual 538 47

225 non-contextual 487 60 contextual 482 56

to 897 ms through the addition of contextual DC-gain in the visual conditions [F(l, 15) = 9.47, p == 0.0077]. However, the decrease in total actual response time from 819 to 808 ms through the addition of contextual DC-gain in the combined tactile/visual feedback condition was not significant [F(1, 15) = 0.71, p = 0.41]. This might indicate that contextual DC-gain simulates the variances in muscular effort associated with tactile feedback.

Surprisingly, subjects adapted their movement pattern outside the target because of contextual DC-gain in the target region. Actual movement time (table 6.5) was significantly decreased by 16 ms through the application of contextual DC-gain to the visual conditions [F(l, 15) = 4.61, p = 0.0485]. DC-gain type and DC-gain value (table 6.4) had no combined effect (F(2, 14) = 0.03, p = 0.9681].

6.6.5 Presence of an Interfering Target

It was expected that the presence of the interfering target influenced performance more strongly in the combined tactile/visual feedback conditions than in the visual-only conditions since the IPO­trackball catched the pointer inside a target, thereby hindering movements. Indeed, total actual response time (figure 6.8) was significantly (F(l, 15) = 211.63, p = 0.0001] increased by 104 ms in the combined tactile/visual conditions by the addition of the interfering target, whereas total actual response time remained constant in the visual-only conditions [F(l, 15) = 0.16, p = 0.6984].

The percentage of ch'lracter recognition errors during the visual search task was influenced by the presence of the interfering target. When only the circle was present, the average percentage of errors was 10.8%, whereas the average percentage of errors was 16.5% when the ring was also present.

6. 7 Discussion

The addition of tactile feedback to visual-only target selection feedback significantly decreased total actual response times. This improvement was found to be constant across the tested DC-

Page 58: 1994 Afstudeerverslag IPO

6. 7. DISCUSSION

Total actual response time (ms)

not present present

r-- 0 --I

870

756

not present present

53

Interfering target (-)

Target force level (mN)

Figure 6.8: Total actual response time by the presence of the interfering target and target force level.

gain values. It appears that once an optimal DC-gain value has been determined for minimal time to target in a visual target acquisition task, maximum performance over DC-gain values in the combined tactile/visual task can be achieved by pure addition of tactile feedback.

The DC-gain value, which produced the lowest average total actual response time, was found to decrease by the presence of the interfering target, independent of target force level (figure 6.7). However, the average actual response times were not influenced by the presence of the interfering target in the visual-only condition (figure 6.8). In short, visual objects in the user interface, such as objects near the target, may have an impact on human performance.

Contextual DC-gain was found to improve objective performance in the visual-only conditions, whereas performance in the combined tactile/visual conditions was not improved by the addition of contextual DC-gain. This suggests that contextual DC-gain in the visual condition partially compensated for the performance improvements caused by the variances in muscular effort required for movements in the tactile feedback condition.

The decrease in total actual response times by the addition of contextual DC-gain may have occurred because of a change in stimulus response relation. This relation might have been changed by a faster perception of the visual modality to unexpected speed deviations in linear movements than to the absolute position of the pointer in relation to the target. Since the pointer generally is in retinal vision during the hand-induced movement towards the target, unexpected leaps in pointer position (as caused by the sudden increase in DC-gain in the target area by a factor two) might cause a saccade to catch up with the pointer since the picture on the retina changed unexpectedly. The simple detection of this behaviour might have been a faster trigger for pressing the button than the detection of the pointer being inside the target which additionally requires recognition of the position of the pointer in relation to the target. Although this relation is similar to the fast reaction to tactile stimuli, as discussed in the previous chapter, the performance gains for contextual DC-gain are not as large as for tactile feedback.

Although actual movement time and total actual response time generally showed no unexpected relation, actual movement time to target was found to be significantly decreased by contextual DC-gain, although to a lesser degree than total actual response time. Actual movement times decreased by the addition of contextual DC-gain in spite of the fact that during the movement towards the target's border non-contextual DC-gain was applied. Subjects might have adapted

Page 59: 1994 Afstudeerverslag IPO

54 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

their complete movement pattern, based on the expected behaviour of the pointer in the target area. However, as suggested in the previous chapter, a change in behaviour can occur because of the direct intervention of tactile feedback with user's movements. As the user's movements were not directly influenced by contextual DC-gain in the visual conditions, it remains for further research to determine what factor(s) influenced the impact of contextual DC-gain on actual movement time. A starting point for such research might be to examine the relation between subjective ease of target acquisition and actual movement time.

DC-gain type and DC-gain value were found to be orthogonal, i.e. changes in tactile force level were found to affect total actual response time by a fixed time for all DC-gain values. It is suggested that the addition of contextual DC-gain to a visual-only target acquisition task will decrease time to target by a constant time for all tested DC-gains.

When tactile feedback was added to a visual-only interface, target acquisition was faster and the number of errors was reduced. However, it was found that the presence of an interfering target could largely undo the decrease in total actual response time of combined tactile/visual feedback over visual-only feedback. Both subject reports and experimentor observations indicated that the 'catching' of the pointer during passage of the ring reduced performance and increased frustration. The increase in error rate for character recognition by the addition of the interfering target was probably caused by visual overlaps of the interfering target and the shown characters.

The addition of tactile feedback in the secondary task conditions led to a smaller improvement in performance than the addition of tactile feedback in the single task conditions. This is contrary to the findings of Burke (1980) and Keyson (in press) who found that the addition of an extra modality for two-task conditions actually improved performance more than the addition of an extra modality for single-task conditions. An insufficient independency of the two tasks might have caused this discrepancy between findings. If the visual modality processed more information in the tactile feedback conditions than in the visual-only conditions, the addition of a secondary visual task might have had a larger impact on total actual response times in the tactile feedback conditions than in the visual-only conditions since the competition between the two tasks was larger in the tactile conditions. However, this explanation is not supported by any circumstantial data. It remains for further research to determine why the findings on the addition of the secondary task were not in line with the hypothesis.

6.8 Conclusions

The influences on human performance of visual workload, DC-gain and presence of an interfering target were studied to optimise both visual and tactile feedback for a target acquisition task. As expected, the addition of an interfering target increased total actual response times more in the tactile feedback conditions than in the visual-only conditions since the user's movements are influenced to give tactile feedback. The negative effect on total actual response time in tactile feedback conditions, caused by the addition of an interfering target, should be taken into con­sideration during the design of user interfaces, based on a pointer-catching device such as the IPO-trackball.

A different layout of the applications in the user interface might solve problems caused by the presence of interfering tactile targets. An alternative solution is dynamic adaptation of the feed­back, supplying tactile feedback only when relevant. Such a dynamic adaptation can be realised by movement endpoint predir:tion. Since movement endpoint prediction offers an application­independent means to solve such problems, it should be preferred above application-dependent solutions which may involve costs in restructuring existing interfaces. Lacking sufficient methods for movement endpoint prediction, research on tactile feedback with devices that influence user's movements should be accompanied by research on methods for movement endpoint prediction.

The application of contextual DC-gain instead of non~contextual DC-gain decreased total actual response times for the visual-only conditions, which is in accordance with the findings of Flach, Hagen & O'Brien {1990). However, this effect of contextual DC-gain was not present in the tactile feedback conditions. This might indicate that contextual DC-gain can partially compensate the

Page 60: 1994 Afstudeerverslag IPO

6.8. CONCLUSIONS 55

decreases in total actual response time, caused by the variances in muscular effort required for movements in the tactile feedback conditions.

Part of the performance improvement of contextual DC-gain might stem from a faster stimulus­response relationship, triggered by the unexpected leaps of the pointer when the DC-gain value changes. Since actual movement times were also decreased by contextual DC-gain, it is suggested that a change in user's behaviour occurred for the movement towards the target. This change in behaviour must have been induced by the user's awareness of the application of contextual DC-gain in the target area, since outside the target area a non-contextual DC-gain was applied.

The effects on total actual response time of the presence of tactile feedback and DC-gain type were found to be orthogonal with DC-gain value: both the addition of tactile feedback and the addition of contextual DC-gain to a target acquisition task decreased total actual response time by a certain fixed amount for all tested DC-gain values. This finding makes determining a new optimal DC-gain value superfluous, as expressed in minimal total actual response time, when either tactile feedback or contextual DC-gain is added to or eliminated from a previously optimised target acquisition task.

Both studies clearly confirmed that tactile feedback offers possibilities to enhance existing user interfaces in terms of performance and ergonomics. However, tactile feedback, as supplied by the IPO-trackball, can not be merely added to an existing user interface, especially since it can interfere with the user's movements.

The two studies indicated that tactile feedback, applied to selectable objects in the user interface, should be optimised. The second study indicated that tactile feedback is most effective, and can be studied best, when applied to an interface that provides efficient visual movement feedback. Such an interface should also take into consideration the potential of multiple targets and their layout with respect to user movements.

Page 61: 1994 Afstudeerverslag IPO

56 CHAPTER 6. DC-GAIN, INTERFERING TARGETS AND VISUAL WORKLOAD

Page 62: 1994 Afstudeerverslag IPO

References

Akamatsu, Motoyuki, MacKenzie, I. Scott & Hasbroucq, Thierry (in press} A Comparison of Tactile, Auditory, and Visual Feedback in a Pointing Task Using a Mouse-Type Device. Ergonomics.

Arnaut, Lynn Y. & Greenstein, Joel S. (1986) Optimizing the Touch Tablet: The Effects of Control-Display Gain and Method of Cursor Control. Human Factors, 28(6), 717-726.

Arnaut, Lynn Y. & Greenstein, Joel S. (1987) An evaluation of display/control gain. Proceedings of the Human Factors Society 31 Annual Meeting, 437-441.

Arnaut, Lynn Y. & Greenstein, Joel S. (1990) Is Display/Control Gain a Useful Metric for Optimizing an Interface. Human Factors, 32(6), 651-663.

Atkinson, William D., Bond, Karen E., Tribble III, Guy L. & Wilson, Kent R. (1977) Computing with feeling. Computer & Graphics, 2, 97-103.

Berchem-Simon, Odette (1982) Ergonomics Glossary, Terms Commonly Used in Ergonomics. Utrecht/ Antwerp: Bohn, Scheltema & Holkema.

Borland (1992) Borland Pascal with Objects, version 7.0, Language Guide. Borland International Inc., 1800 Green Hills Road, Scotts Valley, CA 95067-0001, USA.

Bouma, H. (1971) Visual Recognition of Isolated Lower-Case Letters. Vision Research, 11(5), 459-474.

Brems, Douglas J. & Whitten II, William B. (1987) Learning and Preference for Icon-Based Interface. Struk, Steven S. (ed.) Proceedings of the Human Factors Society - 31st Annual Meeting, 125-129.

Broadbent, D.E. & Gregory, Margaret (1965) On the interaction of S-R compatibility with other variables affecting reaction time. British Journal of Psychology, 56(1), 61-67.

Buck, Leslie (1980) Motor performance in relation to control-display gain and target width. Ergonomics, 23(6), 579-589.

Burke, Michael W., Gilson, Richard D. & Jagacinski, Richard J. (1980) Multi-modal information processing for visual workload relief. Ergonomics, 23{10), 961-975.

Buxton, William (1986) There's More to Interaction Than Meets the Eye: Some Issues in Manual Input. In: Norman, Donald A. & Draper, Stephen W. (eds.) User Centered System Design, New Perspectives on Human-Computer Interaction. Hillsdale, New Jersey: Lawrence Erlbaum Associates, 319-337.

Cox, Brad J. (1986) Object Oriented Programming: An Evolutionary Approach. Addison-Wesley.

Dodani, Mahesh H., Hughes, Charles E. & Moshell, J. Michael (1989) Separation of Powers. Byte, 14(3), 255-262.

Duffy, Elizabeth {1962) Activation and Behavior. London: Wiley.

57

Page 63: 1994 Afstudeerverslag IPO

58 REFERENCES

Engel, F.L., Goossens, P. & Haakma, R. (1994) Improved efficiency through I- and E-feedback: a trackball with contextual force feedback. Manuscript 1013. Institute for Perception Research, Eindhoven University of Technology, the Netherlands.

Fitts, Paul M. (1951) Engineering Psychology and Equipment Design. In: Stevens, S.S. & Langfeld, Herbert S. (eds.) Handbook of Experimental Psychology. New York: John Wiley & Sons, 1287-1340.

Fitts, Paul M. (1954} The information capacity of the human motor system in controlling the amplitude of movement. Journal of Experimental Psychology, 47(6), 381-391.

Fitts, Paul M. & Peterson, James R. (1964) Information capacity of discrete motor responses. Journal of Experimental Psychology, 67(2), 103-112.

Fitts, Paul M. & Seeger, Charles M. (1953} S-R compatibility: Spatial Characteristics of Stimulus and Response Codes. Journal of Experimental Psychology, 46, 199-210.

Flach, John M., Hagen, Brent A. & O'Brien, Daniel (1990) Alternative Displays for Discrete Movement Control. Human Factors, 32(6), 685-695.

Floyd, Michael (1993) Comparing Object-oriented Languages. Dr. Dobb's Journal, 18(11}, 104-118.

Frith, Christopher D. & Done, D. John (1986) Routes to action in reaction time tasks. Psycho­logical Research, 48(3), 169-177.

Gibson, James J. (1962} Observations on Active Touch. Psychological Review, 69(6}, 477-491.

Gilson, Richard D. & Fenton, Robert E. (1974) Kinesthetic-Tactual Information Presentations­Infiight Studies. IEEE transactions on systems, man, and cybernetics, SMC-4(6}, 531-535.

Gittins, David (1986) Icon-based human-computer interaction. International Journal Man­Machine Studies, 24, 519-543.

Goossens, P.H. (1992) Trackball with force feedback. Report 882. Institute for Perception Re­search, Eindhoven University of Technology, Eindhoven.

Greenwald, A.G. (1972) On Doing Two Things at Once: Time Sharing as a Function of Ideomotor Compatibility. Journal of Experimental Psychology, 94(1), 52-57.

Heller, Morton A. & Boyd, Marsha E. (1984) Touching with a Wand. Perceptual and Motor Skills, 58(2), 390.

Heller, Morton A., Scrofano, Danette K. & Nesbitt, Kimberly D. (1989) Effect of Tactual Scanning Mode on Braille and Shape Recognition. Bulletin of the Psychonomic Society, 27(2), 131-132.

Hinton, Ronald A.L. (1993) Tactile and audio-tactile images as vehicles for learning. Non-Visual Human-Computer Interactions. Loughborough University of Technology, 169-179.

Johnson, Jeff (1987) How Closely Should the Electronic Desktop Simulate the Real One. SIGCHI Bulletin, 19(2), 21--25.

Johnson, Jeff, Roberts, Teresa L., Verplank, William, Smith, David C., Irby, Charles H., Beard, Marian & Mackey, Kevin (1989) The Xerox Star: A Retrospective. Computer, 22(9), 11-29.

Kappers, A.M.L., Koenderink, J.J. & Lichtenegger, Inge (1992) Haptic Identification of Curved Surfaces. Tech. rept. UBI-T-92.MF-068. Utrecht Biophysics Research Institute.

Kappers, Astrid M.L., Koenderink, Jan J. & te Pas, Susan F. (1993) Haptic Identification of Dou­bly Curved Surfaces. Tech. rept. UBI-TR.93-MF-039. Utrecht Biophysics Research Institute.

Page 64: 1994 Afstudeerverslag IPO

REFERENCES 59

Keyson, David V. (1994) Doctoral Research Proposal. Internal IPO document.

Keyson, David V. (in press) Tactile Directional Cues in a Game Environment. Simulation and Gaming, An International Journal of Theory, Practice, and Research.

Keyson, David V. & Houtsma, A.J.M. (1994) Angle discrimination for a tactile point stimu­lus moving across the fingerpad. Report 980. Institute for Perception Research, Eindhoven University of Technology, the Netherlands.

Krueger, Lester E. (1982) Tactile perception: a sourcebook. Tactual perception in historical perspective: David Katz's world of touch. New York: Cambridge University Press.

Leenders, Guido, Holtman, Koen & Wevers, Harry (1992) Compilers II. Technical Report. Eind­hoven University of Technology.

Leeper, Robert W. (1963) Learning, Perception, Motivation, and Personality. In: Koch, Sigmund (ed.) Psychology: A Study of a Science. McGraw-Hill Book Company Inc., 365-487.

MacKenzie, I. Scott (1989) A Note on the Information-Theoretic Basis for Fitts' Law. Journal of Motor Behavior, 21(3), 323-330.

MacKenzie, I. Scott (1992) Movement Time Prediction in Human-Computer Interfaces. Proceed­ings of Graphics Interface '92, vol. 7. University of Guelph, 140-150.

Mackinlay, John, Card, Stuart K. & Robertson, George G. {1990) A Semantic Analysis of the Design Space of Input Devices. Human-Computer Interaction, 5, 145-190.

Magee, Lochlan E. & Kennedy, John M. (1980) Exploring pictures tactually. Nature, 283, 287-288.

Mayhew, Deborah J. (1992) Principles and Guidelines in software user interface design. Prentice Hall.

Meyer, Bertrand (1988} Object-oriented software construction. Prentice-Hall International Series in Computer Science. London: Prentice-Hall.

Meyer, Bertrand (1992) Eiffel: the language. Prentice-Hall object-oriented series. London: Prentice-Hall.

Minsky, Margaret, Ouh-young, Ming, Steele, Oliver, Brooks Jr., Frederick P. & Behensky, Max (1990} Feeling and Seeing: Issues in Force Display. ACM Computer Graphics, 24(2), 235-243.

Moolhuysen, J.P.M. (1991) Trackball met terugkoppeling. Report 776. Institute for Perception Research, Eindhoven University of Technology, the Netherlands.

Nielsen, Jakob (1993) Usability Engineering. Academic Press.

Nye, Adrian (1988) Xlib Programming Manual for Version 11 of the X Window System. The X Window System Series, vol. 1. Sebastopol, CA: O'Reilly & Associates, Inc.

Oborne, David J. (1987) Ergonomics at work. John Wiley & Sons.

Rimmer, Steve (1993) Super VGA Graphics: programming secrets. London: Windcrest.

Robson, David (1981) Object-Oriented Software Systems. BYTE, 6(8), 74-86.

Rogers, Steven P. (1979) Stimulus-response Compatibility: Extra Processing Stages versus Re­sponse Competition. Proceedings of the Annual Meeting of the Human Factors Society, 415-419.

Rumbaugh, James, Blaha, Michael, Premerlani, William, Eddy, Frederick & Lorensen, William (1991) Object-Oriented Modelling and Design. NJ: Prentice-Hall.

Page 65: 1994 Afstudeerverslag IPO

60 REFERENCES

SAS Institute Inc. {1990) SAS System. Cary, NC: SAS Institute Inc.

Shannon, Claude E. & Weaver, Warren (1949) The Mathematical Theory Of Communication. Urbana: The University of Illinois Press.

Simon, J.Rkhard, Hinrichs, James V. & Craft, John L. (1970) Auditory S-R compatibility: Reac­tion time as a function of ear-hand correspondence and ear-response-location correspondence. Journal of Experimental Psychology, 86(1), 97-102.

Smith, D.C. (1985) Origins of the Desktop Metaphor: A Brief History. Proceedings of the ACM Annual Conference, 548.

Sprinthall, Richard C. (1983) Basic statistical analysis. Addison-Wesley.

Stennett, Richard G. (1957) The Relationship of Performance Level to Level of Arousal. Journal of Experimental Psychology, 54(1), 54-61.

Stroustrup, Bjarne (1986) The C++ Programming Language. Amsterdam: Addison-Wesley.

Tdi,nkle, U. & Deutschmann, D. (1991) Factors influencing speed and precision of cursor position­ing using a mouse. Ergonomics, 34(2), 161-174.

van der Made, R. (1993) The temporal trajectories of discrete manual movements, aimed at a visual target: a literature study. Report 922. Institute for Perception Research, Eindhoven University of Technology, the Netherlands.

van der Made, R. (1994) Predicting the endpoint of a manual pointing movement, aimed at a visible target. Report 922. Institute for Perception Research, Eindhoven University of Technology, the Netherlands.

Varney, Nils R. & Benton, Arthur L. (1975) Tactile perception of direction in relation to handed­ness and familial handedness. Neuropsychologia, 13(4), 449-454.

Wiener, EarlL. (1975) On Simultaneous Monitoring and Tracking. Journal of Applied Psychology, 60(1), 100-105.

Wilkinson, Robert T. (1961) Interaction of Lack of Sleep with Knowledge of Results, Repeated Testing, and Individual Differences. Journal of Experimental Psychology, 62(3), 263-271.

Wilkinson, Robert T. ( 1963) Interaction of Noise with Knowledge of Results and Sleep Deprivation. Journal of Experimental Psychology, 66(4), 332-337.

Wolfram, Stephen (1991) Mathematica: a system for doing mathematics by computer. 2nd edn. The Advanced Book Program. Redwood City, CA: Addison-Wesley.

Page 66: 1994 Afstudeerverslag IPO

Appendix A

Tactile Fields

The tested tactile fields are described in this appendix in mathematical terms as they appeared in the employed design tool Mathematica 2.2.1 (Wolfram, 1991). The circular tactile fields were expressed as functions mapping position to force instead of using heightmaps, as described in chapter 4, since force functions simplified understanding the visual plots of the tactile fields. If necessary, heightmaps can be generated from the force functions by integration. The functions for the tactile circle fields (FLengthCircle) and tactile rings (FLengthRing) were built from constants, given in the next section, and simple functions, described in section A.2.

FLengthCircle uses a function {AddZero) to remove tactile feedback from the center of the tactile field to avoid oscillation. AddZero preserves the size and distribution of the tactile feedback outside the zero center. It calls the actual functions determining the tactile form (ForceFlat, ForceHole and ForceCombined), depending on the argument FunctionNr. FLengthRing tests whether a position falls inside the ring (InsideRing) and into which small tactile hole field (en). Once the position inside such a hole field is known, it employs AddZero to calculate the tactile force.

A.l Constants

ForceMult determines the maximum tactile force level.

ForceMult:=225

ZeroForce determines what ratio of the tactile field diameter should be without tactile feedback.

ZeroForce:=5

The diameter and radius of the tactile circle targets.

DiaCircle:=20 RadCircle:=DiaCircle/2

The diameter and average radius of the tactile ring targets.

DiaRing:=120 RadRing:=DiaRing/2

The inner and outer radius of tactile ring targets.

InnerRadRing:=RadRing-RadCircle OuterRadRing:=RadRing+RadCircle

The number of small tactile hole fields inside the ring and the angle of the ring allocated to one small hole field.

NumberCircles:=2-(1+Round[Log[2, Floor[Pi/ArcSin[DiaCircle/DiaRing])]]) AnglePerCircle:=2*Pi/NumberCircles

61

Page 67: 1994 Afstudeerverslag IPO

62 APPENDIX A. TACTILE FIELDS

A.2 Functions

L determines the length of a vector.

L[x_, y_]:=Sqrt[x*x+y*y]

Definition of the fiat tactile form.

ForceFlat[Amp_, Dia_]:=-Sign[Amp]

Definition of the hole tactile form.

ForceHole[Amp_, Dia_]:=-2*Amp/Dia

Definition of the combined tactile form.

ForceCombined[Amp_, Dia_] := -If[4*Abs[Amp]>Dia,

Sign[Amp], 4*Amp/Dia]

Extend a tactile field by a center of zeroes, while maintaining its diameter and distribution:

AddZero[FunctionNr_, Amp_, Dia_]:= If[2•Abs[Amp]*ZeroForce<=Dia I I 2*Abs[Amp]>Dia, 0, If[FunctionNr==1, ForceFlat[AddCalcAmp[Amp, Dia], AddCalcDia[Dia]], If[FunctionNr==2, ForceHole[AddCalcAmp[Amp, Dia], AddCalcDia[Dia]], If[FunctionNr==3, ForceCombined[AddCalcAmp[Amp, Dia], AddCalcDia[Dia]],O]]])

Calculate the new actual amplitude of a point in a tactile field with zero space added.

AddCalcAmp[Amp_, Dia_]:=Amp-Sign[Amp]*Dia/(2*ZeroForce)

Calculate the actual used diameter for a tactile field with zero space added.

AddCalcDia[Dia_]:=Dia*(l-1/ZeroForce)

Whether a point is inside the ring.

InRing[x_, y_]:=(InnerRadRing<=L[x,y]<=OuterRadRing)

The identification number oft he small circle inside the ring that contains the point (x, y ).

CircleNum[x_, y_] :=Floor[Arg[x+I y]/AnglePerCircle+l/2]

The position of the center of the small tactile field inside the ring, containing the point (x, y) on the ring.

cn[x_, y_] := With[ {AngleCircle=CircleNum[x,y]*AnglePerCircle},

{Cos[AngleCircle], Sin[AngleCircle]}*RadRing]

Force scalar for positions on a circle tactile field for the flat (FunctionNr=1), hole (FunctionNr=2} and combined (FunctionNr=3) form.

FLengthCircle[FunctionNr_, x_,y_]:= With[{l=L[x,y]},

J

Abs [If [1==0, 0,

]

If[2*l>DiaCircle, 0, ForceMult*AddZero[FunctionNr, 1, DiaCircle]

] ]

Page 68: 1994 Afstudeerverslag IPO

A.2. FUNCTIONS

Force vectors along x- and y-axis for positions on a circle tactile field for all tactile forms.

FVectorCircle[FunctionNr_,x_,y_] := With[{FL=FLengthCircle[FunctionNr,x,y], l=L[x,y]},

If[l==O, {0,0}, {x,y}*FL/1] ]

Force scalar for positions on a tactile ring field.

FLengthRing[x_, y_] := With[{l=L[x-cn[x,y][[1)], y-cn[x,y][[2]]]},

Abs[If[l==O, 0,

]]

If [InRing [x , y] , ForceMult*AddZero[2,l,DiaCircle], 0

]

J

Force vectors along x- and y-axis for positions on a tactile ring field.

FVectorRing[x_, y_]:= With[{FL=FLengthRing[x,y], l=L[x,y]},

If[l==O, {0,0}, {x,y}*FL/1] ]

63

Page 69: 1994 Afstudeerverslag IPO

64 APPENDIX A. TACTILE FIELDS

Page 70: 1994 Afstudeerverslag IPO

Appendix B

Analysis of Variance

B.l Introduction

The mere comparison of the measured means between different groups of observations only gives hints where actual means might differ. Analysis of variance is a method to verify whether the dependent variables (e.g. reaction or movement time) were actually affected by the independent variables (e.g. tactile force level).1 The resulting statistic is the F ratio, which gives the variance between the selected groups of independent variables, divided by the variance within the groups. Variance is a measure of the amount that all scores in a distribution vary from the mean of that distribution. When scores are very similar to one another, or homogeneous, the variance is small, but when scores are dissimilar, or heterogeneous, the variance is large.

Selected groups are most likely to reflect different populations when the variance between gronps is relatively large, compared to the variance within groups. For example, an F ratio of 11 for two groups, using ten subjects, indicates that the variance between groups is eleven times greater than the variance within groups, thereby indicating that the sample groups are very likely to represent different populations and have different means. Using tables, it can be found that the probability p of being wrong, stating that these groups reflect different populations, is very small (p < 0.01). The probability of such an error is called the alpha error. In social sciences, an alpha error of maximum 0.05 has been generally accepted as a sufficient level for proving the significance of observed differences. This level has been used throughout this thesis for analysis of the observations.

In the next section, a mathematical definition of the theoretical terms will be given. Section B.3 discusses the notation for significance, followed in section B.4 by the preconditions that enable analysis of variance.

B.2 Definition

The total variability V of a stochastic variable is composed of between-group variability Vb and within-group variability Vw where 'group' refers to any partition of the independent variables. The variance V of a stochastic variable X is defined by

2)X-X} V= df

with df the degrees of freedom. The degrees of f~eedom for the total distribution, dft, are the total number of subjects, N, over all groups, minus one:

dft = N -1

1This discussion on analysis of variance is largely based on a publication by Sprinthall (1983).

65

Page 71: 1994 Afstudeerverslag IPO

66 APPENDIX B. ANALYSIS OF VARIANCE

The between degrees of freedom, dfb, are equal to the actual number of sample groups, k, minus one:

df, = k -1

Finally, the within degrees of freedom, dfw, are equal to the total number of subjects, N, minus the number of sample groups, k:

df,=N-k

Using these definitions, the variance between groups, Vi,, is equal to

. l:<X- X) h= dfb

and the variance within groups, V,, is equal to

L(X-X) Vw = dfw

Using these measures, the F ratio is defined as

F= vb Vw

B.3 Notation

In general, the F ratio and the alpha error level are noted in literature as

[F(dfb,dfw) = r, p =a]

with

dfb : between degrees of freedom dfw :within degrees of freedom r : F ratio of the variance between and within groups a : alpha error level

For example, the significance of differences in means of three sample groups for an experiment with twelve subjects might be denoted as

[F(2, 10) = 4.76, p = 0.0352],

indicating that the three sample groups stem from diffe~ent populations. The probability of erroneously stating this is 0.0352 when the requirements in the next section are met.

B.4 Requirements

F ratio can only be used for determination whether selected groups reflect different populations when the following requirements are met:

• The groups have been randomly selected.

• The stochastic variable has a normal distribution.

• The stochastic variable is in interval form (i.e. distances between samples are meaningful).

• The within-group variances are fairly similar.

Page 72: 1994 Afstudeerverslag IPO

Appendix C

Source code

C.l Expl.pas U:r•J noun. ~,)C)ne)

r;ttOOr&& EX;tl:

v•q en. Gr&ph, l.ibe\0, UbuUO, U.WU"l.O~

t tC"J 1994 tnstituu of hre~ibft JtH•ucb !indhov-·­V.raion ; expl.~• : l.l ,.,.

A~a.tbor : ••!murv •· ut• : OQido r...nctera V~tru~ 1 J.w. 'l'OOI:'"J'Struit l~ fOS'i CH Ken~- SUl It.'S ltindhoV.rt t.l. 0'475a-u:u tel. 04o .. usus

DHcr1pcionr ::r.~ii;t 0:o!I~;!:.!~~.:~~l: U.Td~r nu. em TM •X~Mrl .. nt e-1•"• of • potnt-.,.,.~c•l.ct gaae ~otith dreles.

a~to .. uu: Xtd.eh.l rel<MH n~u~1'U1 lWttwd ~h.y ~ """ ,.~_ch••·

llnprovM ~rACY •nd •tf..:ttvU:,y of dau.-gulwrinq. lt'i-12·199); W.es et>ndltions. pain'tflr uuta at: cen.tu. hivher

otiiebnc:y. U-Ql,.ltff: a.u:ter t&etih fbtlds. vlth 2•ro cet•r. 4·0~-1!1:1•~ Dult:l ,..._ &df:kd, n-ttne DPO~ ~ aetiVat•.

17·0S-lnt: ~to account for new U.... and UI-hinan-by'.

Pl..u. not• tbllt t.tM t..wtUe C~ 91.,_ wit-h t.bb aoftwu. -• e•lcul&told \l'ltbout siiiOot:hing. To r.buUd 'tfMt ori9inal ~vicur c.'OIIf.llnely. you sbould ~ DftP,..VM._x_e and DlPP_VAL.,.Y_C to t.ro in libuilO.;~u Ult ¥lJ'p1~• e.Ua to wair. tor buttoft Fr••• r.o eaUe tb..lt -it. on a apa.ceba.r pr-ue. Th••• C'hang- w.r• aot AMOlv.d. by a r.- v•~rdG¥\ #( li~lO.paa all':te. th&)" ar• ut..ts.r ..... u.

conat. ~-C•l: ~%ns_C•)•

I l\\lMtMl' Ot 4ttfet"*ht: taet.Ue-fon~UlH ) 1 ~" of ah:•• of co.tna 1

Bw_Ccl; ~O_roltCZ_CcS: t20-.J Uf(_P'JIVLT_Cot4, tUtd.f D!MCUIOD2J Kl_COMBtHATtons_e.,t: Nf\..TM¢ETS_CcS: MtN_wAtT_C$o'!iO.;

MAX_~r't_C~'?S;

mu.LL%ST_COUI~C•IO: 1NC_COI!t_$l%E_C,.20:

f a.tndWictt:.h uup or ul-.d cc.bi-Ucnt l t }tll',yl t--•Dlam./!2~ZDO_FOStCE_C1~> F~o I t ~r of ditf. force .ulr.iphc•tou. I

l ~t' of t&rqets } t Hitdi'II'Wa tiu to ~1.,- MtW*l'l ••1•rtton

of a t•t'IIJ•t atld li9ht-1no Up ~ naxt ) ( Mlilltu.n.. tJ.- to del.,- baU11Mn a•lacUon

ot a r.uo•r. AM Hvbth..:J qp th& n-xt )

t hWIIlMr of diU•nnt ton!•-~:Oiiabtuatlona ) t d1-'-•r of •-U••t: l:'oift in pixels 1 ( 1-at diUn•nc• irt dlu;et•r bu-­r.- diU.•r•nr. s.h.d cohu }

ttn !J)CE_~M_C.O; { X-p<MI leftald• v- .UQ } wtD'rii.CAHE_NlltA_C''"'fitO; 1 wtdth. q&ae ana 1 'KIP_I':I')(>E_G.UU~_AJI2A ••• e: .. o; j Y-~ top Q'- •r•• I Hetom'...,GAM~c .. no: ( h·lllivht .,,.. •na l $TAR'l'_x.,._Ca320•l.UT_!tle&_GNU_AJI.!'..\_C; ( Start .X·pos of eer-npctr.t•r l ftAM'_Y_r:.,24(hTOP_EDOE_CAM£_AAEA_C: { SUr't Y~po• of aCJ:-~~ft~:<•r ) CO..)V.flO_x_C,..l.l: I Cl)•utio &10114 X•ax:h )

l.l: I Cll*Utio &long Y·.xill' ) C•-1; I l.USIU:UI'Wid t1- v&rlilbl• 1

I Mo.,...n-r t:.tttaah •• U•-.d !o~C st&rt. tl- J t r•tl.lrll'lf&l Oc_Wb.ltt_T.ug•t u !on t&r111•t J t ~t' gf a!Hh:•conda in • l!l;aeond I

~_on._co.'b:\•xp1\1»'1f"; 1 top ot t.M ttl• hi•nn:hi• ) i$Ud•f DEMO_MOO!} LOG_Dt ..... C=-'4;\talp' < U•luJ t.o:;;_DU:_c.,PRC_Olf~-C+'OUI:_SV_t:>t't!r-••': tS.ndUl

1 ~-~~~ Gt'&pbital PQ•i~ioue 11M ~:o1ou of t.•nlpiet.ur- ~~-""¥ 1

TDCT_t'IZZ-C.,;z; { Sh.• but u ... l 'tlOC1'_totrr_c .. CMt.ultront: 1 ,l!ltaf. ben t.i .. ; '1'1:XT_eot.OJ...C•I.iObt..&lu•; { Colo'S' bH~ tt .. }

tn*' T~~t_fofta-~d.COrd t Ml~ &11 4&t& on on. t..-r~t ) X': hm99•r: { C•nt:ar X' po•lcion, Y' 1111eqwr; { C.nt•r- y posi-tion. ot-c•n int~IU f t>i-ter. l £n·or, f><xloleuu { Via1bl• on •er•-· J ltnd..~•-X, ~-Pos_Y: tnt~•t:l f £:nd: x,y poatt!<m. 1 Tot_hsp_Ti-. I Tut.~oi ro&JX>n- u-. i Ti- t;ntnlt4. ( 'tin vhan carq•t r.,qion "*"' ent.et'<l'd. )

:~:=~=~~Tt .. : rul; : ;i: == !;~:t ~::!:~ ;::u~:I:~= !!!!t~h•n t.ht'. IIIK>V-t i& -..-4. j

•M; 'l'P'_T'Yfl•"'ttaft<:t:ton(Nap, t>i•: lonqintl ~ bPQ"ittt;

var Tin•r' 'tlnr_class, ( ,...,,.t~t.t.-t' i Ul·. 11t_Cl•"*" t Ho)-41'1 "'••r-int•rfac• ) t.ag_F11•1 t.(IQ_clau> t ttola toootno l 'l'.arwe:t_P¢• 1 •r-rsy{l. .mt_TAJlCETS_Cl of 'r•t'V<ftJ'o&. 'f"JitHu

t For e-.ic•t.iort bat:~ rtun_,._ Uld C&le_lore•lh111Nl&l0ll!: l Y&r CUP .• .'rARG£1'. Foac&_PONIDLA., FOJ.e!JWt.1': in~•rt

( ••-•• Oft_Wh&t.,._T'UPt •~'"'"'" l

tu:n=t:ion on_Wh&t._"f~t 1 tntqltC": ( ..,_.turn t~t:~ H point•r 1• on • tarpt:.

otMnd.•• r•~ ,l(l)'f_C4f_1'AAGE't'_t':' • I -·· with Ul.Pointtr do

~Nbat._'tUQ<tt::NO'!'_ON_TA!!:Gft_Ct it ~i:t=~~":::ai~~~X', Ta~t-Po•fCUR_TAII.CI:'rJ.y.

PM_X, Poa_YJ "'"' TAIIt'O•tJc!c [t::Ufl_'l'AI'-Cl:l').Di••ur <liV 2,) thQ On....~t-T•rpt.:a1:UR_T.AJ~Gft

tUt~;Ct:10ft on.A_~t: l>oolMfU ( il•t\ITn if in41d. targ;u. ) .....

Otv\_1'&f9t>t:a0n_h"!Mt_Tu~t<!t>NO't_Otl_'f~£'r-C; . .. , tum:ucm t.enathlvar s. v~ lonvtntJ: ~:<UJ1: -·· ~nvt.h:•sqrt!•qy:tJ~:J •sqrtyJ): .... ,

tunct:lM ro.r.ut.J c.-.. PS-.-: lonotmi: t.oi'I(Jll\t:;

~!:.Ut..:a: .. 2"'~·FOJtcr;_MUl-T cUv Di•; _, t\lncHm; fl>rtftllld llt.illp. tHat lonoin~l: loncrh~:t: -·· if t~Abc t""'l »1!11.•

t-t.•n ro:o"'""l•l:~t.onQint(Aap)•rortci_MVt.'f •h• POt''lll\dd: «4•.Mp•f'Ofi:C!_MULT d1V Di&;

function A&tt•rr>(f• 'fP_T)'p&; Allp, Ola, l.ono:int.l 1 lonqtnt: ..... tf Al:>$t.\ltp) a2•ZDO_FOttE_C<~~<D1&

tn.n AddZ•ro ~ .. o •ts• ~z.-ro:=!CA&np~SQn..t.onvtnr.IAmpl*bb div !:•zeao_FOPcJ~C~, Dh·Dia dlv :D-O~rc~CE_C):

tun.:Uon Cde_fe>re•_XUHtf. Pon_X. Po&_Y; !olli!Jtlltl: int~tq•r: { C•\.C'\;It•t• t:M tote• in X•4J..-.euon. } v.&r t: Tf'_'l'Y'Pe:

L,K,'Jl tonqtnt: ..... C&le_Fo~:ca__x: •0: it r~T.u:g•t.l t!Mn

b.Qin x:=Pos_x~Tatvn_Po•tetm._T..\IICETI .K; Y•"'hs_Y-TU~t_f'l)fiiCtllt,TAAGE'I'l.y: I.: •t:euncHt..ftG!ehix,yl): e•sa ~-!'OfiJIUW\ ot O: f••Fo-,-1•1: l: f~•:fo("lllllla2: 2: f:•Forlllt.ll•l: •bod: 1-f a. .. o tl!JH\ C•le_,..n>._lt:•C

•U• Call:' rore•-XI=-Add::teroft. :..

- T•~t-~(<:-1la_TUI:Ol!'l"l .Dtuwurl•x dlv f.! •-nd:

function C.ale_f'orc•-'U'Hft, P.:.s_)t, Pofl_t', 1onqinti -. )nt:*'iar, ( C•lcul~ot.c- l.M fO't'tl• ll'l )t-4ir•ec.tol\. ; v•t' f: 1T_~:

L,x,y; lonqhH::: -·· Calc_f'o~e•_Y ::oO: it i~_A_'t.n-u•tl ttt.n

67

-·· X': "k&_X•T&rOiilt_Posi~-Jfl~1'AltOrtl .)II;; y: ·~-Y~1'argn_PoateufLTAltetT} ,y: I.: "toundtt.•nocl\{x.yll: cou• wrcnu:l:_t"OIIIWLA of 0; f,.,,ot'ltUl•l; l: fp•rot'ltUl&l: ~: f:o<FodiU:ift); •M:

Page 73: 1994 Afstudeerverslag IPO

68

if L•O tb.ftl. Cal.e_ror'ft_Y:•O

•1•• C•le .. F~:~rc•_Y:><Ad4%•rott, r..,

T•t'tl•t-Pot (cuft_TMG!tT).J:>i-t•rl•y cU.v L~

proc~n bpty_ll.lfl:•r: { Wait uot;U IN non. b r•l-•ed. } .....

r•PNtt until run: Ul.Po1nt•r.8utton.Pu&twd.: .... ,

J)t'oe«Nrt lnit.,Grllptl.ie•: f l.Qild fl'.tpQie• fx..,_ disc. i vu Gr_!!rtv.r, CrJIO(Mi. nr_Ctlde, 1. j: .tnt~r: ..... ~_nriv.r:.O.te«; l-nit:Gt'ilpt\ICl'._Drlv.r, or_Mode, BGt..J)lA_Cl: Er::_r:~:tGr.;JhJ.nvlt; U Err_~~ Uwn !'auJ,_En'or!CrqmErrortts:glErt"_COd•l );

•M:

~•<Nn Run_C.U..Iforc._lll.iltiplieatCI:r, tore•-~· t.t: l.ntqnl t ( Run • q..,.., 1 v.ar Start_'fiN: :r••l-:

T.no•t.•_ttit, I. Old.,.'t'aro•t, CU¥r•nt-T&rg•t., 1'ot•l-'t'i.M_D<tl4y~. 't'ilM..,_'l'o...O.l.ty, M0v.4._$0 .. f&r I

l.tl.t-o•r: a.ll.,Po•..X. hU,.,PN_lt_014. lhU-ht_Y, kll.,.Pos._Y_Old, »1tt,JtaUJO•~· Ditr_aaU_.__T:

lono1nt:

( tiae vtt.n o- •tarttldi ) ( ~r ot: t.arv•t• hit: • I loopeeunt•r ) l Which tuo.•c va• 1:1.1t: l t tuo•t \lhic:b. b und•r ptJcinur 1 t total tt.. <UhyH M<:.tUU G( randoM V..itiiY!I' J t di!IPl• v•rbbl• } [ ws.-4 (GT a10-nt:. thr•llhohl )

Polnt•r-1'04: Polnt•r-Poa1t1otL~t t poa. of ser~1tt.ter ) TU.._£n;tw.d; r.Nl: T&l'fl•t-SM!Wn: I ~ther a t41"9'ft ia .:wr.ntly Vitlbl• l

boalun:

P~•Dnv_cotnllfl't int:~l'l: t or- a coJn, } eon.at. ifR...Dtf't'D.!R'T_tns..e•l: vu c.t>ur_,.,._x. ( X•pon. of e•nt.•r C'o1n t

c.t~.ur_,.,._.,. ( V-poa. of e•nt.•r eoin l ~atw:to. n1.-.tw; int4tg•l' l { Dl.-.t•r cQln J tO_T•bl•t IU"n'(IO •• NfL.DI!"PDENT_tos_c¥11 ot r•al; AIIQ:h::rul: _ ..

tD_TabJ•fOl ;·d,$; U)_'l'UhtU:•l,St ft)_'l'ab1af2);•L5~ ( l>'tck • 11u "f cointJ) Di .... UI' 1 •SMAl.L&ST_C'Ot"-C+tMC_COtk_sl'%£...C~ t'tidO&lllll_tDS_CI : A.lllplf.tudoc•t<lllnd(IO...."l'abh[td.)~ol-uu:J: A.hQl•~•l'~llQOO)"l"Pl/1000;

C•ht•r_ros_X, •-round{siniAno;l•l ~ARctllt\ldoJ•Wlmt_CME"_II,l'l.l.,\_C <Uv 2: C•l')t•I'_Por._Y~-routld(c:o•tAnool•I•Aao\llitudot•Hl'lGH'f'_CNI:~C d.lV l:

H tC•nt•-r-Poi_Ydl) Qr' !C•nt•t~Po•-Y,.c.tlt.IOI:'tt th*n ..... A.nol•!~l••Pt/2: t:Mlt•I'.,Poi-X:•r<NMfe!otM9t•I"N=plit\ido)~~CAJttt.AJI:BA...C' dlv 2: C~tlit_t¢1_Y<H'OWldiCO• !AnQl•I"Mlplitudo} +tf£I~_CAKl~ diV l;

"""' T.u:q•t_FocUh·J ·•• oComt:.•~'-Pc&.....X: T.rv•t._f'o-11: (Ht'i , y ~ ..c.n~er_F>U_l': T•r~t_Prul lNr).Ot.-.ter::::Oi._tfl'{ Tug.t_PoatHr) .Et't"or:•f•lse: T-.r~t-P¢1 lifT) , ~t---•P-Tt-••Ulft.ltflNZlLTtta_e; 'I'U9et_l>oa l'NtJ. Tt-._Ent•TR: "'UJIDQ'If4I!::D_TlXE_C: Tarw•t,..l'l>l (lfri .surt._~_'tta. • "~f'lHED_Tllll....C: T•rq•t_Po.AIHr1.Plrn_Tth: ~<1JKDlel"lNm_TI"Mt_C;

S.tr:Ulftyhtklidl'iH. t•Uovl: S•tC.t~lottY•llow}; 'IJI.P<tl.ntn .lhlttch_Oft: J'Ul£1Up~~•lC.nt•:tJ<>•J(, Ctil.t.•r-~c._Y. Di-•t•l' cU,v J, DUIIWit.•t t:Uv ]), Ut -Pointer .Mtcb_On:

•!!l4~

-i· with Ul do Wirh Vbu•l do .....

Cl•ttt":

h~t1000,.20): B••Pt2000,l01 ~

B•ll_P1>._)Lt>ld: •Point•r .Jnput_O.vt.C"•. Pol -X: tu.ll_Pott_Y_<nd~ •IPotnu·r. htput_Devi~t• .Pos_Y:

POII!:E_WLTt•ton:•.Jfult.iptico&tor: I'O~I'OJUft1I..A:•f'crc._'l'Jt'pe; CUI't_1'Alu:t'l': ·~ _ON_TAAc.ft_Cr

P<litJ.ter_to..XrdJTI.It'tJt_C; J!Qh'J.t:•r-Pc•. 't::•ftAPT_T_C: P<lint•r .W.t'fJ_'to.Jt.v_hc!itionU'ointu _FG•t: ..,..ittt•" .swtte-..on:

Tact.i le,£lllt.pq.t_o.tvic•,•"•t: T•«1l•.J>Jtput_o.vioee, ht._FoT~•-Xt 't•etllot .CU_FQrc•_x tO.

Po1nt.•r. Pco~~:_x. i'o1nt•t. Po~~c~Yl 1'

1'&ettlo.OUtput_t>evtco .S•t-F<:rrt::·•-Yr ":'ac1::ila ""t_rorco_Y 10.

Ti-I',A•ht: Tihr,St.a:rt.: Stool"t:_Ti-!=1'i-r.spUt_1'i-r

t<ld_T.ar;;.t :"lcngHlt 1 Nll; (NO'T_~_'!'AAC!'T_C:! Cl.lnont~T•l"fl.-t 1 t:NO'r.M_'t~!'f~C;

T~c._Hl.t;ll</J;

to~o· .. 11<4_SO_P'a.l''"'o,

nt~pty_INU•r•

Poin1:.•r, Po.,._x, Point.•r.l>o::>•-11 I:

APPENDIX C. SOURCE CODE

Tarw•c._ll:bown=•t•h• ~ 'r'ocd_l'U..._Del&.yitd' •0: whil• (Nft_'\'.U.O.IT$I_Cu'l'al"JeUJii'tl do .....

tPl•y t.-ei

U not: Tuv~.lhow tbM bttgiia n-_Entned::wTt-r.split:_T~: 1"aet:H•.ouc:pu;e_t:l\n'ic•.tt.•.c: 'tt __ 'to.J)el&yl •n.ndtlsUCI~X-lfAtT_C·KlH_.»,lT.J:l•KIHJQtT_e; O.l•y(Ti-.._'foJ)el.&yJ I Pointer • SWitcb,..Of t : kalot_<:ltllatTupc•..Jtit:•ll t CU1t_~:.,..YUQ&UJ1it:•1; Po.t.n.t.rJ"O•.X:.nMtr_x_C; hirtt:•r~.Y:•ftART_Y_C'; Jioint.otr ,W.rp_To.)iev_H$1Uon(Jctat:u_Posl! ~iAUt .SW1tch.J)nt T&rpt;_.sbowr!::•tNe: S..l.l._.I>M_%_0ldt1lFoint.r.lt.li(N~i«.tos-X: BAll_fitoot_Y_Old I O<tiOinte¥' .lnput:_Oevice , i'M_Y r Beep(!i)O,l$!: ~y_autfer:

ToUl,..,TiM .. O.layedt~o:ir~~~rr~Tl-·Time_Eneu.d) ;s!C_C): •Nl:

{deul:'ain.~'tl a.u_~c~t_X:•Poim.r. tnput..,.:O.vieo.Po•..X: !la.U_Pas_T:•him:n.:ti':;I'Ut_.o.v1c•.Po•_Y: :C,it: f_kll_Pos_x: a~ thll_Po:I_X .. Ball_P~s_.'l_Old! : :Oitt:_e..ll._l'().ti_T :or• {8aU:_Poa:_Y•llall_Pil',-'f_Oldl: s...lt_pos_x_old.: •Ba.ll_roe_xs a&ll_Pos_Y_Ol4:•1U.ll_Pol_'ll

U !Ditf_.hll_Poa..X<"OI o-r (t)ift_pU_Pos_To-D) then -·· ( U tho bJtll t!KWO<l, updiat• •went varabl•• l T.actih·.OUtpuc.J:)Iivin,ll:ea•t.• Taetila.outputJ)evi~.set._fM<c•_Xt

Tacc.11•.C..t,.roii:'¢•JI :P1ff .. Ball_PH_x, Poinur.•u..x, Po.int.r.t~o~_l'}):

't'act.i.l•.OUtput.J)IiVi.:o.s.t,..Po~ .. Y\ T,.,;::tU•.O.t_tot"Ce.,'t(

tUff_hll_PM..,Y, ilolnt.f.'.Po1il_!:, Pcint•r.Poa_'ti I':

Point:lit_~.X<•Po1nt.r,to._lt• romu!UUtt:_a.U_Poa_,X .. Cl)_RATtO_x_et;

Pointotr_PctJ:, T: •Pointer. Poa_t• tO!.tMU>.itt_BaU_.Poa:_Y•e:D_AAT%0 .. Y..Cl:

Poinwr .W.f'P_'fo_Nw_.Po$it.ion(Pol.ntn_floalo

it ffoVecL$0_P'ar<"'"""-"t'HR_C: then ttovect_so_ru ~~so_rar•

•be (01tt_a.u.Pos_xl • aHit'liU_a.U_Pu_YI:

if ftlol~H_So_Fu,.~TKJLC) .r.nd COld_,-.""'t.""'NO'f .. t'JN_TARG~-CI then -·· Ta:rQet_Posi01d,..Tuoetl .start_h,_Ti.IY~· Ttur .sp.U.t_Tiu~Tott.l_Ti.IMI_O.lal{<HlllWf.C...C:

Old_'J'arv-'1: :><MOT .. ~»~-'T'UGtT _e: -· 1f (Qn_.t\..1'at'Qltt:l tiUII\ ..... it ICUILTAAOET<>C\Jrreat.,.Taq.tt.l then. -·· cunent_Ta;-g.t =..CW...TMCITr

T•r<.~~•t:_Poa!CUn.nt. ... T•I'~t}. 'ttM_Itu::•r4Ml•• 1"i ... r. $plit_11 .. •Total...,T.lu~l~!tUC-Ct

lf Tarpt._Poatcurr.nt._Ta~t).rint_~ .. o tium Tu·.,..t_PM (C'Urnnt_T.arv-t.J, Pirtt_Tila&>" Ti-t" .Spl.it_Ti.-.-Toul_fiU_o.l•~Jft>BC_C'; ....

.1 .... curr_t_Talt9•t l•NO'r_ON_TMtall't_c,

"""' t Ya a t.atqet ••1.-::•uttl' l if Potnc:•r .Button. N•twC tb•n

vi.t.h T•r~t:-~t~'t&Jt0£1'1 do -·· { tl'aa• t•l'~ .nd .. t. ito&U ) Target_ShDwn:•f•l••: · 'l"ot_M~tp...,'ti .. ;"'fi .. r .SpJ.it_Ti-·Tout_The•_t::lel~/llSt'.C..,C: tncl_Pos..X:"Poict:•r .t><ta_X: End_Pos_Y ••Polnt<n .PMi_V: Pcint.ft" .tvtr.cb_t:JU: SaU'i11Styl•lSo}idr1ll. Bh,ek1; il<lt.Col~ Ull.fr,ck) • f'H1Ell1PIHI!lt, y, Oi.-tet diV ,:. Di.tdYUt diV ~): Pcl~r.~h:eh,_on:

'T•r~ta_Hit! •'t•t<;J•t.ot_Kit•l: 014,_Taroet.: •CUJLTARC£'1"1 curreat_T•ro•t • •NOT_ON_TAAGET_C: Kov.ct.So_Far: •0:

Et"r-or: IOI\Ot on_A_ 't•ro•t: lt !rror then B••pi:!SO, 2'5)

•ls• ~lSCO,l'SJ: blop~y_I!Uff•r:

•tld.r

Ti-r.Stop:

PQtnt•r, $Vit:o::-t~_ou:

T•etll• ,0\ltpn_o.vtc•.Jt• ... t:

I ~t• log·tU• ! ... ,. for t. :•1 to NtLTAltCETS_C do ~tth T.u:o•t_Poc Ill dt! ... ,.

Lo9_VU•" Lc9 nnc_To_St.rttoreeJf\,llt.iplic•tot-1•" '• tm_To_~r!Fcrc•-'l'YP*;,.• •., lct:_'l"'o_Sti'{N&_TARGETS_e; .. • •• tm:_~_su~ til• · '• lnt_To_Su {XI•' "• Int_To_sc.r {yi ... • • ln't_Tc_su·toi..,..t•rl.,. ,., tnt_ To_$~£" il'kloL'f'o~Iilt: f&rrt~t!) .-• b•.l_To_St!!:" r'tot,.ba.p_Tl-i • • · .. J!.••l-ToJtr !'t.t..e_!at•r.OI•' • ~ fl••l_To_St:r l!lt:•:tt_I"'M_'l'I.Mi • • '• •-LTQ_su· tth·at_1'1.-el6 · '• lnt-_ To_SU"!End_Pot=,.XJ •' ' • lftt_To_Stl' i.l:nd...PO•-Y i •' ' • lnt_ To_str lT«'tih .output_t)f.vi~•. Sta1: i<::_rricttonJI • · · • 1At_To_Sti'(T«'t11•-0Utpl.ltJ)rl1e• .St-.tio:_trl.etion._YI I:

l)t"Oe.-dur• Titl•-"•V4>: ! P'r~C' •• tttl• p,.q• t~-&t. •rph~n$ tit- ouw 1 .... , t1 int.q.-r. -·· C)••rO.vh::•,

vi~b tit Vi•ual do .....

Page 74: 1994 Afstudeerverslag IPO

C.I. EXPI.PAS

S.te<>lwfTIX'r_c:ot.QlLCl: S.t.hXts:t.yletTEXT_FONT_e. Ho:ri~ir. 1'EXT_S:ttl....¢i t [Sifdef tmfO_IlOD!;} OUC:_T-xc._XY(O, 0, • ODlO ~ " DEKO HODt • t:EMO tiOD£'!1 tot' 1:•1 Ul s 44 -in

BMp(SiX),lSJ: BHpt2000,SOl; Bw.pltOO,lfiO}; .... ,

{$•b•) OU:t._Tut-.Jtno. o, 'Mallo!· l: Uandifl CUC.,..'fltXVY'tO, so, •vow ltit ~rt..n't JI:IO•t i• to ~1 an•): ou=._,..xt_xi(O, 15.•nauvk-Wrio aoa•H1k eitc*b, db op Mt'): OUt._TeEt_xt'{O, 1CIO, 'selw~ "•t"sl:l:bijnltn, t.nwi]tu.. 'I: QQ:t_Tftt;_,X'f(0,1'5C,'V•~l.poa -~~t. :!• u sn.l JDCV•H~k 'til)'); OU.t_~U1.1'1'!i,•ck ~cl•HU drultll:an • .~::» unv.w:en'11 ~t_T.xt_xr(G,200, 'circ•l ~ijnt:; .d.ul.' I: O!.tt..~!0,2SO,•so. nl 1• vo.lu Ut. dti cnckbdl ja•J: Ollt ... 'Texe_xrco.2'7S, ·t..w.oav• t.invlOtaek..'l: o-.,~ ... ~_xi!O.ll'S,'N& i.O.n '•lnt_'t'O_StrfNR,..T.utCITS,..C)•

• o:itrc•l• Jc.rljO: je d•' l; ouc .. or.xt_xr!CI,lSO, 'pl~nb•id 01a we c.• NIJt•ft·'l: out_or.xc_xyco,cso. ·~ op a. IIP&t.iebflllt oa t• beqtn.nen! · 1:

wu~ .. hr_la.at~Pre••: .... , and:

funeeion Table{i: in~l: int.~r: bel].il'l-

c•s• 1 of a, Tabl•:•l.O: 1: Tabl•:•l7: Z; Table:•ll: l: T&bl•:~<21; 4: Tabl•:=l6r s, Tabl•:•O; 6• Till:l\.••'"'§: 7t T&bh·r.,ll: .Jt TUJ.e,•lS; '1 T'Ul•:•l:

101 Tolbl•:•2': 11: T&ble1•l: l2<TUh:•U: ll: Tabl•:•,H: l.ft TUtl•~•lO: lS: 'f&bl•:•1: Ut T;U)l•••l4: 11:; T.tbl•tall: 11: T&bl•:•l: 19: 'h.bl•1•ll; 10: T&bl•:•lS: Ut 't&bl-••=6: ll: T&bl•:•ll; llt T&ttl•• •U: 2•• T&bl•:•l: 2S.: Tabl•r•22.: 2f: Tabla: .. s; ~7' T&bl•• .,:n: lll T&bl•:=4; 21: Tabl•:"'l5; lOt TAl.•~•\'1: 31: Tabl•~•ll: lll 1'abl•:•l4: ll; ..... ).;•1•: lt: Tabl•:,.20; )S: 'f&b1•: •lt:

•M: ....

.......... l•ill;

CIIU i IIOd NJLP.,..IfUL.T.,.C D( 0: ..Ult;=O: l1 fllult:-"llS; l: NUlt::liJO; Jt tcu.lt:o:)1S: .... ,

i11•l div NR_F_IIULT_C: :rera.~•l tiKld m. ... J't:IMlU\.Jo.S_C:: l: •! dlv llR,.,l"OR.Mt.ll.A$_C: o i • ' 10$kMJ.JUM" _co:r.N_c. INC'_co:rtt_st Z:E._c• i •

•hd:

p~n Upda.t•Jtutt~AQti.,.Fo-r-: v•r .t. J'l):nJI. KUlt., Dia, P<:l•_x, rae_r • .-. y, t.: int.,er:

:!!:.d~· ~i~; Porce_x. rorc•S: lonoin.t::

t: Tr_~: -·· •• •Ul ,pointer .P<:>._.X; y; =Ul. Point•r .l'oa_'l t in•O: rOW'Id:•t•lfl•; whit• u~1,, uv:t :wt rQ>.Uld de

-1n ~t-Cb<)ie•U. ""'"'· M<.llt;, Pi•. f"o•-~. P<n_Yl: F<NndJ•Dl•t.tru:•(x. y, Po•_X. f>Q•_Yic:Oi• dlv :z: lnctil: .,...,

Fmel.)ftJl.T,o:O, f{$C't-~1 .. 0;

it .. -.ad tn.n !Mqin

~T:cfN.i'tl f'OI«:'l_JI'OIU«tl.A;"P'011k' ..,.,

ur. T.et:.i l• .~tput_n.vlc• ·••••t.;; tlift_x :•lt~Po..J[: our_v:o:y~P<:nt_Y: L:•rti:WJdClAl'li;'th!Pitt_x. Di.rt_n I; ~••• fORCll,f'OMULA of 0: r:,.f'o'I'Mll&ll lt !••Por~t~~.ta:: 2: f•IIJ'(Iri'IIQ1•): •hd;

lf L•O tb•n -·· ,o:.:::._X:=O: t.:ore._'t:•O: ...

•18• .... ,. l'o.rc•_X:•.\I.ti:U.roff, L, Dhl•tltU_X d1v t.: ,C>t't;._Y'I"'Addt•roU, t., Dl•I•Dt.ff_Y di .. · Lt

•"'" IU.T&ct.U•.Oo.t.tpu.t_o.v1c•.S•t:_f'ore-•-XII'~e•-XI: UJ .'tact.il•.OI.Iti)Ut .. O.Vt.c•.Set:_Forl::•_Y irat"ce_Y');

•M;

procadur:. IW.h_rl•ld#.; 'JU i. Jlo"'· tru1t. bi&, P<!fi_X. Po~r_r: h'l-t..,..r,

&All~Pol!>,..X, { us:IJd tor 4&tltt1'1UIUIQ twit loc:,.tion ot M:Tflrhpoi.nt.~tr 1 lhU,,J•o•.J[_Old. klt_l'o•_'l. kll_foa_t_Qld, Di.ff~klLPo•~X, Di.tt_a.lt_Pt»_Y<

l())')<Jlftt.; r.:.¥"c._x. f'<>rc•_\': lnt.~~q•l': itotnt•r-~•· Pt:<tnt:•t_P.:.dtiou~~: { poe. of ••a·-npoint•r i ..... Ul.Viaw.l,CJ.••rt

Ut.Vicual.~t._T•xt.-XY!O, 2.20, 'V•t'IU'ld op Me bb.d:'): UI.VisuU..ou~_Tsxt...)t\"10. uo. 'ct. al.lbjHt.i...n lN.Uit.•iu:l.:ndNkk•n••: UI.Vtcual.Out_Ten_.Xr!O. UO.•q~.t~~ t-tt!.n V"M IU vol9<lftde <:ire.tll.'l: Vl.Vi.ua.l.OUt._'TeXt_x¥1.0, lOO,'L•t hi•tbij op devol~ erie.ni~u·l: Ol.Vi.ual.ou~_.,.._xt_x'YUt, 240,-' • M~U.'l'M-14 vu &UWdgMid'l: Ut.Vi.ual.OUt._~(O. 2-60,' van t:uti.•l• f~cl!:' II u:t.Vbual.Out_,..xt._XYID. 21o,•• pntr:.iv gevo.l vm dfl t:iMd.IHick')l UI.Viaud.OLI.t_T•xt .. XYIO. llO.'W&.Mur 1* ~ J:l.U l»itnt rond'll UI.Vbaul.O\lt._T<D:t_XY('O. l40.':S• be-t ·~riuat at door op c:h'l: ut.Visual.out .. T4txe_xt'l0, )liO,•ap.u.i•ballt t• d.t:'ul:UI.\.'1: tn:.vt.u.al.OLat_Text_lt'I'(O, 420, •Druk op ct. ~tiebalk OM v•n:t.r t• g-.u. 'I'

Wait. .. Por .. Bu.tt.on_Pr-•;

Ul.Visual.C:l•ar:

tor 1:=0 to 35 do b.egia.

$at.FU.lStyleCSIOlidF1ll, Y•llO\oll; S.tC:olor{'lellcw): O.t_Choie•{i. Po:n=, IN:lt.,. DJ,.a, P<>•J, Po$ ... Yl: Fill£1lips•IPo11..X. l'os .. Y, tlia div 2. Dia div .t•: -· Eq::n:.y,J!IIdtu;

H:l.th Ul do vieh Vi!N&l do -in aall~•...X..Ol4;fll"ol.l!Ur.Input .. :;.vie..Po:I_.X:

B&llJ'os_Y_Old.:,._"Pointft'.ln;:utJ*vtc•.hc-1';

CVJL?ARGJ:T:=flO'T_ON,.TUGET_C~

T&et:il• • .S.t_V'\ul<;:tion_X tCa.le .. f'OC'C._:(); T&C't:il•.S•C_I'IUI#t:ion_YfCAle_Porc•-YI;

PQ.\1\ta.r_Po$. X: a!OTAStT_JLC: Poinct•:r_Pos:. r: :!iTIJI:r_T_r::; hint:•r .warp_ToJt-_Posit.ion!Polntes-_Posl; P<:oin~ .CYit:eb_Oll;

TMtll•.OI.ltput_t>evlc..a-•t; Upr:iilt.•...JtUlt_Md..,Fora:

"ihile not l!l.Poi;tt•r.INtton.PUah«:l do ..... f <tet•rsirw ~ > Ball.Jos_x~ apoln&•s-.I~Le• .PM _xi a&ll_Pos:_ r: •Point•s-. IfiPI,lt_O.Vlc. , Pos_Y : tatt_lblll_po-.J::=·taall._t6a_x-aau_~os_.x_oldl: Ditf_&.ll_Pos_Y:.,-tBdlJ'oe .. Y'-Ball_Jto$_f_Oldl: Ba.1l,..POtl_lt_Ol4:,.,h11_Pos_.X: tl&llft•_Y_Otd:=hll_Po&_Y:

if (l:liff_Ball_Pos_XuOj OE' fDiff_l.lU_Pos_Y<>OI t.Mt\ ..... { tf tM ball IICWecl, update a.veul vadabl .. j Up:late_Mult_l,:'ld_form:

•ndt

Pa.!.l\t•r-Pos .x :=Polnt•r .Po._x .. s-ound !Dit r_a.ll .. PosJ;:•C1:1_M.1'10-X...C) :

Point.•s-.. fO•.v~•l'olnt•r .t>oa_Y• l'ICiua.ci!Dl£f_Ball_h .... Y"CD,.JI.\i'tO_'t_CI:

Point.•r.~_To.JI-_Podt:lon(Poi.rtter_Poal: end:

Poi-nt•r .swic.ch_Otf:

T•cUl•.CN.qNt._Ds;vh:•.~•~: •hd:

•nd.:

noe.dur• RUn...T41•t.; ( flun •U t.esu, ) V.t.r Trlat..Mr. { &:abject DUMbK- •

1. Siu_e-b:Uution, f'Mw._Multiplic.uor. Fore•_Fi•t4 .• J"Ql'Jillh-• .•. t:hoh·•~ i~ev-r: .,_...,_'l'Ml•< arny(O •. lnl: .. cottaUL\,'t'IctlS_C-11

Qf 1nt~n t ptek-tehl• ) ... ,. 1Ti.1JJir:•l:

tor l ::~<0 to Jqt_COOTNATlOM$_C~l do U&&V•-"•bl•!Jl :.,0:

vbU• Tti.al_Nr.,-Hk_.eo!UJlN.\TlGNS_c· del ..... { t.lf'lt &..ndwldtb of '"•*'~'~ } Chotce::~<PickilftLCOKBlNATIONS .. C, BW_C. Us~o~;~•_TUl•J; t 0<..cho1e.,.m_OP_COKB_C' )

cas• Choic• JKHi ,,_flUI.T_C of o: Potc•JtU.tr:ipltc&tQl'; =0• 1: ron:•_t~dt.iplicat~l~us: z~ Po«:e_ttultiplte•t.or ~-;..;'30! l• ror.::._MI.Iltlplie•~:~:~t'; .. l'?S: ... ,

UU<S.if ODIO_NOO!} Forc•Jf'Qit.l.plie•t.or:-..lSO: lhnthf)

Cholc.:o.CMte• div m_r_M\Jt.T_c·

l'ore•_F1•ld:_l'of'II'U1••~boic• flltl4 QJ'ORKUUs_c:

C'boiHt"'C'bDte• !,{tv ~f'OJUNI.AS_C:

~-FilR.lhit(t,.Otl~l'.ll',_C~fflt_To_s-r.riTt~•LHrl ~· loq' I;

~t.m._C.W.•~rore-._fN.l.tiplieuor, rore•_Pidd_l'onw1•. Idl:

h.pUOOO, SOl 1 De<tPtlS-OO,SOI; "**PI1800,S0ll &..pt1JOO.SOJ: De•P.!2000,$01:

Del&y!l'SOI:

L!tll,l_FU•.I:Mn.;

{ tntc..,.. IJ\I.bj.-et of pertol'IMI\e• l Cl••n::>evic•:

lf 'h"tal..)lt',..U "'-" .....

trl.Vl4wtl·~t_T .. t_x'f(0.220. ~elWJb.t vijf •inut•n pauz•.'l: 0.1.-ytlOOOOl: -•h•

ttt. \'lSU&LtNt._,.._.t_X'HO,l4:G.

W.it_l'¢r w»ut:ron_Pt"•••:

rnct'trl•l_Nrl:

"""'

'ln'\lX op dot tiP*ti•b&lk om Vltr:de;- t.• '1•-

69

Page 75: 1994 Afstudeerverslag IPO

70

-·· TlMT·lnit:

ltilc_ca-.umt=-:

ut.InitlSKo\l.l...POtlft'ER..C):

lluldSnd:•lO'SUl~

T1tl•Y...-•:

lbm....'l'H1::

'l'J.tMr.J::!o:M;

Ut.Dola: .....

C.2 Exp2.pas {$!'•) iSN•l { xti•eoct.. l iSA•} { AliO"Q d4U. ) i~l ( ~u~oon. J

prtoq~t:q:ll:

\II*S Cl't, ~. graph, U.bqlO, libui10, HbV.rlO:

{ (Cl 1U• lcstitue• of ,..,.c~tpt.1on bhar~ &1~

• expl.pu; I 1.0 1 It&)' lS, 19U ~ CUllio t.ellf'l(Mra vo~n-tr'"t 1 60iS 01: Hl:wn t•l, OUSI-1921

J'..n TQOI'OP•t.r·•u ll 5«42 &1 EindmvaQc t•l. 040-USHS

Deseripticnu •~ri-ntfol •ott.w.u• t:Mt: t:r ies to uathltT dat.:• em •tfttet.ivicy on ditfer.nt typ.• of ~-valu•• and tn. in:t•rebang.UJ.Uty ot taetUatvi•Wll fa~Jc, nut a:lp4-l'i .. nt:. COtU:i.tta ot .._ pol.nt-olM-B•leet 9_. vith latv- Uld -......11 circ:l-.

Att•ntion: uw. Borl.nd tD!:-cOGpiln can <:rub lol'he COfiPilin; thi• progrM. Pl•-• .., •• th• c~ .. u- -r•1a •bpe• <>t t.M flort.rv::l p,ucal COIIPil.-r.

Hi•tory: Zt- l-1994= lnitiflol r.lnaa, u .. d on •xp1.pu. a ..... U!t4.; rtnt. r••l ral••••· Vhud distracton .and

cant•xt-r~.n.it:iv. f•fllb&ck ~. 1.i- t·Utt: seorino addoMI. t.oog:lncr .r111 ftt.• wutt-riN lliiJPt"CiWCI,

19ua14rou• but U.x.•. lS~ S~li94: COil!NhU ii!VI'~· 30• S•l99t: F1m.l ef'um9•• baud. on t'dU.lU IIHM'!ant! pilot.

C~il•r: ll.:trl&ftd P.uc.t

f l( • deao of this progna :h to t.. qiv.a. Mtttw ~ •• ~ ~ th• ~ •f eotld.iti•P• Nld 1:rh·h hefiUy .nd only •t.ow. t:ore•-U•ldit •l'ld KAWDMf-v«lu• .. ttut.t •r• diff•nnt rroa tM uu•l viNal/t.c:tU• r~k inlW~l trut«.}

t• Ud.fitl* DDtO_IIODI:l •> t lt • ~•rt•in e<mditlon hu to be- t•IIU<l, d•fln• 'tES'l'...MOOlt aM UU u.

t.tt. eottdi.UOfli•CQMUnU Mt-n t:::htl $1tck>l TltST_MOnB/hlldH, ) i"' f$dotUM TIWI'_NOO!} ~1

{ !!!lf!!HtfHI!ItH!t) f t!!!t tMfOllTIIIfT !Ill! I f !!!H!!Hllllt!!!l!t! 1 { S•het • l~•· lt d!Jt:ch i* .:t-Uned. •ll t<~Jxt:• .;~:e in duteh. otn..tvl••· dl t11st b in ~U•h· }

Ud4Uru~ dutchl

t H tbi• 1• d•Uned, then tM ~Jp*C•lwir b •s•\l.m.,Q to:. be .altu.')'* MpreuH. r•tton.l •n•w•r• t~ two o1v.n end •11 d•l•Y• •.-• .. --a. l

f" i~ti- t.IO'l'_tNTERACT1VE) •1

( U uus h ct.hn.d, no •ound u output. 1 f • uuuwa NO_soumn • 1

( M~~-- ElCPU:ttffln'AL C'afSTANTS ----- )

Uit~t OI!:MO_IIODitl ( H11'!!1Hll!H!!!!l!) ( li!!! lMPOit'J'Nn' !! !! I } ( !i1l'!!H!!IH!l!!!l!} SU&}_MA,ME_Ca•t••t• t i l!!JIIll'!I!Hl!!l!!!) ! !!!ll lKPOitTAHT !!!!! ) ( lll!HI!!!IIl'I!11P!) SUI!L1JULC"15; l$•1 .. ) SUDJ'_tlNll_C,.•tf-.o•: SUBJ_NP:_C,.U.< !S•ndlt} ):P._VlstJAL •. J.0AbS_C',.2; mt_F_kULT_C•2: HJJ,_cottT'E.'C'f$_C•2: Wl.....¢AlH$_Ca l; aw_c-..t:

%ER<:'I_FOftC&_C'•S; !lOt.)

f$J.(d•t tn!HO~JtODEl UR_COUUU..'l"IOHS_C"l; ~ts_C,-i; NP:_k!t.ATlONJHST_sna_c.,s,

l ~t- <>fsut>je<:"t. l

I u_. ct #\l~jac:~ tor 4HI<> MOd•. ) i Nwlti>er -ot INbject-. l

! ~r ot ditf•T•nt vhlv•l. !~- l ( ~r .:tt d.ttf, toTe• JN.ltiplie•tora. J { ~r ot d:Uf•rent cont.xu; condi:tiot~£, I ( ~ ... .ot diffe.-ent w.tn• .C~t.nts t•ct.m. t l. h.:tdw1dt.h or u•.q• o( tried c~tnattonz. J

f lf lut. Yll..-:tU.-t•rtf.2•!.t:RO_:POJ\ca_ct•:. r.:..-c••O. 1

N~.J~'Ul!S_C.,2; { ~r gf dLU. eomtoin.aUcrus <ot!l:'~tvlthout ring. ) .,._T.\P.C&'fS_C,mt..,.\HQLU_C•IGIJl:ELATIOM_OIS'f_Sl:t£S_C'"llR_PERti:S_C;

lClN_WAtT_c,.SO; { Mln.U..... t1frllt to d«tl•:~ .bat1aan •al•cUon l!l.t • tarl)e't-~ Hohtim up th• nu·t, )

t K&Xt-';A!H tiiM t.o d•l•Y b.t,...~ a<ttoct:imt ot • t•.ro•t ~ Hwhtinv up t-h• n•xt.

H<•h•) m:I_CGt!&IMA,TIONS_C.,WLC.UNS_c~NR...,Cc:tn'&XTS_C•JQL7_HUf.,T_C•Nt\_VlSUAL_LOADS_C;

( ~r- or -.ncrt- ot ~nc -eo H c.stect. l NJLRELA { ~r of diU. diseusc•Jstu nlulons. J NR.. C tft.uv.lM.r ot dift. eoabtcecion. wit.b!wlt.hOUt. r1h'J, 1

_c~Hfi:_P:Il..AT't(IH_.DlST_srzu_c:•u_pr.JUis_c::

{ Mic1....,. ti- teo Mley M~ cel.~clou or • t.•r9•t .ad .Ughe.tng up rM ltiUtt, }

( hzi- t.L.,. co delAy tw~~ ••l.etioa or • t.r<;et ~ liohUno up ch• rwxt. }

~tR •. ~TtOfCctU.Il_MS_C",.SG: ! MiA~ t:i .. t.o dill-p}ey • ehar-aet•Y in .... l s.PAC&_C,. t Syal;bal t.bat. r-•pr•••ct• •pae•. } !hndltl

( ~1:' <>i t.tiU•r-c forca•eOfl\binatJ.et~•. ) Nl'i:~POtfiT&_oo_SCALt:_c.,S: { t~r ot ~lnt.a on !.Ho:nt·acd• for ~NI:rj.eri·n

r-at.lng. 1 t.t:PT_EOO!._a.II.ME..Afl»_C"'Ot I X.~~- l•tte:id.t 9- er••· ) Wltn'H_G.AME~~C,.64&: t Wldth 0._ ar•ll. j TOP_e:t:IGE_eAM~CaC: t Y~pol tQp o-.,.a. .ue•. } K!.lctrr_CME_.\fl;r.A_C.,UC· ( .tt.iqhe Q-.. ua ... ) START_X_C,.llO•LitM'~t::lGE..GAM£_.u.v._c: ( Stuc X·pos ~f szr•~lcC•r, J STA!tT_'t_C:::l4t'HTOP_!DGt_GAHI!_AltL\..C: ( Sten Y·pgs of ser•enpoinur. t tr_CAtN_x_c .. o. e ~ t oc~941n •l¢>nit x--l•, ..-Mn no ottt.r DC•9dn 1•

1JP*Clf1.60. ) DC_c.AIU_Y.crO.I: t l:!C·itf;ln •hmv v-aslf., wl'l•n no ottuu· OC•9•tn t•

Jlp•etf~..:s. }

APPENDIX C. SOURCE CODE

( UndatiMd ctu vuf.&bl•. } t ~ thr .. hold. ut~lld tn •tvtinq '''"· } t ~=- ot tll1U.uce~mts 1n a •eeond. } ( NualMlr ot ••c~;~tld$ co d•tay for • coft- br.U. { ~~ x'"'4ffc•t ot cbaraccar. UOUJid poin~•r. f .JliJc.iMul y•oU••t at c:barActus .arrNmi pointar. C rl'*'t· in tu ~~>f low ~•· J

NlQMJ'l'l'CH_C..SOO: [ Freq. 1ft N$ ot his:rb ton... ) OUJtATlottJCQU:...sotnm_C•lSO; [ Dundon J.n as of elM ~ incUc:.ting •cor•. } DUU,.IOII_,.a_somm_ca?S: t ouutioa i11 as of delay NtvMrl. bHpt,

itldic•ti~ •core. } { Cl.lu~t.on :Ln .. of • •Mn bHp. l ( t~~W•tioa in u of ptriod vl~h diqlev-d •con. ) t lt lt'r<l:~. 110'1. r.f.M•TlNI!L~ .. >2: pt, ) t IJ!dcial slGp* b of rttt•• l•w tunctiu. for

.:t.c.ntiftlldOA of a:pect.H ~ tiM. J t laM tor r~ ~r warnu::·•-ccr-. l ( Low t..etU.• tore., t.Hted ill. ~ri..nt, ) ( Higb t.a.etilll (orft. -c .. t!Jd in ex;!fti:Mn:c. l { ~r of it. ... to rat.. J { Y~poll. wa..n iuu co race •tart. l ( Uftdotf • V•h• hr vu-itlbl• in ulaUoa·~r-v. J { Color of ••lAetAd u..-. J { ·,r•rU.cd ou .. t for a&ia t.xt of

•pr"a br#tton' -~•xc. l r Vertical offHt of top of pap:, J { v.rcwal ott-t. Moew.ea two u-.. of uxt:. J C Pi.tlrt po•dbla ..-reb ~Ml¢.H, ) t S.COa.d poaeible .-reb Cb.al"&C:tfl'. } t &.ow CC•IJAiA ~;Hud in Q:~Mtt:iunt. J t Mff<UUA OC-q.-itl t-ted in S~riunt. Sqt-t:l*0.6 } { High DC·o•in t.est.«i: tu exp.ril:wnt.. 2•0. $ ) ( eU.ut ot bordllr ot tax~·boxe•. l

ET_aot.Ob_C: ( St41.AC!ard ~:~tt-e. <tf tUC~lKtXH. ) { Width of point.u. l I Ht.i.'Jh~ of poiuoar. I t Cbar will appi!U b.at.-.n LON and

HlGH_SHOW_O!AA..,PitOB_-r;. . • 1 HlGH,..SMt\f..,_Cli.U._PROB_c.,0.6S: I t:i-• Ute a~ted aov-t. tl- to ter9•t. ) no».....N¢ ... CWII4_Cri'.l: I Prob. of .ine.dtictru~.Uy no ch&l' 6J.#pl&)'d du:-!1:19

trial ~ith hhrh vu,..l. lo~. J

'IOP_OU._C•'ht '•bta_su_c ... ·aX;tl'; t 1'01> ot the fil• hl..:.ardlt•. ) UUliLCif'l'OS'_D:tR_C•DlR.,.SEP_c.•~q· r { 1'ep of the n• hhr.uctrie. l UifO.f ottto-_MODt} LOO.))tR_C•' it, '•D1Jl_S!P _C• 'dec& • : !S•l••J LOG_DIP_~PJ)lli:_C+DU_SII>_C•'dau• :{ N- of log~ fUn. I IS•1'141.fl CHAiLDI~C•EXUIII_C": t Pl&ea of fU.•& lodt.h f<mf;~luq••· ) TEXT_FILI.,.CaEXS_DlR_C•Dl$1_$l.P ... C• • t•xc ·:

MON_TRtM._FtLE_C•' trial .tnon•; ;row_f!t.,(l(:l_ftt.t_ca • bloclt • .on· : oaJJ)A'I'A,.IXT_C•' .obl ·: SUBJ)ATA..,PT_C•' .sub': IMP_DA~_c..·U.bpl':

C Fil• contUninv expl.an.at.ion of tho. •~i..-nt. )

f Fila tor ramot• -ttodnq:. ) { FU• tor r...n• -.itorinq. ) f ~r. for ru- wl.th obj. cut ... l { Ext. for lll•• with .ubj. det.. t { l!Jttomainn for fil•s \iJCh ~

bit .... )

t sh:• caxc. 1 t Sl:• -..u cext. t ( Fnnt: t.X't. J ( Color t..at.. J ( llKklfi'OI&DIS color. J f bt.r.a ~~ri.dth ot ch• t11xt.•boxe11. J ( IXtl'a twl.,hc of tlw t•:U.41ox••· I

t.oW.,.VtsUAL_LOAD_C .Ot l Low vi!Jud t: .. db•ek •Mbl.d. ) lilGil_V~_C•\: I H19f\ villlllll lHdtwlck aru.bled. l

t ......... TEXT ~·~ .... )

!$1fUt Wccll) l~tEAK_TXT_c.•vijt au.rNten ~u:t•. •; OIL'l'XT .... C~'.;:>lt': t l'li!Ct: ~f 'OK' ~-··itli,J<l l { T••t 1ndi.e•t!A;' to pr•s• button to CQnUn<W. J

.... ,. D.-uk op a ~~.hop .... ,.: ••.-d-t' a.v.p, d• V.:tlQ•nd• ••t•n::•: 'Total• ccro~:• ~•c:•: 'HQOG•t• lleOI'e'';

~TXT4_Ca'Jouv acor•1': s:co«r._'f'XTS_c••HDaq•t• •twr• :::ove.-: •; SCOltl_'t'XT._c.,·~n nt•uw• hoow•t. •r:o~:•! •: IIJU_TXT_c.•w.lh t•ec.r :t:q :i•'': suu_cooo_'l'XT13~ · h•etiw': SUlt.J_(I()OS)_TXT1_c.·T* h·no~·.,.·: SUBJ_I"'O)lt_'Tftt .. ca•Oflelncuo·: SUBJ .. POOR..TX'I'l_c~·-r. •-1·: OON,JtAn.,TXTl_Ca''!'&c-t.i•l• t.rugtcppelhv.r?'; SUN_IU.TLTX'fl_c .. •cunor •n.lhai<t-t·: IUS!LTX'f .. Coo'Je l\e;b(; dA ~ls-cwl ~i.stl' l uo_~'l"XT-C•'o•n' • ts.l .. l lmEAIL.T.lT_c=-• tt.v• •lnut• .b.-• .u.. ·: OK_TXT .. C•'ot:' r { 'f«<xt ot 'OK' ~-•lt9"'· J ( T•xt ihdh::•tiAQ' Co PT•se: tNttoh t.o coutin>a. t PRISS_TZT_Cr'<"< Pt-•~• tbll t»Jtton, ,.,...,.: PATE_TX'!'_C•'P1•••• rst• or:::tt. tollowlnq •-w;-••: · scott!_TX'tl_c.•curr.nc tot.&lscor•: · 1 SCOIUL.T:IM'l_c,.•eurrent htg~.:or•r •;

_e .. •Jw:r tot•l •c:.:t.-•:' • _C•'HiQI\ •eo¥• •o.t•r: •: _c,. 'A n.w blOb *t>4t*\': 'lebic:h ~b.a.t•<:t•r did you •-?· t

_QOOO_ TXTl_ca • Ph:•unt • ; $U&J_C(I(IO_TXT2 .. C,."fo.:t h:et•: SU&J_POOft_ TXTl_c=-' unpl•••umc • : $Ul'IJ_fi'OOit_TXTl_C•'TI:Io •1.0\1': StJJ>J_IIJo.H_TX"l"1_C,.•'hct1l• f•..U:.•c-k1'; SIJBJ~MATI.,.TXT2'_Cr'C\Jt"St)f' -~~1'; Mtss_TXT_c,..•You •i•lled th• ctrcl•l': NO_OLULTX"f..,.C"·~,..: (hadit)

NEWPAG&_am_c,.•NDfPAC&" 1 _c.·lfi]JIIFt.nte·: •JIQTN•: C•'!HCt.lSH': ;.DU'l'Ot.; _CMD.,..C•'~l·~

s~_CMD_c•·s~·;

lfOIOOU.. PIPIO • scou_Dato_ TAC'TlLILDfJIO """""""'AL­VISUAt._Dt M..,'l'»CETS_ na._.sESSlOHS_ OrMO_CAtll_c ... J, ; ODIO_ttORCI_C.,JSO:

.J)£110'; •'VISUAt._D:t~_v£MO·: -.•NP._1'MGC"fS.PO._S£SSlott·: S';

I DC·oain ton d-o•. } I Fore• (or t•ct~.l• t•..at>ack if\ d•~~~e•. l

tYP4> T•roet_Po._T'./ri*=r•eord K, y, l".nn:LP'f\•_X. End_PO,_'t, Po•_CMr_x. P<n_t::Mr ... Y. l"•~ck_Vtau.i_t.o.d.

{ Holde .;r,ll dolt.• on on1 t ... r.,.-t _ J ( c•nt•r x- position. 1 ! c~t•r y po•ition. 1 f 1tnd x. y i>¢S!t1ot~. I i Pol!tion of polnt-•r ~ clulr. we• dt•ptAy.d. } l High or low Yi~•t load. 1

Page 76: 1994 Afstudeerverslag IPO

C.2. EXP2.PAS

Feedback_Context, Forc:e_MUltiplicat.or, Distance, Di-ter, Diam..,.Rinq: int~ar:

Mol•. Fa..:lback_C...in, Cbar _Sbown,_ TU\a, Tot_rtasp_Tiae, t.aat._Ti.Iu, First_Ti-. Las~Tilu_Rino, Firat_T~JUnq, start_~tos_Ti-:

r-1: Charac:tax-: char: ~r_Shown, Rino_Vidble, Error, Error_Ch&racear:

boolaan: and.:

( Noncontaxtual or cotltaxeual te.dl:lack. ) { Kaxi- fore• levd. } { Dis't.Ulee ciTcl•. l { DiaJUtar c:irc:la. J ( Di-eter rinq. l

( Angle tmder wbic:h the circle appeart>d. ) ( Used De-gain. I ( Ti- wta.n char -• • .._... ) I Total response ti-. ) ( Ti- wb.n tar;:at ragoion was entered.. ) { Ti- wMn target r-oion was aneand first ei-. I I Ti. ... when ring r.;ion .., .. ant a red. J ( Ti ... vMn ri.J)g ~ion w- ant.ar.ct Unt tiM. ) ( TiM Wan after eargat. requisition 110ra tb&n ) ( t,hr, IIOV-ftt i&IIOVed.,) ( Ch&ractar eo b. look.ci for. } ( Whether the char. was sbown. J { Was the rinQ vidbla? ) I Visible 011. SCI'aaft. ) { MheUwr ella quasc.. for •-inq etw s.u-cb-cha.ractar

was ~rM correc~:ly. l

1 Pu:ftctiontYSM 1:.0 ~· t:orc:afonrulaa ~:o usar•iacarfaca. ) TF_-ryp.at:unc:tionllollp. Dia: lonointl: lODO"illt: Pint-o•r•'"iateoaJ:": Prae~:ilaJC.._Claas•ATIIctile_,.__,Clus:

'l&r Tiaer: Ti_r_Class: 1 Molds t:as~: 1:.1-r. ) UI: ut_cl.ass: 1 Holds us•r~in~:•rfaca, 1 Log_Fila_Cbj, { Holds objactiva data. l Loo_Fila_S'Ubj: t.oq_Clua: £ Holds subjec~:i" data. 1 Target_Pos: 1 Holds 4ata on t.a.rgets. I

an.y{O •• Nll_"l"~-C~l} of 'h.r9H._ks_-ryp.: Charsr I Holds i.aa9e1 of cbarac:ters. l

array['&' •• '%') ot: Iaaoa_Class; High_Score: int:e~;~•r: { Highest score tor one condit1on sgfar. ) ~r_Circles: integer: I HUaber ot small circles inside ring. ) ADQ'le_Circlasr ra•l: ( Angle bet.-n two aa.ll circles iuidtl

ri.nQ" in radi.ns. ) TactUa_Piald: array to .. ~Tlat_DlST_SI%ES_CA11 of PTac:tileJl-._ctu•:

( Tac:tUa display IH&Ory for all possible co=ttin.tion. of circ:las an4 rings. )

var CUR..TARCE'nflt. ( C\lrrent tac:tila Ueld. 1 PORC£_)1\JLT, (Maxi- force 1..,.1. I CENTEJLCIRCLt_POs_x. I Canur of circ:la tactile tiald. } C!N"r!:R_CIRCLE_POS_Y, AH_COMB, ( C~in.tion of c:ircla si:l:e/rino size. } DIAME't'I.R_Ctrtc:LE. I tli-tar of circle taceila field. I DIAJIIETER...,.RING: ( Di-t..ar of second U•ld. tba rlnq. )

it~taoar: RINC_SHOWN, I Whether t.he ring Uald is displayltd. I PIEL~_SHOHNr I Nbal:ber the fields ara displayed on tba scraan. 1

boolean:

1 ----~ Lanoth ~--·· )

function Lang1:.hlvar x. y: lonvintl: r-1: I Return len(llth of ~tor ex. yl. ) _,.

Length:~aqrtlsqr lxl••carlYII: end;

function Pol'lll.llaliAI!Ip. Dia: longlnt..l: longlnt: -·· PoPNolal:•l•-'-P•I"'OtC&JJULT d1v Dla: •nd~

I ··-·· Add_'Zal'o -~·-· )

!unction Add_'Zaro(t': TP_-ryp.: Alllp, Dia: longlntJ: lonolnt: I Add a raolon Vlth zaro values to the cent..•r of the tactila field. 1 -·· if (Abs(Aa~p)•2•z£1l0_PORCE_C<•DiaJ or IAbsiAII!pi•:J:>:o-DiaJ

and:

then Add_%ero: '"-0 •1•• Add_%ero: :f (AIIIp·SQ'n...Intiii!Qpi•Dia div 11•ZUO_PORCE_CI,

Dh-Dh dlv ZEJIO_POP:CE_CJ:

I -~--- C'11'cleNwa ··--- )

function C1rcleN'WIIIx.y: intaoerl: blt&Qer: I Return nWIIber of aaall circle inside rino at poaitton lx.yJ. ) -·· Clrcl~:-.o.:;runc:(JmQl.eht. ¥111.nQl.e_C1rc1.e••O.'i); end:

hmction c.a.a_on_Nhat_tlald: intaver: I Return the nwaber of the flald the pointer h over. ) var x, y, fx. ly. Piald.Jir: inteoger: be<,Jin

lt:~Ut. Pointer .Poa~X·C!NTD_ClkCLE_POS_X•MAX_DtiJI_FlELOS~C cHv l: y:~<Ul .Pointer .Poa_Y•CEN'T!R,_Cli!:CLE_POS_Y•MAX_DliJI_PlELDS_C d.iv 2:

P'lald_Nr: '"NOT~ONJIELD_C:

if fxuOJ and IX<MAJI:_DIAII_PI!LDS_C) and iy,..DJ and ty.ciU.X_DlAM_PIELDS~C'I then

Tact.lle_Piald!AW~COHBI• .O.t IX. y. P'leld_rlr. b. fyt:

ea.a_On_What_Pield: "Plald_Hr: and;

function a.aa._cale_rorc:e_XtDiff. Po._X, Pos_Y: 1ongintJ, integer: ( Calculat• tha forca along the X-axil during the DCtUal e~r1-nt. 1 var PlaldJir. Porca_x, Porce_Y: int..ever: -·· a-_calc:_ro-..ee_x: aD:

Poii_X: ~Po•_X-CDITER_CXRCL'!_i"'S.)::•MAX_DIM_Pll!.t.l:lS_C' div 2: Poa_Y:•Po"-""carru._cntcu._POs_'t~'lU.X._DlAH_Ut.l.DS_c cUv l: it IPos_xHO) and

I Poi_K<MAX_.DIM_PlELDS_C) end tPoa_Y>~OJ and (Pos_Y<MAX_DIAM_PIELOS_CI than I In•lde target raQ"ion square. 1 -·· Tacttla_PieldiAW~COM81 A .C.t: IPo•_X, f'oe~Y. Pield_Hr, Porea_X, Force_YI ,

lt' lPleld_NroRINC~PlEt.D_CI or Rln<,J_ShoWn then c.uut_Cale~torca_X: :f'orea_x:

•nct~f f'OP,C!~KULT=O than C.VU_Calc:_Force_X:=O:

function Gul.a_cale_Forc•_Y"IDiU. Pos_X, Pos~'i': lon<,Jint): 1ntaoer: r Calct~l•t• the foree alono the Y·ii..Xil!< cturtno the actual ·~ri-nt var Field_Nr _ Poree_x. Fore•~\': 1nteoar tliQ"in

aaaa_Cale:_rorce_Y: =0: Po:>D_)(' =PoD_K·C!In'£R_ctii:CL~_POS.)t•MAX_DlAH_Pl2LDS_C d.1v 2:

Pos_Y: aPos_Y-cEm'Eil_CIRCLE_POS_Y+NAX_DJ.I.M_FlEJ.DS_C div l: if (Pos_x:uOl and

!Pos_lt<~Iu_nn.Ds_cl and 1Pos_Y>a0) and.

:·;!;J~~;::-:~~=-~.!u!::~ } -in

Tac:tile_Pi•ld(AW_COlCB) A .oec.(Po•J. Pos_Y. Pield,_Nr, Forca_x, Force_YI:

if CPi•lcLNr<>lltNG_FIELD_c) or Rino_showD then G&IU_Calc_Force_Y: •Porc:a_Y:

if POJtCI..!fUL~O than ~-Calc_rorc•_Y:•O: ... , t:u..ou:eioc Coct:a:cual_GaiD.,..XIStandard....Gain, Hi"t\.,G&in. tow_Gain: re&ll: real: 1 Detenli.ne the contextual gain along tb• x-a.xls ~sad on Vhet.har

th.- caat•r of a c.arqet is bei!lq approacbad or laft. I var Old_Porc:e: in~:ager: -·· with u:r. do -·· contaxtual_Gain_X: •StaadarcL.Gain:

if Gaaa_Cln....l'ftlat_Pi.ld<>NO'l'_ONJ'IELD_c then -in

C Nac••sary since otbarvi•• c . .tc_Porca alway• return 0. l

Old_Forc:a: aroae!_MULT: FORCE_IIULT: •1000: 1 A ~at.iva torc:a 1• a fore• to the rlgbt. } if Tactila .cac_Forc:a_x 1Po1nt•r. r.aat_tlove_x,

Pointer .P-_X. Poineer .Pos_Yl •Pointer. Last_Nov._X<O

tto.rn coneaxtual_Gaift.)C: aHigb_G.ain •1•• Cont•xtual_G&ift.,X: ,.t.cw_Galn:

~E.JIULT• ~ld_Porca: and:

and: encl:

twu:tion Cont•xtual_Gain_Y(St&rld.ard_Gain, High_Gain. Low_Gatn: r•all: real; ( ~t.•naine ttl• c:ontax.t:u..l gain alonq: tM Y·u:ls baced on whe~:t\eor

the canter of a u.r<,Jet is blliQ'iJ approached or l•ft. I var 014....Porcet intaoar: -·· Wit..h UI do -·· contextual_Galn_Y:o:sta~rd_Galn:

if Ga!lla_On_Wbat.._Pteld<:olfO"''_ON_PtELD_C than -in

.,.,, and:

t N•c•••ary •inca ot.Mrvise Calc_Porce always return 0. I

Old_Foree: =PORCil..MULT: PORCE_.MUL'I":AlOOO; t A naoa.tiva force Ia a force t.o the right. ) lf Tao:tile .a.t._Porce_Y {Poi.Dtar. L.ut_Hov._Y,

Pointer. Pos_x, Pointer. Pos_YI•Potnt•r. Last_lllove_Y<O

than Contextua.l_G.airt._Y: o:Hi.gh...,Gai.n else contaxtual_G&if\-Y: •Low_G.aln:

P01tCE_IIULT1 aOld_Forca: ...,,

procedure Empty_auuer: 1 Watt until bUtton h r•l-sad. I -·· re-peat until hOt Ul.Potnur.Button.Pushad: end:

procedure Wait_Por_Btltton_Prass: 1 Wait tor relaase and pr••• of buteon on trackball. I b~ln 1$1tndef NOT_Ifi'I'ERACTlvt.l

l!!lllpty_BuUer: repeat until UI.Polnter.Button.Pushad;

($and1t'l •nd:

I ··-·· Debug ~--·· J

procedure Da~t•: et1'1ng): { Print. a dabuQ<,JinQI on tha •c:raan. ) -·· Ul. Vil\l&l .0\.lt_ Text_.XY_C'ant..er llfiO, 2 .. 0, sl ;

Nait._Por_8utton_Prase: and:

{ ·--·- Draw_Pialds ---·- I

proeadura Drav_Pleld• !Ceatar_Pos_x, Cent.er_Po._Y, Di.ua_IUng, Diaaet.a-..: inteqa"t': .....

Ul . V\.B'.I.al. Sa.ve_st.a.t.e:

SetColoriYal!owl:

I Draw ring. ) H Display_IUnQI t."han .....

Display_lllng: boolean):

SetPillStyle(wldedottill. y•llow): Ul. Vhlual . Pill_£11 ipsa (Center _Poll_}t. C.ntar _Pos_Y.

IDi--.R.in;•Diuaterl dill 2. IDi.._p.tno•Diametar) div 21: SatPillStylallli!PtY!ill, yell-1: Ul.Vhual.Flll_Ellipae (Center_Pos_x. C.nt•~r~Poe_Y.

IDi.ua_Rinq-Di ... urJ div .2, {Di&IIIJI:ina·Di .... terl div 21: •n4;

I Draw eircle. ) SetPUlStyl•{widadotUll. yallovl:

71

Ul.Visual.Pill_Elllpae(Canter_Poa_x. C•n,ar_Poe_Y. Ot-ter dlv l. D1..-tar dlv l):

Ul.Vi.ual.Raeto-..._state: and:

I ~·~-- Set_lnt•rfac:a -~·-· l

procedure Sat._Interfaee(C•nter_Po._x. Centar_Pos_Y. Oiu_R:lnQI. Dia&eter: intaoer: Dhpl•Y-R1ng: bool•anl:

I Set •- global p&r-tara tor e-ication ~t..-•n Rt.ln_Bloek and Calc_f'orc•. at.c. I ..... CDrt'EP'-ClRCL£_POS_X: ,.Center _Pos_X: Cnn'!l'.._CU~.CL~PO$-'t: cC•nt.•r _Pes_ 'f: DIAMETEJI_CIR:Ct.E: =<Dl;weter: Dl.AHETER_IIINC: "D1ULR1ng; FIELDS_ SHOWN :""tru•: IUNG_SHOWN: :Display _p lnq: .....

Page 77: 1994 Afstudeerverslag IPO

72

pt"oc.cb&r• ct••rJi•td•J t Er•s• t.uo:•t• on the ccc:••n:. J -in

t:l, Vtcual.Sav._seat:a; S.tPiUStyl•(SOlidPill. llac1tl t S.t:Coior talackJ; Ut. Vtaul. till-llllp .. tC':EN'J'IIl.,J:tact.E,.PPC,..X, camat.,.ClJtCU..POS_T,

DI~:tNO•l>l~CntcLr div l, Ollt.lt&1:'UJI:l.NC•DIAJIJI:t'EJLCII~CU div 2;:

Ul. Viwal.P1ll_lilip.,.tC:!N"r1:ft_C"l~Jt. ~C"llte:Lt,.Jit)$-Y, D~CU~Ct.J: div l, I>~IJtCLE div ll;

ur. Vi!IN&l.RHECr«-Stata:

"""'

proeedun un .. t_tnt.rt.e•: t bc•s: t:ti&O globAl par..,.t•r• tor c:l:l1m!Unicu.hm J:wtt.v..n fbm_Bloe­

&nd cdc_Fotca. at¢. ) -in n&t.tls_SRii:IM'Jl:•f•U•r ..,,

!'Unedcn ilUZLBloell: 1Yor~_ttul tipUc•tor, C<ill.t:Cft, Vi~u.al_t.G&dt

int4'Q•trl f s.H~4'41ltwaeory, df!'O *" C•l.:Jore._!X!tl } ~br roal: t.a.uning, ~-k~>l'C; l»ol~hJ< int~r: ( htum •cor•. }

t PUut a -•d<m e.ni~~~g on. ~riaanhl <ondit.ion. l var Taqets_Hit.. ( ~r of U1"9•U hit. }

i . ( L6ClJ)Count.ot' • 1 Score. I SC'OU fOil' -00• tdd. l Total_.scora, ! 'fot:al •eon for t.hia eQl'ldition. l 'tot:d_TiM~D<th}-.cl. (Total UN dd~ Hcau .. of r~ wa,t1hr,l. J ttov.d_so_r&r. ( tlud tor mv ... nt tb.r .. bold. l en.ar_Poa_x, r Po•ttion o.t: o:h.rAc:t•r on Rr••n, l ChaT_Pot~_Y:

J.nc~r; Po1nt.or_Po9: f I'Q•ition of sc:n•npoint•lr. )

Point•r-Poa1 tion_Typ9~ '1'1M_P-out1M_Itftt.•re<t, C:h&r_D1•play_sc.t.rt:_Ti-. Ouplay_Ti-_s..uch_cbQ-, £nt;er_T1-.

( TS... at \rtl't\1ch th• cMr. wa• 0\Atput to •crHn- ) { TJ.m• aft•r which ttut. char. aboi.Ud bot 01.1tput. ) ( 'ti- at whieb a t.at'9•t wu MUr«t. )

xn_Punc ... SU~Le. C S\ua of dop•~vdu•• tna P1tt4' lw tlmet:hm­ln.t.•reApt. i.e aa!NtUd to 1M :c•ro. l

ID: l'••l:

t lnd•• of dUU.eulty of uro•t. )

uaao;r._Tabl•: arnyto •. ,TA.RCI'l"S_C•U of int..g~u:·: ( Ftc:t .. t:;lt,\l•. 1

Poiftt9r_W<IIII!I_OV..r_r1•ld, t ""* ttwt po1nt•r ttwt lut. tJ,M

SbO\lld,..Dhplay..,chH, Ch.t.r_.SheWn, Char_On_Scr•oen•

r.b9 pcdt:iOh "'"* ~t~ cww • tacv-t? } ( Should a ehu 1M tUcplay9d? } ( Hu" a cbu' w- dhplay;td aM •r&Hd? } ( h t:un~mrlY a cb.t.raetw dhpla~? l

bool•an: CMr_To_Dbplay;

C'J\&r: l Clur dhpla~. )

function waa_cort'.et_Ctuoractttr_~tehar_s.howtl: bool..n: Char_D1.,:tlaY'flld: cbarJ : booi.-nr

t O.t•naifte vMttt.r sub:S•ct eon:iK'tly &til or ttOt aaw tn. c:tuol'"4'tltr to look !or. ) var s.arcb_Cbarl_J'na .. d:, ( Wb.thft" t~ tlr•t. cMr"t.r· waa "litCt«l. t

S.4reiLCha¥2J'r••..t. { wtt.thu tiM tHH:ONi cbar"tih' v.a ••l..:ud. J ~ro_o. .. _~a.d• I ttb9tMr t.» ·~· el'wirACtu wu pru...S. l

bool.-n: Sa•reh..CMd_~_xt. S.areb_Cb&rl_BoX,Jtl, h•rctt_Ch.flrl_Box_Yl. s .. r~CM:d_Jto:a:_U, { tto.itlt$ of Ul'•t cbanet•r~box. ) S.ucb_Cba:r.l,JkJx-_Xl. S..rch...Char2JJoJLX.i,

S..rch_Cbar2_Box..Y'l. S..~cl\,..Cbul..,tk>t .. 'tl, ( l>otiit.i<»t of ueond ebat&et•r~boz. ) tto_ctuor_sox_xl. NO_Cb.ar_Box_Xl. ( Positio» ot flQ ck.U' tdt., ) Ho_Ch.t.r_~n. ao_Cbar_ac._v:z. C•n<::•r-~rl_Bolt_JL <"•nc•r-~rl_&b.Y_'t, C•ntar_cturl_&ox_X, c.antar_Cbari_ftox_'t, e.ntar_No_Char _lk>x_X:, C~•t ~-Cluor _8olt_'t:

intaQ9r: Point:ar_Pas' ( Ji'<>tlit:ioa of •oer-npoint•r. }

Point.•r_Poslt:ion..'l\'Pe: ..., .. with u: ® 'lo<ith '.'hu•l Go t.~il:.h ti>~>iht>lfl' do -·· Save_St .. ta;

S.tColor lT£X'T_C01.0Jt_C!; Sn"r•xtSt.)•l•f'f!:XT_Fo:tr_C, HorizD:a.r, TEX'r_SUt_CI: Wt_~xt._xT_Cant•r(C.tM•utX di.v 2.

C.tti.U:'I' d.iV 4-talll:thaio.ttU.!Sd_'t'X"t"_C! dS:V l, su_'t'XT_CI:

s.arch,_eh.rl_&ox_Xl ;10Qattla:xX div 6-C'hlln(S£AACK_,CHAJ\l_C).width div .:!• EXTRA..Hllmf_...,x_c di v J;

Saan::b,..,Cbal'l_Box_x:z,~t.~:U div i• Chns!S£AP;CH_CHAiU_CJ .width di\t ."1:• ~Wttl"nU!IOX'_c diV l;

S••n:h.._C'h,.ri_Box_Yl:=C.Uta:a:Y4 l div ). OFFSET_BORilEA._C~ EXT1U._HEIGHT_B0X_c div lR Ch.t.r&{S£AJICH_CKMtl_C') .h•iqht ~

S••rch~Ch.t.rl_aox_~l=~tMaxY"2 div l· OP'FSET_90RD!lt_C•!X"l'RA_tttXCWI'_IOX_C div ;r,

S••rch._Char~_lt6)f_Xl, ·~tMaxx•s div fi­C'hara!SV.JI.ot_CHAP..l_ct.w1deb diY ::1:­EXTM....WIDTK_BOX_C <ltv 2:

S•.t.rch_Ctwor2_&ax_X2!~tMaxx•s div 6• Chau{st:AJIOI_CHM2_ct.v111t.h div 2• EX'1'RA,.)flDTH_80X_C: diV :!: :

Sa•rch..,C'Mrl_lki:a:_'l'l: ..C.t:HflxY•l d!v )­OJ'P'SI!T_BOftDu.._c­ltX'r.I.A_H!.lGHT_!IOJt.C d.iv :z­Chu•lSEARCK_CHAA2_cJ.hatflbt.:

Sh.reh_C'twlrl'>x:_Y2 ••~t:JYJtY"l di.v l-OPFSET_801'DaLC• ~OM'T_.BOX_C' d.iY ,1;

No_Ciur_&olt_l(l::(;.!lt)!:~ ct:l.v :1'-~WID'nL&Olt_C :b.v l: Nt:~_Ch.ri;_,fki..:~X4; •Wtl'IAXX 4h• 2•rxt'lt.A_Wlt711!_80'!'!:, L d:i\1 l: Mo_Ch.t.r_Box_Y1:111Gttt".u"r2 div J-

07J'S!T_aolU)!lt_c:­D'n!.A_HIGH'r_BOX_C cUv l­cbara[~CHAlll-Cl.M1ght<

~O-eha:r_l&oli'_~Zl!>Golltltallf"l ctiY 1~ OFf':srl'_&OJI.D!'JLC• E:X'f'RA..)ll:IGtfT_IIOX_c 4iv 2,

Dr•w_&o:~~:_lCY!S.uch_CMrl_aos_xl. s.-.rch_CNt.rl._Bolt_Yl, ~rel\,..ebarl_Bqx_xl. S:••rcb_c:Mrl_au_Y2i:

~aw_J,\ow_)(Y!~Ueb._Charl,.&rur_Xl.

sur~.tt_ChUZ~Yl. s.-.reb_Ch.flrlJl<uc_X2. S..r.rcb_~l-J;kx_Yll;

cnw..JK;t,..XY{No_<:tw.r_aolt_Xl. Jto._.chu_amr:~Yl. NG.,.Cb.t.r~X2, tta~ctw.r_aox_Yll;

C.nt•r_Cba¥l-~x...X: 1&!S.arch_Cbarl_lkn_JU•s.,uch_Ci:i41.l'l_Box_)Q) d!.v l; C•nt•r_Char.!_&o:._)(' • tGa•rcll_Ci\&r4._.!1ox_X1•S•arc:t._rharl_&Cix_J:ll d!v 1· <>ent•rJto_Char_l!lox_x, .. !tto_Cf\AT -~-XhNc_Ch.t.r_aax_xz; dtv l, Cant:•r~C'bill'"l_lk)x_Y:"' iS.fll'Ch_Cbarl_&x_Yl~S..rch_Ch.iorl_&ox_¥2; dtv 2. C•nt.•T-Chilrl_lk)x_Y' ~ jSaan:l\_C'hacJ_I)ox_Yl•s.&T<:h_Charl_aox:_l'll dlY 2: C.nt•r .)ki_Chtot" .,)lmt_ 'i > •lNC>_~T~fk>:a:_Yl•Uo_Char_Bolt_'tJ I d1V 1.

APPENDIX C. SOURCE CODE

CMr•ISIWI.CK...CH1oltl_CJ .!Ut(atlttt_cb&r:l_1Jox_)t• eurats~C!Wtl._C).wid~ <:Uv .2.

Cant1tr_c:bul..)tt::ll(_'t-ebaH [~CKM.l._C'l.haioht:. XQRht)~

~ntst:.MQt_¢1WU'...,C:1.PUt(ome.r_au.r:t~­C'bar:sfHA.AC'H_cttl.lU_cl.wtdt;h div 2,

e&tv_OUlrl_lktlc_Y-cbu:•tHARCH..C!WU_C •• Mivht. XCAPUt:.):

ouc_~_cantutcam:.•r_No_Cb&r_aox_x. c.nnr~Cb&r.Jto:x_i .. taeM:i.qhtitiO_eMIL"l'Xf_Cl 4iv i. RO_CHA1t_1XT_Cl :

l'Oint.H".S.~.J:ain.,.;xi~Ct; hinur .S.t_tx:_Gaia._TtDC ... CA!tLY .. Ct; rotnur .ht_Gai ~~~;;)~~-:~~· Jmpt.y_cmt:oeu&l_C&i:n.l: J'Oi»t.•¥•$aolt_CO!t .~ ); Hint•r. s.t_ id(l_l"!mC'tien i

rapey Fiaid._Y"ubCeion! :

l>ottn•r_Po •• X:aGetH&xX div 21 Potnt•r.Jtoa.V:•iNo_ChU..Box..Yl•O.tJWtY dlv 4l d.iv 21 Poinur .WUli_To_,._,Jtodt.ion ti'Ot=ttar_l'OA I :

lt•atore_seate:

Pci.Aur .cwtceb.,.en.:

Dapty_IUtta:r:

Saarc:tLCMr1_Pr•••ad~ •f•l••: s.uetLChul_Pr•••~••f•h•: No_enar_Pt•••ed:•fa1H:

( wa:t for ••l.ctiOI':I. I l'l'pa6t

POU'lt:•r, ut::xbl!•:

($ifndet NOT_:nrrEJI.ACTIVEI if Jle~>int:•r.I'Nteon.Pv•~ th•n ... ,.

s•arc1\,..Charl_Pr•••ed:• thJ.nt•r .Poc_,X»•Savcb_Cbarl._8o:lt...Xl I amt !Po-int•r.Pos.,.X«<•h&rch,.,Ch.at'lJki)C_lQI atld. ~h1nt•r.:ro• ... Y>•S.arch_et'l.u1_8cnr_UI &nc1 ttoint•l'·h• ... 'li'••Saaroeb_CMrl_IJOX...Yll r

SN.rctl_ct\.arl_Pnuad;• tPoint•r. PoaJ>.S.<~.al.'cb_Char2_boX..X11 .uv:l (Poir:.~:n.J'os._X<•h.ueh_Char.l_lox_xll And lhint•r. hli_Y>•S.ar<rb,..eh4t":.l_86x_Yl l a.bd tPoint.r .Poii:_Yca&ear¢h....Cbar% .. BoX..Yll 1

No_Chu'_l'r .. -.e<t:•iPoictu.Pca_x,.#No_Cbu_lk»t_xll &tid lhtnur.hs_let<:-*N4_Cb4r_~2) and IPointar .Pos_Y,.•No_Cbar_Scx_vt• &tid {PQ'll!l!at'. POa..,lt<•No_Ciulr_~Yl):

•nd: U•ls•l lf ~ ttwn S•.areb_Cba;rl_trH•~:to.tJ"UaJ Uenc!U:l

Ubtil s.&reh_Charl_ProKa-.d or S.arcb_c::Ni.rl_Pr .. ~ or tto_Cb.l:i' ... ftruatldt

po,.iat.r.S\rit.ch..Off;

V.~ts_corract_Ch.t.raet.u_s,w,at,.. 11Char_Displ~:S£AROLCHARl,...CJ ..U f,_.rcb...C'hu"l_huaecU and Cbu"_$MVJ1) or llebu~1aplay«l~C'RAIU_CI .:d ISaar~b_ctw.rl_Praaa.d} .flftd Cbai'_Shown) or tMo.-~rJ>r••Pd aM noe Cb.t.t" .. ChoW'ft):

Poineer~sat_DC_Gaift...,XtC&inl r Po tnt...- .s.e_oc_c...ULY ccaint: Point•r.s.t._(:OfttextU&l_G&intconuxtl 1 Point..-.Sae_Gain_P"luv::Uacatccnt..a-l_Gein_lt, CCAu.xt:uoi._c.t"'-YJ t PtJ.tnear .s.t_updn•-~t_Pi•ld_~t:i~t

~y_Upd.ata_'--.Wbat_F1•ld_Punction):

proc.di.IA C•lcul,&e._Pi•ldlltRr :in~evarl: t Draw both t;M ct.rc::t• &fld, dtJO tarv-t. Tb-. ehataet ... lstic• .ue dat•nc.in~ by Hr. l v•:r """"-~trcl••

ni.,_t•r. { Pi-.r...r of t.ll• Cit'Cl•- l C:ant•r_t~oa.,X. { Cent•r posn.1on of t:lw ~ircl•. J canr:.r_r>o._Y, l>la"'.JUtv,~, t ~ di-taT of 'the out:•rrcircla ot the t'ifll#. I Nr_o._,, tn:t-. ... ; f Durrfloy v&rhbl•. ) An;1•: c-1; OisphY.,.Jt1nQ~ ( Wboet:hu a 1"1.1\11 abould be cUaplayad. )

bool•an: ..., .. { Lia1 t JsandW'I.i:l'th of uz:ag•. J

lllr-~::o::Pi;;:k!mt_TA.Jte.t:TS_c. IIW_c, Uz:aoe_Tabbl:

cu• NJ:_Dw!IJiiy .,od mt_Ru.ATION_DIST_SIZES_C cl 01 ba(JJ.n

~Circ1•:•SMLLJIIST_c:ntc_c: Dt.......,.tf!V>"~LJ)lllT_RINC_C; DioNHUr: :stiALL_DU.tt_CtltC_C': ... ,

1: bollalh ~oap_eir~l•, :o:t.~o,.~tr;JLDtST_euc_c: Dl-....l'tlnq 1 ,.SMA.LL_DIST_ItlNG_C: DiQ•t:•r r :SIUr..l.t._Dl.AtU:"IItC'_C: .... ,

:!: b.9h~ Jwa>_chcl• :•~U;T_ctac_c, Olu. ... IU1'$11: ,.u.JI:CI._D:tST_P.lHG_C: O.i..,.t:•r:•SH.A.L.t-DtM_C'ntc_c~

•nd: 1, b.9in

"-P_Cit.det:I...AJIOIU)ttri"_C¥RC_C': DJ:--1Ut$1J:•l.AII!Gt._DIS'T..)IIHG.,C; l:'ll.t.Ntar: •t.AM;;c_ntM_c:nu:_e:

•nd; ., ba<#tft

.wp_ct rc l•: ·~1LDift_Cl1te_C': Dt-.J!lnQ:•~l)IST_Rtw:t_C'J Di-tar::..VU\'~SWIJ.I,..J>tAM_C't1tC_C: -;

•nd~

AW ... COMttt#'Hr~ liiOd Q,..Nt.ll"l"JOH_Dt&T_lUZU_C;

t W•<l~t\Uoo-rt"'110!1tP1/uealR!dc:n:lrll•lll t ~-~irclor<;"'l ilhl lwovwf0.nt11'lt:tti>!.Jilre".S.utt,!.'li.~•rtPi-JH.n>r11 t!ln(2J J•!l · -"ftt:l•_ctrch.u:• 4"?t/Hil:ltdMt'_t.:il·~laa:

Jh_bu;My,Qtr .. ~ dtv mt_ltJtt.,l.1"tQir_t>tSTJ't:U_c~

O!•play_ftiftOul tHr_l)uallly llliOo4 M_PIIUti_ChlH:

Nl:_.DuMiy:•ttr~ div .._PDJfS_C;

{ 'i'ba Al'lai• i• t!r.wn at r~ fr- •U lt•U ......,1••· l t AnO:l,. .. o, u. to. Ui, 110, u, .. no. ll'!i .t.or-. 1

AnOl•: :rt"M\,d.caillj *PUt;

tD:•l'OUftdflft~AII!P-t'irc:la/t>iUitUr'•lltlnt:l)•tOQ)/100: ( ID i• ....... I

c•nt•r .. Pu_x:•routldHantAA;fl•l "AIIp_Cad•I•WJPTH_GA.MC_o\ltEA,_e t'lt·.r Z: Collfte&l:'_hs_Y:,.'J"'WWd!l't>S (AftObi•~-CirChl *li£1~_UAM£..,..AP.EA_C div 2~

TUIJH_.Pct: [Htl .X: aC-at•r_Poiii_X l T•¥1Jat_htl (fll'l .y: •Cant•r_to._t: Tuw•t-l'oa (tirl. '£nd...~>o•_X: •C'•nt•r _J'o•~X: -r.r.,.t_ros i.Nrl • !od...Po•_Y ·11/C•ntar _.Poc;_Y: Tarpt_PosiNrl ,Po._<:hlir_X,,.O; Taro•t~i>oaiN.rl, Ptt•_ctur _l•t<O; 'ta~ro•t_Po•I.Ur 1 .UJ-.It•r' ,.s;H-t•l": Tarqet_Pot!Hrl .tlt-_R11'$11t•Oi __ P,tf19 •

Page 78: 1994 Afstudeerverslag IPO

C.2. EXP2.PAS

T~t-hil1lft'J,Jtinq_Vbibl•~•Oia;~lay_MQ!il: 'l'uv•tJoatlilr) .Error: •fd••~ 'raq•t_Poil (Nr) .Cbll~-.Sb.ot.ft\...'l'iM: •tmDU'Dim_TitiE_C: Taqet._P:os(Nt') .Cbar-_sbololtn=!aln: 'l'arqttt._PociNt) .Tot_Resp_Ti.-!=UM'D!tJ"INID...,.'f'IM!...C:~ Tarqee_Pcs (NrJ .u.t_Time; 'l"u'tJtot._PoaiNrl.St.!irt_Poli_Ti JLC;

~==:::::m~~ :::!!:3-r:-..M · f...C; TarQet,..Po&IN:r).Firilt_TiMJinQ::\I'JIDU M&_C:: Tarvet:Jo• (Nrl .Cb.U'&'!:'t:.•r:•' -·; Tarvet._Pqa(Nr),Jtrroc-_cbarac:te'tl1tfai••: 'hrgetJoa(NrJ.hedbact.,.Visual_LcMd:=LClW_11t$UALJ.OAD_C: Ta1.1Jet.,..Pollllrft"J.Pelldb&t:'k_f!cnbXt.laNONCONTEX'TV.u._Co\IN_C:: T.t.r'04't....PostNrl.FH<lback..G&in:•O: Target..,.Poillllt" J • hl'Ctii_H'U.l t1pllcat.or: •Force_Mu.l tipl ic:ator: Tarpt._l'osiNT} .Aogh!&Anglet T.u~c_pos(Nrl.t>1na.nc.:a.Mip_Cirde:

Dt'wJ:I..ldttc.ntu_~_x. c.Atn_;>oe,.,'r. tliULIU.DG". Diueur, Display_rtifii;JI:

ht._%nt.dae•(Cenuzo_Pos_x. c.t\UI'J'os_Y, Ohs_Ring, Oi ... eu. Difl)lay_linq): .,..,

proe11duu ~~-TS.ald#: { Er.u:• both. t:U eirel• oUitl5 rtno tarqet fr0111 eM .11er-~. 1 ... ,.

Clur_Fiel4s: OC.C•~:,..lb.hlt't.-:a t .,.,

pt'O~· ht~~Jt_Trhl: ( S.tUl) a tri.\1. ~ YU' t.'lq;wte~:lld_lfoV_T; r•.11l; [ lt!(pectM ••~il!IU.ci ~t tiae. )

lfoni~"-'tJ"ld_tU•t t.oq_c:l.u:c: t tt.aoe. aoui~ri"4 ~;~t nid ~r. \ ...... wiu:t Ut do vi~ll V1au&l do vi~h poine•r do -·· 1'i.Jiw'l',h••t:

Tiaer . Seart; 'l'iM~It<x.lt.irte_E:nt.T.d:><'fi-.Cplit_Ta.; 'totd_Ti-..Deby.<::i;•O:

i«N~J&t,,.CI

'T.c:tile .WtpQt_n.vlc..a.a•t: Poiautr.SVlt~OU; es.-:r:

{$it..S.I! NOT_lH't'U:AC"ffVE} !Mil~t:r&hdcatHAX_WAt't_C•MlN_WAlT_Ct •ttltf_WA!'f_Cl; u-uo UU:Mef NO_SOUNDJ (lhJtptHlCH_,PlTOf_C, DUP.AT:tON_SMOitT_&UP_C);} Uandifl

C:aleul•t:.a_Fiald.1T•r;~~_Mit1: CI.IJLTMCEml::cTact:~.;:sJUt:

tlonitor_Trtal_rU•. tnit tEXf...PlR_C+tllfLSEP _C.,ttOf;_Tll:lM._FILit_C) l Monit.or_1T blJH•, t.oa"Unt-T<:~_Str lTaro-ts.)itet t: llo4J.tot"_'fTbl_tu •• o.m.;

U Vb_l_"-dsH1GiU11SUAI._1.oAO_c tM'Q ...... ( Plcll: • cMraee.r to took fen. I U t.adoaUOO):.PROB_NO_CKM,_c•too ttwn -·· if randoaCl0l4)>SU: thQ; Cb&t'-~_Di•plQ";•S1:1.aCB_C"HMl_C

•h• CUr_TQ_tli•ph,yt ~<SEARCH_CHARl_CI ShoUlcLD11JStl.11y_Cba.l": Etru•: ....

•1•• ..... should_Ohpl•y-Ctuil'":•fal••:

•nd:

1t c:UJL1'AAoETNR:O t:han Expect.cl_ltov_T:•lD_FUNC_B_C•ID •1•• exp.ctaoct_Nov_T:•lD_P'Uh<:!_SUII\_Bt~TAitGC'niJt"UJ;

Oi~<play _1'1••-S•arch_Ch•lr '" Ti-r.sput_TiN" LOW_SHOW_CHAJLPROIIl..C•f:XpartedJtov_T• l'"andoal roundt IHIQCSHON'_CKAA_fllOB_C-LOW_SftOW_OWI_PROS_CI"

EXpee~ed_Mo'II_T• MSEC_CII/'MSf;C_C;

Char_On_St'r•*ft: =f•lce: Cl\.ll.t"...,shown:•fala•;

•btt:

J>olttt•r~.x:.,.ftART_x_c: l>olnt•r_Pos .Y: "':START_Y_C:

P'Oint•r .W&t"p_TO..-.w_,podt ion !I"Oin~•r _Po• I :

Point•r .SWlteh_On:

l:lie;pty_~N{fet, "rutd_T'I._J)el:&y.d•a'to~al_Ti __ C.l•yed ..

n><.mdl {Tl••r .Split_T1-·Tl-.J!<Nt,ine_Entfl'flll ~KSe.::_t:l ~

proe.dlu• Upd.at•_stattt; t Up4ata •ta~atiec of ~Tfo~•· i ..... with DI de with. vsaual do .....

H PoiAt•r .Moved tNt~\ ..... tf ~-$0-'&r<c~ntR_<! th-ft ... ,.

Mov.d......So_Par: ~so_rar• abe (Point•r .LUt_lkiVe_x; .. P:f:(floit\U1' .t.aat:_Mov...,.~l;

U t't&TQ1tt_l'<l.tC\nl..TUGen3J.Stut_hii_TiMootllmttlNIXl:_Tll«l.C, and !Hoved_SQ_F"&i:~MO'lE_tHP._C~ tlum '1'•1'9•'t_Po•tCUM_T~J .Start:_:fO#~Ti_:,.

T't-t. SpUt,_TiM~Tot•J-TiM_t)lolaywd/MSIC_C;

if t~Qrt...WIM.t_f'i•l<tc"NO't" ... at_f'II.LO_CI ttwft ... ,. U DDt. Point•r_wu_ov.r_rt•ld tMn vit-b Target_Pos{CUl._'t~l do ... ,.

Potnt:•r_w.._o-..-.r_Pi•ld~•tOM: Dn•r_T1-~··u-r,Spllt_Tl.--'t0ul_Tt..a._n.t.v•~ttntc~C: cas. Ga~U_on_~t-f"i•ld or ClJ«:t.E._P':rELD_<:; .....

L.a&t_'ft .. :•E.nt•r_Tt-: U !'hst._Ti-"Ot<CUlH!O_Tttm._e

th•n rin>t_T1111•~•Dlt•t"-T;ull,., ...,, P.tlfG_rt!LO_C 1 .....

~t_'fl-_JilM•"Itne.r_TI.-: if F"irat~'t!A._Rino .. tmnlP'lNIW_'tlltJLt"

the-n Pirat_Tl-_llin.Q'<~'I:nt•r-'ri-· •net;

•nd.: ....

•b• ~t.ntu_wu_ov.r_rt.•l4:•f•ln•

procec~Ur• Upct.t•..lf.iqh._Vi•ual_t.oad...TUkat l Updat• eM ehu'.eun ~ui.aq on t.M •erHA. ) ..... with ot.ViR•l d<:t .....

( lt no cbanc:t•r b on tb.tt &el'lMil And t~ vb~,a.t lout h M9h= displ•y • r&hdca en.u•cur &1'0\il\d. t::M po1ne•r. ' if not o:hu',..Shc:IWn ud.

!'t'ia.r ,spht_TiM>Oispl•:t-TU.. ... S.Ueb..Cll&r} aDd (~d.,.Disl>lay_ebarl tMn ... ,.

1 IH.rpl.ay • chu'uut' f.ft ot~oe of t:.h• tour q\Udranu arO'.Uid the eursor. l

1 t.e(t Ot' ri.Qht ot l$\lnur1 l U r.uw:k:at:U•l. t.Mn .....

I to J.e(t:. ot c:uucu:, ~ Ch.u ... P6•.Jt 1•U:S: .hb\:..tt", PQs_)(•¢h.Ua (Char ... To_Duplayl , Width•

WUI"MLPOl:N'r'llLC div .2• r~ICKI..II_OFP'SET_x_Cj 1 U ehaf'_Pos_x..::o t.Mn Char_Pos:_x:=O: ... .... .....

{ 1'o riobt ot nnor, } c:Mr_P<.Is,.X: •Ut. Point•r. Poa_x+

W1tl"t'K,.P0nt'l"'*,..1! 4iV 2+ randotifCl'WLOFFSET...:LCl:

if Chlll"_~_x:~oc.eHUX then Ch&r_Poii..)C:.C.tttad~nteb.\r_To..Di~layl.width: .....

{ Above or "'la ¢Ut"&Ct": ) U n.n&.t~l•1 t.b•n .....

( ~cunor. 1 Char_PcuJ_Yt•US: .P<:Iint.•r .l'oi::_Y-

Cttarstehu_To play} .Meil;rbt:.* MUQf't_tiOl dlv l-r~! _cl:

U eb&r_pcs_v<o u.en ;•O: ... .... -·· ( .. lw cuuor. } Chu_Pol_fH•Ul .S>oint;Q" ,Jto$_\'+

~Tc>N:.~s.:rd:;};. if Char_ u:{Ch.u ... ToJ)i-.pl•Yl-Height then

<:bar H.xY~teh&r .... 'l'o_Oispl~J .ttdvhe: ...,, U:t ,hinur.switeh_Otf: Cban•(tbosr ... 'J'o_Dicpl•Yl·PuttCh.u_Pc._X, Cb&r_Poa_T. XOJUI\lt.J: Ut ,Pointer .Switch_On:

t .Poa_dMr_x:-ut.Poine•r.P\dJC:: .~_cbU;-Y:-tn.Polnt•r .Pta_Y: .cbar_Shown .. .'l'i .. :'"'l"laar .&pllt._"tble: .Cbar_Bbovn,atJ"U*:

U Cb.ar_OU....kl'HA U4 i t'rt .. r .tllpltt:_t'U....(;:ba.r_OhJ;d.ay_et:ut_'ti-1 •KSEC_C•·•

KlN_DUIATtoti_CKAIUd_C:) than { u a «::~t' hd bHn d.l*Pl~ for • Nffid.-ly lonv

u ... d•tau it. J .... ,. tit .Poln.t•r.S\o/Uei\,.Of!: C:ba't•lCh.f.or_'ro_Cilspl~l ,?UtU:m,'t'_1>oll_l:, t:bu-~-'1. EII!Put); u:s: .Polnt•r.swiccb_on: Cbal"_Ot\_$C:r••n••hl••:

•ud:

s:..p_kn~:• ··~-~ )

prol.."•du~'• &.•p_Scor•CStart_Scot•, End_!kor•.

I Shl»f •cor•. )

'r~>tal_s.:or•, Hl.gh_Scot•• lnt-v•r; St\Qw_T•xt,_Sco.-a, tlak•_Sowld: bocl•anl:

v•r Pitch, .t.oo.p .. em.a.nt•l': tnt:-v•.-: ..... Ut. vi•u•l. sav•_St.u•:

.Pltt:hl•KlCH_PlTC:!I_C:

U 1lholoi_Taxt,.Settr• t:l:utn ... ,. S•t<:ol4rt'fl.lt"r_COLOR_CI: SUTotStyl•!Tti'T'_ront.,.C. ttorh:Dir, T!X't'_MIALL_SIZ&_CI: Ut,Vi~Wo\l.Drav_aox_XY(Ge~M&XX·:tJS. O. C.tNA.XX. 601; Ul.Vl~d.OUt..,.T•Kt-X'Y(G!ttM•d~21S, 20. SC01tE_TXTl_CJ; Ut.Vi.•ud.ou.t_T<txt_xyto.ttt.s•X~)1S, f.O, SC01lE_TXTl_C'l: Ul.\llll:ual.OIIt_Taxt_XY_RiqhtiV..Uf.sxlt-10, lO, !nt_To_St.rlToh;I_Seor•J!: Ul.Vbi.Uil .Ou~_'l',..t.)CY_ItiPttCntt.x!C~lO, 40, fnt:_~_StrltUQh..,Se(INll 1

"""' f(l\' t.oop_Count•:r~•St:,U"t_SCor••l to :tfld_.Scor• do .....

lt &hov_f*rt_sco:r• tMn ... .. Ut. Vllltal .~t"-"-t_lCY_P:i9l\t_Eni!I'•(C.tM.l.X:~lO, ;1'0,

73

Int_TO_Stl' !,.ot•l.SCon•Lncp_cwnt•n·J): ...., (Uttdef NO_SOUND} U K.Ue_fl'OQnd tbfll hept,itch. DUIU..TION_SCOI\t:_soutfO_<:l

ab• O..laytD\JJA'flott_~_Cl; (HolU} Del&y!tltJIIATlOH_SCOitlt_souw.D_Cj: l~fl Pitcht•l>itch,.Pitcb 41v l; O.hyttl'fJRAflON_iiO_SOtniO_Cj:

<Jtld:

t$itn&tl NOT_ttn'UACT7V&l 0.1AYUhfOW_1'l~SCOitlt_<:); U.Mtfl

Ul.Vi~Ual.b&tDra_St&t•: ....,

Pt~ l'$XIat•.Jiut~PJ--•: 'Jar lklv_T, r••l; i ~ WI\At.-.r•r _.::•5sary •ftar • butl:€11\-p!.tss. ) ..... wi t.h UI. Visual lllo vi th Tno:•t_Pos[CUft~TAAC!'nQI:J do -·· Ti-_Acutine_Erlt•r&<l; sTi-r .S.,l it_ T"t-'

f Lr••• Utl'Q•t •nd ~l:.a $U . } Tot:_Jt•sp_ Tl_, =-T1-r. Spll t._Ti-~T>:>t•l_Tt-#fl• t..yll4FMSJ.C'_C, !lld...Pos_X! :!II, Po1nt•n .Po11..X: E.nd._Po•-Y: ><Ul. PolM.•r .Po •• y,

Page 79: 1994 Afstudeerverslag IPO

74

_ ..

!rrort•f~-on_~t:-Pi•ld<>-Cl~E_tlm.D.,.C}:

Ql.Pol.llt•t' .svtt.ch_Off t

if Ch.u'_Oft,.$¢r- and !Viwd ... ~o:IUGH_VlSUAt._LOM_C) t.M'tl

Chan leb.V_To..,Di•I'Jl•Yl.Put(Char_Poc_x. Cha.-_.Poc_Y, XOf\I'Ut:J:

~_Fiellk:

it £rtor ~ seer•: •O •b• ......

( P: lD_Ptmc:_SWI_BI&Uil Oui<CUR_T~: T<:ltJtesp_f.f.M.:I./lD.il l ifCUJL~O

than MW_'l":-mJUNc_._e•:tP .1 .. tcov_Tt"'lD_ruac:_su..,.arcca_TMGETNR•mr

it Toe_.t:t....,.,_T~ttoV-1' tlwh kor•:•l •1•• if. ITot_I\OifP_Tt.~cv_T•'nKl.)II:D_#COftE_C)

tHa :ieono1•2 •1- IJeOrlll•l<

if lboV_scor. tMtl :&np_seor•to. sc-..

't=t-.l.,..kor•. H.ivUoor•. tl"\W, t.ru.};

Ul_n=_;,._8:cll:l_f\ul.c_S>.ali_Bi•ToU•$JJ-T:I..,.Ill>: ... , 1f !V.hual_Load:Kl':c.8_'111$W,L_LOAl:),..C:) th1m ... ,.

if lrt'bf' tb41'r. ... ,. save_se•'t•: S.tColor!TIX"t_COLO,_Cl: Set'l'u.t:Styl•~1'EXT-?ONT_c:. imTitO:h', TEXT_SU:i!_Cl.t Wt:_Tu:t_xl'_C•nt•riC.tlt&xX div 2.

Gec.MUY div a-so. KISS_'t'X'r'_Ci:

cu:t:_ftxt_xr_c.ne.r(O.CHu:X .:tlv .2. o;.t.Hax.Y div 2•SO. P7!..ESS_'l'XT_CI:

Ra5tor•_ftae.: W"Ai~t_FOJ.'_!Ntcctt.,.h ... : -.... ... ,.

kror_Cb•clf,Ctat":ootlclt Wac_C<~rroet_cn.r~t•t'-s-niC'h.ar_Sl\Q'wn, C:b.ltlr_'l'oJU.•pl•Yl;

i r snov_secr• t.h-n ..... J.t Error_ctur.et:•'f tMn Scor•:•O •h•

N9in a..p .. seoHlSCor•. scor••::t,

Total._kor•. tth.Jh ... seor•, true, tala&);

&cos-•~•~ore•l: .... , To'l;a1_kor•:-Tot.l_$ctn" .. SC'or•:

r~li:-Vifilal_t.o..d:•Vhual_t..ad; P~lt_C~'t.•it't.~»Contaxc; P&..._c.t_cain:.CUtu Cl'\Ara<"t&r:~r-'to_tlicplay:

ut .P.,int:•r.litVit:<~b.,.on:

inctT&r941tiJ. ... H1tt: PQ.1nt•r,...W••-ov.r~•i•1d,•t•h•;

t~~~ptv,.BUthr;

witk Ul da vitb Vbual do-

-•• Cl••rz

fVII!Cit__'MULT: *F"re._""'*l t lpl ie&t-or; cmt ... 1'ARCI:mltt ~NOT_ON_FIIU.D_C;

T<r.eUl•.S•t-I'IUlCt.lon_X(C&IM_Cale_,.on:•Jll 't'&eti 1•, set~f'\meto1on_'l' (G.tiU_C.,lc_For<:•~'l•;

Point•r-PO•. X •~S'l'AA"t_x_c: Point&r _Po!ll. Y: •START_Y_C 1 Pointer .t4rp_'rQ._H-~to•1 tiOflo l~:lnt•r-~1;

Point•r .s.t_tx:_Gdn_Xt<a!n}: Po1nt•r .s.t_oc_Cdtl..l'i<aUJ): Point•r .sott:_C'ont•llltu.1_0..1ntCont•lttl: t'oint&r. S&t._Gatn_f'\ul.Cttons (Cont:&lttu•l-G&in_x. Cotu:utu&l_C.in_T); Pointu .fl&t: ... ~u_on_~t_Fi•ld_F\met:i<:mr

blpty_!JPd•t•_on_Wh.at._fl&i.tl.l\lnetion} ~

!>Qint•r .svtteh_Clnl

't'actil•.Upl!at&_fore&tC, O. Pt:ttnt&r .Pov_lL Polnt<tr .Poa_Y~;

Point•r _., ... _o-v.r_rt•ld: ~<f•t••J Tarq•ts_Hit: •01 TI£LDS_SHOWN: •f•ls•: Tcu,l_Tt-_n.layed:,.'D; T<lt&t_scora: •&~ cmr_Shoonu•f•h•: tn_rune_i!Nit,_a:-o,

for- i:,.o to ~TAJWITS_<>l do U••'WI•~'l't.bl•!ii;:O;

!'Jiilpty_INrt&r:

"'hil• not I (PQL'tNtQ.!TS_e.rT•~ts.)tlU or i ~'l'nq•u_Hit:U and t.&.untng~

J"" it net l'l!U1S_SHOWN

tMb Snup_Tdd •l•• ... ,.

1 t Vbu.al-~Hl(;R_VlSUAL.,..t.oidl_C then. ~t•JUilh_Visu.at_l..lMd_T•d:c;

~ta_Pohtt•r.Jind-'t•etil•~

t,Jp:Mt._St.•u:

t 111 • t.upr- ••l~t.d? ) tSifn.:N-t Ntft_Ur'tERN:TtVItl it Pl1int:er .9-.uaon.Pusrutd t~n I S•l••l H trv• t~n !S&Mitl .....

TaetU•.S•n_Funet lon_X!D()t.y_c.t~:_f'ore""•~, Taet u • . s.t _ f'vnet 1 ~:~n_ y ( D~pt.y _c.t t!' _F~>fc• • : TaetUe.Upd.at:.&_rore•tO. &, Pt>tnt•t'.Pos~X. Point•r-Pos_Yt l.lpd•UJN'ttM_Pr••"' Taetil•. ht_F\mct i.on_X tc.-._t",~;k_Fore•_iO . T•etil• .S•'t-l"unet ian~'t [Go.-_C•lC' _r.::~rc•_Yl 1

"""'

APPENDIX C. SOURCE CODE

Tactil•. S&c_FUnCc.ion_xt,.,t.y_c.lc:_rore•l: Taetil•.s•t-Pw::uttion_Ytbpty_atc_rorc•l;

'riaH".St.op:

Poinur .swtt~OI' f:

Ta¢til•.~t:&Nt_IMviee.a. .. t:

if not: l.!tUD.iDCJ then ..... { !.lpd&t• lo;•fH•. J for iu•O t.o NR_'t'J>.t\Qft$_¢~1 do

wt~:b T&f'9•t:-Pos{U do :..OOJil• .. Ol:lj. Log(I:n1:_To_8tri!UBJ.)fi._CI•SPACX.,.C•

Int_To_St:r t:tox~t:ipUcaeor) •DACC_C• tnt.,.'l'o_Stri~~)•SPACE_C• lnt_'l'o_strll'~k_eonun) ·~c .. lnt: ... To_St.lt(i+11•SP'AC!!. .. C• ln<e_'l'c_Sttt" (XJ •$'P~t.,.C• lnt._ToJt.r iY) •DAC"Il.C• tm_To_.kt- u:u_,__x) •~~'~'N:&..C• Il'l!: .. To_strt~ .. TJ•Sti.C&_C'• 1M .. To_$U(hs ... Cbu"._X)+SP'ACLC• lnt....,'tO .. StrlPo•-Char-'ll•IP~C• Int_To_StrtT•cUh.¢1ltp.u: •• O..v1c..St.&tie_tr:.cr;:ton_.x)•SPAe&..,e:• 1A~To .. Stl'iT&c:t.1l•.OUt:J~~Ut .. Davic.-.SUtic .. fl'l.Ct.i.cnt,..Yi•SPACZ_C• tne_'t'o_St.r IDbc.anc•) •5P4CE_C• ln:_Tc_str uu ... e•r) •s;PAC!LC• Intc .. To_sn'lfl1.._1.ing) •IJP~C· lnt .. 1'o_&trtBool.,.'1'0.,.1nt llti.h;_Vidlal•)) •SPACZ_C+ lt~.tc_To .. Str lllt:(!rrorJ I•.&PA<:t_C+ lnt .. "ho .. Str lnetl.fror_ctu.ract..rl l•SPA¢l...e• lnt .. To .. St.rf ~tebu_ShoWn) I•SPACE_C• fl••l .. To .. st.r ~ R•'lll .. TG .. Stl' Real .. To .. St.r c~r .. s a..l._To_SUIISt..vt. .. Po P.eal_To_str!Ph••t .. T Jle•l .. To_St;rU.ut_T R-l .. 'J'O .. Str(Pint. .. TiJW) •S'PACI_C~ b.al .. To_StrU.•st .. T~I•:IIPACILC• R•al .. ~_t>tt ('fct:_JI:•ap .. ;t"iiiM) •SPACE.,.C• Int .. To..,.Str tord.tebar.w:t•rtl

"

proc.dut• 'tltl•_hp: ( P"t:.:w:Nc• • tltl• p&9&' tbat •xplaltd the • .,_,rt~. l V•r lD,.PU•= 't-t.: C FUebMW:t!. tor til• ~tdniaq the t~t.. }

t.1n•, t A liN r•.ad. frqa tM Ul• containlnq t:~ tnt. 1 Knd•, ( OescriptiOft ot l~• to b& ~W.t-put:. 1 OUtpo.rt._L!D&; C Line .t.tU to Ia QUCJN'~- }

llt.l'ib!iJ: f'aa_T, I Th& Y-pntti.:JP of t:M u .... t:c be output. } i: t~tet'-1

int..,.•r:

~lttd..,.P~: ( hint tm~t-..o• t•at .md ·nit tor •~•n. 1 .....

UI.Vi--.LOUt-_Tett-_XY_e.t\t.•rtC.UCaXX div :l. Poll-_'f•LlHE._OFPS!:T.,C, PkUS ... TXT.,C): Wait_,.,_._aut.t4n..,hn•: P<>•_Yl 'llfOP_PAGI_IOS_f: ut.Vi•~l.Cl•ar; ... ,

1 t..ngotb d<n•n•t. vol'k. Probably owrlO&Ikld. l ftmetion Strtoq_l.en9thlvar 'ntt; atrino): lnt:~r: f R•turb l.noth ot •Uift!J Ttt. • .....

s-trl.na-LenoUt~ =int~rl'fi!lt{Oll: ... , tW'!Cthm Stting.,.'t'e.U tv•t Txt.: llitf lP(OII' at:¥,1l\1: t ht:lltn •tgu&~~nt lrlitltfnlt Unt. c:Mt•cht I -·· U TXt~<'"

tMn String_Tail:"''" •la• S:t:rtn;_T&.ill *CCIIJY{',.._t, l, Stt'inQ.t..bQthiTXtl·ll: .... ,

proc~H ~int_Line tllWtb: booio.nl: I crutck ..m.thttr ouc.put_Line h• SNfti::ientlY l.ono far em. line cr flullh.

.noS if y.e. cut.put •• tfiUCh •• p.a4ibl• ot lt on on• liM, ) vu t.i.M_'to_Print, { Holde lln& to ba p:rll\t.e4. l

h•t.-Word.o •t.rii'Jr;l: ( W.,;t -rd - tront of Ol.ltpo.at_L1n.. I NartJlor<L~1 ult&Q•1"; I Pon.n.on Qt tMXt space. l ->n vttl'l Ut .Vi~MJ.•l do

b&gln { P•-.z& CI"HHt'f'\il\? ) it Poti_T•l•t.tNI_OfYSit't_C',.tC&ttkXY~Of'FS£'r_PP.I$$_TXT_c tn.tl r.nd..P•9•:

1t ttextw1dtb!O\itput_L1MI'>'C..t~) or- P'1usb th•n ..... t.ill*_1'n_P'..-tnt:•' •,

t~.flt

( t...rtwidth{Lill*_'fG_PrintJ•~••twtdthUf<txt_wordl ""' O.t~ l

t.1!l*_TI:I.,.h'1nt ~ •1.1n•_To_l'rlnt.~next_W<Ird:

{ t:•xtvldth\1 v'h1_'l:'o_l'.-~ht.l ~" $otl«tXX 1

[ l»at.U.l• a word plu• pouibh spa-c•. I n.n ........ 'td .. Po8'-PO•fSPAC&..C'. t'l'l.ltPOJt_\.iul 1 1 t N•xt_wor4,..1'1:i•"O

tb•n ~•ltt_Woa:d•..OUt.po.~t_Ltne

•11• ... ,. ,...~._wo ... d:•c~iOUt.put_t.lne, ~. N&xt._word_h•l · OUtput_t.in.t: «eopy !OI.ItpJ.t::J.iM,

N•xt ... ~~••l. Str!.nq_fAn9tbt0utput_t.iM)•Ih-xt._Word,_Po5l:

utat.ll { t•xtwidthH.ttw_~_Print i •twlttw1dth!IM11Ct_W.:.r<IJ ~tlt&x.XI or fOI.Itput_t.in•m• ·) ;

it m>t ft.&Xt.Widt.b~Li.noa_To_P'.-intl•t•xtwidth!N•xt~MoroJt~c.tlt•:d:l t.tl&n i t•;:o;twid.thiLin._To_l>tlnt.i .,,. Cet!D.X)I; .wd.

t•xtwi4thtLin•_'I'O_f>:tiftU•t••twidtblN&xt:._Wordl oe,.. C.t!!.&XX &n4 0\ltfll'llt:_L.in•"'' • )

LiM_~_f>ri.nt: :t.tn•_T<I_Pr lnt..o.N•xt_Wont •ls• I t••twidt.btt.i.P<W_To_Prtnt~ ~,._ C..tH"'XX ..vi

t•XtWldtb{Lin<~_To_h'!Mtt•hxtwtd.tb{tt.xt_W;:;rdl • ~t"•XX I o-.n:PJ;t_:t.i_,,..,..,t_~•C'I.Itput_l.in•·

OUt:.T•xt.J(Y 10, P()•_Y, t.i-_'l'o_Prtttt i;

Page 80: 1994 Afstudeerverslag IPO

C.2. EXP2.PAS

end: end:

hs,.Y:>~P"III-'f•t.lHJLOl'l'Sft_C;

.,..,

var v.a. ( usttct tor c..t.Un9 u.o. of e:q:..ri~t, ) V-.1.2. Vall: i~t...,.n 'ltUf: rMll V&lS, Yalf• l:c>ol•an: ~1'0-ti~. f ~tfi.lc for :U.M. } c~; sutn;nt cont:4lM ~. J ......

vi th Ul.Vi wal do ..... !i:l..r:

S.tColarfTIIX"f"<<eo;.oa_c): se"-)I'J!S~ylef'f1Xl:'_P'Otfl'..,C, llorllU)ir. n::xT'JU.t....ca:

a:tsiplltt_file. 1'1:X't'"_YILt,.Cl; nnt,lln_FU•lt

Pos_Y:""l'Qfi.,.PMI_fiOS_¥: OUt:pv.t_t.in•:•'':

MQIM~~Q(J),..I!;

Wile not "f ctn..,.,FU+l 4o ..... !'Hd:lft(ln.Jil•• LiMJ:

tf LiM[StdllQ-'--nQ"thtLiMIII•' \ • ttwn lMivin

~..J.iM:a••; LtM;•c:opytt.ine, 1. strino_r..enoth!LineiAl): ...

d•• ~tAMn4..To_t.tn.:•SHCI_e:

if iLiM[ll•"<') MCf {LiM[2J•'ot'j ollod ttlneiSu:iP\l..,.,..l'lqtbH • .1n•ll•':o'J •nd (Li.ue(st:ril'!II::J-IAftQth:U,.iM) ~ll•'Jo') chon beot"'

C~~·Co:py(Uile, l, tltdnv_~th!Li-1-CI: u ~wrat_am_c tbeo

J:Mvin lliodel.C~r Lltt•:,.••: .ad else it ~CfG&.lSIU'!fttl_c tb.n

bfr9llt WoehttsC~; Llne••'': Mw:l•l•• it ~•80'l'H_om_c tMn b.oill~!~l 1.1-l& .. : ...S•l••

if C~I!Wl.lNlLOID_C a..t\ biJoin r.iMt~t•': Fl\aiJb...t.bw: Pos_Y:aPos_T•t.INI!;_OFFSET_C •nd •1-

U~•~atD-Ct.hotn bi;qlD LiM>•'': fl~:W.M; Jt:I)(LPap .nr! •1••

l.t (~•~CIHO_C'fCD_CJ or 1 _am_<:) or

' I tor !COiliMM!tVl _am_C} dJ.ft ... ,.

t.iM••••1 Pl~Lltwt INL.P~t val1;..0; valat•~.u._a.uM_c: vall: •iAW_vtSwu._t.O.\l)_c; V&H·1-»DDI_GAnt_C: V~d!i:otth»: Va16:•~rw»: l.t ~.otfOftlW..J\F..MO_.OIC_c

tban ValtS:,.f•l- •'-• if C~ltTACTILE_DEMO_c.tm_C

dWtl V.ll:•DDIOJ'OACJLC •l-lf C~hd~_CMD_c

tbd Y•ll·~-CAtH_c •liB• it e-M-~tSUM._tlt~_tl»ro-om_c

t.hittl Vdlt"'Ht~_VISUAL_LOAD_C; P:wt...,&tocll.iVall. Va.U, V•l.l. V&U. ValS. V.-141, Cl.Ut:

•net •h• lf C~.,N'P._'tAACETSJ"EJLS£SS10H_ctm_C th•n

t.itwt: "'lnt_T~_st.r INR_1'o\J\C!:'t'!U:I •1-~• Lt c~·S~t_c:KD_c: ttwn

Ll,._,,.st:ArtCH_CHNU_C •1:s• t t Comftl.-.ratbS!AIIC:HCHAJU'_cnn_c t.h•n

Un•:•!llt.U!cH_~_c: •h• l ( C-.nd:Nit_SESSIOHS'_CHD_c t-Mn

Lln•tdl'lt-~1"o-.Stt(Ml!:_COHBUIATIONS"_CI •l.o. l'&t.at_lrroc( 'lfnJtnown COINII&nd in 4efi!O~f11•, • 1;

UU'~Ut dutch) t t ltfoda,.wct.ta_c;m_et tb.n

LiM!•''; U:•iH) if !~.,~ClU)-C'I tlwn

l.iMl"''': ($1Hldi()

11 Lt-..•·· ta.tl ..... O\;t-P~t-Lin•:ll¢lleput_Lin.•LlM•~nd_1'o_J..i:na: Print_t.ia-tt.lli••l;

•M:

'1-h_Un.:

~P-w•~

dos•Un_rU.•l: ... , _, Pt<:>~:•dl.ur• J:•~'•-S\lbi thrc•_lNlt:lpUc,~;tcr-,

cont•xt, Vtitl.l•l-Lo.ad.,

1~:~~e..,•n e.tin•

r••t•• r x..c lf'U.b't~et: nh1.ct:lv.ly r-u• ttt» e .. e.c~ ~itirm. , vu· l.. j,

nl, n.:. H•htht_tt:-, ! 'tu.tboioi(fht: cf • qu.•stion aM twn:-. 1 41, dl, f>t•v~t, f>tfiV.,..3. ( Ch.-.t'&et..'ri••t.lab ot 'bo~ elto::~ on. ) (»(....&ox_xt. OKJk:uc._lC2, OK_Ikl:tt_'ll. OK._Dok_Yi. C Posit.icn of ·ott·~bo)l.. ) hl, h:!: int-o-n: V..c_T~hJt, t.ow_"r•:o:t:, tdqh .•. ·r.:o:t: ctrln<;~~: G'lrt_r-llnq~SC"'~- { Ccnt-alns r..c.11n9 tor o•n.ul f••Urc. ) R•l.aticm._Secn:•, { Cont-ains r•t-ing f.()r r•l•t.ion ifo~-.ev.aant-. lt:lt_f'•rt_scor•• tn.t-..•t: { C'ont:.ain• r•tlnQ for ••t.imt-<1 ~rton\-anc•-P: Plnt--.,•1'; I .l'olnt•t to •n tn-e.-q•r. J l'to1ru.•'r-f'6A: Potnt•r_Posttton_'!'yp: ( '""· of tscr••nvo.tnt•c 1 ll:•J•Hort- uuy{0 .. 2. -::1. AJ of { c~nt&ins tlut PQ!.n,t.u:au~ or 1

t•~on:t t tM blcelte on r.h• ser••n. J "Pos_Xl. ~•J2. Pos_Yl. ~•-'f2: lonqtnt: Val:t.abl•' P~nt--w•zc:

•nd: stov. f 'rru• it '011:' .c:Ue:k.~ ..m •ll qu•stion• ·~•v•r.d:. l!iH-.l, t Tr'U* U 6U qo.ut.aUon.s answ.J"ed. l rcum: bool••n: !. r.ound • box th&t w•s ehek<N Ql\. 1 'rltt• .ertnq; f lk>lds output su·inq "'itb •ubj>~FCt:lv. tbt""' 1

75

..... with- Ut do vj.t.b Vi~l do with Point•r do .....

Clear, S•t:Color(

i:•ST'JI..RT-?OS_Y_C: t\1;•0! Hl:i9ht_It••"'CO.e.iiU:Y~lO•tu~tbaiOht tOt<_'l"ft,..CI .. lOvi l div d,_tn:MS_c:

wu. l'll<11m_l'I"'KS-C de { D1.Qtlay i:loM:C and, ill\IMI:iOI'l. ) .....

)U; •int<lq1!t"lt•xt:M1Qtkt(OUC_'t*R) l•lO; bZ: ~tihtq•rtif~int(t~Ur:tiwiqhtiLow_or.xtl. UlltUiqht 1Hi91\..T4txtl) )•:U>;

Ol.lt_TU:t_XY_Can.t•rtC:.t-MUX dtv l, 1•20, tloHc_Text::): 0\.t't_T•xtt.J{YlO• i•h1•5. t.ow_,._xt) 1 oue_-r.xt..,JC1Jliohtt~tMAXX. i•bl•S. Hivh_1·u~):

UZ:•O~ dl:•C.tK.uX div !NII.._..POINTS_ON_$CALE_C:•11: o:tl:.C.tHuXdtv IN1\..P'OIN'l'S...O'M-~C:l; 11•fC.~M.uJC~(dZ•HR...POXNTS_otl_SCAL.E_C"1fl•d1)) dtv lr

vhil• n.l<NJI...I'Ontri_Oii_~c do ..... Hn•Cj, l•b1 .. bl•5. Hb•(j+dl. l•hl•hl•S. Hoali. l•hl•hl•S, Unelj, i•H•iUh.t,.tt-.

j. i•Height._It.:M: ~•dl, i•H•ighe_It-~: j+dl, l+hl•hl•$1: 1•dL !•H•ioht_It.al:

tt.htionfJ\1, All .Poo_xl;•1: l'daucntnl. n3l .Poa..)C2::,..j•d.1: Rd•UcnJnt, n21.Pos_Yl:•i•hl•h2•5: blaticu(nl, n.ZI.Po•_Y2:•l•H•1~t._It.•: ru.:l.-et.1ontnl • .aJ.V•tia.bl•==Jtr JWl.ation(nl. n2l.V•dH>l•"'=otnnJZF_C:

tnerj.dJ"I• inc:!nlJ.: ... ,

ine!fl11: ine!L INl--1~-t:

_, ( ser .. fl di~J•ys ...-~:.tone ..ad bcua. J

PolM•l'-""'•X:-..t-fiAilcX div ~t i'olfltft_Poa. Y :•STAM" .. f'OS_Y_C:: i'olnt.•r .W.t'Jt-~_Podt:i~MttPol.nt.c_Poal:

Point.r .s.t:..,DC_C&t~toe_anuLcJ: Point:ar .~_nc_cain_TtbC_O.UU_Y_C): floint•r.a.t:._coatdtual_C..tnt~G.UJLC•: hintu.SK_c..1n_f'\met:iott.afl'l!llpcy .. com.xeu.l._4-Cln, ~~t~pty_cont•cwat_c..tn): hinr:...r.c.t_Upku_OILWhatJ'i•ld....FUnet:ioac

Olpty_t~p;Ut•_on_Mbt.t_Fl•ld...l'\lm't.ion):

Po1n.t.r.SW1tch_Otu

.Dtlpty.J:Ntt•t"":

r~•t: f until swp l

tUfnde't N"''_tm'OACTlV!:l it PointoU',INtt-on.Puatwd tl\tln ($•lc..) if tru• t.b•n IS•ndif) .....

i•"Or Pound:=taill•: vht.i• 11<NP_ITEtlS_CI aft<l nat F"fNnd d_, .....

:1:•¢: Whil• (j<NR...P01NTS_ON_SCALl_Cl .md: not fou.nd cto. .....

PoUad:=!Point•r.POos_X>•I'•hti<m(i. j},ii'ot~_Xll And {PoLnt.n.Po.s,_X<«lt•laticmti, "jl.Pe•.JQI .ai\d (Po.!nt•'"-Po•_V .. :R•htlon(i, jj .Po•~f"ll -»M tP~:~int:n.Poa_YHit•htion(L H .Po.-_Yll;

PriiV_I:"'il ~-J,,;j; lDCl)l:

•nd: 1rtr{1); ..,..,

tt tcund t:Mn vit:h ~•lat.ton(Pr.v_l. f'Twv_,,n do

b.Qin if va~r.\abi•""~"'UNOU~c t:fwn

c 4 squn• hH t:>..a ••1.-«.d •lr-..dy. t wit-h bl•tlonlPr•v_t. V4rl&b1• .. f do .....

Pcint.•r,S\titteh_Oft: S.t-rillSt.yl•l !Dpt:yfiil, Hl.tc"fE!)_C'Ol.OR_C1; llaril"o•-Xl+l, Po#,..'ll•~. S>o•_,k2~1, Po;J_Yl~U; pqin~•~r.#W1t¢"l!_O;;;

•nd:

{ .a.u H-.. on • (J'!M•Uon ~intt t:o uw • .,.. vut.t>l•, 1 v~~ii!Jbl.• ... , .. Pr __ .;:

PDinrAr .SVit.cb;_Oft: snr.iUSt!fhlllSOlldfUi, SEt.lt'C"r'm)_COl.CJLCt: hr(Fas.)tlH. VO*..,.Y'l"l, Pott.)a~t. M•_YlwU~ Point•r .ltW-lteh_D.Q:

UUAii*tNO_~l a-ptHIGil_Pl't'QLC, DIJ'lti.TtON_SMOtt.T .. Jl>.US}: l$endlt) ...

•l•• { was 'cit' elick<td and. aU qu••tiona ..n•w•r-.d. ttt.n- dona. t H ti'o.int•r.Po•_X>,.or.._lti)X_Xll b.nd

(I'Dint•r.~•-~uo01t_~X2l and tPoiat•r.P<>•-Y>•O¥-&ox..nl <Wit {f"Qint•r. Pos_Y«•01'\.,.S<:lx_ r21 tlwn ... ,. i~"O: Pilled:•t~l ~t h I { .;NR .... l'tt.MS_t) d4 .....

Pillacl:•l'i U~ •nd H:l•hlt'iatl!i O}.,'JIIri.thl.,~< .. UHDEF_c:'l ·~!ill

eod; stop:=Pill-.d· ....

•la. Uifnet.! NO_SOUND) h~ lt.-OW_P"l're'H_<.!. f)Ul'I.ATtOt,U>UO~T ¥8t£P ~Cl

Page 81: 1994 Afstudeerverslag IPO

76

(Sdae)

' {hndU'l Uif~t 1Wr_IN&DC'f%V!I !lmpty_lluff•r: U•tMUtJ ... ,

(SitO.t HOT,.,Vi"J''!!W:r:tv1:) seoputrue: (,kndiU

unt.U St<~P:

Polnt•r .SW:Ltd!,..OU; ... , ( ~ r .. ulu t.o log-fil•. ) 1.:•0: '1".11:t 1-tllt._'!'o_cu (Sl11oJJ6t-CJ +SPACI..,.C+

Int_'ro_Strtrorc._8Ultiplieaco>rl +SPAC£..C• lDt_To_.StriViflat_Lo44) •D.\C~t:• Iat_'f'o.,.Strteo~l·~e· Iut._To_Str tUl. T~tiU.¢11t;~ut_Dev1c:e .aucie_.fncci«\,Jti ·~c ... lnt_To_Str tUl. T~U• .t:.ltJNt_z,.vl.e•.Static_l'r~~t.:tou.,.Y) +SMCZ_C+ -.d_To .. su (Gain.; •DACI-Cr

Whil• U<D_l"l'EJtS_C) do ... ,. l':lt:w!'Jct+ll\t_b_nrthlat:Lon!:l., OI.V&riabl•R•ll+SI'ACS,.C:: incH I:

•M:

!.oo;,.)I'U•_SUb1 .t.oqf'I:'Xtl: emh

pxoe.cture Run_~riJMnt: I ftiW •ll u•t•, ) 'lf4t' 81oc:k_Nr,

i, t Block~ .... J

For.:•.JNltipUeator, I "ui.- fOTH< 1.-l, I ctto:teer lnt:-o-er: Usaqe_T&bl•: uray!O •• mt_C"OKBI!M.Ttcn$_C~U

ef int-v•r: { Pick~u.blil, J Vb<4:d_.t.oad, ( Miab or 14W viwal·load. } 'l'ot&l_kor+, ' .-ou.l aeon ot subject tor OM cohdititrm. C:O'nt••t: h,t_,.r: ( Con.t•~tu.ll or Mn•cc»t.teitt1Ul f~k. J Gain: r•d: ( DC~ain. J Moni.tD:r_alloc:k_FU••

t,oo_ch.••: t e\l;n·•m; block ~ to ... .,._.,t• ~ic:or1JIC1. l -·· Blo.:lt..)fr:,.l:

Hi!irh_So:or•!•O:

fttl' 1:•0 t:u NP_COMBUIATIOMII_C~l do U•~•-T•1•UI;:~O:

whll• 81M"k_l!llruNR_C01QttMA'ttONS_C' do ..... t t.U.it. b~idt.h or uq•. Pick a eObdition. 1 Choh•••PickiNR,..C'OKtllAA'tlONS_C. 8W_C. U.a9•-T.abl•l: t O<~io:•<mt-OF_cotm_c J

I Pick • .-1- tore• l-1. ) e.•• Chttic:• acxS 111\..f' _wt.T_c ot 0~ Fore._fN.l"eiplic•t.\U':at.OW_TAC'I'lLILFORCE._C: 1: Fore•_NUltipU,r:ator :•HlCK,..TioCT'tLlLPOitCil.C'; .,..,

Utf&tt bEMO_JreODI;) to~_.W.t:iplicat.ar:•Htoo_TAC"rlld_~: !Senditi

{$.ifd•t 'IUT..JtOfl£1 Fot'e•-~lt:t.p1ic:ator:atttc.K_TACTIL&_FO~C' UM'IdU')

Choie•;otChole• dlY NR_FJWLT_C;

Cltlfl• ChoSe• Jlod NJLC'C'IITUTS_C' of o,. Cont:•xt:; ~.\t._CAlM_C~ 11 Ccntext:;~AL-GAtR_C;

•nd:

($1(def D!MO~MOD&l Cont.•xt. :~At,_GA!N_c; (.$•Mit)

($H~t t'ES'T_MODI:) com:.xt:t•~M.~CA.tN_c; ($•nd.10

C'hol.c•:•Cboic• div tn!i_C'OHT'UT'!Lc:

eas• <::Mie• IIIQd ~VISUAI._1.¢Jd)S_C o!' g-, Vi•u.al_l.o&d:•HlGILVlSUA1._LOAD_C; 1• \'t,$U.a\_I-Oad: .. I.OW_Vl~-Ct

•od;

tUt.U.t Dl!ltO_HOO!} ViRal._~,.,HfQt..,VtSIIAL_l.OAIU:~ i$•1141f)

($H'd•f '!'UT_ilOO&l '.'l«u-.l_t.e~o~d;,.HJQ(_VISUAl._t.OM_C: (S.•Mi-fl

Cho1c•: •<::Mlc• d1Y RR_VI5UlU._t.eM!S_C:

tt Cont•:rt..cottt'.£)t"h!At._GAUt_c th•n ..... e••• C:bo1e• of

Or O.tn.,,t.CM_a.II.Ut_c; 1: Galn;:.H!:DU»e .. CAUI_C; l' .::O..iD••fUCH_<.li.lltti_CJ

end: ... .t ... .....

c.a•• ctw1.:. ct Q: C....in:•f..QW_CAIH_C: 1: C...1n<*Mtlltutt_GA.IN~C: 2; C.1tHlllHfila_l:f.AlN_C: .... ,

<tnd:

{$-itd•f I»:MM_~£! ca.~n. "'HXtllUW.~WltN_c: l$~10

iSitd•f TUT_ItOOE1 ~in::KED%UM_GAIJI_C': {Sotndifi

Log_ Pi l•_Obj . Ini t (.t.OQ_Ill$l_C•01R_Sti' _C• smtJ~C•tJJ:$1..,.SU'_C• '4&t•• • Int:_'fo_S.U' illloek_Nr I•OAl~DA.TA...,aT_C):

LoQ:_Fit•-~bj .tnit lt.OO...ntr-_e ... Dts:t_sa:p_c• $UB.l~C•DU_s:EP_C• 'ti•t:•• •Int_'To_JIU'!Block_Hrt•SUB_f».1'1t._D:"l"_CJ;

Moni 't"Or_8loekJil4 .tnie IEX!_Ot~•Dtlt_StP _C'•HON_at.ocK_FtL!_CI : Monteor_.81oeii_P~la.Loqt!nt~'fo_litr IB~ock_tlr! t; Koni.tor_&toek_F!..la.~:

'%'<>t:.al_S<:¢r•: '~P.W'l.,_tUcek tForc•_tNlt iplie•to-r, ¢¢nt•'Xt, Yhiu.t.l_t.o.d, C....ht, f.ah•. t.F\1•1.

Pauo_S~.tbj tPorc•_HtlitipUc4t:Qr. -c-ont:e)(l:,

APPENDIX C. SOURCE CODE

Vi-LLO&d. GainJ;

Ut.Vinal.el .. r:

S~O::.lQr'l'l'EXT_C'Ol..Oif...Ct: ht!l'flltSt.vlal'I'IXT_FOifT_c. Horialt!r, 'l'I:XT.SIU..CI:

Ut.YI.JN&l.Cilt:_~(O, -40, SCOU....'h:'r-4_Cl ~ Ut. Viw..ol,OU.t:_'hx.t_XY_Right f3fO. 40, Int._'h..,St:r (Total_scor.) H ut.ViJnN.l.,OII.c::..,.-r.•c..nto. ao. scou_nTS_cJ: UI.V1oN&l.OU.c_~_xr_JtiptU60, 10, lnt_'to_StrtHi9h-konJ) t

if Total..kor."'i¢Lscor• U:Mm ...... Bt~..-·~..,-ot.a.1._$¢on: for t::oO ~ 3 do ... ,.

fSittat:t.f RO_ICMm) !Nap(2000. 100): &up(lOGO, ?5)J -..p1«00. $0-) I h-.>(5000, 25-l: fS.nditl

_, Vl.Vbv&l.CNt: .. Toc_rtfO, U1>. SI;'OU_n"rf._CI: to; i;.O co 2 d1:1

'""''

.... ,. rutMttt JrO_soutml .e..p{2000. llX>) t -....pl)OOO. 'ISl; &Hpl401l0, SOl; »a<tpfSOQO, 251; {$QdUl _,,

Laq_:Fll•-aubi.L.oq(lnt_-ro_s~:x:tToeat_toconl i:

l.OOJil•-~j .OOM: t.ov_ru._Ob, .~,

{$itntot.t lfOT_lJI"'"'MC:'T'T} O.l&yt2SOJ 1 tS.MlfJ

if {Bloek.)lr aod. iNR_COMitW..'tlONS_C 4iv 4!•0) aM !8loclt.)tt<!t:.-._eotml'MA'l'%0HS..,C) ,. .... .... ..

Ut.Vb~U.1.0ut._nxt,.xY-C'tmt•riC.t.NU:X div 2. 220. Bf!.I!Ait_Tl'T_C): ($lfrt&tf NOT_:nrraw::Tlvt:) IMlaytCOTFU_aJWUt..C'*M&c_Ct 1 Ut.'J1si.I•1.0Ut_or.t_xv_e.ne•l"IU.t:b¥X. d1Y 2, JOO. P'ltJS$!_1"XT_C'): U*I¥Ut:J ...

•1•• Ut.Vt.-l.<Nt_'h!xt_XY_c.nteriC.UU.XX div 2. 260, PRESS_TX1'_ci;

W•tt_rt:tr_a.n:t-on..Pr•n:

inc(Bloci::..Jirl: _,

.... pc'OCadur• l.!:lad...,Cbar.; { t.o.t.d t.bit ~· cOAC&intng tbs ttmt: tr- d..tsk.

'ftte tcmt:. "**"' W-1 -~~lu·-~:li--T·ft!:ITNil--11-iiO ... U, .. 75 ..... 110•i•oiiSt•l

' vat(! fU•: i, i: int~r: -·· tor {:ao to 1 -do

"""'

... ,. c••• 1 cc 0: t:eo~>d!S~CKIUtlSi: 1; j••MdiSI'.MOI.-CHAili-CI: ... , ... iva It, CMAlt_Difi....C•DlJ..,.OU_CH:hrtji•BMP_D.\TA_IlCT_cll r-ttttf, u: CMr•CchrtH) .x.o.dlfl; clo .. ttl,; ...,,

( nca tt.r• upt.o. copy_u~ctil•_U.to_.... sh<o\lld a insict. copy_tut:il•_into_.... H~r. t:M [lU\Cth)l\ r•f•nmc• .at: pn:tc~r•·P·U·-c•t- do4J6h't: ~11• ..... ,

V•¥ ftEW~UND!II._I'Olm'P• iqt:~r;

t~metion OCL~t-P'i•idl 1nt•;;•r; t Jt•t.ctnl ct~ruw_c 1t polnt.ar t• em cirC"l•,

ftllle_¥I£t.D_C' if J)(linur h <»l rttlf, otharwt•• r•t.<Ku ooor_otot_FtEt.O .. c. Dan't. torg:•'t t.Q c.aU "l1pot.c::._on_Whfle_Fi•ld .tt.•r -•ry chan;• ot cun~;~r-pcstei<tb' i -·· <:n_Who~~t:_,ialtf! .. Ft!t.D_UNDD\_JIOftl'l'1tll;

'""''

proeeduu ~t:s_on_wtlat_Pi•htiPot:_X. hl1_y, inc::...,•rJ; 1 UJ;od.l.t• e-M C.ollltlJ*t-•ft\illl.b.sJ' ot tb• tpot•nti.at 1 taro-t ~ t:ha pot.flt•T,

Also .::.all thh ~oe*'<iur• .arur ""*'tY ch.l~ et point•:r~pos1tton! l V•:r d.1 r••l: .....

f"lLt.O_tmD£1l.._JIOUft'1Jt: tMC't _Clf_PtEl..O_C:

it rlu.DS_.SJI('*If t:hs:n ... .. d, •Oi•t.IU\c• !CDn"EP....CfiU:t.ll.f'Of:Jt, CDri"D_CtKL&_PoS_Y',

hiii_X. Poc_n:

tf 14..,.1!11.\Mf:ft!U:tw:t.!: dtv ,, ttwh '11EUUmb9._POlJI'Tilll•~P.CLE'_rlUPS;

U PlNG..,SHOMH kohd !4•P•b:tAMrt'VI._RtlfG div 2"'DiUMZTD_Ctii.CLE div 2) u;d ld>;o!>lAMLTD<_Ilim'l d~v 2-:0t~ •. ClRCl,£ <iN ~) t-h.n PlE.U>_UNt>!'JLPO!NTV!:; "l'ttNC_,.tt:t.D~C: .....

•nd:

hmc:t.lon on.A..'1•1d.o boo1•1lnl \ ~•eurn ~t.h•¥ 1M liM t•.:>;•t. 1 -·· On_A_Pi•ld•~~What:_,~.ld.,,.NO'f'_OH_rttt.n_t:": •nd:

Page 82: 1994 Afstudeerverslag IPO

C.3. LIBGlO.PAS

c ·-·--any----·, fW\CtiOA Cbl(()t.y; iot.~r) 1 inuoer: ( Ret.ura y-coordinau of or1qin of tM etrcl• u.r pod~10l\ tx.y~. ) ......

~;~(dntC:i:n::ld'I&I!IIX.y) '-ADQ!•_Circl .. 1 ~ Ul~ div l) l: .... futtt:t1oa c:Uc:_ron:fW(mtu. ~_x:. Po$_Y: loaoin~l; in~; r c•twlac. tm tore. &long u. x-ui•. 1 v•rft'tf-~;

t., t ~ of tiM v.ctor tx. y!. l .. }'I longi.Jl~~ rt ia:c~: { beur'D~l!.W holdar. } k; ~: { 11:. f.~Sdi~ c.be 1M:I;U 6f Uw vfttor t:~ t1Y eeter u ~ ri:IQ. } t.: tn<e~u; t riel4 ww:s.r pointer. } ex. cy1 int*9er: ( c.nc..r a( ¢i~r:.l• .i.R dt:q. J ......

nett: tl~Whn_rhlch if 't.C:utCLE.,..r:tELO_C cb-

.... ln { cueuht• fore• toT drcl•. l XI•P'ot:.-X;-CI!2trD~;~:lftt:~_x: y:s:Pw:_'t<arrD...Cl~ ... Y: L:wt"wnd!LAmQthlX. YJ I; t••Ponw.l.~: if L<>O tMn

l't"'Add_:erojf, L, t)tAltETD_CIRCLI!:J•x div t.; •nd~

il t•IUlfG_PIEt.D_c: tbtm ...... ( Cde\l.l•t• fore• for dn;. J X: ~<Po•_x~ci!:N'I'!JLCtltCL&_I'OS..X: 'Y! :tPo•-Y•CEN'l'!lLCtR.CLE_POS_Y: ext•enxht. yl: c:yntcny!x. yl: x:ax-ex: y:lfiY-C'f; L:.ot!.'XmdU,.en;tbiX, yH: t 1•Porwulal; if t<)-0 ~

l'J•Add..l•roif, L, tl .. lAflJ:TP_C'l.ttCLE.l~-. div t.o ... , C•lc_f<:~~re._x: •r: ... ,

f~ion Calc_Fot'e•_TfDHf. Po$_%, P<>• ... Yr l<mqintJ: in~r: ( Calaa:t.t• tM fcu-c• along: ~rut Y~axis. l VAl'[; Tf_~l

t., t J,.at~QU. Qf t-M Vk"eor {X, Yi , l .. y; lO»Qintt r: int..-rJ ( a.eum~v.lue boldfl'. ) It: rul: ( lc: indicat .. th lltftOth ot the v.c:tor !ro. the cnt.r to ~t. uno. ) t: ht-oft'::: { Fi.td Wli1M' potAe.w. ) eJt. ey: int~r: t C'tlnt-r 'Of .cire:le ln dflrl. I .... ,.

n•Ot e ~.on_Wbat.J'teld: lt t.III<Claeut_PUUJ)_C theft .....

! Calaln• rore• for dJ"e:t.•. l ltl•floa_X~ClAC'U,_POS ... )h y:•'Poc_Y..C:t:lft'tk_.CtJlCLI:,..POS.,.V: t.:et'OWXIlL•nathHt:. yll: t: •PonNla:Z: U t.oO th•n

r:•Add._Znotf, t., DI~CIN:LEI•y div L: ..... It t•~lNC_Pllti.D~C th•n ......

( C'alcubt.• fc.re• (or J'ihlf. ) :Itt •P<>•-X·CEm'f'.R.....C:l:RCI;.t_JIQS_X: y: •Po•-Y-Ct:lll"nR_t'UICLZ.,..I'OS_Y 1 t c• &nd cy ua.t.o.,..nt. •r• IHiettBfl.ary, ll!nr• eM x:,_ ADd y:::

•••19fl;INI'It ua IM.Itual ~QdQt. } n:•r:me:lx, yJ:

:~;;:~::.:, Yt:

YI"'Y-CYI &.t•rouMU.-nothcx, yl t: l::of'onN1a21 U L<>O th!tn

r;•Add._t•r~u. L. DtAMI:f'a_etP:et.tJ"y dtv L; .... , cak_Pot'e•_l': •r:

•Ntr

proc..tur• Cb\)y_T.u~"tH•-lnto.)l .. : t CQ4'1)' all t•ctii• ob).ct• t.nto •rraya f<>t: fue.r raotri.v&l. t

'J'4lt'i. j, .. fi•lf!.Jir. ...

{~tu.) t~t:.t'.J t~e•r.J

( '.l•ld~r. I f T.-etU• foTt:a f•eclback a1onq z~ut.. 1 T•cet.l• tore• h~.acl( .alo~ y•ub. { Holds curr•nt x~PQsit.ion. )

Ty. .. y, DlM_Itillq, oi ..... t:•r:

( Holda C~Rr•llt y~po•l.tloD. j ( DhiiHt•r ot the c•nt.•tbt)rd.l:' of r.ha rinQ. J f oi ... t•r of tM ctre-1•. 1

ltlt~t'; eoru:;t CatriR._POS_it_C-*IIUm'H_c.lMJ...ARU_C: oU-v ~:

...... CE:N't'J!lt.POS_l_C•HEIQHT_I:ON'~C div ~: Lart_POr_x_c<:~PaaJS·""-X....OlAICPU:t.D$_C d1v 2-: 'X'OI'..PQS_l_C~JO$~Y,..CMKAX.))lM_rtt;Lt!$_C d1v 2;

tllit~~r:. .. r1•id:

tor i ~>•0 to tm_IUlL.ATXON..,DtST_s.n:tts_C-1 do ...... '' w.Mvail<o:dz-t(T•I:.'.t..il•-"-..,Clan1

dutn F.at.al_trrori'O\.I.t: af lHM.I:"Y ia Copy_'!'actU•_lnto_Mftl.'l: V*~IT4Cti.l•-Pl.•ld(iJ. •.£7.:'*0"f(T-f.Ctil•-Mftl....~l•nll;

't•ctH•Jl•ldtll ~ .lnlt:

c••• !. ot o~ beQln.

D1..._P.lhl;'l:diCAtJ._DtST_Rt~C; Pl-t•r t •IIIHAU.._tll..t.M._(;ll'C_C;

"""' lt~in DiUI_tUl'!I2:"'SM.U..f.....DlST_RtNC_C: tii.-e•r, ::SMM.L_PlA!t_CU:;::_c, ..... ,

~: t-Q:in Ditutt. .. JUnt~:"'l•Nbll!:_fJlftJUNG_C; n.t.-t•:- 1 .. SM.U.t._ntl.it_Cttte.c-:

•M: l:~:l.n

bbA.JUnq;a.l.lo.ftC¥_t:lll1T'_ll:lOO_C, b.t.-t•r' :ot.A.fl<tt_l'tAA_c:rn:_c, ... ,

4• b.Q:in

Diu_Ri.nvl•LAEGOI:S"r_tuw_c: Di-c..r ot=V13tY_SMI.t.t._DIAM_ClllC..C: ...

•b• Fat.al_lrror!'U'nMown •iwo ~iMtion in copy_TaccU•Jntc~.·tt ..,.,,

77

~r_circlas;•l .td t~U.ntim.(Pi/Arc,.Sin{bi_.nrtt>iu,...JU.ncHlJJln(lt}•U:

fled;

AnQle_cireleai•:•Pt/~r_ctrc-lH;

ut.ViSU&l.Cle«rr

lb"aw_PieldstC~C. C'DI'TIRJIOS...Y-C, Diaa..Ri1110. Di...c.u. t.l"\a'):

S.t.Jnt.trfue(CDf'l"::!R_11IJLC. ~-Y..C, OiU_Iiif:l;, ~tt.r, C~};

~T:-t!ICILTAC'H~C: CUli._T~:aNar_cef_flELD_C! ux .T&etile.ue_~iOft,.XtC:l.le_f'~_l): Ut.'hetile.~iCD,.Y(e.leJor--.Tl:

for 1'*0 eo XkX..DL\fLntt:OS_e~l 6o

.....

fe>;;: loaO 1:0 HU_DIAlfJt'tl.tlS_c-1 do -·· lU•t.8P'!'J'OI.JLC•:l: '/l rt"'P_POS_Y_C•t: updau_~Wh&t.Ji•ld.ur. y;: Pl-;.Pi_.lb. y, red): Fl•ld.Jir:aOrt..What.Jhl4: f'x:•UI.TaetUe.O.t_Pore. .... XlO. tli. Yll Py: •Ut.Tac:t.il•.Get_forc:•-~to. x, yl 1 TactH•_Pield(i)•.Asliqn!), k. F:l.el.d..,Nr, r:te. l"',il: ... ,

t1l.Ta.etUtt.Set_twu:tion....Xtl!'mpt.y_e .. lc.,1tu:·o:•): Ut, Tt.etU•. S•t._tuAc:tioll_YIDipty_calc_Fore•) : ut. Tactile .OU.t5:Nt.~1ea.us.•t.: fl&wlS_SHOWN: ><tal,..:

...... Tl•r.Jn.it:

Ul.lnit.!SlVI.L!._PO!liTP.,.C);

Copy_Tactil•_Into..)(esr

U1, T•ctU•. c.t_f'Une:tilm_X {l'.ll!pty_C&le_tei'Te•l ; Ut, T.etil•, S.t_J'\l$t:icm_Y !Dipty_C&lc_Fore•l :

bnds..clt~C:

LatLCban:

t ftt up calor nt char.ct:•u. i kU~GaP•l•tt•U .• co. -tO. ~l: ( S•~ ~ color- of ri~ and eil'cln. J s•t.~l•tuu;:z. •o • .:o. <tO!:

Uitndld TES'f'_M002J Tit-1•-'P&o-: thMHl

Ul,ll)rj)M: ....

C.3 LibglO.pas

1nt•rt•~:•

1 UbQ'.p•• t l.O : .Jun• =·· 19tt.l lGu.ido~t'· vo~tr-tl ,~:,.o; CQ !$ant t.$-l. 041!>4~1tll

.r- Tool:'Opiltr•at. lS 5£-;.l A.l £i~v•n ~L oco~llSllS

( tt.curn tM nr1tl4r..,....••n!t.&tion ~Jf •n int~r. I t..metJ.en lnt_TQ_Strli; iDt4:9•rl' at:rtno;

\ lt•eurn tM etrtnvnpr"*llt«tion of • tono.lut. 1 tvnctic.n lAnQint:_'f'f)_:;:c.rfi: l<>b1',1$.ntl ~ rtr,.tiQ:

( conv•rt .a t••l to-. •trtng, uslw;~ D!.Cltt.\LS.)tUL_C de-d ... ls. lUI ro!Jhdino! I hmet.ion llt•al_Ttl_$trlS: r•.al): atrift9:

( hu.uon the •trin.or•rr•o•~:~t-«tion Qf a bQQle..n. • function &<wl_'to~Str ll > btu;.l•~l: str111Q':

{ tt.tut:n 1 if b, othtitt."ldH 0:. l funetton !:k>Ol_Ta_ln.t.lb: bno-l•MJ: !nteq•C':

I Predue• dv.rinq ""t iiidl.Ua~ & lliMV&v• t- o.t ft:eq~.umcy Ft:-.q th, l praet«Nr• a..p(Pr4<q., ti'UI'> .lnt:.~•rl t

l ~turn tt. ...:1.- ot two rul•. } tunotlonttaxJ:•&lta,b~ r••lt: r••l;

r R.r.urn 1 U .,..o, o it ••O. -1 u -o. ) fwtetion ~fnt.t&• J,nt-.:<tr) 1 int~1

t hl"-IAt'h l if t."O. 0 H 4•0. ~1 U: •<0. I tunction son_~tntl•: lonvutt), int...:•r•

( Jt•turn t.M MXi._ ot two lOJa.:t.nt•, l tl.ihC't:-.lon MAx_t.onQtntt•.b' lonqinU t lonvint;

t ~<-•t:urn tlw •ini- of t- lonuinu. l fUru:Uon Min_t.onvintta,b• lcncintl t longint;

t A• tum t.M -....1- of tuo int-v•n. ) function Ku_ttKC4.tn hu:~rl· il'l~•r;

r ll•turn t:h• IIUn.l.u. ct two int.,g,.rt, ) tu.wticn IUn_tnt.ta.b> imq•rl< inc...,•re

t Ptck lUl ind<tx ot •l..unt• H\ U«*tJ4'_Tabl• and i:ncr•a.!'>a th.a.t. ol~t by I'm• "f't.- belllit¥$dth a-t tn. •l•M*nta of ll••u•_'r<r~t>l• h r••er,df>ad to IN \

Page 83: 1994 Afstudeerverslag IPO

78

tUMt.iott Pilll-Ulr. ew~ lnt~u: v.u v.~_'t&bl•t nl'AY of utt~rt: uu:~;

t lncr .. -. • witJt V•l. 1 p:r~• lnc_b•ltv•r •; r•d: Val: r••ll:

t a.tu:rn t.M •bort.nt clbtane. J:M~w..n two poittt::a. ) function ll1•tmc•tx1. yl, xl. l(3~ n.Ui: u&l:

t •'ty tM h)'boanl WU:•r- } proceur• JaptyJNft•r;

( bturn pohr a.t119le ot vector {x,yl. } f..uwtion. .IU'!qlah::,y; lrtt~rl: .r••l;

( htun arc•ia ot x. } fwx:ti.on ue..,Sin Htt ra•ll : r-..1:

~1.-.t~.tlllticm.

Y4•• Crt. D<a. kaph:

C01:Utt: f'At.SZ_m'..C•·t-.1••'; t Jt:C'iz~Grepr-.nt.&tion af & f&ltl• boolal:$. ) ~1"ln' .. C' •· tf'\#*'; { $Uift0l'11prfll.ntu.icu ct • t:-ua Mola4.!\. 1 BU:&_cotN_c .. l.O: r Uot.•t.icn D.a.se fe~ !lcngHat to stnnQ' t0¢1l*l:'•t~.

lhoul.lt. M-<tlC. i tlklw.t.IJtU,l...C•): t ~r of ~iM.la afcn ptt.rtod: tn

nrinqr~._nution ot hd. J ttU_SUt.,.Pt~Y-C•SOCh f lfu:i- ~r of d-nu it~

•rny h.anci~ u:. Pie~. J

t btu.rn t.M •triU~~Pr-.ntat.icn af an ttu:.,q•l'. l hmeti® ln~;_-ro_stril: ittt.qar!! atrlnJJ; _ .. lnt_Tit_su·~~lnt-"",..ltr llonoint.tit 1 t .... ,

t ll•turn t~ •triaor_,::~r•••nta.tion ot • lonQ"int.. l t~mCt.ion Lonoint_To_str U: longintl: stri~: v.u 1t••ult.1 •trinQ:

IMQ&ti•f I bool•.-n: b...-tin

f Con.et. (ot twg&t.iv• ~n. ) hq.act•f••tl,.O): J.:,..JoMUi;

! 8u114 lft.rll:l9r.pr•••ntat1<»:t ur non-n...-tiv• v.alU<t. ) b5ult;w••: VhU• 1<>·0 do .....

TU5l.llt.;:c:hrii IJIO!i DA.SE_CONV_c•ordt•o· J)•RtHNlt: 1:><i div BA.Sz_C'OIN_c; ..,..,

( COt't'*'!C (Of' :Ul'O.U· } it -~lt,.•• t:Mn Ma:t~l$••·•·:

t Add ainua-dqn H n.e•••4rf. ) 1f N*9Ul•C t:lUm t..onQ'int:_'l'o,.Str:••-••bt:ult

•1•• J..o:ftgint:_'\'t:>_5t.;"1lllbB\I}t;

( llaturn tM •trinor*Pr•s.n't•tion of • bool•.n. ) fWR:t:.iOh lool_To_Strti: bool•t~n) f •tdPU: beoin

if i tbttn. liOoi_To._St.r:*'I"JJ;Ul'!_TXT_C' •1..., lliOol_To_tn:r:•,Al.SE_.TtCT,..C':

•nd:

{ eonv.rt • tMl to • lftl'il\0, ~if\11 occnv.r..s_,.u.c._e ct-:i-b. Jto tcruN:HN• t tunc:t.ion P••l_'to_St:rii: r••ll; 4t:rinq: v11r ,__ult::, ¥rut: s.trtno:

}! lntei)'<U': -·· t Ccrr~t for neo•u- nwt.l:l4tr&. J lt i<O t:lum b:ault:::z•.•

•1•• P<••ult:,••;

!•"'•""'HI:

h~n~lt;•~•eul'!';•f.J:In9lnr_'f<i_st:r itNne 1111 ~ •. ·: { A•sqlt c-ont•ih$ GI.Qh •net 1nt.~r~p.an-t of ChiP T-L f

( • At.t•nc.ion! • ttune c&o..•n·t tuncuon corttn::tlyl .. tf'U\Cl'SU,Ot otv•• '541 111itb &othnd P••c•t 1.0. J

rr .. ct:~tnt:_'fo_Stc(trwwtPncti.l"•lfPilnllO)•pecJMM.S_RV.t._ca II: I rr•ct: ccntdn. th• tr•t'th>n.tl ~re u-• lO.D.!c:'JKALs_IUU<.I._c. )

{ Appt!nd t.•clin-.t z•ro••. I j: •l•nothiPr•etJ. ~~~il• j<OI!CUtALS_fi.II!AL_C da. ... ,.

Result:,.l'l•-1t••O•: j:•]•l'

•nd;

ite.J~l_'to_Str:=A•.ulc; •M:

{ !)(lt the pt00i:4illl ili~l\ Ut"~r INU49* fJ!, ) proeedur• ,,..t.-.l_Enor is: •t.tinol; ... ,.

l'*•tor.cTtitt:M:W ~ Tu.t.KocS.USJ: "'t"lC•ln( '.\ hotal ~zror -oe<:'\u.O. 'I: wr!.teln(•i: ~up!SO,lOOOI;

t:o011lr: •f\d:

( Produce clurlllQ' D.l~t &illi:r•c • ainew•v• ton• ot f~..nc:y Fr-.q K: ) PJ'CH':.,dut• k•plf'r-eq, f>IU': ll'\t~r); ... ,.

Sound!f'reql: Od4Y!l4rl; M.QI.Uiid:

•nd:

( Jl•t::•un l it b. oett.rw1•• o. 1 !uru:t1on &oot_To_lnttb: ilool•anl intq•t; -·· tf b tMn &ocl_TO_lnt:"'l

•l•• Bool_To_lntt"O;

APPENDIX C. SOURCE CODE

{ l!•turn rh• t~~&Xi.Jmla of two r•al•. l tuncdon llaxJ\-l!.a,b: r.alt; r•al; ....... if a>b ~ Ha_lt•.d Hila •h• llaz__lbi-.L:ab: .,.,

( ••w.rn 1 U: a>O, o U uo, ~1 it a..-o. ) fUDG"ti<m ~DtfAl int~Uil int..,fl'l .....

it fl>C) t:hen sp_lnt.l'llll •1 .. H a•O: thM Sqn_lnt:~•O. •1s• if 4l<O eb.n 5;'tl..,lnt:1•"1:

•cd::

\ bcurn l if uo. 0 if -.•0, ~l if .a-cO. ) !un¢t:i0h SQe-l.ODOintl•: l«mqi.\\~1 t in.~r: ... ..

if a~o tMn ~Gn..~int:d •lu 1f a"O ~n &vu_Lonq.h~t:t•O d•• 1.f •"'0 UJ.n $9n_t.Ob9ittt::a-l; .,.,

i Rott.urn t:M ~aU:i.al-. o1 t::vo lonqint:a . i function ll:ax..tonoint{a.b: l<~tl'IJ.t\tll lonqJ.nt:: -·· if a:o-b t.twn Mu_Lon;1ntl•• .t•• M-.J,onoJ11i1'1t: •b:

( :bt.urn t.M IIi~ o~ two J.onQit~ts, • tunct.i.cn l!ll~lnt.!a,b: 1Cib01nt.t: l.onaint.r .....

if ll.<b t.Mn Hin_Limfi.LM: •.a •ls• Ml.n_Langint :tlH

( hturn trw aaxi- of t.- lnt~rs. 1 (unc:t.ion hx_lM(.,I:H i.ftt:"9*t'J: iMq•t-: .....

u •~b r.Ma tta.x_tnt1-•1 .. N-.._tm:;ob:

1 a-tum t.tw aint- ot two int-a•rs. J funct1QIIo Min_J:nec•.bl J.nt:~t) 1 tnt ...... : .....

it' ,.,..b then Mih...lht.:•a •1•• llin_1nt.l•b:

1 sut.ie arny e:ont.aJ.niaq indleu ot ... u.n •l~ts ln tfs:age_Tet •• i vu- llln_V•l_l>o.: arrcyJO •• ~sne_Pt~'t-e~u ot lnt...,.l':

{ Plclr .an i1Jd¥K .at •J~• bt tb-~_T'IIbJ• .and .fncr-... • t:bllt •1-nt by on-, 'l"'M 1Mn4w-14tll of tit* •1.-nu of u.~.'hld+ h t-t.uin.d eo Jlw. J

tunceion Pick{Nr, &It J~t: v•l' U•~-TD1e: M"r&)" of &n~r)1 il'lte~J•r:

f Pr11: Pl"' OtU t1U4a-1'Rl•iO .. Nrll-!MIU thl.-qa_'!',abt•{ll .. ~Tll<ecf!w Pl• tA!t l)c,.i<Nt"< tltJ.J ... U.•o:a_THl•fi;Jl Pl"' IN:o-0

Poat• Pl No: Us_ao._T&bbtiJiCitfi!!\I{PiclrJ•i PS"' (Ai: C<-"i"'UJ' ~ lnPiek~ UUI~Uli•U•-T&bl•liJ!

I Villi' Min_V•L ! Sa.aH•t:t v.hw in tt•M.O•-TUl•. )

Max_Vd. 1 L•ro••e v~;iu• in tll$60•-'table. } CAGle•. t H~tld• r•s".tt. I i, { LcopcCI'Wlt.•r. I nr_fltn._V.~Jl_Po•: J.nt~r: ( ~of •1-nt• in U•.....,•~T•bl• ttQ'.l•l to Min_V•L ) .....

MilL Val : :ottA:I(tNt: M-.-._Vel:.,O:

iP>O: ( inv: Ql: Min_VclS'IHUI j! o-<•1<11 u•~•-T•bl•llU

Ql: w.ax_V•l•!kAX j: 0<..-j<i• Us..-qe_T.t.l•lil) Ql; Po•_Mln ln !Sr:'t j: Unq•~'t'd>l•,jrdUtt_Vdi

I whit• i"""t" do ... ,.

i 91 " Ql • Ol ) lf Ut:~_TUI•l-ll•M1ft._Vd «:ttft ftin_Vd;el,l'jj41Q•-TGleUl: { fQl ~ QlH:to•1•ll ) H Ua~_T.t!l•UI>IliiX..V•l ~twn M __ VIIl1::U.f10•-TIIhl•!U; i IQl .. 02 "'QHU:,i•ll l 1:,.1•1; tQl~Q2'0l} .....

lt M-llilC_Val-Hin_Vat<Bw then { MA,X-MlH-<Bw ! Cholc•·nabdo.t:ttrl •1- f ~-MU1s!IW J .....

{ c-r-t• ••t of 1ndic•• {)If •1-nta contail'linQ eM -u .. e v•lu. in tM un-v. !

1; .. 0; Nr_Mj_n._V•l_Pos:•O: Whil• 1c:>ftr" do ..... H U••9•-TAhl•{1}aM1n...V-.l th•n ~in

1f l<'Y_Min...V•Ll'oa>,.MAX~l>12:f!_f"H"tt..)U!.kAT_c uvm f•tal_lrrori'Arnv <.1t<t ot bound.tt, tu.ncH04 Pit!k. unn: Htq.•t •ln M1n._Val_,..,.!rk...Htn_Vd_Po-11] 'd;

lneUtr_.in_V'al_Po:l): •nd:

tneli): •ll4;

Choie•::o-!lltn_V•l_l'o• [r~1Nr_•un_vlll..,Poat l1 1l Us&a•-TIIbl•IC"boic•J<l<tlih..,.V•l ttl•n f'•t•l-~ror-~' ln pictt.. • I~

•M:

PiCkH<'C'h¢1~•: U•.q•_TIIhl•(Cb01~l••U•~-T4bl•ieboi<:-el•t l

I lMt-•••• • ~""••l '"'lth Vd. ! proe..:ttn·• Jnc_~altv"r • r•Al; '.'lll r••ll .....

a:•••V.,I:

·""·

Page 84: 1994 Afstudeerverslag IPO

C.4. LIBVARlO.PAS

( .. -~-- l».•'t.Me:• ....... ~ ... )

.... •b•

( ltlcO ) ..... U IX>O) &M (l(I>•OI t..blrn ~···~~&.."''iytx) •b• H i;ltdl) .u:id [:po:O! then An;'l.•:•Pi~hd.anty/-xl •lse H ht<O) and l¥<•~1 than Angle:.:<Pl .. ATCT,an!y/xl else H !)1:,.0) &Ad !y.o:•OI m•n AllQlel:.Z•Pt~Arc'l'~i .. Jixl: ....

r a•t.um. ue•tn oi x. 1 t'lmet.i<m Arc_Sin!Jt; r••ll: r•.Ur .....

Ar<JinliJU'f!timiX/aq'r~U·sqrttr:i I}: .... ,

...... .....

C.4 LibvarlO.pas

·­vndon .... A.Ut.hor

: libY.a.rlo . ..-• t 1.0 t .June 26, 1994 1 CU1.:kl L••nd.•"•

\tnovd.-ntJtr-t 1 60IS C1f Hom c.•1. U?SI•Ull

J..n. 'Tooropurut lS 5642 JI.J Eindhov­t:el, o•0-11Sl1S

O.llle.-iptton: vo~~ri.ou• cla••••· including • f••t- ti-r, log fac:UH.t••· -& fll,at Ull:t:.U• t'IHtdback lookup ch.ss ~ a clu• for IWI.t\J.~l.at:ioh o( t-o;••· Vl.O 26~ 6~1994: tnHial rel ... ••· tncludtl h•t tl-r,

blios.ct on work of 't'UrboPQwt;r SOft (SWAC-<:oll•ct.ioa\.

e<>onst: 1'VID\..~IOH_C•ll9l111.56'1: { haolu:tion .oft~ t .. ~ t.t-r, J ( TM- ~t.ut.c t:or 411St.-.t\ee .wt dl.-..t.*'t

u• u:c.-.11 bt t:b. •JrP9ri-nt•l •ott:v.u•. } $MALL_I':US't_ctP.C_C•lOJ): 1': SMall din.•~• c-t•r aer-n to r-r•r chela. I ~tft_CtRC_c .. zoo: t L&r09 diat~• e-t•r aer..n t:G c::.nt•r coircl•· 1 SKM.t._Ol$1'JI,I~~C"'ll)0; { Sa&ll <hat.nea bor&.rc-ntal' t'lnq tc <:-tar eire!•. L.AltG~IS'T_RIHG_C•200: i f.AT99" d:.at:~ borde:r:c:ettter r.\49 to cant•r eircl•· VUtY_SJlALt._DfM_C11tC_C .. l6: t V.ry .-H rtrrl• di.,..t.ar, 1 SMM.L_Dt.l.it_CtR:C_c~u: f s.au d«l• cli...,.ter. ) LAJ!~lllM_cnu:_c,.ca: t t.&rqa circle d:i~•r. }

t Mu:iawa si:.e ot ttw ana eont.tninq .tll fi•ld$, I HAX_l)nk~tftt.es..,.c .. LARCl!'_DIAJLClaC_C•~»Ift_RSNG~C';

{ Nwaber ::.! IX or 'fl pisat).s rep¥e•«~t:~ by ~ eel, Chooaen avch t:b;r.t: Sl\ obja<:t 4f 'f4C't Ue----.c\4 .. !U.s 1.nto 6411\b, }

III.U"_!lY'tE_c•2-5S~ f t..upst: unsi~ ~r tholr Uu tnto one bVt•· 1 ll'lXSl.S_PD_CU.L_C;l: t Hwlll!ar ct piXels st:or.-4 in omt e•U, l

( Al:t1.u•l l•~hlwidth ot lookup •rr•Y. J AXU~st;n:_cEU._c~KAX_D!AJI_-pi!!,J;lS_C dtv PIXti.S..,_PE5l,.c;u.t._c: MIN_Fl£l.DJG._C=-O~ ( S.•ll•st i<MntiU•r tor ftdd, ) tflt..XJI!t.b...J'Ut_c~l: ( L&r.g•st. identiflu for tt.ld. ) $l:Cl4_rx_at1'_C•4} ( 81E. in. statu• t.b.at coru:at- •twn ot x~tcn•·

Alt.6 • .._ "$"llt:t.~\•-C:•ll_"J'lirn) Slctt_n_an-_e..a: ( Bit 1n st.at!.!.ll tMt <ont.ia.. •ivn of Y~f<>re•. i t 't'lw Cnllovinv tiu:- nuaben -.r. M h1 the r..w;,•

•tlt_r-IELD_HJ\_C .• lL\l(_PIELDJIILC. Ttud• C:OMt&ntl .u·• o..~a.ct in t.l\8 • ..,.ri-nt.al •oCt.w•- t4 id.ntify U•lU. •

NO'f'_oo_r:ttt.J)_c =0: ( ~et.1na.d by on_Wba~:_P1•lcl H tmt. on • U•ld. ) Cl'JitC:t.t_,.tt:t.O_c "1: ( R•tumed by on_Wii.at_PI.dd 1t av•r circl• tl•l!S I lllNC_Fl!l.O_C -"2: ( Ret-urned by on_wn.e_rt•ld if ov•r dl\9 U•ld. i

I 'l"YtM' th4t hol"- Held l\l.llllbar. x~rorc:• AD11 'I~ tare•. Fiwld nuii!Mr .UIIt: bot in tM r.-no:• MlH_FllltlJ)"_NlLC: ••• IU•lCrlt.I.O_Nfi_C. X~ .nd '/-fore:• ~•t to. 1ft the roll.I'IQ'• o ••• M.U_8'f'TIL<:. 'rhao ~n ar• codM •• foll~•,

st•t.ua MS8 ••• t.SB RltRJI:Y.X:tt~ 1\"'ll•••rv.d.

l'=lliQ'n Y·tore• Xao•iiJn x-to:re• N"ti•lC: nWIIbar

tx, ty! o~~b$olut• X• <~nd. '!-fore:• l t.~ T•ctile_C•ll_Typa.,

r.entd StatUI.

"· ty, byt;.., •nd:

( Ar:r&y at t...:til• c•ll.a<. 1"ha! total erl:• <:>f thi• •rJ:4Y 1a U•it.c\ to &4 Kh. J

Ta.tctil•JI--_1'JP8""

.r·uy{O •• AXIS_$IU_Cil.L_C~1. 0 •• Ul$_SIZ&_ett.~C·lJ

of "t'U:eil•-C•lt_~; f P, .. t. looKUP cl<ln ht t.«t.H• to"• M:ld U•ld nwt;Daor. 1 T«til•-"--clun

ol>joct ~r.t· 'hctil•_Maei_~: prooadUH tmt.; praeot<N:r• fk»''*r pr.:w::«tur• Aa;d.p{X, y, Fi•14.,)fr. Fore._,c, h~_..Y: i~J'J: .,~.....,. C.t.tlt, y~ int-.a.l':

v•r He~. ht<U_lt, F~_7: int.-.a.r•: •M;

Ti.mt.r_Clu•«ebjttet: l print• l se.ue._~: luqittt: Sto;>_t.U..: lngint.: 'rilllib(jf' bOOl!tet fW\CU.cm. a..d; tonvin~:.: t public l pr~•Illit.l pt:~•Don: CI~•C.t.lt.ltr&~; )jiS't'IC~ ltaa•t~ proe~ hue: pr~<lSt.CfPI tW'lCtic:~; ll..,._MI1 nal: hmr::t:ion Split_Ti-~ s--1: •nd:

~-Clu•aoPl•r::-e ( Pf'ivat• J f: t•Xtl ( pu.blie ) proeadur• lni-e!Nu•; ot.tiD;I'~: Jlr.:w::MNr• t..¢9!at nrinq!: P~l'•Don•7 procadur• Pluab: ... ,

{ Clue m>ldino l>it1114P iluod. catltai~ -tbod:D t:.:r atQt'•P and lat•r r•trieval. }

lug•_Cla.•a•object 111:1&0•~ .t•C'Cl'd BitM~1 f'Qiot•rl Siu t vord.t

el\d; tunc1::ion li'J.dt:iu word; t"~.mCtion KtttQ!bt 1 word:: proc.dure lrut.; procadu;r• Don.: ps-oe.aur• Drop: proeeun O.t:!Xl. fl, XZ, Yl: 'lttordl: prac.m.tr• PUt!X. T, BitBlt~ vord:l: proe::adur• #.l~!V•r f: til•t: prae.wu-. t.oadtvu f1 Hh•l, .... ,

( ~ro tn. tm.d~ ~ival.nt of L- • ~1. l fW\Ct.ion CanUmlU.: lot10lttt:); *'••l; -·· U t.•O thai\

Cardtnal: r.f.l9 .. t612U.O•t. .,.. . C&rdiua.l:.,t.:

•M;

( Ca\C\l\.t~t• UN 41l..-pu4 itn a1lU .. eond.s) ~e-.n St:art aM $tap. l function IU•P"M.l.'rt-lSt•:rt:, 1lit:-ap: Lobalnt•: r-1: -·· ltllr!Pflllld_,.lu :,.Cirlr4ln&l1St.op- (St.&rt•~ltall JTlii!ILR!SOWTIOff_C; •nd:

c tni~auu ttur. ) procadl.u:·• Tia<tJ'_Clus.In!t; ~g:ln

( !.plt(;(rt'd t:h t:J.-r (:hip to •llow l aicros•cond. r••olut.ion. ) t S•l.ct U••r ltiOda 1, s-*4<1/wdu r::tt.nn.l o. I VQt't. lUll {-"$l4~ HlOUOlO<ib) lnHna!Stb:/$00) r OlllP short $•2 :D<tlayl port{$t0l ;a$00; (t.$9 "' OJ iolin.tSEB/SOOJ: (j~~p •hort $•2 ;Dal&yl port.1$COJ t"'$00: (Jt:SB "' 0)

e.:nbn.t•:

T!all\9:=f;t:ls•• •ndt

! hetor• ti.,.r to Mnul •t.•toe 1 p:r:(J(!ed\lr• Ti_r_ct•••.Dorut: .....

{ «•store tM ~~" chip ~o l~• DG'J"'U.l st•t•, J ( S•i.ct. t:t.&t' 1IIOde l, :r•..ttvrit.s cn.n.n.l o. 1 pe!'t:($0}<"-Sl': (OOUOUOb) iMi-lS£8/SOOl: {)~ aMn $•2 ~P.l•yl por~f$tG) , ... soo: {t.sa ~ o; btl:hw($Q/$0Ctl: {jll;) sMrt. S•Z ;O.lay) ponli40J ••SOO:: {M$6"' 0)

Tilllinq;:o:f•le•; •nd~

\ Jt•-t tl-L) p~rocadu.t'& 'ri-r _Cl•••, Jl4oa•t: ......

T1•1nctl vfais•; ....,

{ St:ar:l: 1:1-r. } pnu:·adu:r• Ti_~r_cl•s.•, st.art: ......

Start_Ti-: eR••d; ti•ino:•t:rua;

.andt

{ ···-~ Ti_r_Cl•u.St.op ••••• l

f ltt:ap t:ha r.i-r. J pri>~:t<hJr• Ti_r_Cl.a.o:•.S:t:.p· -·· scop_T,_:~Read: Tilf>i.nQ;,.fa.lsa, .. nd:

79

Page 85: 1994 Afstudeerverslag IPO

80

{ )ta;ld th• tlaer vitb 1 JdCroheotd ftiiOlYtf.OA. ) fUMCion 'f!Mr_Clu •• bad.: lcmq1Mt ... ,.

inliM( $FA/ $MI$20/$b01 $8GISOA/ , .. , $801$001 S£5/S.U/

'""' $UJ$C1t S£4/UO! Silt$Cl! 5!41$401 SU/$C't'/ .S.r'l'i$.D31 StAt SUI U91$C6! saottfr/

{eli (­,_ , .. , ·­''"" lin ·­!In ,..., hn ·­{not (in ·­,_

dx,$l:O &l.SOA 4x,all •l.SDO $43,•1) tl.dx di.u aL$40 bi,4l •1.$40} ::_.-.1 tl. $21 SLU l.l.SO?P Sll.all

:tU.n.bl• int•t"rrJPt•l :~PIC oevl) rAa);. u Had lrrl

:Latch tt-r 0}

;had irr) :S.V. h t.n ;~:l :Coun't•r •• .,. bx} ;l.S8 ir. J:t.t

:MSB in BHJ :IMN .uc•ndino eount•l't :JI:.•ad PIC i:e.r} :S.w• ie in S!l :Mu:lt: dl int.•t"tu;IC::t)

$£il'l$2ll i9t/S401SOO; S4£/:$C:C/ S:GfS&8/$16rUCiSOOt $89/SFO/

'"'" ·-· ·~· {ftl<.'I.•J

~. $40 ;r•~ low vord of ti-l ••.u ;tr- Jlos <at:a aru.) tbi:,es~IUC)J ·­'""' i•ti

ax,ci ;Jt••ecr• iar froe Sl}

•nd:

SEii/$211 $l'11/ $UJ$r&/ SMI$011 $74!$0'1! $lfll$n!J$P'TJS!XtJ $77/$01/ $42/ [done:) SU;$StJSKf $U!$.UJ$F£):

$ll,d)

!J!IOV u.di {c••c <ll,sot (j: 4ono (ClftC! lnc,Sl'? f1• don• {it:u;: cb:

{taGV tbp--fJ ,in: {JJCV (bp~ZJ .dx}

t C.aUbrue the u .. r. ~•neirut tM d.hy nucod by ttu!ding 'tM ti.Mr. }

pn>C"~n Ti-r_el.u•.calU'~""'W: const- R£K_C • lOOOr V&J" J.> WOf'<l;

1.1. i.t, biff: lcmoine: ... in

n.lt•r•Mnlnt; fo;~r i t,.1 to ft!PS_C' 4c; ..... l.lt~; t.l•'ll'bdr ! tlu t.htl al~ ditf•r•ne•. t tlitt:~Ll-t.l: u Ilirt < n.tu. tun

O.lt&!•DiU: .... , .... ,

I tnabb inUZ'II"UP't$} rfl•trhv• old. trr) ;C®AC•t' hlt (l'l'f :Jurl;p it not} ;CCWlt:er " $rF?) :non. U ao} :•1•• eow:\t int r~.}

( ~ to r••ol..,.. n~Uiet in Loi;_Cluc ) proe.m.tr-• a.a!_l'lu-.h cv .. r r: e••t 1 : .....

Fhaah.Cfl; ... , 1 cruu .1lt)(l ~ ua log rn•. l proC-.:1\U'• l..oq~C'J.Ut.J:(li~(~: 1Utih9l1 ~in.

Aniontt. ,...,..,: ttavt'J.U!I.':):

•nd:

t App.nd a nring at th• -nd of ~ loo;r til•. 1 l)fo.::ild>.J..-. l.c>9:_Cl•••-'4-0ol•~ •rflnoJ ~ .....

lofr'it:etrltf. ••1 •nd:

' clo.•• rM log rue. 1 proc.<iut¥ \.o9_Claas .CoM; b9Q'ifl

Clon•!Ot •nd:

( SN'Id ,odJ. <Mt.a in buH.;:;r.\l<)fi\Orv en phyairai fH•. ~dnq eM bUfh<r. QtiU• handy for t••tino alne• te dlow• aor• l)l'~i•• «kt•.,..iMUon et t.aulty IJpQtiJ. J

proe~r• t..oq_Cl•••.Pluah: -,In

R•alJlual\!fl; ... ,

{ lnieiAUtt• IJt-nJCt.ur•. l proc..tl.i"• r~•-Claua.Jn1t: bAJ9J.n

1-g-•.Bh:~~~Ap:• nil: lll>Age,Si:t•:"'O:

•M:

APPENDIX C. SOURCE CODE

{ f»t.Qi.M Niobt- of iaQ.a. l t-t.in taap._clu• .~WiGht: wt'dt ... ,. u~.ti~,.nu

tlum tc.ivbt:..Uflor!OUU:(Ili&CJ•.&l~"li Ullt 65515 al!Ja lleiqll~HI$; .... ,

( Clipe; a i.Jav• froa th• cerHn and ator• it in • ~ic ·;rariabJ•. i $)roe.c!ur• ~.,.Cl.ats.GtH:::I:tl. 'll, X2. 1'2: worcll; ... ,. ~opt ~.sh.apoJ.cq.t;t••.t:•IXl, Yl. xJ, Y2!: € ~ain IIIIISOty tor iN;-a. 1 q.tua!~•-81tlt&p, IN19•·Si'lal: t Copy tM 1&.\qa to ~h• dloeatl'Cl a-oey •r••· qat.t~lXl. n. Jt2. r.z. ze.g•.B.ttflf.ap~,:

•nd:

( Clips .an U..~ on UM •cr•an. l vrete.dsn·• taaqe_Cl•••·Put(x, '/. !lteBU: vordl: ..... pue~t•. v. 1-..va.aicMap"', atultl: .,..,

C PrHIII UJ> "'- ---.ory QUd by &n v.nw.anted 1~. ) proe..,.ra ~-clue .Orap: .....

H 1-a•.Bi~MtU. than fr-11-v•.bi'l:Mp. ~.shah r-o•-111~•:a0; t-o-.81taap1•nl.l: -·

t sa.,.. .an :I.M(II• to 4hk. rue lWSf' •lr•~Y be ~ tor WJ'itiftll. l praeedur• x.....,._cl.a••.Savatv•r f: tU•J 1 .....

t st.ot• U.. ~··• d:c• •c "tMt it H¥ be eorr.ctly lo.&iHd laur. l !Jloct:wri"tt. ~.Slu, ll: ( Wdta i~ it••U t:o (iiak. ) bloekvtit-a(t, ~.attlt.-p~. I~Miii•·Sh•l: ......

( L<M.i.U an t..o• off diak a.ncl •tor•• it .ia a ~e V.riabl•. fU• lruST d¥'.ady M open;&«~ for rtt&dlbG, J

prccsdut• X....•-Clu•.LOad tvar t: til•! I ..... { Pind m.~t hav bio t.h• i~UQ~~ h- l blod:ra&d.lf, 1-.Q•.Sl:t•, 21; t .Alloc«~• --.ozy for 1t. ) q•t:AeaUutJe • .flJ.tlhlp., llNI;I•.&iZ:ai: t 1.o•4 JM.av•. } blccb .. ct(f. Icaga.BitM&$1"'. 1.-Q •• Siul;

•M:

{ A f&lit lcolrup &TT~Y i~tp1-nt:•tion for t.ct.U• !ore• d•~ndif\9 <Ml po•!~ton. V.aer; fteCft&&ry tot incHas• t:n. e-.;;Ung traquency tor Uw ••c:cm4 ·~rl-..t.

Clua v•• not .tM,..qr-•t-..1 ll'itb uz-clus, .twc•u•• r-tl:l.etJ(IIU <m •.iu ot fJ•hH, c:•~o~.,ttd by u c • ._..,.e •. 1\.lr-t:b.ar opt;.t-.U.a:At.ion 111: quit• trhd.•l by •UainaUnc.t ~®l• f>t' tripl• c~ll• in row t.o tile' C.t.-furn:tion with .qual p.ar-ura. I

t updu• •t<~~ttJ• u, contain a- H•id ~..-. } tWU::t:lon S•t:_Fi•ldJlrl&tiiot':IU;: byt•; Putld,Jtr< 1%\t~t.TI; byt:•: b.-q1n

U 11i•l1$Jlr>=WINJ%EL.DJI1"._C! and !l'i•lcl..Nr,...,.KAJCJ'l£t.O_ml_C) tMn .....

( ct •• r Piald.Jfr. } t:t..at.._.• :w$t..atu• and iAAX_BYT£...C-K.U_rtU.D_m_cl: ( Sat f.l.•ldJit. l Set:.,.Pield.J;I'Cl"'SteUUI 0!' f'tel<;LN!'; ....

•ls. ht~ol_ltrrort'Ill-a•1 ct•lo:t-~r in S.t_l"it!.d_Ntt,'t; •nd;

i \Jpd.lt1.a 1tt:.a4- Cf:l ~l>fii,.4.1:<~> thA-t. t.k»n nQ t~•l.S:

u:soci&t" vi;;h i.hi• poU1t .. J fsmcc.t..:m Cl•sr_Fl•ld..J'fr(!Jt..at..,...: byt•l t J,wt.•: .....

Cl•.-r_rialci,Jk:•Mt_r.i•l4_ttr ISUt:u•. NOT_ott_tl£t.O_Ci: ... , t bt~rn ~r of t1•ld .:.ont.a£"*<1 in s:t .. t.\1$ ) funct.ion c.t:.tiald_N:rt.Sc.at.I.UH byte-1: byta: -·· c.r._ri•J.t\Jfr, •Statu• and AAX_P"IEt.D.Jff:_C:

'""''

( Updat• St..atus to contain th• &t.Vtl ot Fa. ) f~met.S.on Set_Si.vn_r:cl:lt.-tuol'o tayta, h• lnt~rl · byu• . .....

t et-" alon. } st•tua :•Statu• tt.hd IMU_aY'l"£_CwSXGM_rx_tnT_cl, f S.t •Lon. }

Page 86: 1994 Afstudeerverslag IPO

C.5. LIBUIIO.PAS

if h:>O c.b.n st.at.us:oo.ttatus or stGN_N_BtT_e; S•t_si.;n_h:: •Stat\J• t

•Mr

{ Upd&U St4t\OC. ~ con~ in ttw 1'191\ of Fy, ) funodon ht_lign,Jy!stn.u•l bye.•: Fyt itlt:~UJ• byt.o; .....

{ Cl.u d9ft,} S:tatwt r •Stt~tu. artd UIAlL11't't!.J;•StClf_t1_8IT_C}: ( $"alp. ) it Py.l-0 tlwn St6tus:dtat:ull Ot' StCN_f'f..,.arr .. cl S.t_s;ign_Py;-ti!UW.:

•M:

{ Jteeurn •l U Siln'l ot: h (O~i:Mfl in lK•tu•l h D<fV•ti·,.. ottwM•• r.c.u.m 1. l

f~loo c.~:_~;n_PlHStaeu•~ b)tl:•l: UtUQ•l': -·· it snw• u:.cl s::tQN_n_.wrr .. eastGN_r:K_alT_,C t:.Un c~n:_sic:rn-rx:al •1•• O.t"'"Si~' •~1~

{ bt.urn ~1 if •ip Of ty Ui:OtlUia.d in Se.ttus) ts n.qadv.. Otl'l.•l"Wi- :return 1. }

fuctiQll. Gttt .. Sl.O'ft-P':ffStat\14 r bY't•>: inteqfl"': -·· lf Sc.aeu• .and SIGHft_IIT_Cl!S:IGN .. l'Y_B:r'l'_E:' tMQ ~-$19'1'1J'Y:•l •h• C.t.,..iiU.p_fy~ *" h

( ct.u U.. .tvn of X•forc::• U\ Status. l t<meU.Ot\ Cle.u .. SiOZLPx(St.atUII: :byt•l: int..;JOt': -·· <:l•ar_Si~••S.t._Si9D.-h[5till.tus, OJ: .. ,.,

{ lnltiaUs• nructw:••. rill array With ~ro valu••· l ~.&.lnt 1'<K'til• .. Motii\..Cl~s.Init: v.u 1. j1 intti(JU:

xt ))yt•r ..... tor i1..0 to AXIS_Stzl:_cxt.t.:_f'-1 do

for ,:•0 to II.X.IS_Stl:ILCELL.,.C~1 do .....

... , tht!IKJJYU. j).st:aaas:•

cl .. r_r1•10r4 ct ... r_SitJU..P':tl

Cl_t_Si.OI\..l'XIO)tl: ...-orya. :U.ht•Or ti:.Oty(i., U ,fyJ•O:

•nd.;

t Don• L• ampty. ln. th• futur• h: .:ot.~ld toontalin Mst:ruc'ton tor .:tyn.-ie&Uy •lloc:ued •ttuet<.ar.s. l

)')I'M'~• 't'a>:tll•_H...._cla•s.~; h-vin

"""'

I A.:nign • f1•1d ~r. X'• and '(~fore::• to • P<Uition on ltb<l •er•.-n. Not.• t.hae t~u:rtU• r•soluti¢n h 1~ than ••a·- T•soluti.on; quick eb&n9•• ot tbe varlGiN ov.r a •-11 di11t•ne• •r• tilt•r-.d and c•n dh~•r. I

proc.cha:r• Tac::ul•_..._Clsss.AIIsiop~tx. y. Pl•ld..Jb"., Potc•_X, f'dt~_it: 1M*9•rt: .....

u U«IPorc._x)>MAX_!n"l'e_C thftl f•cal_h'tcr i ·x~tc~<;• out of rano- in- 1'&etit._M .. ~Cl•••-Usion. 'I;

i.t &ta(Pc:rc:-•.Y)'7ft.M_.8:YT!,_C than l"•t•l_E.rtor t 'Y-fc:trc• out ot r&flQ• 10 T•etU•_II: __ Cl••• .A.-slflll. 'l r

( C'•leutau ll- •n-d. y-podtlon in tMI tactU• Mfl'l(lr)" in r•l-.t-lon with tlw Jcr••n position. l

x:•x dtv PIXU.S_PEJLCEt.I._C: ynry dlv P.IXI$L&_PIJLCILI,._c;

t Upd&~• •rn.y, ~ vtt:h -..ory{'IL y} do -·· St.a.tu•:•S.tJi.-ld,.)lrUit:•t.\llt:, 'i•lr~JU'l:

S"t&rtiS!t.Sat_Si!J!LP>II$U.t~A•. ,or<:•JJ: .st.;:>.~A, .. ht..$iO'f\,.J'yi:S.t&tl.ls, For-c•_Tl: P"ll; "byt:•tabs(~I'C·J~ f I ry~..-byt;alab•U'cl'c•-•1): ..,.,

•nd:

t 1'.0.-t U•ld nlJ.IIIlHr and xly-forc•u~ •uoct.~t.a vi:t.h • •c:'t'-n I)OlJU.t~. t proe-=r• ,.a.etil•~-Clua.C..t.Ut. y: int.e9•f'J ...... v.r Pi•l<l.Ht. l"otc•_X. l'orco_Y~ .tnt:~rl:

f C.alm~.1•t• x· and v~po•lt.l.on ln t~ tact:U• ma-tDOry ln uht.iOft wiUt t.tw •er•*h podt.io-b, •

l!:•x div PIX1U.S.J"~C&J. .. eJ Y•..Y div ~IXELS_PD_etl.L_C;

i LooiNJ! r.w.tu in nt•Y. 1 wlt:h M_,t"y(,;:. y! 4o -·· Pi•ld...JttttA:tott_Fialcl.Jk' \St&t.'IS~:

r.:;:rc:•..X: •h•o.tt._S!!;ftl....Flii"{St.•tust; rot"c•_T; d'Y~a.t:_Stvn_PytSt•t.usl:

•nd~ and:

..... ....

C.5

.... V•rsion

""'" Au 'thor

LibuilO.pas

I U.buil.tl-.paa t 1.0 : .run. 26. ltt4 : Guido ~. .. men V~l:'n.ul 6015 CK Mom t:•l. 041SI~lt21

Jan ~rcpst.r..t )5 5642 AJ Eind.bov9n t.d. 040-llSllS

ou.edpt.ion: v .. ·toua trackb.al.l-nlat.cl d•••••· lttcludincr • elu.s !or UJa-•r-MI.t•rfae•• with. taet:U.• iiW4 v~l in· ..ad tNtP"Jt, a fan. t.iMr and lov-fu:Uiti ...

V\.0 U- 5-1994: 1nit~al r•l•ua. Put tiaar ba.hd en- work t:r• 'N"boh\far 110ft. tSWAG•colhc:tionl •

vt.o 26.· f-lti-41 ~t.a:~ioo. ;..proved. V•niott ~\lAC~.

1 '1"tW two r.racll;)l&lb hava di.UU-t.: poliDJS on HM!OU a.ftd: M~O.t'lt • .U: tPOK'Ol is d.Ull&d, t;l:A: t:OII't'SCt :a•tti,~.s for lPOPCOl ar• 1.1•0Jd.· Ot:Mrvis•. '¢.htJ ••tt.inq• f12:r ~M 4Ut»U-66 ar41 us.ct. 1

l$dtihM IPOPC01l

($F•)

>mit.: U.b\IUO:

tll~ft'fa¢1•

u•• CTt., Do•. Graph, Ub;r10. 1~, PC'Il_SUP;

coru~~t SXMJ.JIIOltlTEJLC•l: ! A tnaLtl potnt•r t'Qf' ttta u-r-iru:•rta~. l !..AJtC&...POllft'llt...C•l: f 11. larva pot~n. l DIR,.SEP_C.'\': { ntr•t:t.orv S9PU"ator. } BGt_Da._e.•c; ••DJ:tt..,si.P_C•'bOI.': ( h'eh eo tM cur. con.tatntno .:b<;ti-!U••· J BO'I'"f'OfLST.&T'lON..)lR•OI ( Lowaat st.t.~:t.otl ~r tor audio ehu, ) TOP_S't'A'rt:~8; ( Kl.-gb"t •t.&tl.on. ~r tor audio dan. ) PCJI,ADIO_CAPJ)..)I.fiCIIQS_C•6ll: { llaeory .dltr••• Of t"dio e&m. I CAt.lBIUI.TI:..H'Ut.M't~-C:•lO; ( ~-r of lOOP$ ~r c-aUbra~i"On of' '!'t'&Ckball

to ..,.15Ur• stat:it: bic:t.:ion. l

81

MAX_SA\I'tL$TAn::5_C•Uh ! Maxi- ~r of or•J)Ide~C .. #t&tu r.hat c:a-n b. .~. ) ~:tli_C:...O: l Ccmt.•xtu.al Q&in tMdbac1t an&bl~. ) ~CA!N-C:l: ( Cot~;t.•xeu•l o•1a t~k dlsabl.C. ) { conc:.-xt~l vain: contro-l cU•tane• ot tar1Jat is i~n4flnt of C"ont.•xt.

To Nita t.tt- c:ontdt..\l&l c:ont:rol dht4U'I.c:• lt UtNJ 1Al1f't1" -•: 1.0.1 2.0. :n l.S: l.S. 3/'l' 2.0: 2.0. 2t7 i

API'ROACHINC_OAIN..JtBt...C•l.O; t e&iM<Ulti.plJ.•r wb.a appr~hi.nQ' tuv-•tc:•nur. I ~VUIG-~1N~_t:•1Jl: t C..iNWltclpH•r wlwn l•&vl.no t&roatcent•r. l nnr_ST.JI'YN_TRICT_Y_c--15;: t C:onJ.taata tti•trae"t.cl rrca tot.md atat.ic: friction ) DIFr.,.!M'J)\"N_PI.lC't_X,.,J!•lS; { to q•t ••t• approxi-ticm. )

:::~~~s~O.fit ~ ~t!n~! :-r1:.!:h~:o:·r.!cti1• t~k. ) DIPr_VAL_Y_i::•~O.,; ( -0.6 worD b*•t OP 4861:N¢•<U. l ~y_cat;o~ ( 1'1JM, in-· delayed. -J.t.J.DJ .t.ft•r

• •t.uve· i>SOl ~· tn aotortur­di,J:Ting o::alit~r•t1oa. )

1 Ti .. in u. Ml*YN va..ttih;l aftar • ·-u· tSl c~a tn IIOtorturc• dl.lriDtJ !7a.ltbndon. }

1 Digital tore• iacr...,.. fer .&t.-ps Ln c.1ili.bnu. J t D10it&l t~• iacr:.-• lot •taps i.n caH.b't'at•· ) 1 x thnt•hol4 At 1ilbicb •-.a position ctumo••

nteRIUit.f'OK'IUl-C'>O; lNCU.UIL~l-C•S: Mt.t._"nfk..X_Cal;

.ue c:on.sidal'<td to " &A .etual .,.., ... ht.. I 1 T t..bUCkold at \4\icb nna&d ~1t1on eMnv••

•~"• eOMidatad to ~ an .cw.l aov.-nt. ) STBPBAC~~x_C•lO: { btt·a Y tore• c:Jt.ano- .bat- t.Wo

Cd<tt.tcl\ -•...._r...moc.s. ) ~ro~CE_Y_C=lO:: f Ext.r• Y tore• ch.APO• b.tv.•n two

friction ...._sur-nta. I

v.r n.vic;a-.: Inp.a;tO.ViC•J j Ht>ld~: t>bj~t tor Icv~l.v•t cont:r&i <>l tracll.b.aU

typ.- { Kolda poil1t•r powittan. l Potnt.ar_Posit.hm ... 'lYP*•.raeord

X: 1fit*9•t; Y~ l.nttoqat: ... ,

I HoliV qraphic:a- •tata. J \lisual_!l•ttillG•-T"~114'"'~'*C::QI'd

V.slld_Stat.•: bool.-&n: lt.Jo•_pttet, Y~t.< wor4: et_eotor, COlon word: riU_ln!o> P~tlS.tt.in<JI~; t.ina_tnto: l..tA*httitiQ~; T•ltt,..lnfo: T•xtS.Ulag~; \l').•v_tnlo ~ Via!ofl'Ql"t~: P•l•tte: Pal•t.t:~: _,

l,a~c!alODQ'int:: A<.ldt.o_svltcb._Statu•lAudt.o_on. A\tdio_Ortl: i FUnc:tiontypao ot a unt-~li.S tuneeton tor

c•lcul•t.lon or tha tactil• f..O..Ck:. } C'alc.forca_1'VPto,.,

runctic.MDitf. JC, 't1 J.n~tnti' int.*Q.-r: t l'\l.nctiOM-YP* ot • u••r-euppliltd tunce.ton for

eal~C'JlAtion of tba cont•xt~Ul qain to.bav!oUt'. } Ccnt~•l-Ga-it\w1'YF4•

tW1Ctlo:uS:t4nd..rd_G.111n. Mt.9h...,.cain, Low_O.itH r•All 1 ~"•~1: t hl.ru:tlont)'Pit of a ua•l'-•uppli.ad function tor

updattftO' tAtt lntoplation &.beNt Uta t.upt uMar-tha point.•*'· )

ttpda:t._on_lfh,f.t._1'i.•ld_l'Unetion_'f'YP4t• pri.'IC<td:ur•f..,..Jt, Pos_Y: lnteo;,•rl;

Mot.or_OI..itp..l~ ... et•••-"'ohjoct. 1 privu. l o.vtc•_Ptr: Piret.u:Davica; SWII_ltOt'C:*.;,x• fNIILtotet~.,.Y • old_P'orca ... X, 01d_rorea_1', t_trur_x;, I_Ertor_Yl

int<tqH: t J;Nblie ) -S"t•ttc:_h'ict:lon._x. Jlt.•t.lc_Pt-1c:t.lon_'f,

1nta~J*r: proc~lnit: proe.O.W• OOU.: pr~.- P•••t; prOCltOtlr• s.t_f'or.e•_X(f'orc• ( int..;r•rt 1 prD<!.cll .. u:e s.t_i'otc•_Y l fore•: 1nt:ft9•f'l; pr-«:..dur• C.dibrae•trt•r-•tiont.> int:~r!; .... ,

8\.lt.ton_IfJPUt_ C'la•a"obj-t I prt.v•t• J O.vic•ft~""' .PJnpq:'tb<ivtc•; r pub-Uc ) ptc)('~Jdut'• t'nit: ;-roe.dur• I»M! tUhCtion Pu•h*<l: t>oolaan: .....

't.actil•_OUtput._Cl&cso:cbj--=t i priv•c.• i 0Utput_.n.v1e•: Kotor_o...t.put:_Cb&s: .<_hnetl<>o_ltdt.blioi<td.

Page 87: 1994 Afstudeerverslag IPO

82

l'J"Ul'l¢.c.icm_tnitialiMCI: baohuu

C:•J.c:Jore:e,J'Uneticruc. C:alc_forc•J'.mf:t.ion_Y: C:4l<_Porc._~:

pra~t-<t'lu'• awck_FUDCt.h:m .. _IaithU. .. d: { P\lbUc I procedure set_Function_Xtfx; C.tc_rorc•-~1; pt-oc~• ~_F;.aa¢t:ion...,YUy: C.lc_Porce_'l'ypel; !unet.ioD GU,Jor-...)Cfd, lt, Yt J:c:mqintl 1 .int.eo•r: f~t:ion C.t._Poreo_Ytd. x. y: lono:intl: lnt:-o•r: FJ"OC.&l.r• Update_torc.(d.lt, dy, X, ';{! int~C): ~r• Init: ~·Don•: ..,.,

Viaual_O~;U:JNt-C:ia•••objK:C: ( prlv•t• 1 Vi•u..t_.ttUt.iill.ia.:t: boo~•ac.: st&t•_Potn.ur: int...,or: Qld_SU.Ut arr;ay{o •• KAXJAVE_ST'~tu...e~u of VUu.•l-S.t.tincJ•-~! ~rOil:.o.t.l'o c:twc:k_GI'4Phi~•~: ( public l proc:~ 1n1e: proc~~: procedlu"• Cleu: prc.c~ :prav_COtft'tld_BO)t,.XIflo•_X, Width; !nt-..rt: pi'~'IICI\u'o t!nv_c4M:u~ih•.JC, ~•-Y. Mldth, b~: iQ.t:et~•rl ~ J!I'OCedure tll'~l"h•Jl, ks_Yl, Pos_x:. Pos .. Y2t tn~'H: pr~l' sav._stat:et proe.-ciut• 1\•&t:C~r•_.lt..U•r ~ s•t_cola.rU: W'n:fl: pr01:oacNH set_l'Ul_Golor{i: WOrd!~ pTOC~• Ol.lt.,.Toiltt_x't()f:, Y: 4n~n •• strinQl; proe.dur• 0\lt .. 'T'wxt .. XY_Ri;ht{X, y, iz,;t..-g•r; "' strinq): proc.aur• out_'l'•'l:t_n_aipt_Er-. .. !x. ¥: ihuon: ., at.rinQl: pt'O.:«d\U'• Ol.)t_-r.xt .. xY .. <=-~•I"flt. y, int~r: •: •tti:DQ:I: proe~• Fitl .. &l.Hp••OC. T: ltlUOU; 'X_R.ul:hts, 'I.)Uidh.1•1 word:J proc~ Hot_Fill..:l_Ellip ... IX. Y: ibt..,.l"; Jt..IU41U., Y_IAd.:ua:: vordl: PTOCKlr• Cirel•()(, Y: lnt~U': PAdiu•~ WOrd} 1 4ndt

Av<:lio_ouqru,t.,.Clan.-cbj.-et C\lr~r~_rr~: Ted; SWitcbt AucUo_swt~ib ... ltt..U .. I Stored_sc;.-tio:u:~ uray[BO'T"f''M..t'r~T:tQtt_rq~; •• '"l'OP_STA'tlOH,Jit-1 or n•l: p:rcx:edur• ~nit !N.Hr•••• lOflo!:J'I'Otdl, p:roc.®r• S.t_A\Idio(Volww, hlN\Ce, Tnble. ha~: inteQ'*rl: proc..:Nr.e s.tJr~li'.NH:JU•ncy: r••lJ: ~~roeectu.r• St4re_k•t1onUir1 intlfQ•r: Fnquet~ey1 r••ll: procectu.re s•l•ct_ftiittlontUr~ integ.rJ; Pt"OCedUt'iit DoU: proc:~r• SWit-cb..,J!In: proc:•dun Swi tcb..,.Of f: furutt10il I~t_off I boOb.it.lH ..,..,

"N•ctali_tapn:_elu•'"'ob1~ 'O.Vl<:•Jt.r• Plnpu~;O.Vlc•: tlU\etion P<N~_x1 lonaint: twu:'tiM Pos_Y, loootn.t: Pt'OlHt$ire l11it: 'PS'OC<tdur• Dol\e: en4;

Polnt..r_lflP'Ilt-Cl.aaeaobj.ct. t privata • 11111: hinl:•rl Pr•v_Pcu:

Point•r J'Oa 1 tion,.. Type: cont•xt., Point.•r_widtb, PoJnt•rJt.lloht•

int-o•r: Jtcl.int..r_otu

booionn1 Inp.tt._Drr.,1cet Tr4CkHU_I~t._<::lau:

&rue:~: But.ton_Input_Claee: kU-~Old, kll_Po•_Y_Old:

l<mQ'int: cas.u. C.in_Y. P1:nh_Loat.J, ........ _Lo.t._'t:

r••l: llovod. UpdMU·_On_.ftMt_Pt•ld_PUne_lnlt, Contvxt~Jai_x_runc_tntt. Conte:~~:t~tal_'r ... P'Imc_lnlt:

bool•<IIUl: Cont•xt~a•l-C.1n._X..f\u\Ct1oa, Ctmt•xc:u•l~C.tn_Y'~l'\aK!c:hm:

cout•xtuiitl_C.in._'I'V'P4'; U'p(Uit._on._Wbae_rt.lcL~ti<m<

t41d•t•_<m_W1W.t_rl•td:_l'Uncc:i0lt_'IYPI j pub)i¢ ) t.a•tJIOV•_X, t.a•c_;cov._YI lonuinl:; ' prtvu• J proc-.<Nr• !ntfl'nal_Wat';>_Toil"of:: l'l>1ht.fl'_fotJttion_Tn>-!: I pubUc I tunctiQA t•_on: boole.ara: tunetion ~_x, 1ntttO•rt t~cirm Ns_y, int:*O'~Itl': pr.;oc~n·• swJ reb_ on: proc..:tur. SVitcb_ot t: proc:edltt• Narp_To,....N•W-P.:IdtiontPo•: l'oim.,._Fos:ition...~t; procedu.r• P:•l.:\frn_Po•lv•.r 1'0•: Po1nt•:--~ittcn._~l: procedu.re lnittPclnt.r_Typer 1nteo•rl; procoldute DoMr PT~f'* trtawOt, y: tnt:~rl: P'fOC'-.d'ln• s•t_lX'_4;4in._XtC6in: r••lJ; J>t'Ocedl.lr• s•t_nc_c..to_\'iGain• r.,all, Pt'oe>edur• Upd&ta: snoc<tdur• n•t:_C:ontvxtval_GahHC:cmtntu•l_G.aU\l inr:~rt: proee<~ur• set_O..in._f'uncc:tons.tt"'. Cy: cont•xtuaJ._c..ln...'i\~1 ~ pto~r• S•t_Update_on._wtur.t.f'i~tlcL?'\mc.tiont f: ... ,

~nd_ln;:ou!t._Cl•ss:;ab'j•et: pr~~ Inil:; p.-~.-. Done: pl:"oe...:Nr• Weit_For_ltwy: •Qd:

ttr,.ct .. •~o.bi•et Poin'teT: Point• ••s: ICeyboUd.: ~ l•••: V1~JU41: Vl~l an: Audio: AUd:lo_OI.)tput_Cl•••:

Upd.tt• .. ~Whu_ri•ld...PUm-tton_'r:iP4l •

TIK'tile: Tllietil•_Wtput_Cla•a; pr<>¢~t• tnitiPt>int.•r_7')';Mo: int.~•r) • proc&d\.11"" non.: proc:etl\ln Update_Polnt•r_And_T«"til•; ... ,

1 •~ ~ty •tWUJ tor •xt.•~:t~l t.a••· i tun.cd"t• ibl!lpty_C:eieJon:-•tDHt, X, y, lon<;~:tntt: 1ni:9<J*r: pt"oe~* ~y_UpWate_On..,.What_field...J\mc:UontPo41_X, Pos_Y: llAUOUI! tun.ction blpey_C<:ftt.elltud..,.C.ih(St•ndnd_C.in, ttlql\_Ga1a, LOV.,.."to: r•ali, rHl:

APPENDIX C. SOURCE CODE

f eMclt U op~« .u• ltdda.HeM. ) proe.dur• ViS'Uil1,J>J.tp.tt_Cl4n.Clw<:k_Gnphic•.Jiociv: -· if Dot ViiN•1,..lnitialiHd ~ rat..l_!rrort'Vtau.l_~rpve_¢14 .. : no~ iJa1Jnl!bics !llillCh..'l: ... ,

I tlli~idiH q¥'_.,Me•. } p<riX'lec~Ur• vi~-ou.~~c-... c:l.a.u .lUi t: V&,r Q:r_Driv•r. cr_Mock. trr_C()d•. t.oop_CO'>.ine.t: intaQ~tr: ..... a.r_t>rlv.t":~e: l.n.i.t.W~\C.rJ)riv.r. C.r_litOIH. 8Gl_IU:R_Cl: f!.tt..,Code:,.G\'~Ult.; Visud_ln1tiaii«~:•l!l:r_CodeiV9l'Qk;

if Err_C..S.<~(')t thltn hcal_r.rro-r 1Gr'•Pt4n'<tl"M•QIIrr_eodlt) I:

( C::l•ar •t.•clt wit.b ol4 'raphiCJI 5tat•s. ) ft>t" t.oop_c:ov.nt.•l'l*'O to NAX_SAV£,..S"Ji'.&TU..,C'~l do

Old,.Jr.at:•ILoOJ)_Countvrl. Valid_tut:•: •f•lcv:

seat•-1'fltne•r 1 •O: .,..,

( et..u p.tphtee-ccr-n. ) pro<:<tdure v••Wll.,.OUtput_Cl••• ,cle.u: .....

Cbtte\_Qrapbice_Hoct.t Cl-rC.Vi.car

•nd;

{ nnw t1U81'1: b(J:~C- r.nt•r..:t K p:~aU:ton !Pna_x. p..;,~~:_Yl ..,i~h vtdth wtd:th 4nd helOht. tt.iqht • l

proefi.Jur• Vhual_OUt:pn;J:'l-• ,ur-_c.nt.recL&oA_XY I h•-X. "OS!-Y. Width, Kvioht1 1tR*9•.rl ~

I DT- tilJifod ~x frQ!a fPos_XL Po.&_'iU to {P~:~a_Xl. Pca_fZl. } snoc...tur• Vh\t•l_Output_ct-•.Dr••-Box.JC\'jP<illl_lC1. P<:>e_Yl. Poa_x2, h:a_U: int*Vfl'): .....

C'fl1t(:k_Gtaphio:l_i'lode; li- !Poe_xl, Po._Yl. ~_u. ~-YU: U-if'cll_l(l. Pos_Yl. PcAJ_ltl, P>u_Yl)t Un-!PtHI_.XZ. l'Qs_Yl, ~-:lfl. Pos_Y:i): lt-tf'o1!_x1. Pos_\'2, Poe_xt, Pos_YU:

•od:

{ s•v• or6pht<« etat•. Usa fl:est:or•_St•t• t-o r••toc•, J proeedllt• vt..ut_OUtPQt_Cl&as.sav•_St•t•• -·· Cbeck_Gr~hie&_~Coo$e:

it SUit._l>ohtt.&I'~•JfAX,JIIt,W_STATU_C thltn -'•tal_&-roct ''too -.ny s.av•_$t•t•• -•t..S. • J •l•• .....

With Old_SU.t•(Stat:•-~i.n.t.•t'l d.o ...... Valid,_St.at4!: ~<U'U*: C.U..o:~tiotX.....iti:P~WI:., 'f_4p~t l; BLColor, "a..t~lot; Color': ..C.tCbiO¥; c.tr.Uls.tti"P rrut_lnttJt: c.tt.i.uS•Ui.np fl,tu_totoi • C.tP•J:et.t:oi(Pd•ttAl: a.t:'htct.S.'t'tf r.o• ('f.w~;t_J:rtfol < C.~V1111tlt'Jit~iago~ t·l.tft'_lnfol:

"""' iac::UiUt•_Po1htH): entt;

f ,_,een:• vr.aphic• •t•t.• •• ••ved by i-t ealJ. t.Q s.v._st:~t•. l prQ¢~r• Vi.•ual_OUtput_C'l•••·h•t.:rr•.St:iitt•J -·· Cb!tciLCt".-phie•~r

t t 5rat._Poi.nt•r"O tn.n Yat>a.l_!rt'Of{'MO n:.•t• C$1 4t'4<:ok:.· ~ •le•

.ba\lin dec (flt4t .. _Po1ot•rJ: wi.ch O).d.~k•t•!Stac•.Pointarl 46 ......

( 'llUJ)*"rfluma.•.. I tt not- V.-ll<l_Stat•

the-n Fat.al_Error!·Not a v.aHd g:r"J)hies st•t• in·· ·Vt••U•lSAltp.lt:_Cla••·i'-t<)r•_Stat•. 'I~

li•U•PKU-at\ol>t...Asv-<::t:, 't_Ac~t:l;

Page 88: 1994 Afstudeerverslag IPO

C.5. LIBUilO.PAS

.... ,

satatcolor(•t-COlOTl: S.«:olbt'(ColoJtJ; S.t.Pill.St:yl•CFUl_lnto.Puc•rn. Pill_t-nfo.c~:~lorl: S.t.Lif:lrityhtLic•-lAfo.Lll.\ltStyl•,

t.in._lat<:~. hct•rn. Lin•_Info. 'l'biclm .. al:

S•tAllPal•tot.•!Pd•tett): wieh T•xt_Info 4ct ... ,.

Se~'r.Jtt.N•dWUtorl:t, vert): S.thxtStlfl•IFont, Oin<=tion.. Ch&z'Si:&e);

elld: with View_.tnco do S•tVift1P<;-rtrx1. y1, &2, )"2, Clip): ......

{ Wt$1\lt text a t:o qraphic• •t pcdtion UC, Yl. } pr~• Vicu•l-Qlt.put_claallll.~t:_T.xt_XYUL Y: lnt~r; a: a"r-T1b<Jl; .....

CMCk_Cor&pbic•Jtocko: OUt'h!JrtXJ!X. T. til;

end:

r out.p.n, un • t.o vr~e~ at tU tll)bt of po#ltion Ut, Y). lr••• 4uvit:IO •r•• M(<Ua. j

l,_<Ntpat._ClUII.OUt_Tln:~.J!X-•i'ltht .. b'u•>X. 'f~ i.nt~: Ill U'I11'1Qil

•••tore_st.t•: out.or.xtU u:~T•xtwldthl•l, 1. •I:

"""'

( OUtpqt tut • to o:npbics .at'tNhd ~ e.t•r podtlOA IX. y). ) pcoe~• Vi.ut.l_OiltpU._CI.aas.aut._T«<ttt._X1_C.-atezt", 'tl i.Wt~: a: at.TiQQ"l: vat VI int.~t: ......

Cilee:k_Qrapb.lc:•-Modtt: v;*'l'ntlfh:ltM•J: it tx~w div 2<0j M" {x•w di.V l":G*t*d) tbolm

P•tal_l!n:'orf''!'<twt: 41:1.-n••t: tit: on seJ:a.-n. '• 'Vi...., .. l_OUtput_cl ... a.out_bxt._ltY_c~•r' 1:

Ol.i:t'T•xtXYfX•W d.iv l, y, si: •hd:

f PrAl\11 SA~ all1Pt~• vitb e-t•r rx.yl and XJ<lllU>Jill, Y_~ht• r&d:H. 1 p~.dvr• vaua.t_anput,..Ctass.Not_FUI~ElHpc•Ot, y, int.._,.r, ...... ~c'-.C£.-ph:ic•~' IHt"*"U:. f, 0, )fO, X._lt•<iiWI, YJ•.:h"U:illl;

and:

~-Jl4<iill•, YJI;&<f.\.U•! V<>t'd);

t ~·"' • ctt"cl• w1t:b c•ntar (,c,y) •n4 R•diua ud!IIS, 1 proc...SUr• V'i41l&l_OI.Itpuc_C'lasill.Cir-cl•IX. ¥: 1nt•9•r: ~••'lill.G< ~r4): ......

C'tt.elt_Cr"l'llle•-•~: ctrcl•Ut. '1, t\A<Itusl J

•n4,

{ ~l. ~t:hu ,all tunr:Uone b.Y• ~n initi&Uud. } Pt"~ht 'ftctil•-Oiltp:.at_eh••·Cbeclt_I"WlctiOM_lhtt:1•lt .. <l, -·· it Mt iX .... J"unetiou..lnitillli•..S .mel

Y_!Vru:ti<m_ltlitial.j.a.OJ t:Mn P".•tU_.enor !'T.letll•_out:put_Cl•U: not ecrr.ctJy inittdh.cl. •) 1 .... ,

f Rlttllra tl'ltl •rt•euv .. lM"ea in X-dir.ctlon. 1 function T'&etH•_O!.I.tput_cl&sa.Cet_Forc•_li:(d, lt, lonqint), 11\t.*9•r: .....

tneek_l'uneUoru~_tniti•lls.O:! Got_FQre•_:<:.C..lc~f'utea_f\l:nct:i~rn_Xid, •L )'I:

•nd:

l bt:\li'n tha- •ff.etl.- tore• in Y-d1r.euon. J funct:!on T.ct:Ua_OUtput_Claca.Goat_FQrea_\'!d. x, y, !tlfiQ'l~ttl: !nt~u:

-·· Chect._JI'WI.c'tionc_tnit;ial.talid.: c.t_For¢•-Y:•ca1e_rorc•_t\l.tlet.t.:m ... Y(". x. Yl:

•ndr

{ !!len a fot'~ tu:ietiott eor e-M y4j.netion. Tbi• f'l.l:ftl:t:icm is "'"'«l to o:alCN.l.lt:.• ~ fore• in a point. I

pr«eduu ~ct:il._Ou~t_Cla.n.S•e..I'UMC.i.01l.-ttfy• Cal.e_.Farea_'f'Vp41\: -· Cdc_tore•_PuDcticm_'l:dy: Y_FUncdoD.,...l.Q1t.1aliaHt•t.n•:

•tid.:

t :tru.ti.alis• t.M torcefiltld. ) proc-.a:r• TactH•_OUtput_Cl•••· tnit• _ ..

X_.FUnet~c:t_lAitulU.ct:d&ln: Y_FuDctton_ttlit:UU .. d~•f&lH: ();ttv.tt_o.<.ric..tni.t.: .,.,,

t Pestl"oy the fote.Ct•ld, ) proclf<Nl"• 'l'actile_output_Cl-ue ·Don•: -·· ~==~:=::~:~t:rt:=::i:!::;

OUtput_to.vic•. ~•••c.: outputJ)e"lea .Daft*:

•nd:

{ Upd&U ~ t~U• f...abaelt, l:tiV.O t.ba eool"4J.nat• and hat.~. ) pcoe.&Jr• '!'a.:t:U•_out:pvt_clua,Upcke._rorc.(dx. dy, x. y: int~l"l r .....

out:put_l)e.rica.S.t_fot"~•-XtG&t_1"orea,J:(4X. x. yl) 1

OUtP\lt_tleVic•.S.tJo<rc•-Y (Oft..,Port::'it_t tdy. •• y} l: •M:

( tnithli•• poin~r to actual obj•et cQntll:llltng ella ~vic:•. ) ~racl'dur• Tr•ekbe.U_l~~.C::lu•.Jnitr -·· o.vic•.ln!t~

O.Vtc•,..Ptt:lz.addi'!O.VI.t:otl: .... ,

t ltatqrn the t:Un"ent X·~dUOlt or ~ traettbAU. J r~.meu.:m. Tr&e:kb&U_Input_c::t.a• .PruJ_lh lUfiQtllt-: -·· V.Vi(!'•..Ptlt" .~iU.Ot'l:

PotiJ: so.vlc•-~l1Po.X• and;

t R•tlfm th- curr•nt Y-position or t.ha u·•ckt..all. ) function 'h'•.:kb.all_Inpue.Claa•.Po•_Y: lonoint: .....

Oe<,•io:a_Ptr" . Raadl'osi tionr Poi_Y: aO.Vie• ,C.tkllPbll't;

•M:

( Ptllwtu.t·a~y. ~empty vh.llt'• tul.l. tlenteh YMr• it itelwa .

•• ,..Jt,~rt:hi pro.:#<Nra 1'r.CkRll_ltlPUt:_ct-•.lkmal ..... •ud;

( tntth;lh• t"M po:l.nru· bY·O'• AJid p:l:dtt<'\11. J Pt'~ad\ll'a PeUttal"_lnp~.~t_Cl•sa.ta.it !Polllt•t_'l'yp•' .1-ht..,.rl; VIti' Sh:•: Werd; C4D•t: Crav\0• l'lUP&ttnn'l'YJ*'•lSM, US. $AA. $\~. $M. SSS. $.V.. $'iS I: ......

U Poi:nUI'_~<'SIIA.LI.._POIN'l'P_c' e!\.Ml ...... Pot~I'-Widt:tuao•: P<tint•r_fkioilt:zt:

•net: if Polnt<Jt'_~ .. ~-I'Onr'r'ER_C thttn .....

Point<rl'..,lti<lU\, ... , Potnc:•r-H•ight-;,.40:

"""' i 1t&e'lt tO; O•t aR .-ons..o- of ~ ltCI'MJII;OiM.•f"t t ktriUSeyl•ISOlld.Pill, Whit• I; a&r!O, 0, Po.t.nt•;o-.,)fillth. Point•r-H•iGhtf: SiJ:•!•~SiUIO. 0, P<;int•r .. Wl.dt:.b. htnt•r_H•iqbt-1: c..tttana. si:.•J: c..ttuQti!O, 0. Potn.t•t-Wldr.b, Pointu_U.loht, la"l: IP't"•v~c.l(~•-l: PT•v_Po •• l:,~l: Potnt•r_on: ~r.h•;

c:o..i~:•LO: C.ln_Y:•l.O:

Cohu-xr.,~.U.-W\IH_c.

Pl-ltt_t.oet_xt•O.(h Pixd•_W.t_Y:•O,O;

t.•e>::_;cov._x .. •0: t..a•r~_Y:•b:

Cot>t4'Xt'!,U,l_L!".$t::Jnl.t ·, "'ta.ls•: Col\t1J11ttu.&l_Y_P'Une_lhie' "false; upd.lita_On_Wh<tit_!'i•ld_P'Une_Init: tt.l•h•;

83

Page 89: 1994 Afstudeerverslag IPO

84

tnput_oevtc•.Iai.t.;

Buttcn..Inlt:

! orav tM pointer on tba ser-a \l..d.,nq xor. j proeltd\,n:• Poill.tfl'_~~-el•••·Dr•wtx. )'; 1nt"9ftl r M9in x~ex·hi:v~•r_wid~ cUv l; ~: "'Y~I;I<oint•rJI•ioht di.v Z:

){ ll&>•O) aM U~ot..C.t:H .. )(l¢) &n4 llfl'-tll and {y.c..C.tKUYl tMn Pt:~:taa;;aoc:. 'I· 1111"', XOJU>utl: .,.,

{ R•t.uru on/off I'Uitu• of poiat:er. ) furu:t.l.Ob Poi.ntu_IDP\lt_Cl•sa.ts_on: boOl~Kn: ... ,.

ts_Ot\: •Point•r_On; _,,

t SWitch p~:~htr.r on. ) proc<Ktur• Poi.ntn~_clas~G .svi~h...on; ......

iC net Point.n_on UHm ..... ..... ,

tln.vtPr.v_Po •• X, "Pt.v_Pos.'f); ~inter_on:•tN•;

•not:

[ s.t hori:onul DC.....,_in vdu.. l P~t"• .fl'oint•r_l,.,vt_Ch.fiiJ.S.tJ)C_O..Jn_xfa.JJ)t -•lJ: ......

c.tn_;~~:,*Gaht: end:

t S•t Ve:rt.ie&l tJC~1JAiA v•l-. ) procttdun Point.er_lntNt.-<=l•••.S.t_t:IC_C.ln...,YiGAin: rea.ll: b.; in

<o.ttn~Y:•C...ln:

•ncl•

l s•c ..:ont•xtu&l or non-cont••tu.tl got.tiJ. 1 procedure Polnter_l%1Prt_Clus.Sec;_cont•~~:tu-.l_C.irtiCont.ext.~l-G&in: lht.~erl: .....

if lContntiMLC&in,.~L-C.UN_CI and (COI\tiiXtWiil_G&in<~A.L-CA%N_ct t.~n P•t•l_hrort·~t.t~ OC-IIJdn cont.•n.'! •l•• Cont•X't! ..Contutv.l-~1n;

{ kit l::~t1oc c.c r•.:r•1ve n:ot.tee ~n !Ntr•n:t; ta"get atgnt. ~ eh&ng&d.. ) pro~..:Nr• Poi.nter_Input_Cl.as•. S•t-lflXl&t•_Ol'I_Wh.at_Fi•l4~Pun.ctic:u\ 1 f,

~te-~t_f'hld..JI'tuu::tl<li\.,.T')"pel;

I C.tlc:ul.tt• C:Qt\teltt.Wtl tJCw'fllln .rmd: D::IV9MWI\t "tan t,ppr-oa~:hih!l c•nt•r, ) t~.tt~cl'i.on _,t.;~pr~u~cMnv_e.nwr_~in_XtC.i:n• t•llll, re•l: .....

A.ppro•ehl.ft!J_C•n.t•r .. ~i.l\,.X • cNHOACHlNC_CAlN.JUtt._c~c..i.n; lind;

t C&lC:Ulat• C'Oftt:Htual DC-Qatn .nd: IIIO~t wtwn 6Wl'O«hhl0 cwru•r. J tunetlon Apprc&ehlt~q_C.nt•r_c.al.n_Y!G«oi.t\: r•&ll: r•&l: ..... •nd~t'C&ching_C&ntu'_o.ttn_Y'; •AH'JtOJIIC'Hll!l't::_GA.rtt~ut._c•a.tjn;

{ Cdeul.tt• eont•xtual IX>Q&ln 4nd ac"-"t wt'wt\ ~t~<W"tnq •way Cr.,_ c•nt•r. l hmctton t.a-&vuu;LC•nt•r-G•~n_lU~in: ~"•111ll, te.t! r ,_,,

I.JJ.tving_C•nt•r_c.1n_X: ~:t.£AVIn~_{;AlN_.,tl._c•G4tn; end:

i Calculat• C'OI:'lte\lltot•~ oc-v.tlh .tnd -.-nt vh•n -vino AWAY fr<m c•nt.r ) fuoet.l:Ofl L••"ttlq_Cen"ter_c...in_¥!C..t~· rw•l) re&l ~.il:l

t..a7tnq_Centott _Ga1n_Y: at.EAVJ~_GAttt_Pl!:L_C:"G&1;o:

APPENDIX C. SOURCE CODE

end:

( UpMt• tb. posidon ot trn. potnur, bM:ftl o~ e.tt. z:r.ckbdl movethl)J: .md tH tc-ontn:wal/.lltm-contextualJ oaib v•l'~••· J pY~e Poihtu_Input_cla•s.Upd.t.t•; vu f'Ointtoz_._~ Hitu:•r ... Pcaiticn_~:

lUff_i&ll~.,X. Dif!_kll_ltoti:_Y, .. u_PH_x. hllJo•_Y;

longin.t;r Mov ... rtt..X. KoV-nt;._YI

i.nt-o•r: JlQ.l.~t_x.

Ra&~t ... Y. wrnnt:_C..iD...X. ~..u:_G&in_Y: r•al: .....

"hll-'"..X••l!ICMt_IW./1e•.Po•-X: kU,.Pft_'f:•tnput_r..vin.Pc•-l:

UUd.t lPOK'Oll t:».fE_BallJ'Oa..X••-thlLPo--X-hlLh•~¢14!; liift'---ll .. Pot_T:• .. IIkll_PM:_Y-Boi:U._.c._y_old!: lS•lnt tU,U:_Ball-Po• ... X:•ihlLPo•J-hl.l_PO._x_ol4) r Dift_kll_Pow_Y 1 •ikll_tloS"_l•hll_Pcs_Y_?~dl : U.adl.U

t...tJIJOV* _x: ~ •Dtn_a.:U_Pc• ... :.C ~ t.&st.~_Y::ll:ittJI&-ll_Pos_·o:

Ball_t>cs: _x_Qld ~ •Ball_Pos _x: lhll_P1>t:_Y_Pld;•Ball_1toe_'t:

[ ,... tit. JMl:j. aovN? ) U O:>Ut>UJ'oa_ltoOJ or U::U.ff_hll.,.Po• .. YoO) tMn .....

' It the ball M'HIS, update s.wnl v&rhbl••. )

t:\.lnent_Gain_XIao.tin,..X: au-r.ru._c.atn_Y :eG&in_J;

U Cont:-t~_GAULC ~tutn { It com.ntual tHdbaek 111. to kHJ ~H«l. ) -·· U not (C0Atnt.u.11l_x_rw,.c_rnit: anil c:oneut:ual_Y_rune_Inltl t-b•n

r.u.al_.lrrori'Ondil-t1twd v•t.n. f~U~.et.1ons 1h Pcine.r .. tnput-_C:la••.Upd.at•'ll

curnnt_a.l.n....X:.o:mt:HtUA1_c.tn.JLP\me't1ontGain_X, Appro..ehl.hg...C.Ot•r_c.as.n_x (C:ain .. JU • t.e•vinq_c-tv_G&in_lttG.ainJO):

cm-r-t:_o..t.n...Y: .C:ont&Mc.u&l_Cdn_'l_Fwl.ct.ioa(Q.ain_ Y. Approa1!bhtO.,.t:Ut•r_Ga1n_YtGa1ft .. Y). t.e.avinQ_e...u:..z_Q&in_Yia.in_TJ) r

ltul_~nt:_xl :Ditt:_hll .. Pot:_.X•OJrnnt_GaitLX: ~••l-~t:. .. Y:•D.Ift_hll,..Pos_¥•C'Ilnut..,c.ata_Y:

1 When tt. o•h~ 1• r•tb&r 101o1, l'lloanY actv.l .~tCr..o plots o-t: lost Meau.se of ro..mdlfJW. Jloulidln~;J MUtaP• ar-• int-egrat!ld •nd. Wh•n equ•l or llliiOt'e than one. ~ t<:o th• •cr••n MOV,...tu::. l

Pix.l•-Lo•t--Xtd•i-l•_t.o~~t._x+fr4C(bal_Kov-t_.lti; Pi•h .. lmu: .. :r ;•Pi.-le_t.on_Y•frac:flll.._l_Mcwalnnt_Yl:

~.)(l•t.runciRe.t.l..ttov-at:..Xl•ti'WIC'!Pix•l•-t.o•t-X): ~nt-Y:•t-~(bal~t: .. Yi•c~(PL-h_.Lo•t_Y) 1

Pi-l•_Lel't:.,.Xr•tr.ae!Pi••h-1411t_J;t; P'iftie_t.o..t .. Y:wfl'~(Pinh_t.on_YIJ

Pot 1\t ar _Pa• . X :•Po•-X +tl<We..,nt.)C:; 1'\'llnt•r .. Pos. 't:sl'\'la.._Y•~t .. Y:

Noved:•t.rua:

tnt.arnel_Warp_Ttl (hint:•r_Pos,:

H twz Updat.•,.OA..Wh•t.-rleldJ'Qnc_idt then. Patai_lcrarl 'lh'II:Mtined OtLWb.at_fi.ald tunc:t, in Po11'1Ur_luput_C1..-.Upcl&t:a• J:

t I&Otle. •ottw.ac• !.bat th• point•r wa -.d. ) Upd~t:._en_wn.at_Fteld._l\m!!t' 1.:tf'l (Pt>lntet _l'ns. x. Po1nU·r_l>\l:eo. 'i I .... ··-Mov<kl:•t•t••• ....

t S•t u••r.,JWfJPli..S tunc:Uona reuJ.rnino vuwu1 Cor cGnt•xtual oain. } procedur• PQJpt•r-lAFU:t_cl.u•.s•t_G&il\..~t1ono.lts. ty: CM~.t:•xtu•l-Gain_~l; -·· Ctmt••tv.al_G&t~f'Un(:tie¢~~~"f:ltr

Cont•xt\lal_Gain_ Y _Piwet ion 1 <:.ty; Ce>nt•XC.\I•l..lLNAC _lni t. ~ ceru•; cont .. t~l_Y_f'i.me_fnit: ,.true:

•nd;

( Wup en. polnt:.r to ._ n.w J»•ltion. l proca<Sur• l>o1nt.•r-Inpn_cl.aa•.W&rp_To_New~,._,.ttiont.VO.: hint•r_Poa1tion_"f'YYNJ1: .....

lnt•n~<~~l._Wlllrp_T<ItPoal: £1allJoii_JLOldlr :lnput_n.vie•, ...,._X: Jall_hll_ Y~Old' atnput_Devic•. POa_'l: Plx•l•-Loae:_x, "'0: P.ht<~~l•_Lcwz_Y :~o: .,..,

1 T•lt•,o ea.-. cf tha h.h* DtaU• or C\lv•orvarpi!Y,I. tno:lwiing en. l1. .. 1ta -'f the wcr•.n. l ~~r• 1.\oint.llr_lnp,~t_ct•••·lnt•tMl_w.rp_TotPo•~ Pcu.nt.r_...,..itton....,..,'P•I: var EU_'top._~tt, tttt_eatu._M(Jhto Potnwr_tae:1.tion_'l'ypifr: ... u.

Eft_'tep_t•tt..X:'frPfl.II.X-P<:Iirt>'lt!"_'llt\dt- d:iY J': Etf_'to~_t.tt.l':*JIOfi.Y-POirt>-lfl'_Het;bt dh l; Uf_&ott~lObJt..X:•Po•.X•Pa:ibt•tjtldt.h div l: ttf~t:~-.Jt!oht.Y,•Poll.Y•Potnur..Hai9ht cli.v l;

t Cu ba dnP9 aor• •fttet.nt, l H (tU_'rop_Left. .X<O) chen .....

!.U_'l"op_t..Ct,X: .. o; IU:t_Bc>t.u• ... Phlht. X' aPoir.t•r .. Wtdtb;

•nd; H teH_&ot.t:li*_fU1»ht.X,.,.,...t:KsXXI tn.n ._,.

Eft_Top_t.ett.X:~t-M.:ot-t"<>1M•t'-Wi4th: Jtff_ttotc.o.._Jtii1ht., X' ><Gat ~tUX;

•nd: lf !Uf_'top .. r..tt:.'t<~Cl t.n.n .....

l:ft.,T'C9-Left. Y:,.O~ £ft ... :ant:~:-._lliQht. Y·:o-Po}r!.tfllr-"•iqt\t;

end; it !!.tt_I'Jott:~!9M: .v-..c.ttt•:~tYI than

O.Qifl Itt_ Top_t.att. Y' '"C.tttaxY~Potnt•T _Halqilt, lft~&otto~~t_l'ti.<l!ht, 't' ..C..tttart;

end;

Page 90: 1994 Afstudeerverslag IPO

C.5. LIBUilO.PAS

Pos:.YP'tfr_~ett.Y•Pointer_a.tqht div :: it tPr.v_ttos~x~,..u .u4 (t't•"'-'"·"..;"-11 .- Pc-i:=:~tn_on 'Lhen

01"-tk•v~.x:. PrfW..}>Q•.Yl: if Pointn_Oii Ulen DUW!S'OII.X, Jlos.Yh h.v_Pos.X:•ftos.X; pr..,_Pos.Y:•PIK.'tt

"""'

{ ~tw:n t.ruJ ~e :t JII)Ctti.ot~. <It tlw. point-.1:. l fu::letion ~inter_ltlp;lt_ClJUI.Pos_.X: J,tttegorrr bfK;Jin

P<:ts..,X: •h".v_Jtoc ,l\J eDC!:

t Return tM ew:rmt: Y ~it ion 13! tM poiuttor. I t=ct:tcn Jloir1t•r-1~t_Clus:.Pos:_ll l.nt~•r: -·· lioa_'t:•k.v..]>Qe.. T; .,.,

[ tnit t:M lk:ltOU ..,.S -•n"' t.h• s:t.ati¢ friction in en. -lllyse-. l

pl"OC'~ Mot<>r_OI.Iitp.lt_Cl..a.IMt: _ ... ~tee.llllitl twwic•_ptr: •4lddr'IO.V1cet; O.Vtc._Ptr" • Rfllet.YOTee: n.Yic• .. Pt:r~ .Aetu..t.-otor•: ~r«_x!.,O;

SUX~,..!'or«_'l:'"'o~ Old,.J'ore._x::O; OhLJ'or«_Yizl): Calibrne!CALUIMTt,..tT£1Ur.'l'ION9._C):

•ll'l:

{ s-nd ..u X fo"* to tM ~on. or:ortKtttd tor o•dlt.Uon .ud natie friction. J

proe.dur• Roto&"_OUtput,..Clu..s.t_ror~_,urorco•: int.;'ert: var o_rorce: int.~er: .....

( COIIIIIiP*N•~• for •tat.ic- frtct.hm. t tt ~Forc._X<:oPorc• tb.a ......

!f f'ore•<O t.h•n Po'tno:•l'orc.~&t.t.f.c_hieU.oa_X •h• if Porc:•:oO tb•n Porul•hrc••St.t.ic_Fri~~:ciQJLX;

t Copt.ct ft'Oil it~P_ftvl.pu r.o •uwr•u oacUl.U.iOM. WorkiQQII ~- h baa~ 011 diffarantiatinQ tM fore:• t11 tt-, to Mk• t.hw C'\RVe .-ootber. }

n_rO¥c• • "'Porc;•~Old..Porc•_x: Fore.:•rowtd(fot'c• ,. C.tP?_v.u._x_c•D_Forc•l:

old..,.Fore•...)C:af'we.:

{ 1'Ul hwr• fr- if!P_ckVJ.pa•. l

t Actually .. nd :lt to tha acton. l D•vic•_Ptr"" .JiddFore•tf'o~v~Porc•..X. 01: O.Vlc•_Ptr~ .Actuat.•NBtor•: S\ult_F~>re• _x, :f'o~• ~ .... ,

{ !l•nd aa. 'I' fat'C. to tM aot.onr, corr•cta>d tor o•c:UliiUCh and •~•t::te friction. }

prtJeecNr• lto1:.¢t:_OUtpUt_cl•••·s•~-l"ol'c:•~Y ti'a~r t.nr-o..-t: va.r .P_Fol'e•: int~r, _ ..

J t'<MPM'nlat• tor •t.a,tic frict:lcn. } it ~Porca_ToPon:. tben ......

if rorc~~t«O then Porc•:•rorc••Static_rrlcti<;an_Y •1-1 f Fore ... o then. l"ora•!"Fo.rv••stAtic_Prictaon_'l;

{ C<lpi.d fr- inp_t:s.v),~· tO ~r·llll OIICtllatiOh •. Workinq• Uhluiown. )

D _Perc•, ,.Pore•·Olci_Pcf'e• _ y:

( 1'i~1 h ... • !rOll ltl(:l_dtlvl.pae. )

O.Vi.::•Jt.:r~ -~rr!'•l(t. f'orc:•·S\IM....f'ol"e•_Yl: C.vl.::•_ttr"' .Aet04teNotors: Sl.lll_lo-ree_T: •P'ore•:

_,

' Stop t.M -t.Ol'8. ) proc..tur• Jlotor_output~C1•••·R•••t.; ... ,.

l)ltvir::•_Pt.r" .Rea•tf'orc•: l;levir::•_Ptr" .Mt\l•t.-totore: su._ror<:•Jt~•O; s..._rore•~Y: •O;

•nd:

f sr;op tM lllC>t<~u. 1 pr~r• Mltto:r_O\Itput_C'lass.Oona: .....

tt•••t: •nd:

t Me•eur• .static trit,;i<m in the- •ystftil. Thill ~rt 111-hOI.Hd b.o chachd !<'.!.:t correct -thod£ !Gt 4•t:.en~1:dnq -.eb.\1\i.::•l trict~on. b)' .11 •or• knowlwd9••bl• P4Jl'ilf>l't.

D••*<~ Of\ work ~t P*".l &a.rk•n•. ch&~ tQ AOr• "'*"'sur•• P4'F Srtcond by not J::ffll!Jll•t•l:y .t•••ttlnq tore• att•r the b&U •t•rt• to

-.) ~ocadure Kotor_our.put_C:b.Aa.C:ali.bf'&t:•ii«r•tion~t .t.ntwo•~:l: vu- Test_x, { CUn•nt tore• for X 1110tor. }

,..n_y. { ert't•t fore• fer Y IIOto[". J Olll_Te•tJ, Old,_Teet_Y, Nr..X, Nr_Y, ,,

int~·f'f Total_X, TM:4l_Y:

louo1At: ... ,. 't'Ot•t....x~·o~ 'fotal_Y:or(l; Nr_x:aOt Nr,..Yt-.:0: Ol4_'t" .. tJ;•~l.: Ol!LT .. LT••·l:

tor 1: .. 1 to ~t~u·atiOMI do _ .. 1 ~• R<ttie fdetl:on &lcnv x uic. ) o.vk•Jtx"'.11\it:: if Ol.d,..'l'Ut_X••1

then ,.._t_X1•0 •ln 'tHt-X•.Ol.d_T••tJt-~roRC!..X..C-t~FORCl.J_C:

n..till#it,..)l't.l'" .Add.Porc:etTHt._.X. Cl: O.Vi.ee_f'U" ·"'¢~!;4JifOJ:Of'St l)tlayn.atO_t)ELAY_cl: ·-· lne(T.-s't_x, n~el:

Dr.tlc._~rk Tl'•adl>o•it.icr.~: O.V.lc-~'" .r•••t.,on:•l O.Vie._ptr" .AddPore•f,..•t.)C, 01 t O.Vie•ftr'" .Ju:t."IU!c.,.owr•: t:litlay{SHOP:'t"J)El.A'i_C.!:

wt:tl U&tt~WV1e•_l'tr" .c..t:hlll'o#Xl > B.A1.t._'ftntJC,..C: lm:UtrJl; Total_ X• a'l'ot&l..ll'•fi•t-X: Old_T•st:_.'(:.,..,tJtr

t Jt.aaur• atat.te 1f'lC1:1cn •lanq Y axla. l Devie•-'Ptr"'. Init: U Old-"*.c. .• :t•-1

tMn T••t ... Y: .. o •l- Taat_Y:..Ol4_'tellt_Y-~ft.:me£..Y_C·~~y_c: l:hwLe•_ttr"'.Addr-oreeiO, -r.at_'t): n.vte•_Ptr" .t.ct.uat.aKotora; O.layi£.,C!W;OJ)ILA't_C!: r~at

thC!Te.C_Y, INCP.!ASE_POII.CZ_Y_Cl: O.Vi~ .. Jter,.. .P.aadSI<ldct.on; n.vt~_nr•. r•ntrore•: fleYiea_Pt.r" .AddPorce(O, 'l'es.t_Yl; ~vie•_Ptt'"' .Mt.WI.t.&Moto.:•: l'ttlay ISHOlt'l'JlELu_ca:

until abetllw"l/1c._ptr".C.tll:al1Po#Y) ,. Mt.L_TRR_'f .. C: Inc!Nr_Y): Total_t:~<Toul_l'+..,...t_Y: Old_T_t_1tlt'f•et_T; .... ,

St.uic_Prict-ion.,..X 1 o:f'<Nnd(ToU.l_x/th"_K:) "'D1fF _ST_t)\"'Lnt!CT._X_C'; sur.ic_Ft icticm.. Y t •ro,mcU1'ot.l_Y tilr_l'l ~.oxrr_n_D)'!LPR.ta_ v_c: twwic._l'tl' ... tnit:

"""'

( lnit tM bltt:on. Copy tH .addre•• l:lf tJlao obj.ct contrcUh~q U.. button. )

prQCedure INt:r.on.....I~t-Clu•, ll\!t-: .... ,. o.vtc•.tnl.r.: EJ.Vic•_Pt:rt.-..idr{O.Vic•l: .....

( i\ stronq r;onvtc:t.ion that !IOMttbiUO ..,.$'1; ~ ~ h th• partmt <:~f .. ny toad -••ur••· ~~ lhmt•l W.Wt•r )

pr~~r• ttut~on_I11PJt._c.t••• .no-: -·· •mt::

[ t:. r.bolo button t;IUI~? l function. But.ton_lflP'It._cl .. ••-Pu•h<Mi1 booi•anl v•r Pustwldl,

""'"""'· ~l!Hl: ,bo.l)l•liln( ... .. ~:~:·p=~~-==~u~~ t~t~f.c• clu• Ooeen't.

t'•d the •r:at:IU of t.M bUtton eo:rr&et:ly. 1'<:1 -•• •ut'•, the" •tatu. h r•ac:l thr" UN• an4 by d.mocr&~lc rut .. , tiM •t&tu. 111 O.t•min<td. l

Pustl.tdl:..O.Vte•_Ptr~. IaiM .. n:tol'\DOWn: Pv•~ ;=.!»vic•_Ptr" .t~Jbutto~; PIUMdl:~c:r.vtc•_PI:t'~ .taiNttoN::tro¥n: l'l.lsbwd:,o {llool_To.,.lnt (Pu.nedl) •

tool_To_tnr. tit\uM«UI" &ool_TQ_tnt!Pus:ttwdJ! )ul:

prOt¢.-d:ur.• J(~rd_lna:Nt_cl.asl&.ln.i,r.:: ...... •M:

t l:l.X.y unt:il a ~•11 wu P~"-•ecl. 1 I)Toc:•d•u·a tt~d.,.Input_Claa•.W&lt_ror-"*lf: v•t" 4::'11: chat! ......

repa•t W\tll J(wyl't•ss..:l: 1 lt'& -••rv to roNd t.M k'*Y. •inc. lt

othltt'WiM ~~tt&Y• in the- k•yboal:d-bl.tt'fer. l et\:"!I'A~: .oo,

1 rn.tu•Us• rh• r.adio cat:'d &nd stor& •OiH •t.•t umA in. the. •-rr- l

85

Page 91: 1994 Afstudeerverslag IPO

86

proclktur• Al.l.41o_OUtput_elh• .tnit-t~u ~ longwordl: .... ,. I'Cbdio~•·,~••; exc•~•;•PALCe; Init_i'Cl!:adio; curr4tttt:.,.tr_,;l dl. S: sn~{~MJr~. 'tRUE-l: -sec_MMlio{O, o, o. 0) 1 SWit:c-h..,QU: { lni r sl:.Ored n.atiou } t Attexu;icn! Vsft pr•UX«i indiceHt } St.orMt_SU.tiOM(Ol Ul\0).9: C:tottHLSt.a.tiONJ(U ;atl.t: stox~su.uonatll tlll>ti.S: Stor~U<il:MI(ll :sl001 St..on4_Static:MW[4l t""lOl.{: St<lr~suetocu[SJ :•102: Stond .. st•t:~At\af&j ••" ,,; S:tor.c_seati.O'Ut?J 1•lOG. l: St.and .... St:.at.J.OQII'tl] :•101wl: .,.,

( ~ U. roldio eUtl at:. • (&"~. } ~rc~c.mtr• Alull~_outpJt_C:las•.s.t_tr-.•neyiPl'~~' r .. ll; v.u· tlow:H :boolean: .....

f Accord!.~ to oU\ IPO•repott. ~ h ttt. ••ucbd.ir~tlott. aitlw:T up or do1m. Howvn, ts DoW h -.dlt h.lee whan tlw cl.ista.nce rov&t'tlf. th:a ~dr(l4 f.t:~·~ is sho:rtar wttfl\ •-l:'cbi~ 1.1p, eM ~:.-d.io •t•rt• u!Ul crac:Ju.ng sol.md.e, r'n·th•r ltnoWl.oq. about t:M ua.nino of l»Wh .t• unavailable since the- sottwan•JMlN.&l bU- ~n lut:. )

Dcwn:,.'I'lU1E: s.or~;meyJrrec;u•ney. 1:»\ml: CUrr.nt: .. fr.-q: •Frequ•ncy: .....

{ s.t: Yel\UN, balUIC•, tnbl• ~ b.uo, ) ~<Xt.aur• Audio_Output:_ct.uc.s.c.,AI.ldi~tVol_.. 8aJ.U~Co. "Tr•bl•. &.:••; urt:~r'l : ...,,.

S•U.u·~botvol-" lb.lu~•. Tr•bl•. llol:s.:l; •nd:

( ft:or. • rr~eney i.n~o • ctatioa ~r. } ~ftdur• .\o.t«Uo_OUt:lN~-C:lus.Sto:te_stat.irmtNr: int*'V•r: Frllqtlaney: r••U; ...,,.

it {Nf'~•80T'l"Olt_STAT10NJ(It) and •Hr-e~TOP-$TATlotUQI.I tb~tt~ Stor-.d_st•t.lon~~ (Nrl : •f'ra4U~)' •1•• F•td_~rori'Audio_Wt.put.,.Clacii.Stor-a_St:•t.ion! Nt cut: ot r•nq•.••r

and;

t swttch t:M hW1d oUtSNt. (Jft., I pror:lldur• lo.udJo_OUtpUt_clu-..switeft..Qn: -·· t..P!'nttt&l:

SWit.ctu&>Audlo_Oru .... f SWl tch IIIQOJnd wtput. off. ) proe1d1.1t'a .lfol.uilG.,.,/.llat:put_Clii&O. S:Wi tcb_Ot t: ._,.

VIFALS£1: ~it.:h'"'Audio_Off;

end:

{ SWitch lliJIOtio ott .nd 11at. vol~ to 2:aro::o. ) pJrocttd\lra Audio_OUt.:pUt_Cl•~t5:.tloa.; .....

9>t>t .. N.u:Uot0. 0, 0, OJ: SW\t<:h_Otf:

•rid:

t ll•tu~Cn wMtMr th• eo.md output h, <'~'ft, 1 tunetxe>u Aud.io~OUtput_C:l••• .ls_Otf: boola4.n.­b.qin

rs,...ott:" {S:Witch•Audio_o.tn 1 ~md.:

I ln!t1•11ca tM u•ar J.i1tert•c•. I IH'o>cotdur4- ux_<.:lM•.Jnit:ftcJ.aur_'l'yf:te: int~rJ r -·· I PiTat init vt.aval. •trw• (1:\th.tvi-•• no poin~•"' can boo <;tWUlt:ruet.S. J

'tisllal.lnit; ~\nt.er.lnit:!Point•r-~Jr Aud16.tn:t.t lf<.:.)V.Dto_euv~_c;; T•cti la.tn.tt: ~rd.tai-e: ,..,

! n..treyy all <tav1c:... ) pr<>C*d<.or• Ut_Cl•••·tlo'I'N: ......

¥:•~boat'd.Oona: 'h~C<t:ih.Oon•: A.l.u,Ua..P<:~n•: P.:.l,rrt•r.Do.l'\8; Ytau.r;l.Oo.n.:

•M;

{ llp<ta.t:• both point•i" po•iuon •nd t..tutt'i 1•• feadh.\ek 1 prot•ch.u·• Ut_Cl••• .l)pd•t•_f>Qil'lt•r _Atld..,T•ct 1 tw: -··

APPENDIX C. SOURCE CODE

1'6if\~.llpt!lat..r

if PoJ.nur.ttov~ t:bfll ..... { t!Pdl.te t.&et.ile OUtpi.IC. Vi•tal tc ..UCCI!Ut!¢, It&~ tt;caqute it. into Poi.ntu.Upku •O!Uday. }

't«Ule .Upd.tteJorea !Pointer .J.a•t._Kov..Jt, P&inur .t.aac:..)love_Y, Po.btt.•r .Po•_X, l'oint•r .Po._Tt: .....

C.6 Convgraf. pas J)ti)iJt'-.. CQl\"iVJ'af:

u••• vr.a;m. ltb'ltulO:

; C:.OftVOJ".af,pu ' 1.0 'APril 1. UU , Guido t..•nd4n· ~t:nat.l 'oas CH Horn t.el. Of'l'51~1SI21

J'.a.n 1'oorOJHtt:rut. 35 5U21W£i~ tel. 040~11S:US

J:).•o:t"ipt.ian: conv.Tta aonoc:hs'OID PCX bi~p ftl•• tl:' t:l:w !_....t: undernood by ~ ltbf.aog~O-unit.

H;.•toey: a- ( .. Jnc, Initial r•l••••·

t:a:pU..r: Mt"land Pa.seal

,,.,.. Pcx_~~l" _IWH: • r.eord:

Ma:wfu:tur-r : t;yt::•: V•r•1vn : b:ft•: EneocUno l Dyt•: Bit<f_hrJ1x•1 r byu: xat.a. t•in : word:: l(fux, 'Clux : word; Hru. Vr•• : Wt:~t"~: Pal•tt• 1 &rrq t0 •• 47J ot byt•• ttu•rwd I byt.: Colour_Pl•niHI t byU·: aye .. _h.t_t.iu : word: i"&l•tt•-~ ' -rd: f'Utu 1 uray ttL ,$71 of byt•:

"""' KNdint h._...~_a.e. C eont:.&iM bUdtU' of PCX~bJ.UIIlp. J Wt4th, { Wldotb of PCX-bit.Hp. J tt-ivbc. ( tt•1obt: of PCX•btc:a&p. l Byt .. t woN: ( Nullber of by~ par bol-1~1 at;-nliu.. ) t, f tnp.ar.~ru. with PCX-bl~. l out_FU• ;; ttila; t Qll(put-fU• with own •t.T'UC!ture. } Pic; l~NCM_Clu•r ( cont.dn. bl'taaP• of ~r.eter•· ) J.. ( t.oopc:ouftt:•r. ) Gt-_Ddvu. ( For ~~lc• initlalhation. } ~,JIO(k-. { 'or iP"&J'Iblc• J.nit1dhattun. } &rr_eoo::t.: iat~el'l 1 Error a( or.-pbk• l.ahl&Un~ion, ,, .,...,.,

~toast: 8lTSaS: 1 ~r of bit• PQ' byt•. J BITS_PC\ata•1;!8: LE'T'I'I.R_.OIJ...-t••b:•: a.l....Ofllt_c••e;\bfl!':

f V•l- of IIUist d;nUh:.ut bU. ill • b\'t•. J { D1r•ctory ~h•r• blt.ape .and PCX~tU•• r••1ct... I t Dtr•ctorv <mer• act~ fU- t"-tc.. l

proelkll.lr• Put_Ph:elstlt, Y• -rd: c: bye• I: I Put:. b!t~t~• e trooa l•ft: to r1<Jbt, flt&rtinQI •t tll, y). ) vu 1• J.nt~r: a..vin

far i:•O to BITS~l do

... , -·· u ••1<Wid\h t:tt.ft .....

if 1.: Md atTS_P'CIWI:Rl no tbm Pu:t:Pixalbr•l,y.O) •h• "'n::l"ix-1!x•1.y.l!;

•M: <-:=e d%1 1: ... ,

p;-oc..SUc• h~P'C'lCt.1n•ty: Woll'41: [ tnt:arprat 4nd di&piay •'!'anlin• at bi'{Aap-i~ in PCX-fonu.t. l v.aT e, e.h ~•:

'1'1: .t.M*V•T: ¥, X; WOI'd: .....

n:~<O: ¥11<1>1

vbii• 11!"'~-· do ..... b1=!tr•l4 !L e. 0; t a it.'• • nm o! byt.•• U•ld. 1 it 1 te ,uwt l'Jl1 ,. u;n t:llim ( CQICI1'•••4td U•lda follow. ~adon·-tllod h JU.t.. } -·· ( c.t: the il:'lUI byt:•. )

l:llocllr•Mtt. <:2, ll;

for Vl"'O to iC and Ol~l Do ... ,. 1\K_Pilnlatx. y. el;: :t:•x .. BITS; n.:'"Ti~l:

•ncl: .... el&a ......

Put..J'lx•htx, y, c-l: II:"'X•Itlfl: no,.n•l;

•nd; •nd:

4nd::

pnx::.dut• Unp•eii:_PCX_t1l•; f D1~p.lay • b1t-.."·Hl• ~n PCX·fonu,t, }

v.t.t" 1: hn~r: ..... fct ,,,.o to tt.ioht•l do Po.•*<~-PCX_Lina!il

•nd;

Page 92: 1994 Afstudeerverslag IPO

C.6. CONVGRAF.PAS

..... GrJ)rivnr.O.t:ect: Inito:raph!Gr~iver, Gr_Hc:XM, IIC:t_.DIILCJ: &rr_Cod.•:.cr~t: it ll'r .. codec:.g:rok thft wriulnt4r~ronu:o !ll'r_eode) J r

&9t;tal•tte(O, OJ 1 n~l•c:ucl,1S):

for lt.O to 1 do C ror 411 cha.racura tA th<t &lpbahtle. e~rt a con·•aponditlq

PCX•bit:~aa¥ iluo9•t1l• towards tiM Hbia;lO-W:Ut tcna..t. l begin

"""·

can 1 ct Ch j;,.•b•r 1: jpo'h':

"""' •••lon(t, t.ETrEll..DliLe .. ·\c_·•j•'l&,pex'l; r•••tct, 1l; blocftead !C:. hea40'. ahutt~rl h ... ~tee. 1:z•): Wi.dttll•lwact.r .-....-PA~Hr .¥a!a+l: .M.ight.:,.he&der.ym..x•I:'!,UCH:r.yai..A•\: ~·•·•~r.byt••~r_liu: ~m;>aet_PCX_rile: dt~ .. (f~:

,. .. ioniOUt:JU•. •Jll:\•xp2\pro;J\'•j•'li.bpi' 1: rlftlt"itetout,JU•. P: Pic.lElit: l'ie.~ttll, a:, wid._,, M-i¢t.l ~ Pic .~tl100•i"40.10'0,nonu.lputl: Pic,Put:l200.oi•CO,lOO.non.&lNt-J: l>i¢ .PUt flOO .. i*41l. lOO,norm.dPutl ~ Pic: .Put C400•i*40,400,xotU'Ut:l; P1c.PutCSOO•P40,500.XOJlPo.itl t Pic.hv.(OUt:_Pil•i; Pic.~: <tlotJ9(0UtJ'ihl: ... ,

87