SlideShare a Scribd company logo
1 of 16
Download to read offline
Hachem 1
Fatima Hachem
IB Mathematics SL DP2
Locating the Wii remote in a 3 Dimensional Field
February 10, 2015
Hachem 2
Introduction:
In the year 2006, Nintendo® released the Nintendo® WiiTM and its revolutionary
controller the WiiTM remote, or wiimote (“Nintendo - Corporate Information”, n.d.). The
wiimote is a wireless controller that gives games a sense of depth by allowing players to control
their player avatar by performing the movement they wish for the avatar to perform. For
example, if the avatar wields a sword and the player swings the wiimote in the horizontal
direction, the avatar will replicate the movement, swinging the sword in the horizontal direction.
Similarly the wiimote may act as a steering wheel in a racing game such that when the player
rotates the wiimote to the right, the car makes a right turn.
Rationale
When I first played with the WiiTM console I found it absolutely thrilling how I was in
direct control of my avatar. After years of using a joystick and pressing button combinations, I
now could more actively interact with the game and really delve into the great worlds packed
with imagination. So naturally I questioned how the WiiTM could register all of the different
motions players made behind the screen. Initially I had settled for the most basic explanation,
the sensor bar and wiimote worked transmitting and receiving infrared (IR) waves. Upon deeper
investigation I discovered there was a great deal more to the registration of player movements.
As such, the objective of this mathematical exploration is to determine the conditions that
distinguish one command from another within a game. To do so, let’s first look at the
components of the wiimote.
A Breakdown of the Wiimote:
The wiimote is composed of multiple parts, the parts used to detect motion, location and
communicate between the WiiTM console and the wiimote are the accelerometer, Bluetooth
radio, and infrared camera (“How the Wiimote Works”,
2008).
Accelerometer: This component measures the change in the
wiimote’s velocity, hence acceleration, as acceleration is
defined as the rate of change in velocity, along three axes, x, y,
and z, thus allowing the game avatar’s action to correspond to
the player’s (“How the Wiimote Works”, 2008).
Bluetooth radio: This component allows the WiiTM to
recognize the wiimote as a point of reference (“How the
Wiimote Works”, 2008).
Infrared Camera: The infrared camera works together with the
WiiTM sensor bar that is sold along with the WiiTM console.
What happens here is that the WiiTM sensor bar contains 10
Light Emitting Diodes, or LEDs, with a cluster of five LED
lights on either end of the sensor bar and a space of approximately 15.1 ±
0.1 cm between them, as seen in Figure 2 (“Wiimote: IR Camera”, 2012).
Figure 1- The wiimote on the
three axes
Hachem 3
Figure 2- LED light clusters
These LED’s emit the infrared waves that the wiimote camera
placed at the very top of the wiimote (Figure 3) uses to determine
its location in space relative the sensor bar using a process known
as triangulation.
Triangulation:
Triangulation is a process used by GPS satellites to locate
objects using two or three different reference points. For example
when locating a mobile device three different cellular towers may
detect the signal and provide varying coordinates in order to
provide a more accurate location of the device. The wiimote also
uses this system in order to locate the wiimote relative to the
sensor bar. Considering each of the two clusters of LED lights is a
reference point, the wiimote can define its location relative to each
cluster, using three dimensional vectors (Rouse, 2005).
Use of Triangulation in games
Among the many games I have played on the Nintendo® WiiTM
console, one of the most enjoyable was The Legend of Zelda Skyward SwordTM. In the game the
avatar wields a sword; hence the wiimote acts as a sword. The avatar moves his sword in
correspondence to the motions the player makes with the wiimote. Taking that into
consideration, I thought that it was more like, we, the players, were drawing vectors that the
wiimote and WiiTM sensor bar used to detect and recognize motion. As such I decided to
construct three dimensional vectors to model the basic movements players perform using the
wiimote.
The game registers a variety of movements from using a shield to defend oneself to flying
a gigantic bird as though it is some kind of kite. However for our purposes I will be discussing
the use of the wiimote as a sword. First off I would like to define some terms I shall be using.
1. Slice: A straight horizontal or vertical displacement of the wiimote. This movement
should be along one single axis such as only the x or z axes. (Refer to Figure 6 for
clarification).
2. Jab: the forward thrust of the wiimote, causing displacement along the y axis.
Representing each movement as a vector on a three dimensional plan
To mathematically represent each motion as a vector on a three dimensional plane, I
took measurements of the distance from the Wii sensor bar to where I usually play with the
wiimote. (See Figures 4 and 5). Measurements were taken in all 3 directions (x, y, and z). These
measurements were then used to define the position the wiimote is usually at during game play.
We will call this position, the “origin”. Then distances were taken to measure the distance
travelled from the origin so as to illustrate the vectors induced by the change in the position of
the wiimote.
Figure 3- View of wiimote
from multiple angles
Infrared
camera
Hachem 4
Values at the Origin:
Distance along x-axis 25.5 cm Distance along y-axis: 273 cm Distance along z-axis 28 cm
Figure 4- The wiimote at the Origin Figure5- Measuring the distances in the 3 axes
Defining the Coordinate System
Figure 6- Conventional coordinate system used in relation to the wiimote
The coordinate system is mapped out by the
Wii sensor bar in relation to the position of
the wiimote as seen in Figure 6.
Obtaining the Conditions at the Origin
To obtain the x coordinate of the wiimote’s “origin”, first I measure the length of the Wii
sensor bar. Then, using a ball of yarn I drew out a perpendicular line from one side of the sensor
bar above one of the two clusters of LED lights to the position of the wiimote. Using a ruler I
measure the distance from the yarn to the center of the IR camera at the head of the wiimote.
The process was repeated with the other side of the sensor bar. The values were then computed
according to their location relative to the wiimote.
Length of Wii sensor bar= 24 cm
Distance from wiimote to LED clusters on positive x axis= 13.5 cm
Distance from wiimote to LED clusters on negative x axis= 37.5 cm
ar
Hachem 5
Calculating the x coordinate of the origin:
Method A:
𝑥 =
1
2
(24) + 13.5
𝑥 = 25.5 𝑐𝑚
Method B:
𝑥 = 37.5 −
1
2
(24)
𝑥 = 25.5 𝑐𝑚
To obtain the y coordinate of the wiimote’s standard position I measured the distance
from the point on the floor perpendicular to the location of the WiiTM sensor bar to the point on
the floor perpendicular to the location of wiimote.
y coordinate = 273 cm
To obtain the z coordinate of the wiimote’s standard position I first measured the
distance from the Wii sensor bar to the floor. I then measured the distance from my waist down.
I then subtracted the two values to figure out the vertical distance of the Wii sensor bar relative
to the wiimote.
Calculating the z coordinate of the origin:
Distance from Wii sensor bar to the floor= 131 cm
Distance from my waist the floor = 103 cm
Distance of Wii sensor bar relative to the Wii mote= 131-103=28 cm.
As we are using the coordinate system (x, y, z) the origin lies at (25.5, 273, 28) or,
in vector form [
𝒙
𝒚
𝒛
] = [
𝟐𝟓. 𝟓
𝟐𝟕𝟑
𝟐𝟖
].
This value is assumed to be exact as our concern is the change in the wiimote’s position,
hence any arbitrary numbers could have been used to indicate the position that the wiimote
generally lies within.
The Horizontal Slice:
Figure 7- The Horizontal Slice:
The horizontal slice can be represented using two different vectors and then simplifying it.
Starting at the origin [
25.5
273
28
] and moving the wiimote to the right we get a vector of[
70.5
273
28
].
Now let’s assign a name to each of these vectors. The vector at the origin will be called 𝑠⃗ and the
vector at the new position will be called 𝑎⃗.
Hachem 6
Thus:
𝑠⃗ = [
25.5
273
28
] and 𝑎⃗ = [
70.5
273
28
]
Now to find the difference between 𝑎⃗ and 𝑠⃗ we can use the rules of vector by scalar
multiplication and vector addition.
𝑎⃗ − 𝑠⃗ = [
70.5
273
28
] − [
25.5
273
28
]
𝑎⃗ − 𝑠⃗ = [
70.5
273
28
] + (−1) [
25.5
273
28
]
𝑎⃗ − 𝑠⃗ = [
70.5
273
28
] + [
−25.5
−273
−28
]
𝑎⃗ − 𝑠⃗ = [
70.5 − 25.5
273 − 273
28 − 28
]
𝑎⃗ − 𝑠⃗ = [
45
0
0
]
Set up an equation equal to the difference of
the two vectors
Exchange the (-) sign for a (+(-1))
Distribute the (-1) throughout the vector
Add vectors
Simplify
As such the resultant vector, is 45 in the x axis, which aligns with the previous definition of the
word slice. To visualize this process, I used Photoshop to illustrate a graphical model as seen in
Figure 8.
Figure 8- Graphical Representation of the Horizontal slice
Hachem 7
The Vertical Slice
Figure 9-The Vertical Slice:
It is important to keep in mind that the vertical slice is actually occurring
along the z axis and not the y.
We simply repeat the process used when calculating the Horizontal Slice.
Where 𝑠⃗ = [
25.5
273
28
] and 𝑏⃗⃗ = [
25.5
273
73
]. Here we are searching for the difference of
𝑏⃗⃗ − 𝑠⃗.
𝑏⃗⃗ − 𝑠⃗ = [
25.5
273
73
] − [
25.5
273
28
]
𝑏⃗⃗ − 𝑠⃗ = [
25.5 − 25.5
273 − 273
73 − 28
]
𝑏⃗⃗ − 𝑠⃗ = [
0
0
45
]
As such the resultant vector, is 45 in the z axis, which aligns with the
previous definition of the word slice. This process can also be graphically
modelled as seen in Figure 10.
Figure 10- Graphical Representation of the Vertical slice
Hachem 8
The Jab
Figure 11- The Jab
The jab involves the movement of the wiimote across the y axis and away from the
player’s body. Using the same methods used in computing the horizontal and vertical slices, we
can calculate the resultant vector of the jab.
Where 𝑠⃗ = [
25.5
273
28
] and 𝑐⃗ = [
25.5
244.9
28
]. Here we are searching for the difference of 𝑐⃗ − 𝑠⃗.
𝑐⃗ − 𝑠⃗ = [
25.5
244.9
28
] − [
25.5
273
28
]
𝑐⃗ − 𝑠⃗ = [
25.5 − 25.5
244.9 − 273
28 − 28
]
𝑐⃗ − 𝑠⃗ = [−
0
28.1
0
]
As such the resultant vector, is -28.1 in the y axis, which aligns with the previous definition of
the word jab. The reason why this value is negative is because the distance between the wiimote
and Wii sensor bar has decreased. This process can also be graphically modelled as seen in
Figure 12.
Figure 12- Graphical Representation of the Jab
Hachem 9
Graphically Modelling the Motion of the Wiimote
All the movements I have modelled thus far are attacks; however there were instances in
the game during which one would have to move the sword without performing an attack to
progress further. So how does the system differentiate between a motion intended to be an
attack and any other motion?
To answer this question, I modelled the IR camera in the wiimote as a particle in space,
and relating its change in displacement over time, we can determine the wiimote’s velocity at
any given instant. From there we can calculate its acceleration. Thus, depending on the rate of
change of the position wiimote’s IR camera in space, we can determine the type of command
actuated by a system.
To model the IR camera as a particle in space, I would simplify its motion to one
dimension to enable myself to draw conclusions. The complication is that I have previously dealt
with the movement of the wiimote in three-dimensions. How can I model this motion in one
dimension? As shown previously, 3 dimensional vectors are comprised of three coordinates; for
each of the slices and jab, there has been change in only one of the three coordinates. Thus I only
need to detect the change in only one of the coordinates of the vector for this investigation.
Therefore regardless which of the axes parallel to the motion I use to model the displacement
function, the outcome should be the same. As such I can treat the IR camera of the wiimote as a
particle in space.
In order to study the rate of change of a particle, I require a graph. To derive a graph I
need to measure the position of the wiimote’s IR camera at various points of time. Thus leading
me to the question: how will I measure the change in position of the wiimote over time?
Obtaining Graphical Values and Defining a Curve:
Graphs of two motions varying in speed, the magnitude of velocity which is a vector
value, were plotted. The first motion occurred at a considerably great speed, whereas the second
occurred at a much slower speed. These differences in speed were great enough for the human
eye to detect them.
These two motions are defined, and will be referred to as:
1. Attack: Displacement of the wiimote at a considerably great speed. Generally occurring
within the time span of half a second.
2. Non-Attack: Displacement of the wiimote at a considerably low speed. The minimum
time required for this motion is approximately one second.
Table 1- “Attack” Table of Values
Time
(seconds)
Displacement
from Origin
(cm)
t-axis y-axis
0.000 3.4
0.0427 5.1
0.0580 9.4
0.0855 14.7
0.124 23.7
0.138 35.7
0.166 39.8
0.194 42.7
0.210 43.6
Table 2- “Non-Attack” Table of Values
Time
(seconds)
Displacement
from Origin
(cm)
t-axis y-axis
0.00 2.40
1.40 7.40
1.98 13.6
2.08 19.3
2.65 26.1
2.76 30.5
3.37 35.9
5.16 42.6
Hachem 10
Graph 1- “Attack”
To explain the trends of the graph, we shall refer to the horizontal slice occurring in the x axis
Table 3-Trends in Graph 1 “Attack”
Region Wiimote Motion Player Motion
A
Approaches origin from a distance about
4 cm away while decelerating, until
instantaneous velocity is 0 cm/s.
The distance between the wiimote IR
camera and origin is initially decreasing,
hence the reflection across the x axis.
Player originally has “wound” themselves,
bringing the wiimote closer to the center of their
body in preparation for the sharp movement to
follow.
B
Moves away from the origin while
accelerating.
Player has thrust their arm out horizontally at
full force.
C
Point of inflection of the graph, where
velocity of the wiimote is at a maximum
and will decrease after this point.
Player has stopped transferring energy to
displace the wiimote and is instead relying on the
momentum from their initial thrust as their arm
moves farther away from them.
D
v=0; at the maximum of the graph,
where the wiimote has come to an
instantaneous halt.
Player has deliberately stopped the movement of
the wiimote at the maximum distance they can
move their arm from their body.
E Wiimote is accelerating towards origin.
Player is adducting their arm to their body to
prepare for the next attack.
s(t) = -12174x3 + 4018.8x2 - 117.14x + 3.6719
0
5
10
15
20
25
30
35
40
45
50
0 0.05 0.1 0.15 0.2 0.25
displacement(cm)
Time (sec)
Attack Motion
E
A
B
C
D
Hachem 11
Graph 2- “Non-Attack”
To explain the trends of the graph, we shall refer to the horizontal slice occurring in the x axis
Table 4- Trends in Graph 2 “Non-Attack”
Region Wiimote Motion Player Motion
A
Approaches origin while decelerating
until instantaneous velocity is 0 cm/s.
Player originally has moved the wiimote into a
comfortable position enabling them to maximise
the length of their arm when they perform the
slice in slow motion. This is because the limit that
a player can displace the wiimote is about the
length of their arm from their body.
B
Moves away from the origin while
accelerating.
Player begins to abduct their arm from their body
with a controlled speed.
C
Point of inflection of the graph, where
velocity of the wiimote is at a maximum
and will decrease after this point.
Player is attempting to maintain the initial speed
of the wiimote, hence is subconsciously
beginning to reduce the speed at which they
move the remote.
D
v=0; at the maximum of the graph,
where the wiimote has come to an
instantaneous halt.
Player has deliberately stopped the movement of
the wiimote at the maximum distance they can
move their arm from their body.
E Returns slightly to the origin.
The player has significantly reduced the speed of
their arm as their arm is nearly entirely stretched
outwards. It now loiters around the same area
moving towards their body slightly as they
prepare to resume moving their arm outwards,
hence the upcoming upwards trend.
In summary: the non-attack motion is of a higher order as the player constantly
moderates the speed at which they are moving the wiimote. The attack motion is of a lower
order as the player is less in control of the action and instead stops only when their arm has
moved too far.
s(t) = 0.2752t4 - 4.0137t3 + 17.721t2 - 14.599t + 2.4355
-10
0
10
20
30
40
50
60
0 1 2 3 4 5 6
Displacement(cm)
Time (s)
Non-Attack Motion
A
B
C
D E
Hachem 12
The following procedure was followed to obtain the graphs for the two varying motions:
1. I video-taped the attack and non-attack motions. A
screenshot from one of these videos displaying the set
up can be seen in Figure 13.
2. I decreased speed of video to observe and mark
position of wiimote at various points in time.
3. I used Photoshop to figure out what the position
would be, as seen in Figure 14.
4. I used video editing software, with a timer of the
format (hr:min:sec;millisec), to figure out the time
for each marker in the slow-motion video.
5. I used the ratio:
T(original)
T(slow motion)
, where T=total time,
to calculate the actual time in the original motion.
(See calculations below)
6. I graphed using a spreadsheet program, and defined
two functions.
Table 5- Times in “Slow-Motion”
Time Slow-Motion (seconds)
Motion T
(Original)
T
(Slow-motion)
M1 M2 M3 M4 M5 M6 M7 M8 M9
Attack 0.21 15.25 0.00 3.10 4.21 6.21 9.00 10.05 12.08 14.06 15.25
Non-Attack 5.16 8.01 0.00 2.17 3.07 3.23 4.12 4.29 5.23 8.01
*Where T=total time, and M=marker
Calculating the “Original” Time”
At M2 in “attack”: t(slow-motion)= 3.10 s, then:
T(original)
T(slow motion)
=
0.21
15.25
T(original)
T(slow motion)
=
t(original)
t(slow motion)
t(original)
3.10
=
0.21
15.25
t(original) = 0.0427 sec
At M2 in “non-attack”: t(slow-motion)= 2.17 s,
then:
T(original)
T(slow motion)
=
5.16
8.06
T(original)
T(slow motion)
=
t(original)
t(slow motion)
t(original)
2.17
=
5.16
8.06
t(original) = 1.40 sec
Where t is time and T is total time.
This method was then applied to the remainder of the markers used.
Deriving Velocity and Acceleration
Depending on the rate at which the wiimote’s position changes, a different command will
be acknowledged by the Wii system. As the “attack” command is the faster of the two
movements, there exists a minimum rate of change required to activate that command. Hence,
the “non-attack” command will have a maximum rate of change of position before the command
is registered as an “attack” command. To find the minimum of the “attack” function and
maximum of the “non-attack” function I took the derivatives of each motion’s respective
displacement function.
Figure 13- Screen shot of Set Up
Figure 14- Determining Displacement
Hachem 13
Minimum Speed of Attack
Attack: s(t) = -12174t3 + 4018.8t2 - 117.14t + 3.6719
The minimum instantaneous speed achieved during an attack as seen in Graph 1 is: 0
cm/s. Hence the conventional method of searching for minimums by equating the first
derivative to 0 and solving will not work. Instead I searched for average velocities over varying
intervals of time. This is done by drawing secants between the minimum, maximum, and point
of inflection as well as other points as seen in Table 6 below, and then solving for their
gradients.
To find max/min values:
𝑣(𝑡) =
𝑑𝑠
𝑑𝑡
=
𝑑
𝑑𝑡
− 12174𝑡3
+ 4018.8𝑡2
− 117.14𝑡 + 3.6719
𝑣(𝑡) = −36522𝑡2
+ 8037.6𝑡 − 117.14
∵ rate of change at extrema = 0
0 = −36522𝑡2
+ 8037.6𝑡 − 117.14
𝑡 =
−𝑏±√𝑏2−4𝑎𝑐
2𝑎
𝑡 =
−8037.6±√8037.62−4(−36522)(−117.14)
2(−36522)
∴ 𝑡 = 0.0157 or 𝑡 = 0.204
Looking at Graph 1 we see that the minimum occurs at 𝑡 = 0.0157, and the maximum occurs at
𝑡 = 0.204.
To find point of inflection:
Points of inflection occur when
𝑑2 𝑠
𝑑𝑡2 = 0
𝑎(𝑡) =
𝑑2 𝑠
𝑑𝑡2 =
𝑑𝑣
𝑑𝑡
=
𝑑
𝑑𝑡
− 36522𝑡2
+ 8037.6𝑡 − 117.14
= −73044𝑡 + 8037.6
0 = −73044𝑡 + 8037.6
∴ 𝑡 = 0.11
By substituting all of these values of time into the original function s(t), we can find the
displacement at each time.
s(𝑡) = −12174𝑡3
+ 4018.8𝑡2
− 117.14𝑡 + 3.6719
s(0.0157) = −12174(0.0157)3
+ 4018.8(0.0157)2
− 117.14(0.0157) + 3.6719
s(0.0157) = 2.78 cm
This process was repeated for the maximum and point of inflection.
Solving for Average Velocity:
gradientsecant =
Δ𝑦
Δ𝑥
, which is in this case: gradientsecant =
Δ𝑠
Δ𝑡
gradientsecant =
𝑠(𝑡2)−𝑠(𝑡1)
𝑡2−𝑡1
gradientsecant =
43.67−2.78
0.204−0.0157
∴ gradientsecant = 217.15 cm/s
The same method was applied to calculate all the other secant gradients.
Hachem 14
Table 6- Average Velocity of Wiimote during an “Attack” motion
While the date provides the variation of average velocities over the course of the attack
motion, distinguishing velocities between approximately 120 ≤ 𝑣 ≤ 320 cm/s as the average
velocity achieved by an attack motion, it is not conclusive. In order for a minimum velocity to be
obtained, multiple trials repeating the attack motion with different speeds should be conducted
and their average velocities from the min to the max calculated and compared to find the
threshold value of velocity required for the WiiTM to acknowledge the movement as an attack
command.
Maximum Speed of Non-Attack
Non-Attack: s(t) = 0.2752t 4 - 4.0137 t 3 + 17.721 t 2 - 14.599 t + 2.4355
To find the maximum speed that can be achieved by a non-attack without changing the
command, the value of the inflecting tangent must be found, for at the point of inflection, the
velocity of the wiimote will be at a maximum. To solve for the maximum velocity we must find
the second derivative of the non-attack function before setting it equal to zero and then solving.
𝑣(𝑡) =
𝑑𝑠
𝑑𝑡
=
𝑑
𝑑𝑡
0.2752𝑡4
− 4.0137𝑡3
+ 17.721𝑡2
− 14.599𝑡 + 2.4355
= 1.1008𝑡3
− 12.0411𝑡2
+ 35.44𝑡 − 14.599
𝑎(𝑡) =
𝑑2 𝑠
𝑑𝑡2 =
𝑑𝑣
𝑑𝑡
=
𝑑
𝑑𝑡
1.1008𝑡3
− 12.0411𝑡2
+ 35.44𝑡 − 14.599
= 3.3024𝑡2
− 24.0822𝑡 + 35.44
0 = 3.3024𝑡2
− 24.0822𝑡 + 35.44
𝑡 =
−𝑏±√𝑏2−4𝑎𝑐
2𝑎
𝑡 =
−(−24.0822)±√(−24.0822)2−4(3.3024)(35.44)
2(3.3024)
∴ 𝑡 = 2.043 or 𝑡 = 5.247
Looking at Graph 2, we realize that the inflecting tangent at t=2.043 is steeper at t=5.247.
Therefore the maximum velocity that can be achieved by a non-attack is:
𝑣(𝑡) = 1.1008𝑡3
− 12.0411𝑡2
+ 35.44𝑡 − 14.599
𝑣(2.043) = 1.1008(2.043)3
− 12.0411(2.043)2
+ 35.44(2.043) − 14.599
𝑣(2.043) = 16.31 cm/s
Interval (s) Displacement (cm)
t1 t2 s(t1) s(t2) Average velocity (cm/s) Region of Graph
0.0157* 0.11** 2.78 23.22 216.76
Around
Min–
P.O.I
0.025 0.11 3.06 23.22 119.53
0.05 0.11 6.34 23.22 281.33
0.075 0.11 12.36 23.22 310.3
0.11 0.125 23.22 28.05 322
P.O.I-
Around
Max
0.11 0.15 23.22 34.44 280.5
0.11 0.175 23.22 41.00 273.54
0.11 0.204*** 23.22 43.67 217.55
0.025 0.125 3.06 28.05 249.9
Around
Min–
Around
Max
0.05 0.15 6.34 34.44 281
0.075 0.175 12.36 41.00 286.4
0.0157 0.204 2.78 43.67 217.15
1. Find first derivative
*Minimum (Min)
**Point of Inflection
(P.O.I)
***Maximum (Max)
3. Set second derivative equal to 0
2. Find second derivative
4. Solve
Hachem 15
Average Velocity from first local Minimum to local Maximum
The method used to calculate the maximum and minimum of the attack motion by equating
the first derivative to zero and solving were used to find the local maximum and minimum of the
non-attack motion as well.
Local Minimum at: (0.49, -0.92)
Local Maximum at: (4.76, 42.86)
𝑣average = gradientsecant =
Δ𝑠
Δ𝑡
=
𝑠(𝑡2)−𝑠(𝑡1)
𝑡2−𝑡1
=
42.86−(−0.92)
4.76−0.49
∴ 𝑣average = 10.25 cm/s
The velocity value obtained from the first of these calculations is one of the maximum
velocities that could be achieved by any player. The second velocity obtained displays the overall
average velocity of the completed motion. This data is not conclusive. Multiple trials with the
motion occurring at varied speeds need to be tested so as to determine a threshold velocity at
which a motion is no longer registered as a non-attack, but an attack.
Considering the large gap between the minimum speed required for the “attack”
command and the maximum speed allowed for the “non-attack” command, this creates a “gray
area” in which either command could be activated depending on whether or not the value leans
nearer to the maximum value possible or nearer the minimum value required. This explains why
often the avatar on the screen fails to exact the commands input by the users.
The gray area as of this exploration is rather large. To reduce the range of values within
this gray area and determine the threshold velocity that must be achieved before the motion is
recognized as an “attack,” multiple trials with variations in the velocity of wiimote must be
conducted. Also, to further our understanding of the function of the wiimote we should also look
for the minimum distance that the wiimote must be displaced from the origin before any
command is recognized. Furthermore, could there be a maximum velocity that the wiimote can
recognize before it ignores the command, as in, if a player were to jerk the wiimote at a high
speed, what is the maximum speed with which they can move the wiimote before it fails to
recognize the command? This is a complication that has occurred while I played the game a few
times, hence it would be worthy of investigation.
Conclusion
Commands are actuated in The Legend of Zelda Skyward SwordTM when the WiiTM
sensor bar detects the movement of the wiimote via the exchange of infrared signals. The type of
command depends on two factors, the direction of the change in position and the magnitude of
the velocity, or the speed, with which the wiimote changes position. Using vectors, the direction
can be calculated, and depending on the direction of the resultant vector a variety of commands,
among those are the horizontal and vertical slices as well as the jab, could be actuated by the
system. The second factor determines the type of command that would occur in the direction
calculated by the vectors. Depending on the speed at which the wiimote changes its position in
space there are multiple commands that a player can activate. Generally speeds between 10.25
cm/s to 16.31 cm/s activate a “non-attack” command in The Legend of Zelda Skyward SwordTM,
whereas speeds between 120 cm/s and 320 cm/s actuate an “attack command.” The existence of
a great difference between them forms a “gray area” in which either command can be registered,
thus explaining the technical difficulties a player tends to face during a game.
Hachem 16
References
. (n.d.). . Retrieved May 8, 2014, from http://www.osculator.net/doc/_media/faq:pry-
wiimote.gif
| Nintendo - Corporate Information | Company History. (2014, January 1). | Nintendo -
Corporate Information | Company History. Retrieved May 17, 2014, from
http://www.nintendo.com/corp/history.jsp
Nintendo wiimote. (n.d.). . Retrieved May 10, 2014, from
http://gk12.cis.ksu.edu/uploads/lesson_material/file/3/wiimote.pdf
HowStuffWorks "Wii Controller ". (2010, January 27). HowStuffWorks. Retrieved May 15, 2014,
from http://electronics.howstuffworks.com/wii2.htm
How the Wiimote Works. (2008, September 24). trinalins Science Blog RSS. Retrieved May 10,
2014, from http://pagefillers.com/scienceblog/?p=36
Rouse, M. (2005, September 1). triangulation. What is ?. Retrieved May 10, 2014, from
http://searchnetworking.techtarget.com/definition/triangulation
Whitehead, T. (2012, December 24). Round Table: Let's Talk About Festive Gaming. . Retrieved
May 18, 2014, from
http://images.nintendolife.com/news/2012/12/round_table_time_for_a_festive_chat1/attach
ment/8/large.jpg
Wiimote: IR Camera. (2012, October 3). . Retrieved May 18, 2014, from
http://wiibrew.org/wiki/Wiimote#IR_Camera

