Title: A controlled polygon plotter procedure
1A controlled polygon plotter procedure
- Dr. Lajos Szilassi and László Kóródi University
of Szeged,Hungary
2A controlled polygon plotter procedure
- CAS have a serious shortcoming in displaying of
polygons.
The algorithm that decomposes the polygons (given
by the list of vertices) into triangles obtained
by the diagonals started out from the first
vertex and displays these triangles without any
further examinations.
3A controlled polygon plotter procedure
Lets see the following polygon.
- If we dont use color, we cant see any problem
in the displaying.
4A controlled polygon plotter procedure
- If we use color, we can see what is the problem
with the plotting of a nonconvex polygon.
- We show some cases when the decomposition of the
polygon gives wrong result.
5A controlled polygon plotter procedure
- If we give the vertex A at first, then the
MAPLE tries to decompose the polygon into
triangles from the vertex A.
6A controlled polygon plotter procedure
- If we give the vertex B at first, then the
MAPLE tries to decompose the polygon into
triangles from the vertex B.
7A controlled polygon plotter procedure
- If we give the vertex D at first, then the
MAPLE tries to decompose the polygon into
triangles from the vertex D.
8A controlled polygon plotter procedure
- If we give the vertex F at first, then the
MAPLE tries to decompose the polygon into
triangles from the vertex F.
9A controlled polygon plotter procedure
- This would be a right decomposition.
10A controlled polygon plotter procedure
- In the three dimensional space the situation is
similar, but there are further problems
The CAS dont check that
- the first three points determine a plane.
- all subsequent vertices belong to the same
plane.
- the ordered sequence of vertices forms a simple
polygon.
11A controlled polygon plotter procedure
- In order to eliminate these shortcomings we have
created two procedures cpolygonplot and
cpolygonplot3d
The first of them works in 2D.
The second of them works in 3D.
12A controlled polygon plotter procedure
- Lets see the details of the first procedure.
13A controlled polygon plotter procedure
- The cpolygonplot procedure contains the following
main procedures - Disjunct It tests that two given segments has
a intersecting point. - Simple It tests that the given points
determine a simple polygon. - Out It tests that if the points A,B,C are
given and determine a triangle, then a point P is
out of the triangle.
14A controlled polygon plotter procedure
- The procedure Disjunct
- In this case the output of the procedure is
true.
15A controlled polygon plotter procedure
- The procedure Disjunct
- In this case the output of the procedure is
true.
16A controlled polygon plotter procedure
- The procedure Disjunct
- In this case the output of the procedure is
false.
17A controlled polygon plotter procedure
- The procedure Disjunct
- In this case the output of the procedure is
false.
18A controlled polygon plotter procedure
- The procedure Simple
- In this case the output of the procedure is
false and procedure gives the vertices of the
intersecting edges.
19A controlled polygon plotter procedure
- The procedure Outer
- In this case the output of the procedure is
true.
20A controlled polygon plotter procedure
- The procedure Outer
- In this case the output of the procedure is
false.
21A controlled polygon plotter procedure
- Lets see the details of the second procedure.
22A controlled polygon plotter procedure
- The cpolygonplot3d procedure contains the
following main procedures - Disjunctive
- Simple
- Outer
- Comp test that the first three points determine
a plane and all subsequent points belong to the
same plane.
23A controlled polygon plotter procedure
- Thank you for the attention.