# GeoGebraScript versión 001

﻿#Points hexagon n=6 Execute(Sequence("A"+i+"=Rotate( (cos(pi/3*"+i+"), sin(pi/3*"+i+")), -pi/6, (0,0) )", i, 1, n)) #Hexagon Poly01=Polygon(A1, A2, A3, A4, A5, A6) #Origin O=(0,0) #Segment from center S2=Segment(O, A2) S4=Segment(O, A4) S6=Segment(O, A6) #Circles corners r=Slider(0.1, 1, 0.1, 1, 140, false, true, false, false) C1=Circle(A1, r) C3=Circle(A3, r) #Circle center C0=Circle(O, r) #Intersections I1=Intersect( C1, a1 ) J1=Intersect( C3, a2 ) L1=Intersect( C0, S2 ) #Object T1=Polygon( A1, I1, L1, J1, A3, O ) T2=Rotate(T1, 2*pi/3, O) T3=Rotate(T1, -2*pi/3, O) #Vectors auxray=Ray(O, A1) auxPoint=Intersect(C1, auxray, 2) u1=Vector(O, auxPoint ) u2=Rotate(u1, pi/3) u3=u1+u2 u4=u1+2*u2 u5=2*u1+u2 #First Execute(Sequence("FA"+i+"=Translate( T1, Rotate( u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("FB"+i+"=Translate( T2, Rotate( u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("FC"+i+"=Translate( T3, Rotate( u1, pi/3*"+i+", O ))", i, 1, 6)) #Second Execute(Sequence("SA"+i+"=Translate( T1, Rotate( 2*u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("SB"+i+"=Translate( T2, Rotate( 2*u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("SC"+i+"=Translate( T3, Rotate( 2*u1, pi/3*"+i+", O ))", i, 1, 6)) #Third Execute(Sequence("TA"+i+"=Translate( T1, Rotate( 3*u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("TB"+i+"=Translate( T2, Rotate( 3*u1, pi/3*"+i+", O ))", i, 1, 6)) Execute(Sequence("TC"+i+"=Translate( T3, Rotate( 3*u1, pi/3*"+i+", O ))", i, 1, 6)) #Quad01 Execute(Sequence("q01a"+i+"=Translate(T1, u"+(i)+")", i, 3, 5)) Execute(Sequence("q01b"+i+"=Translate(T2, u"+(i)+")", i, 3, 5)) Execute(Sequence("q01c"+i+"=Translate(T3, u"+(i)+")", i, 3, 5)) #Quad02 Execute(Sequence("q02a"+i+"=Translate(T1, Rotate(u"+i+", pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q02b"+i+"=Translate(T2, Rotate(u"+i+", pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q02c"+i+"=Translate(T3, Rotate(u"+i+", pi/3, (0,0)))", i, 3, 5)) #Quad03 Execute(Sequence("q03a"+i+"=Translate(T1, Rotate(u"+i+", 2*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q03b"+i+"=Translate(T2, Rotate(u"+i+", 2*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q03c"+i+"=Translate(T3, Rotate(u"+i+", 2*pi/3, (0,0)))", i, 3, 5)) #Quad04 Execute(Sequence("q04a"+i+"=Translate(T1, Rotate(u"+i+", 3*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q04b"+i+"=Translate(T2, Rotate(u"+i+", 3*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q04c"+i+"=Translate(T3, Rotate(u"+i+", 3*pi/3, (0,0)))", i, 3, 5)) #Quad05 Execute(Sequence("q05a"+i+"=Translate(T1, Rotate(u"+i+", 4*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q05b"+i+"=Translate(T2, Rotate(u"+i+", 4*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q05c"+i+"=Translate(T3, Rotate(u"+i+", 4*pi/3, (0,0)))", i, 3, 5)) #Quad06 Execute(Sequence("q06a"+i+"=Translate(T1, Rotate(u"+i+", 5*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q06b"+i+"=Translate(T2, Rotate(u"+i+", 5*pi/3, (0,0)))", i, 3, 5)) Execute(Sequence("q06c"+i+"=Translate(T3, Rotate(u"+i+", 5*pi/3, (0,0)))", i, 3, 5))