More Related Content

Viewers also liked

Techcello at a glance
Techcello at a glanceTechcello at a glance
Techcello at a glancekanimozhin
 
Building a "Cloud Ready" IT Team
Building a "Cloud Ready" IT TeamBuilding a "Cloud Ready" IT Team
Building a "Cloud Ready" IT TeamAmazon Web Services
 
Cisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco Canada
 
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT Team
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT TeamAWS Summit Sydney 2014 | Building a "Cloud Ready" IT Team
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT TeamAmazon Web Services
 
Larry Whiteside - Optiv Cloud ready or steam rolled csa version
Larry Whiteside - Optiv Cloud ready or steam rolled csa versionLarry Whiteside - Optiv Cloud ready or steam rolled csa version
Larry Whiteside - Optiv Cloud ready or steam rolled csa versionTrish McGinity, CCSK
 
GigaSpaces - Getting Ready For The Cloud
GigaSpaces - Getting Ready For The CloudGigaSpaces - Getting Ready For The Cloud
GigaSpaces - Getting Ready For The Cloudgigaspaces
 
Tha price of freedom.pt.3.newer.html.doc
Tha price of freedom.pt.3.newer.html.docTha price of freedom.pt.3.newer.html.doc
Tha price of freedom.pt.3.newer.html.docMCDub
 
