### Top Command Examples Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Top.adoc Demonstrates the usage of the Top command with different quadric types. Use `Top(cylinder)` to get a circle and `Top(cone)` to get the cone's apex. ```geogebra Top( cylinder ) ``` ```geogebra Top( cone ) ``` -------------------------------- ### Classes Command with Start and Width Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Classes.adoc Use this syntax when you need to define the starting point and the width of each class interval. The output will be a list of class boundaries. ```geogebra Classes({0.1, 0.2, 0.4, 1.1}, 0, 1) ``` -------------------------------- ### Ends Command Examples Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Ends.adoc Demonstrates the usage of the Ends command with different quadric types. Use `Ends(cylinder)` to get two circles and `Ends(cone)` to get a circle and the cone's apex. ```plaintext Ends( cylinder ) ``` ```plaintext Ends( cone ) ``` -------------------------------- ### Example Usage Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Point.adoc Demonstrates how to use the Point command with a list of coordinates. ```APIDOC ## Example `++ Point({1, 2})++` yields _(1, 2)_. ``` -------------------------------- ### NSolve Equation with Starting Value Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolve.adoc Finds the numerical list of solutions for an equation with respect to a variable, using a specified starting value. This helps guide the numerical algorithm. ```geogebra NSolve(cos(x) = x, x = 0) ``` ```geogebra NSolve(a^4 + 34a^3 = 34, a = 3) ``` -------------------------------- ### NSolutions(, ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolutions.adoc Finds numerically the list of solutions to the given equation for the given unknown variable with its starting value. ```APIDOC ## NSolutions(, ) ### Description Finds numerically the list of solutions to the given equation for the given unknown variable with its starting value. ### Example * `++NSolutions(cos(x) = x, x = 0)++` yields _{0.74}_ * `++NSolutions(a^4 + 34a^3 = 34, a = 3)++` yields the list _{0.99}_. ``` -------------------------------- ### NSolutions with Equation, Variable, and Starting Value Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolutions.adoc Finds a list of numerical solutions to an equation for a given variable, using a specified starting value. This helps guide the numerical algorithm. ```GeoGebra CAS NSolutions(cos(x) = x, x = 0) ``` ```GeoGebra CAS NSolutions(a^4 + 34a^3 = 34, a = 3) ``` -------------------------------- ### Take(List, Start Position) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Returns a list containing elements from the specified start position to the end of the original list. ```APIDOC ## Take(List, Start Position) ### Description Returns a list containing the elements from _Start Position_ to the end of the initial list. ### Parameters #### Path Parameters - **List** (List) - Required - The input list. - **Start Position** (Number) - Required - The starting index (1-based). ### Request Example ``` Take({2, 4, 3, 7, 4}, 3) ``` ### Response #### Success Response - **Result** (List) - A new list containing the extracted elements. ### Response Example ``` {3, 7, 4} ``` ``` -------------------------------- ### NSolve(, ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolve.adoc Finds numerically the list of solutions to the given equation for the given unknown variable with its starting value. ```APIDOC ## NSolve(, ) ### Description Finds numerically the list of solutions to the given equation for the given unknown variable with its starting value. ### Examples * `NSolve(cos(x) = x, x = 0)` yields: `x = 0.74` * `NSolve(a^4 + 34a^3 = 34, a = 3)` yields: `a = 0.99` ``` -------------------------------- ### Example: AttachCopyToView with View 1 Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/AttachCopyToView.adoc Demonstrates creating a square with the same size and position in Graphics View 1 using AttachCopyToView. ```plaintext poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1)) AttachCopyToView(poly, 1) ``` -------------------------------- ### CompleteSquare Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/CompleteSquare.adoc Use CompleteSquare to convert a quadratic function to vertex form. This example shows the standard output. ```geogebra CompleteSquare(x^2 - 4x + 7) ``` -------------------------------- ### Drawing a Square with Turtle Source: https://github.com/geogebra/manual/blob/main/nl/modules/ROOT/pages/commands/Turtle.adoc This example demonstrates how to use Turtle commands to draw a square. After executing these commands, clicking the 'Play' button will animate the turtle drawing the shape and returning to its starting position. ```GeoGebra Commands TurtleVooruit(schildpad1, 3) ``` ```GeoGebra Commands TurtleLinks(schildpad1, 90°) ``` ```GeoGebra Commands TurtleVooruit(schildpad1, 3) ``` ```GeoGebra Commands TurtleLinks(schildpad1, 90°) ``` ```GeoGebra Commands TurtleVooruit(schildpad1, 3) ``` ```GeoGebra Commands TurtleLinks(schildpad1, 90°) ``` ```GeoGebra Commands TurtleVooruit(schildpad1, 3) ``` ```GeoGebra Commands TurtleLinks(schildpad1, 90°) ``` -------------------------------- ### Take(Text, Start Position) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Returns a text containing characters from the specified start position to the end of the original text. ```APIDOC ## Take(Text, Start Position) ### Description Returns a text containing the elements from _Start Position_ to the end of the initial text. ### Parameters #### Path Parameters - **Text** (Text) - Required - The input text. - **Start Position** (Number) - Required - The starting index (1-based). ### Request Example ``` Take("GeoGebra", 3) ``` ### Response #### Success Response - **Result** (Text) - A new text containing the extracted characters. ### Response Example ``` oGebra ``` ``` -------------------------------- ### Take(List, Start Position, End Position) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Returns a list containing elements from the specified start position to the end position of the original list. ```APIDOC ## Take(List, Start Position, End Position) ### Description Returns a list containing the elements from _Start Position_ to _End Position_ of the initial list. ### Parameters #### Path Parameters - **List** (List) - Required - The input list. - **Start Position** (Number) - Required - The starting index (1-based). - **End Position** (Number) - Required - The ending index (1-based). ### Request Example ``` Take({2, 4, 3, 7, 4}, 3, 4) ``` ### Response #### Success Response - **Result** (List) - A new list containing the extracted elements. ### Response Example ``` {3, 7} ``` ``` -------------------------------- ### Shuffle List Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Shuffle.adoc Demonstrates shuffling a list of numbers. The output will be a new list with the same elements in a random order. ```cas Shuffle({3, 5, 1, 7, 3}) ``` -------------------------------- ### FitPow Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/FitPow.adoc Use FitPow with a list of points to create a regression curve. All points must be in the first quadrant. ```plaintext FitPow({(1, 1), (3, 2), (7, 4)}) ``` -------------------------------- ### StartAnimation(Point or Slider, ...) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/StartAnimation.adoc Starts animating specified points and sliders. ```APIDOC ## StartAnimation(Point or Slider, ...) ### Description Starts animating given points and sliders. The points must be on paths. ### Method APICall ### Endpoint StartAnimation(Point or Slider, Point or Slider, ....) ``` -------------------------------- ### Unique Command Examples Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Unique.adoc Demonstrates the usage of the Unique command with lists of numbers and text. Repetitive elements are included only once in the output. ```GeoGebra Unique({1, 2, 4, 1, 4}) ``` ```GeoGebra Unique({"a", "b", "Hello", "Hello"}) ``` -------------------------------- ### Repeat Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Repeat.adoc Repeats the specified scripting commands a given number of times. This example draws a regular octagon by repeating forward and right turns. ```GeoGebra Scripting Repeat(8, TurtleForward(turtle1, 1), TurtleRight(turtle1, 45°)) ``` -------------------------------- ### Example: Basic indefinite integral Source: https://github.com/geogebra/manual/blob/main/fr/modules/ROOT/pages/commands/Intégrale.adoc Calculates the indefinite integral of x^3, returning 0.25x^4. ```geogebra Intégrale(x^3) ``` -------------------------------- ### NSolutions() Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolutions.adoc Attempts to numerically find a solution for the equation for the main variable. For non-polynomials, a starting value should ideally be specified. ```APIDOC ## NSolutions() ### Description Attempts (numerically) to find a solution for the equation for the main variable. For non-polynomials you should always specify a starting value. ### Example `++NSolutions(x^6 - 2x + 1 = 0)++` yields _{0.51, 1}_ or _{0.508660391642, 1}_. ``` -------------------------------- ### Dropdown List Creation and Display Source: https://github.com/geogebra/manual/blob/main/fr/modules/ROOT/pages/Objets_InterAction.adoc This example demonstrates how to create a dropdown list with three functions. It first defines the list 'L' and then shows how to retrieve the selected element using ElémentSélectionné. The list must be created and then configured as a dropdown list through its properties. ```GeoGebra Script L={x+1, x^2,sqrt(x)} ``` ```GeoGebra Script ElémentSélectionné(L) ``` -------------------------------- ### Get Column Index of a Cell Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Column.adoc Use the Column command to find the column number of a specified cell. Column numbering starts at 1. ```geogebra q = Column(B3) ``` -------------------------------- ### Zip Command Example with Points Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Zip.adoc Demonstrates using the Zip command with points as variables and lists of points. The resulting list contains midpoints of segments formed by corresponding elements from the input lists. ```GeoGebra Zip(Midpoint(A, B), A, {P, Q}, B, {R, S}) ``` -------------------------------- ### Get Row Number of Spreadsheet Cell Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Row.adoc Use the Row command to retrieve the row number of a spreadsheet cell. Row numbers start at 1. ```geogebra r = Row(B3) ``` -------------------------------- ### Example: AttachCopyToView with Transformation Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/AttachCopyToView.adoc Illustrates creating a transformed copy of a square in Graphics View 1, with its size determined by screen coordinate mapping. ```plaintext poly = Polygon((0, 0), (1, 0), (1, 1), (0, 1)) AttachCopyToView(poly, 1, (0, 0), (1, 1), (0, 0), (100, 100)) ``` -------------------------------- ### Fit with General Functions Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Fit.adoc This example demonstrates fitting points to a general form of functions, including constants, linear terms, and exponential terms. The command calculates coefficients for each function in the list to achieve the best fit. ```geogebra Fit(L, {f, g, h}) ``` -------------------------------- ### Get First Element of a List Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/First.adoc Use this command to retrieve the first element from a given list. For example, `First({1, 4, 3})` returns `1`. ```GeoGebra First({1, 4, 3}) ``` -------------------------------- ### Sample(List, Size, With Replacement) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sample.adoc Returns a list of n randomly chosen elements from the input list. Elements can be chosen multiple times if the 'With Replacement' parameter is true. ```APIDOC ## Sample(List, Size, With Replacement) ### Description Returns a list of n randomly chosen elements from the input list. Elements can be chosen multiple times if and only if the last parameter is true. ### Parameters #### Path Parameters - **List** (List) - Required - The input list from which to choose elements. - **Size** (Number) - Required - The number of elements to choose. - **With Replacement** (Boolean) - Required - If true, elements can be chosen multiple times. ### Request Example `++Sample({1, 2, 3, 4, 5}, 5, true)++` ### Response #### Success Response (200) - **list** (List) - A list containing the randomly chosen elements. ``` -------------------------------- ### Get First Character of a Text Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/First.adoc Retrieves the initial character of a given text string. For example, `First("Hello")` returns `"H"`. ```GeoGebra First("Hello") ``` -------------------------------- ### Zip Command Example with Functions Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Zip.adoc Demonstrates using the Zip command where variables represent functions. The function 'f' is applied to values derived from the provided list, resulting in a list of function outputs. ```GeoGebra Zip(f(2), f, {x+1,x+3}) ``` -------------------------------- ### Create Sequence with Start and End Values Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sequence.adoc Creates a list of integers from a start value to an end value. The list can be increasing or decreasing. For example, Sequence(7,13) generates {7, 8, 9, 10, 11, 12, 13}, and Sequence(18,14) generates {18, 17, 16, 15, 14}. ```geogebra Sequence(7,13) ``` ```geogebra Sequence(18,14) ``` ```geogebra Sequence(-5, 5) ``` -------------------------------- ### FitGrowth Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/FitGrowth.adoc Use FitGrowth with a list of points to calculate a function of the form a * b^x. The result is displayed as a numerical approximation. ```geogebra FitGrowth({(0, 1), (2, 3), (4, 3), (6, 4)}) ``` -------------------------------- ### Extract Right Side of Equation Source: https://github.com/geogebra/manual/blob/main/de/modules/ROOT/pages/commands/RechteSeite.adoc Use this command to get the right-hand side of a simplified equation. For example, in 'x + 2 = 3x + 1', the right side is '3x + 1'. ```plaintext RechteSeite[x + 2 = 3x + 1] ``` -------------------------------- ### Create Sequence with Increment Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sequence.adoc Creates a list of integers from a start value to an end value using a specified increment. For example, Sequence(7,13,2) generates {7, 9, 11, 13}. ```geogebra Sequence(7,13,2) ``` ```geogebra Sequence(7,13,4) ``` -------------------------------- ### Take Source: https://github.com/geogebra/manual/blob/main/ja/modules/ROOT/pages/commands/CASコマンド.adoc Returns the first k elements of a list or sequence. ```APIDOC ## Take ### Description Returns the first k elements of a list or sequence. ### Syntax `Take(list, k)` or `Take(sequence, k)` ### Parameters * `list` (list) - The input list. * `sequence` (sequence) - The input sequence. * `k` (integer) - The number of elements to take. ### Returns A new list containing the first k elements. ``` -------------------------------- ### Create Position Vector from Point Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Vector.adoc Use Vector() to get the position vector of a given point. For example, Vector((3, 2)) creates a vector from the origin to the point (3, 2). ```geogebra Vector((3, 2)) ``` -------------------------------- ### Get First N Characters of a Text Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/First.adoc This command extracts the first specified number of characters from a text string. For example, `First("Hello", 2)` returns `"He"`. ```GeoGebra First("Hello",2) ``` -------------------------------- ### CAS Assume Command Examples Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Assume.adoc Demonstrates various uses of the Assume command with different conditions and expressions, including integration, solving equations, and simplification. ```cas Assume(a > 0, Integral(exp(-a x), 0, infinity)) ``` ```cas Assume(x>0 && n>0, Solve(log(n^2*(x/n)^lg(x))=log(x^2), x)) ``` ```cas Assume(x<2,Simplify(sqrt(x-2sqrt(x-1)))) ``` ```cas Assume(x>2,Simplify(sqrt(x-2sqrt(x-1)))) ``` ```cas Assume(k>0, Extremum(k*3*x^2/4-2*x/2)) ``` ```cas Assume(k>0, InflectionPoint(0.25 k x^3 - 0.5x^2 + k)) ``` -------------------------------- ### Sample Command with Replacement Option Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sample.adoc Returns a list of n randomly chosen elements from a given list. The 'with replacement' parameter determines if elements can be chosen multiple times. ```GeoGebra Sample({1, 2, 3, 4, 5}, 5, true) ``` -------------------------------- ### Create Cell Range List Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/CellRange.adoc Use CellRange to create a list of values from a specified start cell to an end cell in the spreadsheet. For example, CellRange(A1, A3) returns the values from cells A1, A2, and A3. ```GeoGebra CellRange(A1, A3) ``` -------------------------------- ### Sample Command with Mixed Data Types Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sample.adoc Demonstrates the Sample command's ability to handle lists containing mixed data types, including numbers, strings, and other lists. ```GeoGebra Sample({-5, 2, a, 7, c}, 3) ``` ```GeoGebra Sample({List1, 4, 5, 6, 7, 8}, 3, false) ``` -------------------------------- ### Create Sequence from Expression with Index Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sequence.adoc Generates a list of objects using an expression and an index variable that ranges from a start value to an end value. For example, Sequence((2, k), k, 1, 5) creates points with y-coordinates from 1 to 5. ```geogebra Sequence((2, k), k, 1, 5) ``` ```geogebra Sequence(x^k, k, 1, 10) ``` -------------------------------- ### Create Sequence from Expression with Index and Increment Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sequence.adoc Generates a list of objects using an expression and an index variable that ranges from a start value to an end value with a specified increment. For example, Sequence((2, k), k, 1, 3, 0.5) creates points with y-coordinates from 1 to 3, incrementing by 0.5. ```geogebra Sequence((2, k), k, 1, 3, 0.5) ``` ```geogebra Sequence(x^k, k, 1, 10, 2) ``` -------------------------------- ### Solve a System of Four ODEs with Symbolic Initial Conditions Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolveODE.adoc This example demonstrates solving a system of four ODEs where initial conditions are defined symbolically before being passed to NSolveODE. ```GeoGebra x1'(t, x1, x2, x3, x4) = x2 x2'(t, x1, x2, x3, x4) = x3 x3'(t, x1, x2, x3, x4) = x4 x4'(t, x1, x2, x3, x4) = -8x1 + sin(t) x2 - 3x3 + t^2 x10 = -0.4 x20 = -0.3 x30 = 1.8 x40 = -1.5 NSolveODE({x1', x2', x3', x4'}, 0, {x10, x20, x30, x40}, 20) ``` -------------------------------- ### IndexOf: Find Object in List with Start Index Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/IndexOf.adoc Searches for an object in a list starting from a specified index. The search is inclusive of the start index. ```geogebra IndexOf(5, {1, 3, 5, 2, 5, 4}, 3) ``` ```geogebra IndexOf(5, {1, 3, 5, 2, 5, 4}, 4) ``` ```geogebra IndexOf(5, {1, 3, 5, 2, 5, 4}, 6) ``` -------------------------------- ### Parametric Line Syntax Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Line.adoc Demonstrates the parametric syntax for creating lines in 2D and 3D space. ```APIDOC ## Parametric Line Syntax ### Description You can also use a parametric syntax to create a line eg `++X = (1, 2) + r (2, 3)++` or `++X = (1, 2, 3) + r (2, 3, 4)++`. ### Method APIDOC ### Endpoint Parametric Line Creation ``` -------------------------------- ### Example Parametric Surface Source: https://github.com/geogebra/manual/blob/main/fr/modules/ROOT/pages/commands/Surface.adoc Example of creating a parametric surface in the 3D graphics view. This specific example generates a surface defined by trigonometric functions of two parameters. ```geogebra Surface(2 sin(t) * sin(v), sin(v), cos(v), t, 0, 2π, v, -π, π) ``` -------------------------------- ### Sample Command with List and Size Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sample.adoc Returns a list of n randomly chosen elements from a given list. Elements can be chosen multiple times. ```GeoGebra Sample({1, 2, 3, 4, 5}, 5) ``` -------------------------------- ### Take List from Start Position Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Extracts elements from a list starting from the specified position to the end. ```geogebra Take({2, 4, 3, 7, 4}, 3) ``` -------------------------------- ### Take Text from Start Position Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Extracts characters from a text string starting from the specified position to the end. ```geogebra Take("GeoGebra", 3) ``` -------------------------------- ### Sample(List, Size) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Sample.adoc Returns a list of n randomly chosen elements from the input list. Elements can be chosen multiple times. ```APIDOC ## Sample(List, Size) ### Description Returns a list of n randomly chosen elements from the input list. Elements can be chosen multiple times. ### Parameters #### Path Parameters - **List** (List) - Required - The input list from which to choose elements. - **Size** (Number) - Required - The number of elements to choose. ### Request Example `++Sample({1, 2, 3, 4, 5}, 5)++` ### Response #### Success Response (200) - **list** (List) - A list containing the randomly chosen elements. ``` -------------------------------- ### PointList Command Usage Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/PointList.adoc Demonstrates how to use the PointList command to create a list of points from a list of coordinate pairs. ```APIDOC ## PointList Command ### Description Creates a list of points from a list of two-element lists. ### Syntax `PointList()::` ### Parameters * ``: A list where each element is a two-element list representing a point's coordinates (e.g., `{x, y}`). ### Example ``` PointList({{1,2},{3,4}}) ``` This command returns a list of points, represented as `{(1,2),(3,4)}`. ``` -------------------------------- ### Take List from Start to End Position Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Extracts elements from a list between the specified start and end positions (inclusive). ```geogebra Take({2, 4, 3, 7, 4}, 3, 4) ``` -------------------------------- ### Zip Command Example with Numbers and Expressions Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Zip.adoc Shows how the Zip command can be used with a list of numbers and a single variable. The variable 'a' is substituted with numbers from 'list1', and 'b' takes sequential values (1, 2, 3, ...). The 'Simplify' function is applied to the expression. ```GeoGebra Zip(Simplify(a*x^(b-1)), a, list1,b) ``` -------------------------------- ### Example: Handling discontinuous integrals Source: https://github.com/geogebra/manual/blob/main/fr/modules/ROOT/pages/commands/Intégrale.adoc Illustrates a potential issue with the continuity of the integral of a discontinuous function like floor(x) and suggests defining a custom primitive function. ```geogebra F(x)=(floor(x)² - floor(x))/2 + x floor(x) - floor(x)² ``` -------------------------------- ### Take Text from Start to End Position Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Extracts characters from a text string between the specified start and end positions (inclusive). ```geogebra Take("GeoGebra", 3, 6) ``` -------------------------------- ### Top Command Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Top.adoc Creates the top of the limited quadric. ```APIDOC ## Top( ) ### Description Creates the top of the limited quadric. ### Parameters #### Path Parameters - **Quadric** (object) - Required - The quadric object to operate on. ### Request Example ``` Top( cylinder ) Top( cone ) ``` ### Response #### Success Response (200) - **Circle** (object) - Yields a circle if the quadric is a cylinder. - **Point** (object) - Yields the cone end (point) if the quadric is a cone. ``` -------------------------------- ### IndexOf: Find Substring in Text with Start Index Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/IndexOf.adoc Searches for a substring within a text, starting the search from a specified index. ```geogebra IndexOf("Ge", "GeoGebra",2) ``` -------------------------------- ### Shuffle Sequence Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Shuffle.adoc Demonstrates shuffling a sequence of numbers. This generates a list of the first 20 whole numbers in a random order. ```cas Shuffle(Sequence(20)) ``` -------------------------------- ### ReplaceAll Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/ReplaceAll.adoc Use ReplaceAll to substitute substrings within a text. This example replaces 'cos' with 'sin' in a mathematical expression. ```geogebra ReplaceAll("3cos(t)+cos(2y)", "cos", "sin") ``` -------------------------------- ### Get Type of a Circle Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Type.adoc Use the Type command with a circle equation to get its numerical type. The output '4' indicates a circle. ```GeoGebra Type(x² + y² = 1) ``` -------------------------------- ### Create a Pyramid using a Command Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/3D_Graphics_View.adoc Use the 'Pyramid' command with specified base points and an apex to construct a pyramid in the 3D Graphics View. ```plaintext A=(2, 2, 0) ``` ```plaintext B=(-2, 2, 0) ``` ```plaintext C=(0, -2, 0) ``` ```plaintext D=(0, 0, 3) ``` ```plaintext Pyramid[A, B, C, D] ``` -------------------------------- ### Get Formula as LaTeX Text Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/FormulaText.adoc Use this command to get the formula of an object as LaTeX text. By default, variables are substituted with their values. ```plaintext FormulaText(f) ``` -------------------------------- ### Resolver sistema de ecuaciones con ResoluciónC Source: https://github.com/geogebra/manual/blob/main/es/modules/ROOT/pages/commands/ResoluciónC.adoc Resuelve un sistema de ecuaciones especificando tanto la lista de ecuaciones como la lista de variables a resolver. El comando maneja sistemas que pueden tener soluciones complejas. ```cas ResoluciónC[{y^2 = x - 1, x = 2 * y - 1}, {x, y}] ``` -------------------------------- ### Resolver ecuación simple con ResoluciónC Source: https://github.com/geogebra/manual/blob/main/es/modules/ROOT/pages/commands/ResoluciónC.adoc Utiliza ResoluciónC para encontrar las soluciones de una ecuación simple. Si se omite el segundo miembro, se asume que es igual a cero. Las soluciones pueden ser reales o complejas. ```cas ResoluciónC[x^2 = -sqrt(-1)] ``` ```cas ResoluciónC[x^2 = -1] ``` ```cas l_c := ResoluciónC[t^2 - a, t] ``` -------------------------------- ### FitExp Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/FitExp.adoc Use FitExp with a list of points to find the exponential regression curve. The result is displayed in the form aℯ^bx. ```geogebra FitExp({(0, 1), (2, 3), (4, 3), (6, 4)}) ``` -------------------------------- ### Extremum( , , ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Extremum.adoc Calculates (numerically) the extremum of the function in the open interval (Start x-Value, End x-Value). ```APIDOC ## Extremum( , , ) ### Description Calculates (numerically) the extremum of the function in the open interval (Start x-Value, End x-Value). ### Parameters * **Function** (expression) - The function for which to find the extremum. * **Start x-Value** (number) - The starting value of the interval. * **End x-Value** (number) - The ending value of the interval. ### Note The function should be continuous in [Start x-Value, End x-Value], otherwise false extrema near discontinuity might be calculated. ### Example `++Extremum((x⁴ - 3x³ - 4x² + 4) / 2, 0, 5)++` ``` -------------------------------- ### Take(Text, Start Position, End Position) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Take.adoc Returns a text containing characters from the specified start position to the end position of the original text. ```APIDOC ## Take(Text, Start Position, End Position) ### Description Returns a text containing the elements from _Start Position_ to _End Position_ of the initial text. ### Parameters #### Path Parameters - **Text** (Text) - Required - The input text. - **Start Position** (Number) - Required - The starting index (1-based). - **End Position** (Number) - Required - The ending index (1-based). ### Request Example ``` Take("GeoGebra", 3, 6) ``` ### Response #### Success Response - **Result** (Text) - A new text containing the extracted characters. ### Response Example ``` oGeb ``` ``` -------------------------------- ### FitLog Command Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/FitLog.adoc Calculates the logarithmic regression curve for a list of points using standard syntax. Euler's number ℯ can be obtained by pressing ALT + e. ```plaintext FitLog({(ℯ, 1), (ℯ^2, 4)}) ``` -------------------------------- ### Collinear Points Locus Equation Example Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/LocusEquation.adoc This example calculates the locus of point A such that A, B, and C are collinear, effectively finding the line through B and C. ```geogebra LocusEquation(AreCollinear(A, B, C), A) ``` -------------------------------- ### Get Coefficients of a Polynomial Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Coefficients.adoc Use this command to get the list of coefficients for a polynomial expression. For non-polynomial curves from fitting commands, it returns the calculated parameters. ```geogebra Coefficients(x^3 - 3 x^2 + 3 x) ``` -------------------------------- ### Pendulum Simulation using NSolveODE Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/NSolveODE.adoc This snippet shows how to use NSolveODE to simulate a simple pendulum. It then visualizes the pendulum's position using the numerical integration results. ```GeoGebra g = 9.8 l = 2 a = 5 b = 3 y1'(t, y1, y2) = y2 y2'(t, y1, y2) = (-g) / l sin(y1) NSolveODE({y1', y2'}, 0, {a, b}, 20) len = Length(numericalIntegral1) c = Slider(0, 1, 1 / len, 1, 100, false, true, true, false) x1 = l sin(y(Point(numericalIntegral1, c))) y1 = -l cos(y(Point(numericalIntegral1, c))) A = (x1, y1) Segment((0, 0), A) StartAnimation() ``` -------------------------------- ### Root( , , ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Root.adoc Yields one root of the function in the interval [Start x-Value, End x-Value] using a numerical iterative method. ```APIDOC ## Root( , , ) ### Description Let _a_ be the _Start x-Value_ and _b_ the _End x-Value_. This command yields one root of the function in the interval [_a, b_] using a numerical iterative method. ### Example ``` Root(0.1x² - 1.5x + 5, 8, 13) ``` This yields _A = (10, 0)_. ``` -------------------------------- ### AttachCopyToView: Create a Copy in a View Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/AttachCopyToView.adoc Use this command to create a copy of an object in a specified view. For views 1 or 2, the copy maintains a constant size relative to the Graphics View. ```plaintext AttachCopyToView( , ) ``` -------------------------------- ### CellRange( , ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/CellRange.adoc Creates a list containing the cell values in the specified cell range. The range is defined by a starting cell and an ending cell. ```APIDOC ## CellRange( , ) ### Description Creates a list containing the cell values in this cell range. ### Parameters #### Path Parameters - **Start Cell** (Cell) - Required - The starting cell of the range. - **End Cell** (Cell) - Required - The ending cell of the range. ### Request Example ``` CellRange(A1, A3) ``` ### Response #### Success Response (200) - **List** (List) - A list containing the values of the cells within the specified range. ### Response Example ```json { "example": "{1, 4, 9}" } ``` ``` -------------------------------- ### Pyramide( , , , , ...) Source: https://github.com/geogebra/manual/blob/main/de/modules/ROOT/pages/commands/Pyramide.adoc Creates a pyramid with the given points defining its base and apex. ```APIDOC ## Pyramide( , , , , ...) ### Description Creates a pyramid with the given points. ### Parameters * **Punkt** (Point) - Required - A point defining the pyramid's geometry. ### Example `++Pyramide[A, B, C, D]++` creates a pyramid with base ABC and apex D. ``` -------------------------------- ### Split Command Usage Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Split.adoc Demonstrates how to use the Split command to divide a text string by a list of separators. ```APIDOC ## Split ### Description Creates the list of texts obtained by splitting the given text at the given separators (not included in the list). ### Syntax `Split( , )` ### Parameters * ``: The input text string to be split. * ``: A list of strings that will be used as separators. ### Example ``` Split("3cos(t)cos(2y)", {"cos"}) ``` ### Returns A list of strings resulting from the split operation. ### Example Return Value ``` {"3", "(t)", "(2y)"} ``` ``` -------------------------------- ### Vector( , ) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/Vector.adoc Creates a vector from a specified start point to a specified end point. This is commonly used to represent displacement or direction between two points. ```APIDOC ## Vector( , ) ### Description Creates a vector from _Start Point_ to _End Point_. ### Parameters #### Path Parameters - **Start Point** (Point) - The starting point of the vector. - **End Point** (Point) - The ending point of the vector. ### Request Example ``` Vector((1, 1), (3, 4)) ``` ### Response #### Success Response (200) - **Vector** (Vector) - The created vector from Start Point to End Point. ### Response Example ``` u = [[2],[3]] ``` ``` -------------------------------- ### StartRecord() Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/StartRecord.adoc Resumes all recording to the spreadsheet if paused. It also stores a value for each object. ```APIDOC ## StartRecord() ### Description Resumes all recording to the spreadsheet if paused (and stores a value for each object). ### Method APICall ### Endpoint StartRecord() ``` -------------------------------- ### IndexOf(Object, List, Start Index) Source: https://github.com/geogebra/manual/blob/main/en/modules/ROOT/pages/commands/IndexOf.adoc Searches for the first occurrence of an object within a list, starting the search from a specified index. Returns the 1-based index or 'undefined' if not found. ```APIDOC ## IndexOf(Object, List, Start Index) ### Description Searches for the first occurrence of an object within a list, starting the search from a specified index. Returns the 1-based index or 'undefined' if not found. ### Parameters * **Object**: The item to search for. * **List**: The list in which to search. * **Start Index**: The 1-based index from which to start the search. ### Examples * `++IndexOf(5, {1, 3, 5, 2, 5, 4}, 3)++` returns _3_. * `++IndexOf(5, {1, 3, 5, 2, 5, 4}, 4)++` returns _5_. * `++IndexOf(5, {1, 3, 5, 2, 5, 4}, 6)++` returns _undefined_. ``` -------------------------------- ### Example: Numerical integration issue workaround Source: https://github.com/geogebra/manual/blob/main/fr/modules/ROOT/pages/commands/Intégrale.adoc Shows a case where numerical integration might fail (e.g., ln(x) from 0 to 1) and suggests using the 'false' boolean parameter for the integral command as a workaround. ```geogebra Intégrale(ln(x), 0, 1, false) ```