[Next] [Prev] [Right] [Left] [Up] [Index] [Root]
The Point Set and Line Set

The Point Set and Line Set

Points(P) : Plane -> { PlanePt }
An indexed set E whose elements are the points of the plane P. Note that this creates a standard set and not the point-set of P, in contrast to the function PointSet.
Support(P) : Plane -> { Elt }
An indexed set E which is the underlying point set of the plane P (i.e. the elements of the set have their "real" types; they are no longer a "PlanePt" of P).
Lines(P) : PlaneLnSet -> { PlaneLn }
An indexed set containing the lines of the plane P. In contrast to the function LineSet, this function returns the collection of lines of P in the form of a standard set.

Example Plane_points-lines (H50E2)

The following example shows how points and lines of a plane can be created.

> P := ProjectivePlane(5);
> V := PointSet(P);
> print V;
The point-set of The projective plane PG(2, 5)
> print Points(P);
{@ ( 1 : 0 : 0 ), ( 0 : 1 : 0 ), ( 0 : 0 : 1 ), ( 1 : 1 : 0 ),
( 0 : 1 : 1 ), ( 1 : 1 : 3 ), ( 1 : 2 : 1 ), ( 1 : 4 : 1 ),
( 1 : 4 : 2 ), ( 1 : 0 : 1 ), ( 1 : 4 : 0 ), ( 0 : 1 : 4 ),
( 1 : 1 : 2 ), ( 1 : 0 : 4 ), ( 1 : 3 : 0 ), ( 0 : 1 : 3 ),
( 1 : 1 : 1 ), ( 1 : 4 : 3 ), ( 1 : 2 : 4 ), ( 1 : 3 : 4 ),
( 1 : 3 : 1 ), ( 1 : 4 : 4 ), ( 1 : 3 : 3 ), ( 1 : 2 : 3 ),
( 1 : 2 : 2 ), ( 1 : 0 : 3 ), ( 1 : 2 : 0 ), ( 0 : 1 : 2 ),
( 1 : 1 : 4 ), ( 1 : 3 : 2 ), ( 1 : 0 : 2 ) @}
> print V.3;
( 0 : 0 : 1 )
> print V![1, 2, 3];
( 1 : 2 : 3 )
> print Random(V);
( 1 : 0 : 0 )
> print Random(V);
( 0 : 0 : 1 )
> L := LineSet(P);
> print L;
The line-set of The projective plane PG(2, 5)
> print Lines(P);
{@ < 1 : 0 : 0 >, < 0 : 1 : 0 >, < 0 : 0 : 1 >, < 1 : 1 : 0 >,
< 0 : 1 : 1 >, < 1 : 1 : 3 >, < 1 : 2 : 1 >, < 1 : 4 : 1 >,
< 1 : 4 : 2 >, < 1 : 0 : 1 >, < 1 : 4 : 0 >, < 0 : 1 : 4 >,
< 1 : 1 : 2 >, < 1 : 0 : 4 >, < 1 : 3 : 0 >, < 0 : 1 : 3 >,
< 1 : 1 : 1 >, < 1 : 4 : 3 >, < 1 : 2 : 4 >, < 1 : 3 : 4 >,
< 1 : 3 : 1 >, < 1 : 4 : 4 >, < 1 : 3 : 3 >, < 1 : 2 : 3 >,
< 1 : 2 : 2 >, < 1 : 0 : 3 >, < 1 : 2 : 0 >, < 0 : 1 : 2 >,
< 1 : 1 : 4 >, < 1 : 3 : 2 >, < 1 : 0 : 2 > @}
> print L.6;
< 1 : 1 : 3 >
> print L![4, 3, 2];
< 1 : 2 : 3 >
> print L![ V | [0, 0, 1], [0, 1, 0] ];
< 1 : 0 : 0 >
> print Rep(L);
< 1 : 0 : 0 >
> print Random(L);
< 1 : 2 : 4 >
>
> V := {2, 4, 6, 8};
> A := AffinePlane< SetToIndexedSet(V) | Setseq(Subsets(V, 2)) >;
> print A: Maximal;
Affine plane of order 2
Points: {@ 2, 4, 6, 8 @}
Lines:
    {6, 8},
    {2, 6},
    {2, 8},
    {2, 4},
    {4, 6},
    {4, 8}
> P := PointSet(A);
> print P;
The point-set of Affine plane of order 2
> print Points(A);
{@ 2, 4, 6, 8 @}
> print P.3;
6
> print P!4;
4
> print Rep(P);
2
> L := LineSet(A);
> print L;
The line-set of Affine plane of order 2
> print Lines(A);
{@ {6, 8}, {2, 6}, {2, 8}, {2, 4}, {4, 6}, {4, 8} @}
> print L.3;
{2, 8}
> print L![2, 6];
{2, 6}
> print Random(L);
{6, 8}
The following code shows the difference between the Points and Support functions.

> A := AffinePlane< {@ 3, 4, 5, 6 @} | {3, 4}, {3, 5}, {3, 6},
>                                      {4, 5}, {4, 6}, {5, 6} >;
> Pts := Points(A);
> Supp := Support(A);
> print Pts, Supp;
{@ 3, 4, 5, 6 @}
{@ 3, 4, 5, 6 @}
> print Universe(Pts);
The point-set of Affine plane of order 2
> print Universe(Supp);
Integer Ring

[Next] [Prev] [Right] [Left] [Up] [Index] [Root]