next up previous contents index
Next: Index Up: Manual Previous: General transforms   Contents   Index


List of geometric commands

accel_p P t U A


Computes the acceleration vector U of the polygon P at the point A at distance t from the origin of the polygon. The polygon must have curvilinear parametrization (cf. 3.8.1, and the command polyg_curv). The coordinates of both A and U are computed with this command. If P is defined by the functions $x(t)$, $y(t)$ such that

\begin{displaymath}x'(t)^2+y'(t)^2 \ = \ 1 ,\end{displaymath}

and $(x(0),y(0))$ is the origin of P, the acceleration vector at $\bf t$ is $(x''({\bf t}),y''({\bf t}))$, and A is $(x({\bf t}),y({\bf t}))$.




act T X Y


Computes the action of the transform T on the geometric object X and puts the result in he geometric object Y. There are 3 kinds of tranforms : linear, affine and general. They are defined respectively by the commands transform_lin, transform_aff and transform_gen. The valid geometric object pairs (X, Y) are :

For linear transforms :

(vector, vector)

For affine transforms :

(point, point)
(line, line)
(circle, polygon)
(polygon, polygon)

For general transforms :

(point, point)
(line, polygon)
(circle, polygon)
(polygon, polygon)

In the case of the action of a general transform on a line, two supplementary parameters must be given :

act Tgen Line Polyg a b

This command will not compute the action of the general transform Tgen on the whole line Line, but on the segment $[{\bf a},{\bf b}]$ on it (with respect to the origin and unit vector of Line).




act_s Tgen A B Polyg


Compute the action of the general transform Tgen on the segment with end points A, B, and puts the result in the polygon Polyg.




angle U V


Computes the angle of the two vectors U, V, which is put in the variable angle_v.




bary P$_0$ ... P$_n$ Q


Computes the barycenter of the points P$_0$,...,P$_n$ ($n\geq 2$) and puts the result in Q.




bary2 A B t P

bary2 Poly P


First use : computes the point tA+(1-t)B and puts it in P. Here A, B, P are points and t a numerical expression.

Second use : computes the barycenter of the vertices of the polygon Poly and puts the result in P.




bissec L1 L2 L


Computes the bissectrix of the lines L1, L2 and puts it in L. More precisely if L1, L2 have unit vectors $\overrightarrow{u_1}$, $\overrightarrow{u_2}$ respectively and intersect in A, the line L will have origin at A and unit vector

\begin{displaymath}\overrightarrow{u} \ = \ \frac{1}{\sqrt{2}}\overrightarrow{u_1}+
\frac{1}{\sqrt{2}}\overrightarrow{u_2} .\end{displaymath}




bissec2 L1 L2 L t


Computes the intersection A of the lines L1, L2, rotates L1 around A with an angle ${\bf t}\alpha$, $\alpha$ beeing the angle of L1, L2, and puts the result in L. More precisely, if L1, L2 have unit vectors $\overrightarrow{u_1}$, $\overrightarrow{u_2}$ respectively, and if

\begin{displaymath}\overrightarrow{u_2} \ = \ \pmatrix{cos(\alpha) & sin(\alpha)\cr
-sin(\alpha) & cos(\alpha)}\overrightarrow{u_1} ,\end{displaymath}

then the unit vector of L is

