Construction of standard quadrilaterals

      Muchametshina Liya,  8th class,  school № 57, Kazan, Russia


                   Square

                  Rectangle     
                  
                  Rhombus        
 
                  Parallelogram

                   Trapeze

Construction of square

> restart:
> with(plottools):
       Сoordinates (x;y) of the lower left corner of the square and the side "а"
> x:=0;y:=3;a:=6;

                                x := 0


                                y := 3


                                a := 6

      Construction of the square
> P1:=plot([[x,y],[x,y+a],[x+a,y+a],[x+a,y],[x,y]],color=green,thickness=4):
> plots[display](P1,scaling=CONSTRAINED);

The setting of the second square wich moved relative to the first on the vector (2;-3) (vector can be changed) and with side "а-1" (the length of a side can be changed)P2:=plot([[x+2,y-3],[x+2,y-3+a-1],[x+2+a-1,y-3+a-1],[x+2+a-1,y-3],[x+2,y-3]],color=black,thickness=4):
> plots[display](P1,P2,scaling=CONSTRAINED);

Construction of rectangle

> restart:
> with(plottools):
        Сoordinates (x;y) of the lower left corner of the square and the "а" and "b" sides
> x:=0;y:=2;a:=3;b:=9;
>

                                x := 0


                                y := 2


                                a := 3


                                b := 9

       The rectangle is specified by the sequence of vertices with given the lengths "a" and "b"
> l:=plot([[x,y],[x,y+a],[x+b,y+a],[x+b,y],[x,y]]):
> plots[display](l,scaling=CONSTRAINED,thickness=4);
Construction of rhombus

> restart:
> with(plottools):
      The coordinates (x;y) of the initial vertex of the rhombus and the half of the diagonals "a" and "b"
> x:=0;y:=2;a:=3;b:=4;

                                x := 0


                                y := 2


                                a := 3


                                b := 4

       Rhombus is specified by the sequence of vertices with the values "a" and "b"
> ll:=plot([[x,y],[x+a,y+b],[x+a+a,y],[x+a,y-b],[x,y]]):
> plots[display](ll,scaling=CONSTRAINED,thickness=4);

Construction of parallelogram

> restart:
> with(plottools):
      (х;у) - the starting point, (i;j) - the displacement vector of starting point, "а" - the base of the parallelogram
> x:=0;y:=0;i:=4;j:=5;a:=10;

                                x := 0


                                y := 0


                                i := 4


                                j := 5


                               a := 10

     The parallelogram is defined by the sequence of vertices
> P1:=plot([[x,y],[x+i,y+j],[x+i+a,y+j],[x+a,y],[x,y]]):
> plots[display](P1,scaling=CONSTRAINED,thickness=4);
 If  i= 0  it turns out the rectangleget.
       If  j= а  it turns out the  square.
       If  a := sqrt(i^2+j^2) it turns out the rhombus. a:=sqrt(i^2+j^2):

Construction of trapeze

Trapeze general form
> restart:
> with(plottools):
>
        (х;у) - the starting point, (i;j) - the displacement vector of starting point, а - the larger base of the trapezoid
> x:=0;y:=2;i:=1;j:=5;a:=11;

                                x := 0


                                y := 2


                                i := 1


                                j := 5


                               a := 11

         The trapez is defined by the sequence of vertices     
> P1:=plot([[x,y],[x+i,y+j],[x+i+j,y+j],[x+i+a,y],[x,y]]):
> plots[display](P1,scaling=CONSTRAINED,thickness=4);
Rectangular trapezoid
> restsrt:
> with(plottools):
> x:=0;y:=2;i:=0;j:=6;a:=11;

                                x := 0


                                y := 2


                                i := 0


                                j := 6


                               a := 11

> P1:=plot([[x,y],[x,y+j],[x+j,y+j],[x+a,y]]):
> plots[display](P1,scaling=CONSTRAINED,thickness=4);
Isosceles trapezoid
> restart:
> with(plottools):
> x:=0;y:=2;i:=4;j:=6;a:=15;

                                x := 0


                                y := 2


                                i := 4


                                j := 6


                               a := 15

> P1:=plot([[x,y],[x+i,y+j],[x+j+i,y+j],[x+a,y],[x,y]]):
> plots[display](P1,scaling=CONSTRAINED,thickness=4);



 

 

 


Please Wait...