A point on a geometric object in the plane

### 26.5.15 A point on a geometric object in the plane

The element command is most useful in a 2D geometry screen; it creates objects that are restricted to a geometric figure.

element takes different types of arguments.

- element can take one mandatory argument and one optional argument:
  - a..b, a range of values.
  - Optionally, init and step, an initial value (by default (a+b)/2) and step size (by default (b−a)/100).
- element(a..b ⟨,init,step ⟩) creates a parameter restricted to the interval from a to b, with the given initial value and whose value can be changed in the given step sizes.

For example, the command t:=element(0..pi) creates a parameter t which can take on values between 0 and π and has initial value π/2. It also creates a slider labeled t which can be used to change the values. The values of any later formulas involving t will change with t.

- element can take one mandatory argument and one optional argument:
  - C, a curve.
  - Optionally, init, an initial value (by default 1/2).
- element(C ⟨,init ⟩) creates a point which will be restricted to the curve, the initial position of the point is determined by setting the parameter (in the default parameterization of the object) to the initial value. If the point can be moved by the mouse (as it can when the geometry screen is in Pointer mode), then the motion will be restricted to the geometric object.

For example, the command A:=element(circle(0,2)) creates a point labeled A whose position is restricted to the circle of radius 2 centered at the origin. Since the circle has default parameterization 2 ei t, A starts out at 2 ei/2.

- element can take two mandatory arguments:
  - P, a polygon or polygonal line with n sides.
  - [floor(t),frac(t)], where t is a variable previously defined by t=element(0..n).
- element(P,[floor(t),frac(t)]) creates a point restricted to the polygonal line. With the sides numbered starting at 0, the value of floor(t) determines which side the point is on, and the value of frac(t) determines how far along the side the point is.