\begin{displaymath}\overrightarrow{u} \ = \ \pmatrix{cos({\bf t}\alpha) & sin({\...
...-sin({\bf t}\alpha) & cos({\bf t}\alpha)}\overrightarrow{u_1} ,\end{displaymath}

Hence with ${\bf t}=0.5$ we find the bissectrix.




circle C

circle C x y R


First use : defines a circle C. Its default center is (0,0) and its radius is 1. Some other commands (such as coord or span_c) can then be used to change the coordinates of C.

Second use : defines a circle C with center (x,y) and radius R. Here x,y and R are numerical expressions understood by the expression evaluator.




coord


This command is used to fix the coordinates of points, vectors, lines, circles and vertices of polygons.


points : coord A x y

Sets the coordinates of the point A. Here x and y are numerical expressions understood by the expression evaluator.


vectors : coord U x y

Sets the coordinates of the vector U. Here x and y are numerical expressions understood by the expression evaluator.


lines : coord L A U

Sets the coordinates of the line L. Here A and U are respectively a point and a vector. The vector must not be zero, but needs not to be normalized.


circles : coord C A R

Sets the coordinates of the circle C. Here A is a point (the center) and R a numerical expression. The vector must not be zero, but needs not to be normalized. Of course R must be positive.


polygons : coord Polyg n x y

Sets the coordinates of the vertex n of the polygon Polyg to (x,y).




coord_aff T_aff T_lin A


Sets the linear part of the linear transform T_aff to T_lin and the image of (0,0) to A. Here T_lin is a linear transform and A a point.




coord_lin T_lin a b c d


Sets the coordinates of the linrar transform T_lin. Here a, b, c, d are numerical expressions. The matrix of T_lin will be $\pmatrix{{\bf a} & {\bf b}\cr {\bf c} & {\bf d}}$ .




dist A B


Computes the distance of the two points A, B. The result is stored in the variable dist_p.




dist_pl A L


Computes the distance of the point A and the line L. The result is stored in the variable dist_p_l.




draw obj Gr F


Draws the geometric object obj on the graphic object Gr, with respect to the frame F. This geometric object can be a point, a line, a vector, a circle or a polygon. If it is a vector it is drawn from the current position on the graphic object. To define such a position one may define a point with the good coordinates and draw it.




draw_to A Gr F


Draws a line segment on the graphic object Gr, with respect to the frame F, from the current position to the position of the point A, which becomes the current position after that.




evol Polyg1 Polyg2


This command computes the evolute of the polygon Polyg1 and puts the result in polygon Polyg2. Polyg1 must have curvilinear coordinates (cf. the command polyg_curv).

The evolute of a curve is the envelope of the normals to it. It can also be defined as the locus of the centres of curvature.




ext_prod U V


Computes the exterior product of the vectors U, V, and puts the result in the variable ext_p. More precisely, let

\begin{displaymath}\overrightarrow{i} = (1,0), \ \ \overrightarrow{j}=(0,1) .\end{displaymath}

Then we can write

\begin{displaymath}\overrightarrow{U}\wedge\overrightarrow{V} \ = \ \alpha\overrightarrow{i}
\wedge\overrightarrow{j} ,\end{displaymath}

for some real number $\alpha$. The variable ext_p will then contain $\alpha$.




int_prod U V


Computes the scalar product of the vectors U, V, and puts the result in the variable int_p.




inters L1 L2 P


Computes the intersection of the lines L1, L2, and puts the result in point P.




inters_cc C1 C2 A B


Computes the intersection of the circles C1, C2, and put the result in points A, B. If there is only one intersection point, it will be in A, and B will remain unchanged. If there are none, A and B will remain unchanged. The number of intersection points (0, 1 or 2) is stored in the variable inters_cc of the expression evaluator.




inters_cl L C A B


Computes the intersection of the line L and the circle C, and put the result in points A, B. If there is only one intersection point, it will be in A, and B will remain unchanged. If there are none, A and B will remain unchanged. The number of intersection points (0, 1 or 2) is stored in the variable inters_cl of the expression evaluator.




inv T_lin1 T_lin2


Computes the inverse of the linear transform T_lin1 and puts the result in T_lin2.




inverse L1 L2


This command puts the inverse of the line L1 in line L2. The inverse L1 has the same origin but its unit vector is -1 times that of L2.




length_pol Polyg


Computes the length of the polygon Polyg and puts it in the variable length_pol.




line L

line L x y u v


First use : defines a line L. Its default parameters are : (0,0) for the origin and (1,0) for the unit vector. Several other commands (such as coord or span_l) can be used to change its coordinates.

Second use : defines a line L with origin (x,y) and unit vector (u,v) divided by its length (if it is not zero, otherwise the unit vector is the default one).




middle A B M


Computes the middle of the segment defined by the points A, B and puts it in point M. These 3 points must have been defined before.




moveorig L t


Moves the origin of the line L. Here t is a numerical expression. If A is its previous origin and u its unit vector, the new origin will be A+tu.




moveorig2 L A


Moves the origin of line L to point A (which must be on the line).




ortholine L1 P L2


Computes the line orthogonal to the line L1 through the point P and puts it in line L2.




orthoproj A L B


Computes the orthogonal projection of the point A on the line L, and puts in in point B.




parallel L1 A L2


Computes the line parallel to the line L1 through the point A and puts it in the line L2.




point A

point A x y


First use : defines a point A. Its default coordinates are (0,0) . Several other commands (such as coord) can be used to change its coordinates.

Second use : defines a point A with coordinates (x,y).




point_pol Polyg t A


Computes the point on the polygon Polyg at distance t from the first vertex of Polyg along it, and stores it in point A. The polygon Polyg must have curvilinear coordinates (cf. the command polyg_curv).




point_v A U B


Computes the sum of the point A and the vector U and puts the result in point B.




polyg Polyg n


Define a polygon Polyg with n vertices. Several other commands (such as polyg_funct) can be used to change this number.




polyg_curv Polyg1 Polyg2


Computes a curvilinear approximation of polygon Polyg1 and puts the result in polygon Polyg2. This means that the distance between two consecutive points of Polyg2 is constant. Some commands (such as evol) need curvilinear polygons.




polyg_funct Polyg X Y


Fills the cooordinates of the polygon Polyg with the functions X, Y. The two functions must have the same x-range. The number of vertices of Polyg becomes the number of points at which X and Y are defined.




rotate L1 L2 x


Computes the rotation of the line L1 around its origin, with an angle x, and puts the result in the line L2.




show_aff T_aff


Prints the parameters of the affine transform T_aff, i.e. the coordinates of the image of the origin and the coefficients of the associated 2X2 matrix, and puts them in the following variables of the expression evaluator :

afftr_P_x, afftr_P_y : the coordinates of T_aff(0) .

afftr_T_a, afftr_T_b, afftr_T_c, afftr_T_d : the coordinates of the matrix.




show Z


This command prints the coordinates or parameters of the geometric object Z and puts some of them in variables of the expression evaluator. The possible geometric objects and the corresponding variables are :

Points : point_x and point_y will contain the coordinates.

Vectors : vector_x and vector_y will contain the coordinates.

Lines : line_p_x and line_p_y will contain the coordinates of the origin, and line_v_x and line_v_y those of the unit vector.

Circles : center_x and center_y will contain the coordinates of the center, and Radius the radius.

Polygons : pol_nb will contain the number of vertices, pol_curv will be 1 if the polygon is curvilinear, 0 otherwise, pol_calc will be 1 if the tangents and acceleration vectors have been computed, 0 otherwise, and pol_step will contain the distance between two consecutive vertices if the polygon is curvilinear.




show_lin T_lin


Prints the parameters of the linear transform T_lin, i.e. the coefficients of the associated 2X2 matrix, and puts them in the following variables of the expression evaluator : lintr_a, lintr_b, lintr_c, lintr_d.




span_c Circ A B C


Computes the coordinates of the circle through the points A, B, C and puts them in the circle C.




span_l L A B


Computes the coordinates of the line through the points A, B and puts them in the line L.




symcent_l L1 P L2


Computes the symmetric line of the line L1 with respect to the point P, and puts the result in the line L2.




symcent_p A P B


Computes the symmetric point of the point A with respect to the point P, and puts the result in the point B.




symline_l L1 L L2


Computes the symmetric line of the line L1 with respect to the line L, and puts the result in the line L2.




symline_p A L B


Computes the symmetric point of the point A with respect to the line L, and puts the result in the point B.




tangent_p Polyg x L


Computes the tangent line to the polygon Polyg at distance x from the origin of the polygon, and puts the result in the line L. The polygon must be curvilinear and x positive and less than the length of Polyg.



transform_aff T_aff

transform_aff T_aff A T_lin


First use : defines a new affine transform whose name is T_aff. Its default paprameters are : (0,0) for the image of the origin, and 0 for the associated linear transform. These parameters can be changed using the command coord_aff.

Second use : defines a new affine transform whose name is T_aff. The image of the origin is the point A, and the associated linear transform is T_lin. Only the values of A and T_lin are used, i.e. further changes of the coordinates of A or T_lin will have no effect on those of T_aff.




transform_gen T_gen f(x,y) g(x,y)


Defines a general transform using the formulas f(x,y), g(x,y).




transform_lin T_lin

transform_lin T_lin a b c d


First use : defines a linear transform whose name is T_lin. Its default value is 0. To change its coordinates the command coord_lin can be used.

Second use : defines a linear transform whose name is T_lin. Here a, b, c, d are numerical expressions. After the execution of this command the matrix of T_lin will be $\pmatrix{{\bf a} & {\bf b}\cr {\bf c} & {\bf d}}$ .




vector U

vector U x y


First use : defines a vector U. Its default coordinates are (0,0) . Several other commands (such as coord) can be used to change its coordinates.

Second use : defines a vector U with coordinates (x,y).




vector_l L U


Puts the unit vector of the line L in the vector U.




vector_p A B U


Puts the vector from the point A to the point B in the vector U.




vertex Polyg n A


Defines the n-th vertex of the polygon Polyg. Its coordinates will be those of point A.





next up previous contents index
Next: Index Up: Manual Previous: General transforms   Contents   Index
2009-11-12