GeoGebra and Joystick Dr Đor đ e Herceg, Dr Dragoslav Herceg Faculty of Sciences University of...
-
Upload
harvey-williams -
Category
Documents
-
view
232 -
download
9
Transcript of GeoGebra and Joystick Dr Đor đ e Herceg, Dr Dragoslav Herceg Faculty of Sciences University of...
1
GeoGebra and Joystick
Dr Đorđe Herceg, Dr Dragoslav HercegFaculty of SciencesUniversity of Novi [email protected]
2
GeoGebra in Novi SadFaculty of Sciences, University of
Novi SadBesides regular work, members
of our faculty also teach in elementary and high schools
Many of our graduates work as matematics teachers in schools
We organize courses and meet our colleagues from schools
We use and recommend GeoGebra!
4
How we use GeoGebraGeoGebra is great for preparing
teaching and self-study materials.It is free, easy to download and
install and it speaks our language.We have developed tools for
numerical mathematicsAlso accompanying materials for
textbooksWe often find it easier to “sketch”
an explanation in GeoGebra, than on paper!
5
What we would like to doLearning through playWe want to motivate children to learn
while playing mathematical games (more on that later)
We also want to provide a more direct way of manipulating geometrical drawings
Especially important with younger children that cannot grasp abstract notions
6
The problem we address
Once prepared, interactive drawings need user input, which is provided by typing commands, moving sliders and clicking checkboxes.
7
One parameter at a timeWe can only control one
parameter at a time with the mouse
Sliders and checkboxes on the screen are just imitations of the “real thing”
Precise “aiming” at sliders and checkboxes can be problematic, particularly during talks and demonstrations
10
Joysticks and GamepadsThey can have up to 6 axesMany buttons (typically 6-12)POV hatsAll of these can be used
simultaneously!
Gamepad
11
Why use game controllers?
Benefits:◦Control many parameters
simultaneously◦Inexpensive◦Ubiquitous◦Intuitive – “I push here and that thing
moves”◦Designed to be used without looking
(tactile feedback)◦Interesting for the kids
12
Drawbacks?Not very preciseNot everybody has oneSupport for game controllers on
various platforms and operating systems is not standardized
There exist several SDKs for game controllers:◦DirectX (Windows, unmanaged code)◦SlimDX (Windows+.NET)◦JXInput (Java+JNI)◦...
13
GameControllerInput (GCI)Developed in C# on .NETUses the SlimDX library to access
DirectInput/DirectX compatible game controllers
Hosts GeoGebra applets inside a WebBrowser component
Extendable – easy to add new mappers
14
GeoGebra applet methodsIn version 3.2, GeoGebra
JavaScript interface provides many useful methods which provide full control over the drawings.
Our program acts as a “shell” around the GeoGebra applet, which interprets input given by a game controller and maps it to parameters and object properties in a drawing.
15
Axis mappingRaw data obtained from a
joystick axis is in range [0,65535]It can be mapped linearly to any
given interval [a, b]However, game controllers are
not precision devices. “Dead zone” must be set appropriately.
Should the joystick axis map directly to a variable, or should it control the amount of change?
17
Button mappingEach button can be mapped to a
command, such as:◦Set a value of a variable◦Change a value of a variable (+/-)◦Control visibility of objects◦Control trace of objects◦Refresh display◦Generate random numbers◦etc...
18
How it works
Game controller
AxisMapperButtonMapp
erJavaScript GeoGebra
Input from a game controller is passed to various mappers
Mappers call JavaScript methodsJavaScript methods call methods of an
embedded GeoGebra applet
19
ConfigurationUpon application start, the user
assigns various mappers to game controller’s axes and buttons.
A configuration is a set of all mappings for a game controller.
Configurations can be saved and loaded from files.
23
ConclusionsChildren like to experiment, especially
with something they can touchThanks to a growing list of GeoGebra
applet methods, it is now possible to have almost complete control of GeoGebra from the outside
When interpreted appropriately, input from gamepads and joysticks can be used to control drawings in GeoGebra
So we can provide a more intuitive and less artificial way of interaction with drawings