Demos for the SuperMenu newsletter

Initialization

SetDirectory["JuHa:Mathematica 3.0 Files:Omat:HT"]

<<HTessellate.m

black = GrayLevel[0];
white = GrayLevel[1];
color0 = black;
color1 = GrayLevel[0.7];
color2 = GrayLevel[0.85];
color3 = GrayLevel[0.95];

Drawing geodesics

poly = NGP[RegularPolygon[18,6*Pi/7]];
ln = Geodesic[ZPoint[0.2-0.3*I],ZPoint[-0.2+0.3*I]];
ln2 = Geodesic[ZPoint[0.9+0.1*I],ZPoint[-0.3+0.8*I]];
poly2 = Inversion[ln2][poly];
diag = Diagonals[poly2] /. Line -> Geodesic;

pt = ZPoint[0.4+0.4*I];
ln = Geodesic[ZPoint[0.2-0.3*I],ZPoint[-0.2+0.3*I]];
gd = Map[Geodesic[pt, ZPoint[#]]&, 
	{0.6-0.2*I, 0.8-0.1*I, 0.8+0.1*I, 0.7+0.2*I, 0.7+0.3*I,
	-0.2+0.9*I}];

SetOptions[PointLabel, DefaultFont -> {"Times-Roman", 18}];
glabel = {PointLabel[Point[{-0.1,-0.05}], "L"],
	PointLabel[Point[{0.25,0.4}], "p"]};

HDraw[{ln,Take[diag,{4,Length[diag]}],glabel}]

A triangle

pts = Map[RotatePoint[#,-Pi/2]&, Map[ZPoint, {0.3 + 0.6*I, -0.6 + 0.5*I, 
        0.1 - 0.8*I}]];
poly = Polygon[pts];
sides = {Line[pts[[1]],pts[[2]]], Line[pts[[2]],pts[[3]]],
        Line[pts[[3]],pts[[1]]]};
geodsides = sides /. Line -> Geodesic;
bisect = Bisectors[poly];
bpoint = HSolve[Make[bisect[[1]]],Make[bisect[[2]]]];

HDraw[{{color3, Thickness[0.005], 
        poly /. Polygon -> FilledPolygon},
        Thickness[0.003], bisect,
        Thickness[0.002], geodsides,
        PointSize[0.02], pts, bpoint}]

Unit polygons

polygons = {p1, p2, p3} = 
	NGP[Map[UnitPolygon, {12, 6, 3}]];
h1 = HDraw[polygons, DisplayFunction -> Identity];
h2 = HDraw[{GrayLevel[0], p1, GrayLevel[0.6], p2,
	GrayLevel[0.9], p3} /. Polygon -> FilledPolygon,
	DisplayFunction -> Identity];
Show[GraphicsArray[{h1,h2}]]

Basic objects

p1 = Point[{0.5,0.5}]; p2 = Point[{-0.5,0.5}];
p3 = Point[{0.5,0}]; p4 = Point[{0,-0.9}];
g = Geodesic[p1, p2];
l = Line[p1,p3];
gn = Polygon[{p1,p2,p4}];
HDraw[{PointSize[0.02], p1, p2, p3, p4, g,
	Thickness[0.01], gn, l}]

Inversions of a octagon

poly0 = NGP[RegularPolygon[8,2*Pi/3]];
diag0 = Diagonals[poly0];

g1 = Geodesic @@ Part[poly0, 1, {1,2}];
inv1 = Inversion[g1];
diag1 = Map[inv1, diag0];
poly1 = inv1[poly0];

g2 = Geodesic @@ Part[poly1, 1, {3,4}];
inv2 = Inversion[g2];
diag2 = Map[inv2, diag1];
poly2 = inv2[poly1];

SetOptions[PointLabel, DefaultFont -> {"Times-Roman", 18}];
octlabel = {PointLabel[ZPoint[-0.2+0.65*I],"g1"],
	PointLabel[ZPoint[0.8+0.05*I],"g2"]};

HDraw[{Thickness[0.003], 
	{color1, poly0 /. Polygon -> FilledPolygon}, 
	diag0,
	{color2, poly1 /. Polygon -> FilledPolygon}, 
	diag1,
	{color3, poly2 /. Polygon -> FilledPolygon}, 
	diag2, g1, g2, octlabel}]

Inversion of polygon accross the edges

poly8 = N[RegularPolygon[8,Pi/2]];
invpolys = HypInvertPolygon[poly8];

HDraw[{invpolys, RGBColor[0.6,0.1,0.1], 
	poly8 /. Polygon -> FilledPolygon}]

A triangle tessellation

tri = NGP[TriangleFromAngles[Pi/3, Pi/4, Pi/4]] /.
	Polygon -> FilledPolygon;

gp = TriangleGroup[3,4,4,7]; Length[gp]

HDraw[{color3, Thickness[0.002], 
	gp /. Polygon -> FilledPolygon, 
	color2, tri}]

A 4-gon tessellation

poly4 = NGP[RegularPolygon[4, Pi/3]];
grp4 = PolygonInvGroup[poly4,3]; Length[grp4]

diag = Map[Diagonals, grp4];
bisect = Map[Bisectors, grp4];

HDraw[{Thickness[0.003], grp4, bisect, diag},
	Hyperbolic -> True, DrawUnitCircle -> False]

Black and white 4-gon tessellation

poly = NGP[RegularPolygon[4, Pi/3]];
tess1 = PolygonInvGroup[poly, 1];
tess2 = PolygonInvGroup[poly, 2];
tess3 = PolygonInvGroup[poly, 3];
Length[tess3]

HDraw[{black, tess3 /. 
    Polygon -> PlainFilledPolygon, 
    white, tess2 /. 
    Polygon -> PlainFilledPolygon,
    black, tess1 /. 
    Polygon -> PlainFilledPolygon,
    white, poly /. 
    Polygon -> PlainFilledPolygon},
	DrawUnitCircle -> False]

A 8-gon tessellation

poly8 = NGP[RegularPolygon[8, 2*Pi/3]];
grp8 = PolygonInvGroup[poly8,2]; Length[grp8]

diag8 = Map[Diagonals, grp8];

HDraw[{Thickness[0.003], grp8, diag8},
	DrawUnitCircle -> False]

A 6-gon

poly = NGP[RegularPolygon[6,Pi/4]];
pg = PolygonInvGroup[poly,3];

diag = Map[Diagonals, pg];

HDraw[{Thickness[0.003], pg, Diagonals[poly]}, 
	DrawUnitCircle -> False]

An 18-gon

gon18 = NGP[RegularPolygon[18, 2*Pi/3, 0]];
group18 = PolygonInvGroup[gon18,1];
inv = PolygonInversion[gon18];
z = ZPoint[0.0];
imp = Map[#[z]&, inv];

angles = Map[Angle, imp];
lpos = Map[1.15*{Cos[#], Sin[#]}&, angles];
lab = {"CDCiDi","CD","C","Di","DiCi","CiDi","Ci","D","DC","DCDiCi",
        "BA","B","Ai","AiBi","BiAi","Bi","A","AB"};
ptl = Table[Text[FontForm[lab[[i]],
        {"Times-Roman", 16}], lpos[[i]],
        {0,0}, lpos[[i]]], {i,1,Length[imp]}];

HDraw[{Thickness[0.004], {GrayLevel[0.85], 
	group18 /. Polygon -> FilledPolygon,
	GrayLevel[0.6], gon18 /. Polygon -> FilledPolygon}, 
	ptl}]

Drawing a set of filled polygons

p = Map[N[UnitPolygon[#]]&, {64, 32, 16, 8, 4}];

HDraw[{{
	GrayLevel[0], p[[1]],
	RGBColor[0.0,0.4,0.9], p[[2]],
	RGBColor[0,0.9,0.4], p[[3]],
	RGBColor[0.9,0.9,0.1], p[[4]],
	RGBColor[0.9,0.1,0.1], p[[5]]} /. 
		Polygon -> PlainFilledPolygon}, 
	DrawUnitCircle -> False]