**Elena, Liya "Designing of islamic arabesques", Kazan, Russia, school #57**

> restart:

At the theorem of cosines c^2 = a^2+b^2-2*a*b*cos(phi);

In our case c=a0 , a=1 , a=b , phi; - acute angle of a rhombus (the tip of the kalam).

s0 calculated at theorem of Pythagoras.

(а0 - horizontal diagonal of a rhombus, s0 - vertical diagonal of a rhombus)

> a:=1:phi:=Pi/4:

> a0:=sqrt(a^2+a^2-2*a^2*cos(phi));

a0 := sqrt(2 - sqrt(2))

> solve((s0^2)/4=a^2-(a0^2)/4,s0);

sqrt(2 + sqrt(2)), -sqrt(2 + sqrt(2))

The setting of initial parameters : the size of the tip of the pen-kalam and depending on its - the main module size - point

(а0 - horizontal diagonal of a rhombus, s0 - vertical diagonal of a rhombus)

> a0:=sqrt(2-sqrt(2)):

> s0:=sqrt(2+sqrt(2)):

Connection the graphical libraries Maple

> with(plots):with(plottools):

Construction of unit of measure (point) - rhombus - the tip of the kalam

> p0:=plot([[0,0],[a0/2,s0/2],[0,s0],[-a0/2,s0/2],[0,0]],scaling=constrained,color=gold,thickness=3):

> plots[display](p0);

The setting and construction of altitude of alif - the basis of the rules compilation of the proportions Example, on style naskh altitude of alif amount five points

> p_i:=seq(plot([[0,0+s0*i],[a0/2,s0/2+s0*i],[0,s0+s0*i],[-a0/2,s0/2+s0*i],[0,0+s0*i]],scaling=constrained,color=black),i=0..4):

> pi:=display(p_i):

> plots[display](p_i);

The setting of appropriate circle of diameter, amount altitude of alifd0:=s0+s0*i:

> i:=4:

> d0:=d0:

> c0:=circle([0,d0/2],d0/2,color=blue):

> plots[display](p_i,c0);

Construction of flower by turning "point"r_i:=seq(rotate(p0,i*Pi/4),i=1..8):

> p1:=display(r_i,p0):plots[display](p1,scaling=constrained);

The setting of circumscribed circlec1:=circle([0,0],s0,color=blue,thickness=2):

Construction and the setting of flower inscribed in a circle

> plots[display](c1,p1,scaling=constrained);

> p_c:=plots[display](c1,p1,scaling=constrained):

The setting and construction of arabesque by horizontal parallel transport original flower with different stepspt_i_1:=seq(translate(p1,5*a0*i,0),i=0..4):

> plots[display](pt_i_1);

> pt_i_11:=seq(translate(p1,2*a0*i,0),i=0..4):

> plots[display](pt_i_11);

> pt_i_111:=seq(translate(p1,a0*7*i,0),i=0..4):

> plots[display](pt_i_111);

The setting and construction of arabesque by vertical parallel transport original flower with different stepspt_i_2:=seq(translate(p1,0,2*s0*i),i=0..4):

> plots[display](pt_i_2);

> pt_i_22:=seq(translate(p1,0,s0*i),i=0..4):

> plots[display](pt_i_22);

> pt_i_222:=seq(translate(p1,0,1/2*s0*i),i=0..4):

> plots[display](pt_i_222);

Getting arabesques by turning original flower on different anglespr:=rotate(p1,Pi/8):

> plots[display](pr);

> plots[display](p1,pr);

> pr_i:=seq(rotate(p1,Pi/16*i),i=0..8):

> plots[display](pr_i);

> pt_1:=translate(p1,0,2*s0):

> pr_1_i:=seq(rotate(pt_1,Pi/3.5*i),i=0..6):

> plots[display](pr_1_i);

> pr_11_i:=seq(rotate(pt_1,Pi/5*i),i=0..10):

> plots[display](pr_11_i);

> pr_111_i:=seq(rotate(pt_1,Pi/6.5*i),i=0..12):

> plots[display](pr_111_i);