# GraphMe

# User's guide

1. Introduction
2. Installation
3. Review widget
4. View presentation
5. Drawing the function
6. Offset function
7. The options menu
8. the tools menu
9. Drawing some functions
10. GraphMe update
11. Contact

## 1. Introduction

GraphMe is a app that is developed using html, javascript and css. It can be used for drawing graphs. This document must explain how to use GraphMe. This app have a different functions and some useful advices for users.

## 2. Installation

This widget can be downloaded from the Internet in a packed format. Before using it must be unpacked. GraphMe was developed for using in web-browsers and integration in Sankore. To add this app in Sankore you should copy folder named "GraphMe.wgt" in "../library/interactive/". For example, on "windows OS" GraphMe must be in folder with following path: "C: / Program Files / Sankore 4/library/interactive/GraphMe.wgt". If you have no Sankore then you can get it on http://getuniboard.com/.

## 3. Review widget

Display GraphMe in browsers

A) To display this app in browser just enough to open the file named "Grapheur.xhtml" (it's in root folder) with your browser. But some browsers can not display app correctly. Below is the list of browsers that are able to display app:

- Mozilla Firefox (3.5) : Everything works fine.
- Internet Explorer (8.0) : Cannot open a widget, because .xhtml format is not recognized.
- Internet Explorer (pré-version 9.0) : Widget works but just using SVG. Canvas not supported yet.
- Konqueror (4.3.4) : Widget can be opened but there is some problems with displaying. It still occur when choosed display method "canvas".
- Opera (10.51) : Widget quite useful.
- Google Chrome (4.1) : Everything works very nice! 3D-display is faster as compared with other browsers.

B) To open widget in Sankore you should first open folder "Application" that is at the left of the screen. Then you must find this app and add it to the page.

Display GraphMe in Sankore

## 4. View presentation

1. Place for functions display.
2. Button for beginning the work.
3. Button for adding new function or for getting access to functions history.
4. Display.
5. Parameters that define the part of graph that will be displayed.
6. Buttons for zoom.
7. Button for color changing.
8. Buttons for access to menu.
9. Tab-button that toggles 2D and 3D modes.
10. Button for maximize the widget.

## 5. Drawing the function

To draw mathematical function just enter it at the top of widget and press button "Display". You can use different functions and predefined constants.

#### Basic operations:

- Addition → +
- Subtraction → -
- Multiplication → *
- Division → /
- Mod → %

#### Trigonometric functions

- sin(x), cos(x), tan(x), cot(x)
- asin(x), acos(x), atan(x), acot(x) ( ou arcsin(x), arccos(x), arctan(x), arccot(x) )

#### Square roots and degrees

- sqrt(x) is square root from x
- pow(x, y). Variable x to the power y. For examle:
  x² → pow(x, 2)
  (x+3)⁵ → pow((x+3), 5)
- root(x, y). Root y of x

#### Exponential and logarithm

- exp(x)
- ln(x) is natural logarithm.
- log(x) is decimal logarithm.

#### Rounding

- round(x) → rounding to the nearest whole number
- ceil(x) → rounding to the nearest whole number in a big way
- floor(x) → rounding to the nearest whole number the smaller side

#### Other predefined function

- abs(x) → Absolute number value
- random() → Return random number between 0 and 1

#### Also are available some constants:

- pi = 4 * atan(1) ≈ 3.141592653589793
- e = exp(1) ≈ 2.718281828459045

Not always it's easy to understand how to record a required function. Really if anywhere you err then graph will not displayed. Also do not forget about "*" (multiply) to multiply and "." (decimal point) to write point.

The two-dimensional function must be written as y=[...] and the three-dimensional function nust be written as z=[...]. Other examples are available to use in menu "Help" if you have some difficulties with function definition.

## 6. Offset function

Sometimes when you draw the function you don't see all necessary information about this function. In this case you can change position of graph.

To move the function graph just use a navigation arrows that are in the four edges of the display or mouse move tool (menu Service).

To define place to display you should enter a custom values in the left side of the widget. The left value must be less than the right value. In other case graph will not displayed.