Tha Price Of A G.Pt.1.GOD'S.Remix.html.doc
Tha Price Of A G.Pt.1.GOD'S.Remix.html.docTha Price Of A G.Pt.1.GOD'S.Remix.html.doc
Tha Price Of A G.Pt.1.GOD'S.Remix.html.docMCDub
 
Tha price of tha satan.pt.3.newer.html
Tha price of tha satan.pt.3.newer.htmlTha price of tha satan.pt.3.newer.html
Tha price of tha satan.pt.3.newer.htmlMCDub
 
Tha total abomination.pt.2.pic.doc
Tha total abomination.pt.2.pic.docTha total abomination.pt.2.pic.doc
Tha total abomination.pt.2.pic.docMCDub
 
Tha Price Of Tha LORD.Pt.3.newer.html.docx
Tha Price Of Tha LORD.Pt.3.newer.html.docxTha Price Of Tha LORD.Pt.3.newer.html.docx
Tha Price Of Tha LORD.Pt.3.newer.html.docxMCDub
 
Question 3 of media evaluation
Question 3 of media evaluationQuestion 3 of media evaluation
Question 3 of media evaluationTasha900
 
Outcomes_Störung/Ha-fra-ah
Outcomes_Störung/Ha-fra-ahOutcomes_Störung/Ha-fra-ah
Outcomes_Störung/Ha-fra-ahmb1094
 
