Sangakus

Sangaku or San Gaku are colorful wooden tablets which were hung often in shinto shrines and sometimes in buddhist temples in Japan and posing typical and elegant mathematical problems. The problems featured on the sangaku are problems of japanese mathematics (wasan). The earliest sangaku found date back to the beginning of the 17th century.

Example 1


[PDF] [TEX]
\documentclass[border=10]{standalone}
\usepackage{tkz-euclide} 
\begin{document}
\begin{tikzpicture}[scale = 1.75]
   \tkzDefPoint(0,0){B} 
   \tkzDefPoint(0,8){A} 
   \tkzDefSquare(A,B) \tkzGetPoints{C}{D}
   \tkzDrawPolygon(A,...,D)
   \tkzClipPolygon(A,...,D)
   \tkzDefMidPoint(D,A)\tkzGetPoint{F}
   \tkzDefMidPoint(C,B)\tkzGetPoint{E}
   \tkzDefMidPoint(A,C)\tkzGetPoint{Q}
   \tkzFillPolygon[color = green](A,B,C,D)
   \tkzDrawCircle[fill = orange](B,A)
   \tkzDrawCircle[fill = purple](E,B)  
   \tkzDefLine[tangent from =B](F,A)
   \tkzInterLL(F,tkzSecondPointResult)(C,D)
   \tkzInterLL(A,tkzPointResult)(F,E) 
   \tkzDrawCircle[fill = yellow](tkzPointResult,Q)  
   \tkzDefPointBy[projection= onto B--A](tkzPointResult)
   \tkzDrawCircle[fill = blue!50!black](tkzPointResult,A)
\end{tikzpicture}
\end{document}

Example 2

Example 2.

[PDF] [TEX]
\documentclass[border=10]{standalone}
\usepackage{tkz-euclide} 

\begin{document}

\begin{tikzpicture}[scale = 1.5]
 \tkzInit[xmax = 8,ymax=8] \tkzClip
 \tkzDefPoint(0,0){B} \tkzDefPoint(8,0){C}
 \tkzDefPoint(0,8){A} \tkzDefPoint(8,8){D}
 \tkzDefSquare(B,C)   \tkzGetPoints{D}{A}
 \tkzDrawPolygon(B,C,D,A)
 \tkzClipPolygon(A,B,C,D) 
 \tkzFillPolygon[color = blue!50!black](A,B,C,D)
 \tkzDefTriangle[equilateral](B,C) \tkzGetPoint{M}
 \tkzFillPolygon[color = purple](B,C,M)
 \tkzInterLL(D,M)(A,B)   \tkzGetPoint{N}
 \tkzDefPointBy[rotation=center N angle -60](D) 
 \tkzGetPoint{L}
 \tkzDefLine[bisector](C,B,M) \tkzGetPoint{x}
 \tkzDefLine[bisector](N,L,B) \tkzGetPoint{y}
 \tkzInterLL(L,y)(B,x)  \tkzGetPoint{H}
 \tkzDefLine[bisector](M,C,D)  \tkzGetPoint{u}
 \tkzDefLine[bisector](L,D,C)   \tkzGetPoint{v}
 \tkzDefPointBy[projection=onto C--B](H) \tkzGetPoint{I}
 \tkzFillPolygon[color = orange,opacity = .5](D,N,L) 
 \tkzFillCircle[color = yellow](H,I)
 \tkzInterLL(C,u)(D,v)  \tkzGetPoint{K}
 \tkzDefPointBy[projection=onto C--D](K) \tkzGetPoint{J}
 \tkzDefPointBy[projection=onto B--C](M) \tkzGetPoint{E}
 \tkzFillCircle[color = yellow](K,J) 
\end{tikzpicture}


\end{document}

Example 3


[PDF] [TEX]
\documentclass{standalone}
\usepackage{tkz-euclide}
\makeatletter
\def\threecircles(#1,#2)(#3,#4)(#5,#6,#7,#8){%
\begingroup
   \tkzDefPoint(0,#2){#1}
   \tkzDefPoint(0,0){#6}
   \tkzDefPoint(1,0){tkz@x} 
   \tkzDefPoint(0,-#4){tkz@p}
   \tkzDefPoint(-#2,0){tkz@i}
   \tkzDefPoint(-#2,-#2){tkz@s} 
   \tkzDefMidPoint(A,tkz@p)
   \tkzInterLC(E,tkz@x)(tkzPointResult,A) 
   \ifdim #2 pt > #4 pt 
   \tkzDefPointsBy[symmetry= center tkzFirstPointResult](#6,tkz@p){#8,#3}
   \else \tkzDefPointsBy[symmetry= center tkzSecondPointResult](#6,tkz@p){#8,#3}
   \fi
   \tkzDefShiftPoint[#8](#4,-#4){tkz@r}
   \tkzInterLL(#1,#6)(tkz@i,tkz@r)                  \tkzGetPoint{tkz@e}  
   \tkzDefShiftPoint[#8](#4,0){tkz@m}
   \tkzInterLL(#3,#8)(tkz@s,tkz@m)                  \tkzGetPoint{tkz@f}
   \tkzInterCC(#1,tkz@e)(#3,tkz@f)                  \tkzGetPoints{#5'}{#5}
   \tkzDefPointBy[projection=onto #6--#8](#5)       \tkzGetPoint{#7}
\endgroup
}
\makeatother

\begin{document}
  \begin{tikzpicture}[scale=1]
    \pgfmathsetmacro{\a}{4} \pgfmathsetmacro{\b}{3}
    \threecircles(A,4)(B,3)(C,E,G,F)
    \tkzDrawSegment[color = red](E,F)
    \tkzDrawCircle[orange,fill=orange!20](A,E)
    \tkzDrawCircle[purple,fill=purple!20](B,F)
    \tkzDrawCircle[teal,fill=teal!20](C,G)
  \end{tikzpicture}
\end{document}