You can increase or decrease the scale of displaying using buttons that are in the left menu. So you'll see more information about function. Zoom can be reset in options.

## 7. The options menu

To open the menu you should click a button "Options" that is in the left of the widget. If you click on this button again then menu will close. There are some buttons for navigation between options. Their short description:

- Changing a background image and color. In Sankore changing background theme used for displaying widget on black and white background.
- Display-method used for defining displaying function. There are 6 possibilities:
  1. SVG is a vector format of image and it can be built in HTML-page. It's compatible in most of browsers and Sankore support it very well so is it selected default.
  2. There is a big difference between SVG (image) and display method SVG. If you have a compatibility problems then you should not use this method.
  3. "Canvas" is a new tag that used in HTML 5.0. It define a area in which you can place some images. This display-method is faster than SVG-method, but Sankore does not fully support it. It's desirable to choose this method when you use no Sankore widget.
  4. "Canvas" (point) also uses a canvas but draws a points instead of lines.
  5. XPM format is little known so it's compatible just with a minority of browsers.
  6. Display method "Uniboard" allows to draw directly on the page using Sankore drawing.
- Default zoom button returns display into original state. It helps alsoto return to the origin.
- Display options allow to display or not a grid, axis and scale. They make a mapping more readable. Also you can change the thickness of function line.
- Offset of graph not used usually. But if you use it then you can move a mapping in any direction when a center isn't in the right place. It's avaliable in some browsers.
- The accuracy of calculations of the graph will increase or decrease the number of points calculated. The higher the number, the more accuracy. It is useful to set this value to "0.01" if you draw functions like 0.5 * sin (10 * x * x).
- Options in 3D, the display style to choose how the function is designed: with small points or polygons (areas). Most functions are prettier drawing surface between the points calculated. However, it is better to draw points for functions such as the hemisphere: sqrt (12 - x*x - y*y).
- In the last tab you can change such options 3D, as the accuracy of the calculations and the color of the function.

## 8. The tools menu.

This menu allows you to choose first action of the mouse on the graph. There is a choice of three options:

- The selected tool is the default. By moving the mouse, a point moves on the function and the coordinates of this point are shown in the top left of the display.
- The second tool is moving. It allows you to move the chart with the mouse. Just keep clicking on the display and move the mouse. Unfortunately, this tool can be slow on some browsers.
- The third tool is the tangent. This tool draws the tangent to the function at the point where is a mouse cursor.

Then, this menu also allows to calculate a point of the function. Simply enter the coordinate "x" from the point where we want to find the coordinate "y" and press the "Evaluate". For example, if the function is "x * x" and that defined "x = 2", then the point whose coordinate on the X axis is "2" will be to coordinate on the Y axis "4".

Another useful tool is the analysis of function. To analyse the function click on "start the analysis". Analyses based on this widget are not 100% reliable, but are complementary to a analysis of function that you are doing yourself. It may be that this tool will be improved in a future version of the widget.

In this menu there are also tests the display. They can try different methods to display and see if they work on the browser used.

## 9. Drawing some functions

To draw multiple functions simultaneously, click the small "+" button which is located to the right of "View" (point 1). Then, a menu appears.

The tabs in this menu can go to the history or the additional features (point 2). To add a function click the button to the right of the current function (point 3). Below is a list that contains all the displayed functions (point 4). To remove a function, just click on the "-" button next to it. It is also possible to change the color of each function separately.

History can review all the functions that have already been drawn. When you click on a function of history current function replaced by the function of history.

"Drawing several functions simultaneously" mode is only possible with the display method "canvas" in two dimensions, but the history can be used with all methods of display.

## 10. GraphMe update

The latest version of the widget can be downloaded from the following page: http://gyb.educanet2.ch/tm-widgets/.ws_gen/?15. To update GraphMe, you can also click on "Update" in the options menu.

## 11. Contact

If you want to report a bug, have a suggestion from the widget or just want to ask a question, please contact me by e-mail at: yannick.vessaz@gmail.com.