Atvididade 1 "Conheça-me: Hermindo"
Atvididade 1 "Conheça-me: Hermindo"Atvididade 1 "Conheça-me: Hermindo"
Atvididade 1 "Conheça-me: Hermindo"Hermindo_es
 
Murad's New Titles.Pic.doc
Murad's New Titles.Pic.docMurad's New Titles.Pic.doc
Murad's New Titles.Pic.docMCDub
 

Viewers also liked (20)

Techcello at a glance
Techcello at a glanceTechcello at a glance
Techcello at a glance
 
Building a "Cloud Ready" IT Team
Building a "Cloud Ready" IT TeamBuilding a "Cloud Ready" IT Team
Building a "Cloud Ready" IT Team
 
Cisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready InfrastructureCisco’s Cloud Ready Infrastructure
Cisco’s Cloud Ready Infrastructure
 
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT Team
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT TeamAWS Summit Sydney 2014 | Building a "Cloud Ready" IT Team
AWS Summit Sydney 2014 | Building a "Cloud Ready" IT Team
 
letter of rec.
letter of rec.letter of rec.
letter of rec.
 
Larry Whiteside - Optiv Cloud ready or steam rolled csa version
Larry Whiteside - Optiv Cloud ready or steam rolled csa versionLarry Whiteside - Optiv Cloud ready or steam rolled csa version
Larry Whiteside - Optiv Cloud ready or steam rolled csa version
 
GigaSpaces - Getting Ready For The Cloud
GigaSpaces - Getting Ready For The CloudGigaSpaces - Getting Ready For The Cloud
GigaSpaces - Getting Ready For The Cloud
 
Povety
PovetyPovety
Povety
 
ITN
ITNITN
ITN
 
Tha price of freedom.pt.3.newer.html.doc
Tha price of freedom.pt.3.newer.html.docTha price of freedom.pt.3.newer.html.doc
Tha price of freedom.pt.3.newer.html.doc
 
Tha Price Of A G.Pt.1.GOD'S.Remix.html.doc
Tha Price Of A G.Pt.1.GOD'S.Remix.html.docTha Price Of A G.Pt.1.GOD'S.Remix.html.doc
Tha Price Of A G.Pt.1.GOD'S.Remix.html.doc
 
Tha price of tha satan.pt.3.newer.html
Tha price of tha satan.pt.3.newer.htmlTha price of tha satan.pt.3.newer.html
Tha price of tha satan.pt.3.newer.html
 
Tha total abomination.pt.2.pic.doc
Tha total abomination.pt.2.pic.docTha total abomination.pt.2.pic.doc
Tha total abomination.pt.2.pic.doc
 
