Abstract:
A method and apparatus for using a cursor movement device such as a mouse device to position and orient a graphical object or cursor on a computer screen. The movement and orientation of the graphical object on the screen depends directly upon the path of motion of the cursor. The actual movement of the graphical object is similar to the dragging of an object through a viscous medium. In this manner, a two dimensional object can be moved and rotated on a planar display device with only two directional inputs. Also, the cursor, itself, can be treated as a graphical object. This allows the user to rotate the cursor to a desired orientation. Furthermore, the orientation of the cursor can be used to select one of a plurality of functions performed by the cursor movement device.

Description:
This application is a continuation-in-part of application Ser. No. 07/813,714, filed on Dec. 27, 1991, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     The present invention relates to an improvement in the movement of graphical images on a computer screen or the like, and in particular to a method for positioning and orienting a graphical object with a cursor movement device using viscous dragging. 
     In a computer graphics system, one of the more common methods of moving a graphical object on a screen is with a mouse. Unfortunately, a mouse has very limited input capabilities. For example, the standard mouse manufactured by Microsoft® Corporation includes only two directional inputs (i.e., an X and Y direction). In order to position and orient a graphical object, three parameters must be controlled (i.e., two parameters for position and one parameter for orientation). Because the mouse only has two directional inputs, it can only directly control two of the three parameters. This problem escalates in three dimensional graphics where six parameters are to be controlled in order to set position and orientation of an object. 
     In other computer applications, a cursor is used as an &#34;eraser&#34; or &#34;pencil&#34;. In order to change the erasing or writing width of the cursor, a separate input is required from a device such as a keyboard. Also, the number of functions performed by a mouse is limited to its number of input switches. 
     In both of these applications, the use of a mouse device is made more difficult since extra input is necessary to achieve a desired effect on the screen. 
     In one previous system, a three-dimensional object&#39;s position and orientation is modified by &#34;rolling&#34; the object, as if it was suspended within a sphere, on an imaginary plane. In this system the three-dimensional object is assumed to rest on a horizontal plane. As the cursor is moved, the object is rotated and moved in the direction of the cursor. The path of rolling affects and determines the final orientation of the object. This system allows the user to control five of the six parameters of the object&#39;s position and orientation using the two directional inputs of the cursor movement device. 
     A device known as a &#34;Data Glove&#34; allows the user to change the orientation and placement of a graphical object. However, several inputs are needed from the cursor movement device (i.e., more than three). In a previous Apple® graphics system, the cursor is in the form of a cone in three dimensions. As the cone is moved by the user, it points in the direction of the motion of the cursor and hence the direction of the final segment of the path. 
     The aforementioned &#34;Data Glove&#34; device requires extra inputs from the cursor movement device in order to move and orient a graphical object. The conic cursor of the Apple® graphics system is somewhat difficult to use when changing the object&#39;s orientation. The &#34;rolling sphere&#34; system is not intuitive, making it difficult to control the graphical object&#39;s position and orientation at the same time. Also, the &#34;rolling sphere&#34; system does not allow complete control of an object&#39;s orientation and position parameters. Accordingly, there is a need for an improved method and apparatus of using cursor control inputs that allows a user to intuitively set the position and orientation of a graphical object. Other desirable features include varying the width of a cursor using only the limited input capabilities of a mouse device or the like, and there is a need for a method and apparatus which increases the functions a cursor movement device can perform. 
     SUMMARY OF THE INVENTION 
     These needs are satisfied by the present invention. The computer system for implementing the method of the present invention comprises a central processing unit coupled to a cursor movement device and a display. The cursor movement device can be a mouse, a track-ball device, or the like. The display can be a CRT screen, for instance. Movement of a graphical object on the screen depends on the path of motion of the cursor. The object&#39;s movement is achieved according to a hypothetical viscous dragging of the object through an imaginary medium. 
     Values used in calculating the viscous dragging of the graphical object include the following: the center of mass, the extent of the graphical object, and a plurality of vectors. The first of these vectors points from an arbitrary origin to the center of mass of the object. The second vector points from the origin to the cursor location. It can be assumed that a hypothetical force acts upon the object at the cursor location. The third vector points from the center of mass to the cursor location. The fourth vector represents the orientation of the object measured at the center of mass. The position and orientation of the graphical object are periodically calculated according to the hypothetical viscous dragging method. 
     The cursor, itself, can be thought of as a graphical object and so be controlled in a like manner. This allows the user to select the orientation of the cursor. In an embodiment of the present invention, the function performed by the cursor movement device and the cursor depends on the orientation of the cursor on the display. In a further embodiment of the present invention, the width of the swath of a cursor&#39;s movement can be controlled by rotating the cursor according to the hypothetical viscous dragging. Accordingly, in operations where the cursor is used as an eraser or writing implement, the width of erasure or writing can be easily controlled with the cursor movement device. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1a-b is a screen display of a cursor and graphical objects which are to be moved and rotated. 
     FIG. 2 is a screen display of a cursor and a graphical object and a number of the vectors used in calculating the viscous movement of the object. 
     FIG. 3 is diagram of a computer system implementing the method of the present invention. 
     FIG. 4 is a screen display of a cursor and a block of data for an embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION 
     While the present invention will hereinafter be described in connection with a preferred method of use, it will be understood that it is not intended to limit the invention to that method of use. On the contrary, it is intended to cover all alternatives, modifications and equivalents as may be included within the spirit and scope of the invention as defined by the appended claims. 
     Referring to FIGS. 1a-b, a sample display is shown. This screen display may appear on a cathode ray tube (CRT) device or the like. The screen display 1, includes a cursor 3, a first object 5, and a second object 7. In one move, a user can move the cursor 3 along a path from point A to point B. Normally, the path taken between points A and B is neglected in a computer application. The only processing that occurs is the changing of the stored cursor position to its new location at point B by either storing the new position directly or computing the change in position at several points along the path between A and B. 
     When moving a cursor between points A and B, the time lapse during the movement can vary (i.e., the cursor can be moved rapidly between the two points or slowly). Therefore, a path between points A and B can be indicated as a function of position and time or P(A, B; t). The method of the present invention utilizes the directional inputs of a cursor movement device with respect to time to perform a hypothetical viscous dragging of the graphical object through an imaginary medium. As seen in FIG. 1a, the cursor 3 is placed at location A on the second object 7. The cursor 3 is then moved in the direction indicated by arrow 9 to the new position, location B, shown in FIG. 1b. The second object 7 not only has been moved in the direction of arrow 9, but has been rotated, as well. 
     Referring to FIG. 2, a graphical object is shown with its associated parameters. In the present invention, the movement of the graphical object 11 is similar to the movement of a solid object in a viscous medium. In one model for viscous damping, a medium will exert a force that is proportional to the velocity of the object but opposite in direction. The variable, b, represents the coefficient of proportionality for this relationship. The force exerted by the medium will also slow the rotation of the object. This model also includes a torque which is proportional to the negative of the angular velocity. The torque has a coefficient of proportionality equal to bL 2 , where L is a length value representative of the object&#39;s extent. In this embodiment L is the distance from the cursor location to the farthest point on the object 11. 
     In this embodiment, the graphical object 11 is a five-sided two-dimensional polygon. An origin 13 is chosen in the screen area 1, having fixed or variable coordinates. The vector x denotes the distance and direction from the origin 13 to the center of mass (shown here as point v) of the object 11. The vector P denotes the distance and direction from the origin 13 to the point on the object 11 where an imaginary force is being applied (shown here as point u). In this embodiment, the force is applied at the cursor location. 
     The vector r is equal to P-x which has a constant magnitude while the object 11 is being moved. The vector θ is the angular orientation of the object which points perpendicular to the screen 1 from the object&#39;s center of mass v. The vector F denotes the force applied to the object 11 at point u. 
     Equations 1 and 2 represent the motion of a solid object in a viscous medium under the influence of a force F applied at point u. ##EQU1## 
     Variable m represents the mass of the solid object 11 and variable I represents the moment of inertia of the object. As mentioned above, the value for point u is given by a user input, preferably by the location of the cursor. The rate of change of the point u is given in the following equation: ##EQU2## 
     As time advances, the values for the vectors x and θ must be calculated based on the input value for the vector P. In the above equations, there are five unknowns: the magnitude and direction for both the x and F vectors and the magnitude of the θ vector. The variables b, L, I, and m can be calculated or set to a constant. 
     Solving the above equations is demanding in real time. Therefore, these equations can be approximated to simplify the computations for the computer. Several assumptions are made to simplify the equations. First of all, a &#34;high damping limit&#34; is assumed where the damping factors are very large. Second of all, the force vector F is assumed to vary slowly with respect to time. In equations 4 and 5, changes of variable are made to dimensionless quantities. ##EQU3## 
     Since-the force vector F is assumed to change slowly with respect to time, dF/dt=0. Equations 1 and 2 now reduce to Equations 6 and 7, respectively. ##EQU4## The value ε is a dimensionless parameter that reduces to 0 as the damping coefficient b becomes large. F and r are unit vectors for vectors F and r, respectively. Equations 6 and 7 are term by term dimensionless, and their solutions are the functions z and θ. These functions depend on ε, and therefore can be expanded in ε as a power series as follows: ##EQU5## The parameter ε will be treated as a small perturbation due to a large damping b. Only the lowest order terms are needed. The zero order terms in the θ expansion for z and θ solve as follows: ##EQU6## Only these zero order terms are left in the approximation. Therefore, all effects proportional to ε are discarded. In terms of x and t, the approximation is as follows: ##EQU7## Combining equations 13 and 14 with the position equation 3 results in the following equation: ##EQU8## The right hand side of equation 15 can be written as a matrix multiplied by the force vector F. Such a matrix can be inverted in order to solve for F according to the following function: ##EQU9## Therefore F is computed according to the following equation: ##EQU10## Additional information on the properties of matrices and Equation 15a can be found in chapter 1 of Classical Dynamics of Particles and Systems by J. B. Marion (© 1970, by Academic Press, Inc.). The cross product r×F is equal to the applied torque on the object 11. The cross product of the right-hand side of equation 16 with vector r is therefore equal to the right-hand side of equation 14. Since r×r=0, the equation reduces as follows: ##EQU11## Though easier to compute, equation 18 is still difficult to use in real time. Therefore equation 18 is reduced to define Δθ and Δx based on ΔP from the user input. Using equation 18 and equation 3 and approximating the derivative with respect to time (d/dt) to a simple difference calculation (Δ), the final equations are as follows: ##EQU12## 
     Referring to FIG. 3, a computer system is shown according to an embodiment of the present invention. The computer system includes a display 1, such as a CRT screen, a central processing unit (CPU) 15, which can be a personal computer, for example, and a cursor movement device, such as a mouse 17, for example. The present invention can be used with a variety of computer systems and input devices. For instance, the mouse 17 can be replaced with a track-ball input device (e.g., the Turbo Mouse® ADB manufactured by Kensington® Microware Ltd.) or a stylus/input sheet combination. In this embodiment, the mouse 17 includes first and second input switches 21 and 22. 
     Once an object 19 is created on the screen 1, the center of mass is computed with respect to an origin 13, according to a variety of known methods. The cursor location, u, is constantly stored in the CPU 15. The vector r is then easily computed in a known manner by subtracting the vector x (which points from the origin 13 to the center of mass, v) from the vector P (which points from the origin 13 to the cursor location, u). The length variable L, is the only value that has to be modeled in this embodiment. 
     The screen 1 is divided into a plurality of picture elements, commonly referred to as pixels. Each pixel will have its own unique coordinate pair with respect to the origin 13. Accordingly, the smallest incremental value for |ΔP| will be the distance between adjacent pixels. The values for |Δθ| and |Δx| are computed, repeatedly. Depending on the processing speed of the CPU 15, these values are computed periodically (e.g., once every 50 msec) as the object is moved. Each time these values are computed, the object 19 is redrawn based on the new coordinate values for the center of mass, v, and the new orientation angle, θ. When moving the object 19, the cursor 3 is first placed at a desired starting location by the mouse 17. By pressing one of the input switches, for instance the first switch 21, the CPU 15 initiates the viscous dragging computations described above. As the user moves the cursor 3 while depressing the first switch 21, the object is shifted and rotated on the screen 1. 
     There are many uses for the present invention. For instance, the cursor 3 can be treated as an object to be shifted and rotated. In such a situation, the center of mass for the cursor 3 would be selected between the tip of the arrow and its distal end (e.g., the center of mass could be selected at the base of the arrow head). The vector P would preferably point to the tip of the arrow head. Viscous dragging of the cursor 3 can be initiated by pressing the second input switch 22, for instance. As the user moves the cursor, its orientation can be adjusted to a desired direction. When the cursor is being used as a writing implement or eraser on the display, it can be easily rotated using the above described method. Therefore, the width of the writing or erasing swath can be easily controlled with the cursor movement device. 
     The functions performed by the cursor 3 can now be made to depend on its the orientation. An example of this type of function selection is shown in FIG. 4. If the cursor 3 is pointing upward as seen in the image on the left, then only movement operations can be performed on the pixel data in the block 23. For instance, by pressing the first input switch 21, the pixel data appearing in block 23 can now be moved to another location on the screen. If the cursor 3 is pointing downward as seen in the image on the left, then the data within the box 23 is executed or evaluated. In this example, the ASCII data &#34;list files&#34; is executed as a command. 
     The present invention can also be extended to the movement and rotation of graphical objects in three dimensions. Rather than two directional inputs (as input from the mouse device), three directional inputs are needed. The equations described above can be easily expanded for three dimensional object movement.