# Difference between revisions of "Naming Objects"

m |
|||

(11 intermediate revisions by 6 users not shown) | |||

Line 1: | Line 1: | ||

− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude>{{objects}} |

− | {{objects}} | ||

You can assign a certain name to an object when you create it using the [[Input Bar]]: | You can assign a certain name to an object when you create it using the [[Input Bar]]: | ||

− | * [[Points and Vectors|Points]]: In GeoGebra, points are always named using upper case letters. Just type in the name (e. g. | + | * [[Points and Vectors|Points]]: In GeoGebra, points are always named using upper case letters. Just type in the name (e.g. A, P) and an equal sign in front of the coordinates or commands. |

− | {{example|1=<code>C = (2, 4)</code>, <code> P = (1; 180°)</code>}} | + | :{{example|1=<code>C = (2, 4)</code>, <code> P = (1; 180°)</code>}} |

− | * [[Points and Vectors|Vectors]]: In order to distinguish between points and vectors, vectors need to have a lower case name in GeoGebra. Again, type in the name (e. g. | + | * [[Points and Vectors|Vectors]]: In order to distinguish between points and vectors, vectors need to have a lower case name in GeoGebra. Again, type in the name (e.g. v, u) and an equal sign in front of the coordinates or commands. |

− | {{example|1=<code>v = (1, 3)</code>, <code> u = (3; 90°)</code>}} | + | :{{example|1=<code>v = (1, 3)</code>, <code> u = (3; 90°)</code>}} |

* [[Lines and Axes|Lines]], circles, and [[conic sections]]: These objects can be named by typing in the name and a colon in front of their equations or commands. | * [[Lines and Axes|Lines]], circles, and [[conic sections]]: These objects can be named by typing in the name and a colon in front of their equations or commands. | ||

− | {{example|1=<code>g: y = x + 3</code>, <code>c: (x-1)^2 + (y – 2)^2 = 4</code>, <code>hyp: x^2 – y^2 = 2</code>}} | + | :{{example|1=<code>g: y = x + 3</code>, <code>c: (x-1)^2 + (y – 2)^2 = 4</code>, <code>hyp: x^2 – y^2 = 2</code>}} |

− | * [[Functions]]: You can name functions by typing, for example, <code>f(x) =</code> or <code>g(x)=</code> in front of the function’s equation or commands. | + | * [[Functions]]: You can name functions by typing, for example, <code>f(x) =</code> or <code>g(x) =</code> in front of the function’s equation or commands. |

− | {{example|1=<code>h(x) = 2 x + 4</code>, <code>q(x) = x^2, trig(x) = sin(x)</code>}} | + | :{{example|1=<code>h(x) = 2 x + 4</code>, <code>q(x) = x^2, trig(x) = sin(x)</code>}} |

− | {{ | + | :{{notes|1= |

− | * If you don’t manually assign a name to an object, GeoGebra assigns the names of new objects in alphabetical order. | + | :* If you don’t manually assign a name to an object, GeoGebra assigns the names of new objects in alphabetical order. |

− | * You can create indices within the names of objects by using an underscore. For example A<sub>1</sub> is entered as <code>A_1</code> and s<sub>AB</sub> is entered as <code>s_{AB}</code>. }} | + | :* You can create indices within the names of objects by using an underscore. For example A<sub>1</sub> is entered as <code>A_1</code> and s<sub>AB</sub> is entered as <code>s_{AB}</code> into the ''Input Bar''. }} |

+ | |||

==Reserved labels== | ==Reserved labels== | ||

− | + | These are the labels you can't use for objects: x, y, z, xAxis, yAxis, zAxis, abs, | |

+ | sgn, sqrt, exp, log, ln, ld, lg, cos, sin, tan, | ||

+ | acos, arcos, arccos, asin, arcsin, atan, arctan, | ||

+ | cosh, sinh, tanh, acosh, arcosh, arccosh, asinh, | ||

+ | arcsinh, atanh, arctanh, atan2, erf, | ||

+ | floor, ceil, round, random, conjugate, arg, | ||

+ | gamma, gammaRegularized, beta, betaRegularized, | ||

+ | sec, csc, cosec, cot, sech, csch, coth | ||

+ | |||

+ | In the symbol list of the ''Input Bar'', you will find special characters for the following constants: | ||

+ | * π - the circle constant pi, which you can also type with {{KeyCode|Alt+p}} | ||

+ | * ℯ - the Euler number, e.g. for the exponential function ℯ^x, which you can also type with {{KeyCode|Alt+e}} | ||

+ | * ί - the imaginary unit, e.g. for complex numbers like z = 3 + ί, which you can also type with {{KeyCode|Alt+i}} | ||

+ | When the variable names e and i are not used yet, they are automatically read as ℯ and ί respectively for convenience. | ||

+ | |||

+ | ==Renaming objects== | ||

+ | The easiest way to change the name of an existing object is to select it, then start typing its new name. | ||

− | + | You can also rename an object by then selecting the [[File:Menu-edit-rename.svg|link=|18px]] ''Rename'' option in the [[Context Menu]] of the object or opening the [[File:Menu-options.svg|link=|16px]] [[Properties Dialog]] window of the object and typing the new name in the ''Name'' box of the ''Basic'' tab. | |

+ | {{notes|1= | ||

+ | :*Dependencies are usually automatically resolved: this means that the name of the object is also changed in its definition. Scripting involving objects that were assigned a new name need to be changed manually. | ||

+ | :*If you assign to an object a name that is already in use by another object, the name of this last object will be changed, e.g. if you change the name of point ''B'' to ''A'' and a point ''A'' already exists, the former point ''A'' gets the new name ''A<sub>1</sub>''.}} | ||

See also [[Labels and Captions]]. | See also [[Labels and Captions]]. |

## Latest revision as of 16:14, 30 October 2015

You can assign a certain name to an object when you create it using the Input Bar:

- Points: In GeoGebra, points are always named using upper case letters. Just type in the name (e.g. A, P) and an equal sign in front of the coordinates or commands.

**Example:**`C = (2, 4)`

,`P = (1; 180°)`

- Vectors: In order to distinguish between points and vectors, vectors need to have a lower case name in GeoGebra. Again, type in the name (e.g. v, u) and an equal sign in front of the coordinates or commands.

**Example:**`v = (1, 3)`

,`u = (3; 90°)`

- Lines, circles, and conic sections: These objects can be named by typing in the name and a colon in front of their equations or commands.

**Example:**`g: y = x + 3`

,`c: (x-1)^2 + (y – 2)^2 = 4`

,`hyp: x^2 – y^2 = 2`

- Functions: You can name functions by typing, for example,
`f(x) =`

or`g(x) =`

in front of the function’s equation or commands.

**Example:**`h(x) = 2 x + 4`

,`q(x) = x^2, trig(x) = sin(x)`

**Notes:**- If you don’t manually assign a name to an object, GeoGebra assigns the names of new objects in alphabetical order.
- You can create indices within the names of objects by using an underscore. For example A
_{1}is entered as`A_1`

and s_{AB}is entered as`s_{AB}`

into the*Input Bar*.

## Reserved labels

These are the labels you can't use for objects: x, y, z, xAxis, yAxis, zAxis, abs, sgn, sqrt, exp, log, ln, ld, lg, cos, sin, tan, acos, arcos, arccos, asin, arcsin, atan, arctan, cosh, sinh, tanh, acosh, arcosh, arccosh, asinh, arcsinh, atanh, arctanh, atan2, erf, floor, ceil, round, random, conjugate, arg, gamma, gammaRegularized, beta, betaRegularized, sec, csc, cosec, cot, sech, csch, coth

In the symbol list of the *Input Bar*, you will find special characters for the following constants:

- π - the circle constant pi, which you can also type with Alt + p
- ℯ - the Euler number, e.g. for the exponential function ℯ^x, which you can also type with Alt + e
- ί - the imaginary unit, e.g. for complex numbers like z = 3 + ί, which you can also type with Alt + i

When the variable names e and i are not used yet, they are automatically read as ℯ and ί respectively for convenience.

## Renaming objects

The easiest way to change the name of an existing object is to select it, then start typing its new name.

You can also rename an object by then selecting the *Rename* option in the Context Menu of the object or opening the Properties Dialog window of the object and typing the new name in the *Name* box of the *Basic* tab.

**Notes:**

- Dependencies are usually automatically resolved: this means that the name of the object is also changed in its definition. Scripting involving objects that were assigned a new name need to be changed manually.
- If you assign to an object a name that is already in use by another object, the name of this last object will be changed, e.g. if you change the name of point
*B*to*A*and a point*A*already exists, the former point*A*gets the new name*A*._{1}

See also Labels and Captions.