Custom reporting from CiviCRM with Google Sheets
Custom reporting from CiviCRM with Google SheetsCustom reporting from CiviCRM with Google Sheets
Custom reporting from CiviCRM with Google Sheets
 
Tha Price Of Tha LORD.Pt.3.newer.html.docx
Tha Price Of Tha LORD.Pt.3.newer.html.docxTha Price Of Tha LORD.Pt.3.newer.html.docx
Tha Price Of Tha LORD.Pt.3.newer.html.docx
 
Question 3 of media evaluation
Question 3 of media evaluationQuestion 3 of media evaluation
Question 3 of media evaluation
 
GFOLIO1
GFOLIO1GFOLIO1
GFOLIO1
 
Outcomes_Störung/Ha-fra-ah
Outcomes_Störung/Ha-fra-ahOutcomes_Störung/Ha-fra-ah
Outcomes_Störung/Ha-fra-ah
 
Atvididade 1 "Conheça-me: Hermindo"
Atvididade 1 "Conheça-me: Hermindo"Atvididade 1 "Conheça-me: Hermindo"
Atvididade 1 "Conheça-me: Hermindo"
 
Murad's New Titles.Pic.doc
Murad's New Titles.Pic.docMurad's New Titles.Pic.doc
Murad's New Titles.Pic.doc
 

Similar to fatima_hachem_Locating_the_Wii_remote_in_a_3_Dimensional_Field

Vectors phy2 chp7
Vectors phy2 chp7Vectors phy2 chp7
Vectors phy2 chp7Subas Nandy
 
RoboticsProject2Report (1)
RoboticsProject2Report (1)RoboticsProject2Report (1)
RoboticsProject2Report (1)Agraj Sobti
 
Fun with JavaScript and sensors - AmsterdamJS April 2015
Fun with JavaScript and sensors - AmsterdamJS April 2015Fun with JavaScript and sensors - AmsterdamJS April 2015
Fun with JavaScript and sensors - AmsterdamJS April 2015Jan Jongboom
 
Dancing Scimitar - One Handed Controller Design
Dancing Scimitar - One Handed Controller DesignDancing Scimitar - One Handed Controller Design
Dancing Scimitar - One Handed Controller DesignCheerieaux
 
Dancing scimitar selby thomas_week2assignment0515
Dancing scimitar selby thomas_week2assignment0515Dancing scimitar selby thomas_week2assignment0515
Dancing scimitar selby thomas_week2assignment0515Mnoric
 
miccai-poster-Bahram-Marami
miccai-poster-Bahram-Maramimiccai-poster-Bahram-Marami
miccai-poster-Bahram-MaramiBahram Marami
 
Isometric projection.pdf
Isometric projection.pdfIsometric projection.pdf
Isometric projection.pdfssuser9831e9
 
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...Byungjoo Lee
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingFayan TAO
 
2021 wolrdopen tdp_nt
2021 wolrdopen tdp_nt2021 wolrdopen tdp_nt
2021 wolrdopen tdp_ntAkitoshiSaeki
 
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docxvickeryr87
 
Anish_Hemmady_assignmnt1_Report
Anish_Hemmady_assignmnt1_ReportAnish_Hemmady_assignmnt1_Report
Anish_Hemmady_assignmnt1_Reportanish h
 
3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf ChicagoJanie Clayton
 

Similar to fatima_hachem_Locating_the_Wii_remote_in_a_3_Dimensional_Field (20)

Vectors phy2 chp7
Vectors phy2 chp7Vectors phy2 chp7
Vectors phy2 chp7
 
RoboticsProject2Report (1)
RoboticsProject2Report (1)RoboticsProject2Report (1)
RoboticsProject2Report (1)
 
Fun with JavaScript and sensors - AmsterdamJS April 2015
Fun with JavaScript and sensors - AmsterdamJS April 2015Fun with JavaScript and sensors - AmsterdamJS April 2015
Fun with JavaScript and sensors - AmsterdamJS April 2015
 
Animal killer
Animal killerAnimal killer
Animal killer
 
Animal killer
Animal killerAnimal killer
Animal killer
 
Outline
OutlineOutline
Outline
 
Dancing Scimitar - One Handed Controller Design
Dancing Scimitar - One Handed Controller DesignDancing Scimitar - One Handed Controller Design
Dancing Scimitar - One Handed Controller Design
 
Dancing scimitar selby thomas_week2assignment0515
Dancing scimitar selby thomas_week2assignment0515Dancing scimitar selby thomas_week2assignment0515
Dancing scimitar selby thomas_week2assignment0515
 
miccai-poster-Bahram-Marami
miccai-poster-Bahram-Maramimiccai-poster-Bahram-Marami
miccai-poster-Bahram-Marami
 
Isometric projection.pdf
Isometric projection.pdfIsometric projection.pdf
Isometric projection.pdf
 
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...
CHI'16 Journal "A Mouse With Two Optical Sensors That Eliminates Coordinate D...
 
TAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume renderingTAO Fayan_X-Ray and MIP volume rendering
TAO Fayan_X-Ray and MIP volume rendering
 
2021 wolrdopen tdp_nt
2021 wolrdopen tdp_nt2021 wolrdopen tdp_nt
2021 wolrdopen tdp_nt
 
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx
2048LLab 2Lab Manual 2 c.pdf1 Lab Manual Irina.docx
 
Smart Room Gesture Control
Smart Room Gesture ControlSmart Room Gesture Control
Smart Room Gesture Control
 
Vector and coordinate in games
Vector and coordinate in gamesVector and coordinate in games
Vector and coordinate in games
 
Anish_Hemmady_assignmnt1_Report
Anish_Hemmady_assignmnt1_ReportAnish_Hemmady_assignmnt1_Report
Anish_Hemmady_assignmnt1_Report
 
Computer graphics
Computer graphicsComputer graphics
Computer graphics
 
3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago3D Math Primer: CocoaConf Chicago
3D Math Primer: CocoaConf Chicago
 
ME 547 Final Report
ME 547 Final Report ME 547 Final Report
ME 547 Final Report
 

