Stylus pointing devices enable information, such as position information, to be input to a host electronic device. In addition, the longitudinal or axial component of the force, or pressure, applied to the tip of a stylus may be used to control aspects of a drawing application executed on a computer or other processing device. This facilitates improved simulation of some drawing implements, although other drawing implements respond to additional characteristics, such as the angle of the drawing implement with respect to the drawing surface. One approach to measuring the angle is the use of a tilt or gravity sensor. This provides information about the angle of the stylus relative to the vertical direction, but does not indicate the angle of the stylus relative to the drawing surface (except when the surface is horizontal). An accelerometer, however, does not indicate the rotation of a stylus in the plane of the drawing surface. It would thus be useful to provide a way to determine the orientation of a stylus relative to a drawing surface of the host device.
Exemplary embodiments of the present disclosure will be described below with reference to the included drawings such that like reference numerals refer to like elements and in which:
For simplicity and clarity of illustration, reference numerals may be repeated among the figures to indicate corresponding or analogous elements. Numerous details are set forth to provide an understanding of the example embodiments described herein. The example embodiments may be practiced without these details. In other instances, well-known methods, procedures, and components have not been described in detail to avoid obscuring the example embodiments described. The description is not to be considered as limited to the scope of the exemplary embodiments described herein.
One aspect of the present disclosure relates to a method for controlling an application executed on an electronic device, in which the electronic device comprising receives a signal from a stylus, the signal being dependent on a rotation rate of the stylus. A stylus orientation is determined from the stylus signal, and is provided as an input to the application. In one embodiment, the received signal comprises a stylus rotation rate, in which case the stylus orientation is determined by setting an initial stylus orientation, integrating an exponential of the stylus rotation rate dependent upon the initial stylus orientation to produce a rotation matrix, and applying the rotation matrix to the initial stylus orientation.
In a further embodiment, the stylus orientation is embedded in the received signal, in which case the stylus orientation can be recovered from the received signal.
When the application is an electronic drawing application, the properties of lines rendered on a display of the electronic device can be adjusted dependent upon the stylus orientation.
In a further embodiment, the handedness of a user of the stylus is determined form the stylus orientation, and may be used to control the application.
A further aspect of the present disclosure relates to a stylus orientation sensor that includes an integration circuit and a rotation circuit. The integration circuit is operable to integrate an exponential of a sensed stylus rotation rate, dependent upon an initial stylus orientation, to produce a rotation matrix. The rotation circuit is operable to apply the rotation matrix to an initial stylus orientation to produce a stylus orientation. The stylus orientation sensor may also include a stylus equipped with a gyroscope. The gyroscope enables sensing of the stylus rotation rate.
The stylus orientation sensor may also include an electronic device equipped with a receiver, for receiving a signal dependent upon the stylus rotation rate from a stylus having a rotation rate sensor, a display screen, and a processor operable to render an image on the display screen dependent upon the stylus orientation.
A still further aspect of the present disclosure relates to a stylus having a gyroscope operable to sense a stylus rotation rate, a processor operable to produce a signal dependent on a rotation rate of the stylus, and a transmitter operable to transmit the signal dependent on a rotation rate of the stylus. Where the signal is dependent on a rotation rate of the stylus, the processor may include an integration circuit, operable to produce a rotation matrix in response to the sensed stylus rotation rate, and a rotation circuit, operable to apply the rotation matrix to an initial stylus orientation to produce a stylus orientation.
The stylus may include a user control, such as a button, motion sensor, force sensor or the like, that is operable to indicate when an orientation of the stylus is substantially the same as the initial stylus orientation.
A still further aspect of the present disclosure relates to an electronic device that include a receiver operable to receive a signal from a stylus, the signal dependent on a rotation rate of the stylus, and a processor operable to execute an application dependent upon the signal from the stylus. The processor may also be used to determine a stylus orientation in response to the signal from the stylus and to render an image on a display screen dependent upon the stylus orientation.
Operation of the stylus and/or the electronic device may controlled by processor executable instructions stored on a non-transitory computer-readable medium
In
The stylus 100 may include a user control to indicate when the stylus is in an initial orientation. The user control may be a button 112 on the top or side of the stylus, or a sensor 114 within the stylus. The sensor 114 may be a motion sensor such as an accelerometer, or a force sensor, such a tip pressure sensor, for example.
The orientation input provided by the stylus 100 may be used to control various aspects of an application executed on the host electronic device 104. For example, the orientation input may be used to as input to a computer simulation of a drawing implement, such as a pen or brush. The orientation may be used to control aspects of a line produced by the drawing implement, such as the width of the line, the color saturation, the line style or the opacity, for example.
In a further embodiment, the orientation of the stylus 100 is used to control other aspects of the application, such as the orientation of an object rendered on the display 102.
In a still further embodiment, the orientation of the stylus 100 is used to determine the handedness of a user. The handedness, in turn, may be used to provide improved prediction of the stylus position, for example.
The rotation rate (denoted as ω(t) or Ω(t)) is processed to determine the orientation vector u(t). This processing may be performed in processor 206 of stylus circuit 106 or in processor 218 of host circuit 108, or the processing may be split between both processors. If the processing is performed in processor 206 of stylus circuit 106, an input 228 from a user control of the stylus (such as a button, a motion sensor or a force sensor) may be provided to indicate when the stylus is in an initial orientation. If the processing is performed in processor 218 of host circuit 108, an input 230 from a user control of the host electronic device, or from the stylus, may be provided to indicate when the stylus is in an initial orientation.
In accordance with one aspect of the present disclosure, an orientation of the stylus is determined from a rotation rate vector sensed by a gyroscope of the stylus. The orientation is represented, as depicted by element 110 in
u(t)=R(t)u(0), (1)
where R(t) is a rotation matrix. In an inertial reference frame, the rotation rate is {dot over (R)}(t). Hence, in the frame of the stylus, the rotation rate matrix is
where ω={ωx, ωy, ωz}T is the rotation rate vector. In one embodiment, the rotation rate vector is measured using a 3-axis gyroscope. As indicated by definition (2), the rotation matrix Ω(t) and the rotation rate vector ω={ωx, ωy, ωz}T are alternative presentations of the same information.
Equation (2) may be rearranged as {dot over (R)}(t)=R(t)Ω(t), so the rotation matrix R(t) may be determined from the rotation rate matrix Ω(t) as
where R(0) is the 3×3 identity matrix.
When the rotation rate signals are sampled with sampling interval T, the computation in equation (3) may be implemented by a digital processor using. For example, in one embodiment the rotation matrix is updated according to
R(t)=R(t−T)W(t), for t=T, 2T, 3T, . . . , (4)
where σ=|ω|T is the product of the magnitude of the rotation rate vector and the sampling interval T, and
is an approximation to the integral of the exponential of the rotation rate over the sampling interval. Thus, in one embodiment, the stylus orientation vector u(t) is updated, dependent upon a rotation rate matrix Ω(t) measured at time t, according to
It is noted that equation (6) is dependent upon an initial stylus orientation vector u(0).
Blocks 306-312 may be performed by a host electronic device. Alternatively, the method may be performed by a processor on the stylus itself, provided the initial stylus orientation is known to the stylus. The stylus orientation vector may be determined by a processor on the stylus itself. For example, a ‘double tap’, button press, or other gesture may be used to indicate that the stylus is in a known initial position. The orientation vector and/or the rotation rate vector may then be transmitted to the host electronic device.
In one embodiment, the stylus is used as a joystick. The joystick may used for controlling computer games, drawings applications, remote controlled toys, robotic devices, etc.
The processing circuit 400 may be implemented on a programmed processor, a field programmable gate array, a custom logic circuit, an application specific circuit, or the like.
The implementations of the present disclosure described above are intended to be examples only. Those of skill in the art can effect alterations, modifications and variations to the particular exemplary embodiments herein without departing from the intended scope of the present disclosure. Moreover, selected features from one or more of the above-described exemplary embodiments can be combined to create alternative exemplary embodiments not explicitly described herein.
It will be appreciated that any module or component disclosed herein that executes instructions may include or otherwise have access to non-transient and tangible computer readable media such as storage media, computer storage media, or data storage devices (removable or non-removable) such as, for example, magnetic disks, optical disks, or tape data storage. Computer storage media may include volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. Examples of computer storage media include RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by an application, module, or both. Any such computer storage media may be part of the server, any component of or related to the network, backend, etc., or accessible or connectable thereto. Any application or module herein described may be implemented using computer readable/executable instructions that may be stored or otherwise held by such computer readable media.
The implementations of the present disclosure described above are intended to be merely exemplary. It will be appreciated by those of skill in the art that alterations, modifications and variations to the illustrative embodiments disclosed herein may be made without departing from the scope of the present disclosure. Moreover, selected features from one or more of the above-described embodiments may be combined to create alternative embodiments not explicitly shown and described herein.
The present disclosure may be embodied in other specific forms without departing from its spirit or essential characteristics. The described exemplary embodiments are to be considered in all respects only as illustrative and not restrictive. The scope of the disclosure is, therefore, indicated by the appended claims rather than by the foregoing description. All changes that come within the meaning and range of equivalency of the claims are to be embraced within their scope.