fatima_hachem_Locating_the_Wii_remote_in_a_3_Dimensional_Field

  • 1. Hachem 1 Fatima Hachem IB Mathematics SL DP2 Locating the Wii remote in a 3 Dimensional Field February 10, 2015
  • 2. Hachem 2 Introduction: In the year 2006, Nintendo® released the Nintendo® WiiTM and its revolutionary controller the WiiTM remote, or wiimote (“Nintendo - Corporate Information”, n.d.). The wiimote is a wireless controller that gives games a sense of depth by allowing players to control their player avatar by performing the movement they wish for the avatar to perform. For example, if the avatar wields a sword and the player swings the wiimote in the horizontal direction, the avatar will replicate the movement, swinging the sword in the horizontal direction. Similarly the wiimote may act as a steering wheel in a racing game such that when the player rotates the wiimote to the right, the car makes a right turn. Rationale When I first played with the WiiTM console I found it absolutely thrilling how I was in direct control of my avatar. After years of using a joystick and pressing button combinations, I now could more actively interact with the game and really delve into the great worlds packed with imagination. So naturally I questioned how the WiiTM could register all of the different motions players made behind the screen. Initially I had settled for the most basic explanation, the sensor bar and wiimote worked transmitting and receiving infrared (IR) waves. Upon deeper investigation I discovered there was a great deal more to the registration of player movements. As such, the objective of this mathematical exploration is to determine the conditions that distinguish one command from another within a game. To do so, let’s first look at the components of the wiimote. A Breakdown of the Wiimote: The wiimote is composed of multiple parts, the parts used to detect motion, location and communicate between the WiiTM console and the wiimote are the accelerometer, Bluetooth radio, and infrared camera (“How the Wiimote Works”, 2008). Accelerometer: This component measures the change in the wiimote’s velocity, hence acceleration, as acceleration is defined as the rate of change in velocity, along three axes, x, y, and z, thus allowing the game avatar’s action to correspond to the player’s (“How the Wiimote Works”, 2008). Bluetooth radio: This component allows the WiiTM to recognize the wiimote as a point of reference (“How the Wiimote Works”, 2008). Infrared Camera: The infrared camera works together with the WiiTM sensor bar that is sold along with the WiiTM console. What happens here is that the WiiTM sensor bar contains 10 Light Emitting Diodes, or LEDs, with a cluster of five LED lights on either end of the sensor bar and a space of approximately 15.1 ± 0.1 cm between them, as seen in Figure 2 (“Wiimote: IR Camera”, 2012). Figure 1- The wiimote on the three axes
  • 3. Hachem 3 Figure 2- LED light clusters These LED’s emit the infrared waves that the wiimote camera placed at the very top of the wiimote (Figure 3) uses to determine its location in space relative the sensor bar using a process known as triangulation. Triangulation: Triangulation is a process used by GPS satellites to locate objects using two or three different reference points. For example when locating a mobile device three different cellular towers may detect the signal and provide varying coordinates in order to provide a more accurate location of the device. The wiimote also uses this system in order to locate the wiimote relative to the sensor bar. Considering each of the two clusters of LED lights is a reference point, the wiimote can define its location relative to each cluster, using three dimensional vectors (Rouse, 2005). Use of Triangulation in games Among the many games I have played on the Nintendo® WiiTM console, one of the most enjoyable was The Legend of Zelda Skyward SwordTM. In the game the avatar wields a sword; hence the wiimote acts as a sword. The avatar moves his sword in correspondence to the motions the player makes with the wiimote. Taking that into consideration, I thought that it was more like, we, the players, were drawing vectors that the wiimote and WiiTM sensor bar used to detect and recognize motion. As such I decided to construct three dimensional vectors to model the basic movements players perform using the wiimote. The game registers a variety of movements from using a shield to defend oneself to flying a gigantic bird as though it is some kind of kite. However for our purposes I will be discussing the use of the wiimote as a sword. First off I would like to define some terms I shall be using. 1. Slice: A straight horizontal or vertical displacement of the wiimote. This movement should be along one single axis such as only the x or z axes. (Refer to Figure 6 for clarification). 2. Jab: the forward thrust of the wiimote, causing displacement along the y axis. Representing each movement as a vector on a three dimensional plan To mathematically represent each motion as a vector on a three dimensional plane, I took measurements of the distance from the Wii sensor bar to where I usually play with the wiimote. (See Figures 4 and 5). Measurements were taken in all 3 directions (x, y, and z). These measurements were then used to define the position the wiimote is usually at during game play. We will call this position, the “origin”. Then distances were taken to measure the distance travelled from the origin so as to illustrate the vectors induced by the change in the position of the wiimote. Figure 3- View of wiimote from multiple angles Infrared camera
  • 4. Hachem 4 Values at the Origin: Distance along x-axis 25.5 cm Distance along y-axis: 273 cm Distance along z-axis 28 cm Figure 4- The wiimote at the Origin Figure5- Measuring the distances in the 3 axes Defining the Coordinate System Figure 6- Conventional coordinate system used in relation to the wiimote The coordinate system is mapped out by the Wii sensor bar in relation to the position of the wiimote as seen in Figure 6. Obtaining the Conditions at the Origin To obtain the x coordinate of the wiimote’s “origin”, first I measure the length of the Wii sensor bar. Then, using a ball of yarn I drew out a perpendicular line from one side of the sensor bar above one of the two clusters of LED lights to the position of the wiimote. Using a ruler I measure the distance from the yarn to the center of the IR camera at the head of the wiimote. The process was repeated with the other side of the sensor bar. The values were then computed according to their location relative to the wiimote. Length of Wii sensor bar= 24 cm Distance from wiimote to LED clusters on positive x axis= 13.5 cm Distance from wiimote to LED clusters on negative x axis= 37.5 cm ar
  • 5. Hachem 5 Calculating the x coordinate of the origin: Method A: 𝑥 = 1 2 (24) + 13.5 𝑥 = 25.5 𝑐𝑚 Method B: 𝑥 = 37.5 − 1 2 (24) 𝑥 = 25.5 𝑐𝑚 To obtain the y coordinate of the wiimote’s standard position I measured the distance from the point on the floor perpendicular to the location of the WiiTM sensor bar to the point on the floor perpendicular to the location of wiimote. y coordinate = 273 cm To obtain the z coordinate of the wiimote’s standard position I first measured the distance from the Wii sensor bar to the floor. I then measured the distance from my waist down. I then subtracted the two values to figure out the vertical distance of the Wii sensor bar relative to the wiimote. Calculating the z coordinate of the origin: Distance from Wii sensor bar to the floor= 131 cm Distance from my waist the floor = 103 cm Distance of Wii sensor bar relative to the Wii mote= 131-103=28 cm. As we are using the coordinate system (x, y, z) the origin lies at (25.5, 273, 28) or, in vector form [ 𝒙 𝒚 𝒛 ] = [ 𝟐𝟓. 𝟓 𝟐𝟕𝟑 𝟐𝟖 ]. This value is assumed to be exact as our concern is the change in the wiimote’s position, hence any arbitrary numbers could have been used to indicate the position that the wiimote generally lies within. The Horizontal Slice: Figure 7- The Horizontal Slice: The horizontal slice can be represented using two different vectors and then simplifying it. Starting at the origin [ 25.5 273 28 ] and moving the wiimote to the right we get a vector of[ 70.5 273 28 ]. Now let’s assign a name to each of these vectors. The vector at the origin will be called 𝑠⃗ and the vector at the new position will be called 𝑎⃗.
  • 6. Hachem 6 Thus: 𝑠⃗ = [ 25.5 273 28 ] and 𝑎⃗ = [ 70.5 273 28 ] Now to find the difference between 𝑎⃗ and 𝑠⃗ we can use the rules of vector by scalar multiplication and vector addition. 𝑎⃗ − 𝑠⃗ = [ 70.5 273 28 ] − [ 25.5 273 28 ] 𝑎⃗ − 𝑠⃗ = [ 70.5 273 28 ] + (−1) [ 25.5 273 28 ] 𝑎⃗ − 𝑠⃗ = [ 70.5 273 28 ] + [ −25.5 −273 −28 ] 𝑎⃗ − 𝑠⃗ = [ 70.5 − 25.5 273 − 273 28 − 28 ] 𝑎⃗ − 𝑠⃗ = [ 45 0 0 ] Set up an equation equal to the difference of the two vectors Exchange the (-) sign for a (+(-1)) Distribute the (-1) throughout the vector Add vectors Simplify As such the resultant vector, is 45 in the x axis, which aligns with the previous definition of the word slice. To visualize this process, I used Photoshop to illustrate a graphical model as seen in Figure 8. Figure 8- Graphical Representation of the Horizontal slice
  • 7. Hachem 7 The Vertical Slice Figure 9-The Vertical Slice: It is important to keep in mind that the vertical slice is actually occurring along the z axis and not the y. We simply repeat the process used when calculating the Horizontal Slice. Where 𝑠⃗ = [ 25.5 273 28 ] and 𝑏⃗⃗ = [ 25.5 273 73 ]. Here we are searching for the difference of 𝑏⃗⃗ − 𝑠⃗. 𝑏⃗⃗ − 𝑠⃗ = [ 25.5 273 73 ] − [ 25.5 273 28 ] 𝑏⃗⃗ − 𝑠⃗ = [ 25.5 − 25.5 273 − 273 73 − 28 ] 𝑏⃗⃗ − 𝑠⃗ = [ 0 0 45 ] As such the resultant vector, is 45 in the z axis, which aligns with the previous definition of the word slice. This process can also be graphically modelled as seen in Figure 10. Figure 10- Graphical Representation of the Vertical slice
  • 8. Hachem 8 The Jab Figure 11- The Jab The jab involves the movement of the wiimote across the y axis and away from the player’s body. Using the same methods used in computing the horizontal and vertical slices, we can calculate the resultant vector of the jab. Where 𝑠⃗ = [ 25.5 273 28 ] and 𝑐⃗ = [ 25.5 244.9 28 ]. Here we are searching for the difference of 𝑐⃗ − 𝑠⃗. 𝑐⃗ − 𝑠⃗ = [ 25.5 244.9 28 ] − [ 25.5 273 28 ] 𝑐⃗ − 𝑠⃗ = [ 25.5 − 25.5 244.9 − 273 28 − 28 ] 𝑐⃗ − 𝑠⃗ = [− 0 28.1 0 ] As such the resultant vector, is -28.1 in the y axis, which aligns with the previous definition of the word jab. The reason why this value is negative is because the distance between the wiimote and Wii sensor bar has decreased. This process can also be graphically modelled as seen in Figure 12. Figure 12- Graphical Representation of the Jab
  • 9. Hachem 9 Graphically Modelling the Motion of the Wiimote All the movements I have modelled thus far are attacks; however there were instances in the game during which one would have to move the sword without performing an attack to progress further. So how does the system differentiate between a motion intended to be an attack and any other motion? To answer this question, I modelled the IR camera in the wiimote as a particle in space, and relating its change in displacement over time, we can determine the wiimote’s velocity at any given instant. From there we can calculate its acceleration. Thus, depending on the rate of change of the position wiimote’s IR camera in space, we can determine the type of command actuated by a system. To model the IR camera as a particle in space, I would simplify its motion to one dimension to enable myself to draw conclusions. The complication is that I have previously dealt with the movement of the wiimote in three-dimensions. How can I model this motion in one dimension? As shown previously, 3 dimensional vectors are comprised of three coordinates; for each of the slices and jab, there has been change in only one of the three coordinates. Thus I only need to detect the change in only one of the coordinates of the vector for this investigation. Therefore regardless which of the axes parallel to the motion I use to model the displacement function, the outcome should be the same. As such I can treat the IR camera of the wiimote as a particle in space. In order to study the rate of change of a particle, I require a graph. To derive a graph I need to measure the position of the wiimote’s IR camera at various points of time. Thus leading me to the question: how will I measure the change in position of the wiimote over time? Obtaining Graphical Values and Defining a Curve: Graphs of two motions varying in speed, the magnitude of velocity which is a vector value, were plotted. The first motion occurred at a considerably great speed, whereas the second occurred at a much slower speed. These differences in speed were great enough for the human eye to detect them. These two motions are defined, and will be referred to as: 1. Attack: Displacement of the wiimote at a considerably great speed. Generally occurring within the time span of half a second. 2. Non-Attack: Displacement of the wiimote at a considerably low speed. The minimum time required for this motion is approximately one second. Table 1- “Attack” Table of Values Time (seconds) Displacement from Origin (cm) t-axis y-axis 0.000 3.4 0.0427 5.1 0.0580 9.4 0.0855 14.7 0.124 23.7 0.138 35.7 0.166 39.8 0.194 42.7 0.210 43.6 Table 2- “Non-Attack” Table of Values Time (seconds) Displacement from Origin (cm) t-axis y-axis 0.00 2.40 1.40 7.40 1.98 13.6 2.08 19.3 2.65 26.1 2.76 30.5 3.37 35.9 5.16 42.6
  • 10. Hachem 10 Graph 1- “Attack” To explain the trends of the graph, we shall refer to the horizontal slice occurring in the x axis Table 3-Trends in Graph 1 “Attack” Region Wiimote Motion Player Motion A Approaches origin from a distance about 4 cm away while decelerating, until instantaneous velocity is 0 cm/s. The distance between the wiimote IR camera and origin is initially decreasing, hence the reflection across the x axis. Player originally has “wound” themselves, bringing the wiimote closer to the center of their body in preparation for the sharp movement to follow. B Moves away from the origin while accelerating. Player has thrust their arm out horizontally at full force. C Point of inflection of the graph, where velocity of the wiimote is at a maximum and will decrease after this point. Player has stopped transferring energy to displace the wiimote and is instead relying on the momentum from their initial thrust as their arm moves farther away from them. D v=0; at the maximum of the graph, where the wiimote has come to an instantaneous halt. Player has deliberately stopped the movement of the wiimote at the maximum distance they can move their arm from their body. E Wiimote is accelerating towards origin. Player is adducting their arm to their body to prepare for the next attack. s(t) = -12174x3 + 4018.8x2 - 117.14x + 3.6719 0 5 10 15 20 25 30 35 40 45 50 0 0.05 0.1 0.15 0.2 0.25 displacement(cm) Time (sec) Attack Motion E A B C D
  • 11. Hachem 11 Graph 2- “Non-Attack” To explain the trends of the graph, we shall refer to the horizontal slice occurring in the x axis Table 4- Trends in Graph 2 “Non-Attack” Region Wiimote Motion Player Motion A Approaches origin while decelerating until instantaneous velocity is 0 cm/s. Player originally has moved the wiimote into a comfortable position enabling them to maximise the length of their arm when they perform the slice in slow motion. This is because the limit that a player can displace the wiimote is about the length of their arm from their body. B Moves away from the origin while accelerating. Player begins to abduct their arm from their body with a controlled speed. C Point of inflection of the graph, where velocity of the wiimote is at a maximum and will decrease after this point. Player is attempting to maintain the initial speed of the wiimote, hence is subconsciously beginning to reduce the speed at which they move the remote. D v=0; at the maximum of the graph, where the wiimote has come to an instantaneous halt. Player has deliberately stopped the movement of the wiimote at the maximum distance they can move their arm from their body. E Returns slightly to the origin. The player has significantly reduced the speed of their arm as their arm is nearly entirely stretched outwards. It now loiters around the same area moving towards their body slightly as they prepare to resume moving their arm outwards, hence the upcoming upwards trend. In summary: the non-attack motion is of a higher order as the player constantly moderates the speed at which they are moving the wiimote. The attack motion is of a lower order as the player is less in control of the action and instead stops only when their arm has moved too far. s(t) = 0.2752t4 - 4.0137t3 + 17.721t2 - 14.599t + 2.4355 -10 0 10 20 30 40 50 60 0 1 2 3 4 5 6 Displacement(cm) Time (s) Non-Attack Motion A B C D E
  • 12. Hachem 12 The following procedure was followed to obtain the graphs for the two varying motions: 1. I video-taped the attack and non-attack motions. A screenshot from one of these videos displaying the set up can be seen in Figure 13. 2. I decreased speed of video to observe and mark position of wiimote at various points in time. 3. I used Photoshop to figure out what the position would be, as seen in Figure 14. 4. I used video editing software, with a timer of the format (hr:min:sec;millisec), to figure out the time for each marker in the slow-motion video. 5. I used the ratio: T(original) T(slow motion) , where T=total time, to calculate the actual time in the original motion. (See calculations below) 6. I graphed using a spreadsheet program, and defined two functions. Table 5- Times in “Slow-Motion” Time Slow-Motion (seconds) Motion T (Original) T (Slow-motion) M1 M2 M3 M4 M5 M6 M7 M8 M9 Attack 0.21 15.25 0.00 3.10 4.21 6.21 9.00 10.05 12.08 14.06 15.25 Non-Attack 5.16 8.01 0.00 2.17 3.07 3.23 4.12 4.29 5.23 8.01 *Where T=total time, and M=marker Calculating the “Original” Time” At M2 in “attack”: t(slow-motion)= 3.10 s, then: T(original) T(slow motion) = 0.21 15.25 T(original) T(slow motion) = t(original) t(slow motion) t(original) 3.10 = 0.21 15.25 t(original) = 0.0427 sec At M2 in “non-attack”: t(slow-motion)= 2.17 s, then: T(original) T(slow motion) = 5.16 8.06 T(original) T(slow motion) = t(original) t(slow motion) t(original) 2.17 = 5.16 8.06 t(original) = 1.40 sec Where t is time and T is total time. This method was then applied to the remainder of the markers used. Deriving Velocity and Acceleration Depending on the rate at which the wiimote’s position changes, a different command will be acknowledged by the Wii system. As the “attack” command is the faster of the two movements, there exists a minimum rate of change required to activate that command. Hence, the “non-attack” command will have a maximum rate of change of position before the command is registered as an “attack” command. To find the minimum of the “attack” function and maximum of the “non-attack” function I took the derivatives of each motion’s respective displacement function. Figure 13- Screen shot of Set Up Figure 14- Determining Displacement
  • 13. Hachem 13 Minimum Speed of Attack Attack: s(t) = -12174t3 + 4018.8t2 - 117.14t + 3.6719 The minimum instantaneous speed achieved during an attack as seen in Graph 1 is: 0 cm/s. Hence the conventional method of searching for minimums by equating the first derivative to 0 and solving will not work. Instead I searched for average velocities over varying intervals of time. This is done by drawing secants between the minimum, maximum, and point of inflection as well as other points as seen in Table 6 below, and then solving for their gradients. To find max/min values: 𝑣(𝑡) = 𝑑𝑠 𝑑𝑡 = 𝑑 𝑑𝑡 − 12174𝑡3 + 4018.8𝑡2 − 117.14𝑡 + 3.6719 𝑣(𝑡) = −36522𝑡2 + 8037.6𝑡 − 117.14 ∵ rate of change at extrema = 0 0 = −36522𝑡2 + 8037.6𝑡 − 117.14 𝑡 = −𝑏±√𝑏2−4𝑎𝑐 2𝑎 𝑡 = −8037.6±√8037.62−4(−36522)(−117.14) 2(−36522) ∴ 𝑡 = 0.0157 or 𝑡 = 0.204 Looking at Graph 1 we see that the minimum occurs at 𝑡 = 0.0157, and the maximum occurs at 𝑡 = 0.204. To find point of inflection: Points of inflection occur when 𝑑2 𝑠 𝑑𝑡2 = 0 𝑎(𝑡) = 𝑑2 𝑠 𝑑𝑡2 = 𝑑𝑣 𝑑𝑡 = 𝑑 𝑑𝑡 − 36522𝑡2 + 8037.6𝑡 − 117.14 = −73044𝑡 + 8037.6 0 = −73044𝑡 + 8037.6 ∴ 𝑡 = 0.11 By substituting all of these values of time into the original function s(t), we can find the displacement at each time. s(𝑡) = −12174𝑡3 + 4018.8𝑡2 − 117.14𝑡 + 3.6719 s(0.0157) = −12174(0.0157)3 + 4018.8(0.0157)2 − 117.14(0.0157) + 3.6719 s(0.0157) = 2.78 cm This process was repeated for the maximum and point of inflection. Solving for Average Velocity: gradientsecant = Δ𝑦 Δ𝑥 , which is in this case: gradientsecant = Δ𝑠 Δ𝑡 gradientsecant = 𝑠(𝑡2)−𝑠(𝑡1) 𝑡2−𝑡1 gradientsecant = 43.67−2.78 0.204−0.0157 ∴ gradientsecant = 217.15 cm/s The same method was applied to calculate all the other secant gradients.
  • 14. Hachem 14 Table 6- Average Velocity of Wiimote during an “Attack” motion While the date provides the variation of average velocities over the course of the attack motion, distinguishing velocities between approximately 120 ≤ 𝑣 ≤ 320 cm/s as the average velocity achieved by an attack motion, it is not conclusive. In order for a minimum velocity to be obtained, multiple trials repeating the attack motion with different speeds should be conducted and their average velocities from the min to the max calculated and compared to find the threshold value of velocity required for the WiiTM to acknowledge the movement as an attack command. Maximum Speed of Non-Attack Non-Attack: s(t) = 0.2752t 4 - 4.0137 t 3 + 17.721 t 2 - 14.599 t + 2.4355 To find the maximum speed that can be achieved by a non-attack without changing the command, the value of the inflecting tangent must be found, for at the point of inflection, the velocity of the wiimote will be at a maximum. To solve for the maximum velocity we must find the second derivative of the non-attack function before setting it equal to zero and then solving. 𝑣(𝑡) = 𝑑𝑠 𝑑𝑡 = 𝑑 𝑑𝑡 0.2752𝑡4 − 4.0137𝑡3 + 17.721𝑡2 − 14.599𝑡 + 2.4355 = 1.1008𝑡3 − 12.0411𝑡2 + 35.44𝑡 − 14.599 𝑎(𝑡) = 𝑑2 𝑠 𝑑𝑡2 = 𝑑𝑣 𝑑𝑡 = 𝑑 𝑑𝑡 1.1008𝑡3 − 12.0411𝑡2 + 35.44𝑡 − 14.599 = 3.3024𝑡2 − 24.0822𝑡 + 35.44 0 = 3.3024𝑡2 − 24.0822𝑡 + 35.44 𝑡 = −𝑏±√𝑏2−4𝑎𝑐 2𝑎 𝑡 = −(−24.0822)±√(−24.0822)2−4(3.3024)(35.44) 2(3.3024) ∴ 𝑡 = 2.043 or 𝑡 = 5.247 Looking at Graph 2, we realize that the inflecting tangent at t=2.043 is steeper at t=5.247. Therefore the maximum velocity that can be achieved by a non-attack is: 𝑣(𝑡) = 1.1008𝑡3 − 12.0411𝑡2 + 35.44𝑡 − 14.599 𝑣(2.043) = 1.1008(2.043)3 − 12.0411(2.043)2 + 35.44(2.043) − 14.599 𝑣(2.043) = 16.31 cm/s Interval (s) Displacement (cm) t1 t2 s(t1) s(t2) Average velocity (cm/s) Region of Graph 0.0157* 0.11** 2.78 23.22 216.76 Around Min– P.O.I 0.025 0.11 3.06 23.22 119.53 0.05 0.11 6.34 23.22 281.33 0.075 0.11 12.36 23.22 310.3 0.11 0.125 23.22 28.05 322 P.O.I- Around Max 0.11 0.15 23.22 34.44 280.5 0.11 0.175 23.22 41.00 273.54 0.11 0.204*** 23.22 43.67 217.55 0.025 0.125 3.06 28.05 249.9 Around Min– Around Max 0.05 0.15 6.34 34.44 281 0.075 0.175 12.36 41.00 286.4 0.0157 0.204 2.78 43.67 217.15 1. Find first derivative *Minimum (Min) **Point of Inflection (P.O.I) ***Maximum (Max) 3. Set second derivative equal to 0 2. Find second derivative 4. Solve
  • 15. Hachem 15 Average Velocity from first local Minimum to local Maximum The method used to calculate the maximum and minimum of the attack motion by equating the first derivative to zero and solving were used to find the local maximum and minimum of the non-attack motion as well. Local Minimum at: (0.49, -0.92) Local Maximum at: (4.76, 42.86) 𝑣average = gradientsecant = Δ𝑠 Δ𝑡 = 𝑠(𝑡2)−𝑠(𝑡1) 𝑡2−𝑡1 = 42.86−(−0.92) 4.76−0.49 ∴ 𝑣average = 10.25 cm/s The velocity value obtained from the first of these calculations is one of the maximum velocities that could be achieved by any player. The second velocity obtained displays the overall average velocity of the completed motion. This data is not conclusive. Multiple trials with the motion occurring at varied speeds need to be tested so as to determine a threshold velocity at which a motion is no longer registered as a non-attack, but an attack. Considering the large gap between the minimum speed required for the “attack” command and the maximum speed allowed for the “non-attack” command, this creates a “gray area” in which either command could be activated depending on whether or not the value leans nearer to the maximum value possible or nearer the minimum value required. This explains why often the avatar on the screen fails to exact the commands input by the users. The gray area as of this exploration is rather large. To reduce the range of values within this gray area and determine the threshold velocity that must be achieved before the motion is recognized as an “attack,” multiple trials with variations in the velocity of wiimote must be conducted. Also, to further our understanding of the function of the wiimote we should also look for the minimum distance that the wiimote must be displaced from the origin before any command is recognized. Furthermore, could there be a maximum velocity that the wiimote can recognize before it ignores the command, as in, if a player were to jerk the wiimote at a high speed, what is the maximum speed with which they can move the wiimote before it fails to recognize the command? This is a complication that has occurred while I played the game a few times, hence it would be worthy of investigation. Conclusion Commands are actuated in The Legend of Zelda Skyward SwordTM when the WiiTM sensor bar detects the movement of the wiimote via the exchange of infrared signals. The type of command depends on two factors, the direction of the change in position and the magnitude of the velocity, or the speed, with which the wiimote changes position. Using vectors, the direction can be calculated, and depending on the direction of the resultant vector a variety of commands, among those are the horizontal and vertical slices as well as the jab, could be actuated by the system. The second factor determines the type of command that would occur in the direction calculated by the vectors. Depending on the speed at which the wiimote changes its position in space there are multiple commands that a player can activate. Generally speeds between 10.25 cm/s to 16.31 cm/s activate a “non-attack” command in The Legend of Zelda Skyward SwordTM, whereas speeds between 120 cm/s and 320 cm/s actuate an “attack command.” The existence of a great difference between them forms a “gray area” in which either command can be registered, thus explaining the technical difficulties a player tends to face during a game.
  • 16. Hachem 16 References . (n.d.). . Retrieved May 8, 2014, from http://www.osculator.net/doc/_media/faq:pry- wiimote.gif | Nintendo - Corporate Information | Company History. (2014, January 1). | Nintendo - Corporate Information | Company History. Retrieved May 17, 2014, from http://www.nintendo.com/corp/history.jsp Nintendo wiimote. (n.d.). . Retrieved May 10, 2014, from http://gk12.cis.ksu.edu/uploads/lesson_material/file/3/wiimote.pdf HowStuffWorks "Wii Controller ". (2010, January 27). HowStuffWorks. Retrieved May 15, 2014, from http://electronics.howstuffworks.com/wii2.htm How the Wiimote Works. (2008, September 24). trinalins Science Blog RSS. Retrieved May 10, 2014, from http://pagefillers.com/scienceblog/?p=36 Rouse, M. (2005, September 1). triangulation. What is ?. Retrieved May 10, 2014, from http://searchnetworking.techtarget.com/definition/triangulation Whitehead, T. (2012, December 24). Round Table: Let's Talk About Festive Gaming. . Retrieved May 18, 2014, from http://images.nintendolife.com/news/2012/12/round_table_time_for_a_festive_chat1/attach ment/8/large.jpg Wiimote: IR Camera. (2012, October 3). . Retrieved May 18, 2014, from http://wiibrew.org/wiki/Wiimote#IR_Camera