%
%	gbb60166@gmail.com	https://unilab.gbb60166.jp/prekou/prekou.htm
%
% aspectratio= は 1610, 169, 149, 54, 32 の中から選べる（省略時は 43）
% C:\texlive\2023\texmf-dist\tex\latex\beamer\beamer.cls
%\documentclass[17pt,dvipdfmx,hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer}
%\documentclass[17pt,dvipdfmx,hyperref={pdfstartview={XYZ null null 8.00}},aspectratio=169]{beamer}
\documentclass[17pt,dvipdfmx,aspectratio=169]{beamer}
% pdfの栞の字化けを防ぐ
%\AtBeginDvi{\special{pdf:tounicode EUC-UCS2}}
% テーマ
\usetheme{Copenhagen}
% navi. symbolsは目立たないが，dvipdfmxを使うと機能しないので非表示に
\setbeamertemplate{navigation symbols}{} 
\usepackage{bxdpx-beamer,pxjahyper,minijs}
%\usepackage{graphicx}
%\usepackage{tkokugo,furikana,tsayusen,shiika,sfkanbun,jdkintou,plext}
\usepackage{type1cm}
\usepackage[deluxe]{otf}
%\usepackage{tikzsymbols}
%\usepackage[dvipdfmx]{graphicx}%
\def\pgfsysdriver{pgfsys-dvipdfmx.def}%（graphicxパッケージを使用しない場合はこの行を有効に）
%\def\pgfsysdriver{pgfsys-dvips.def}%デフォルト
%\usepackage[e]{esvect}
\usepackage{tikz}%（これで、pgfとpgfforが読み込まれます。）
\usepackage{setspace}
%\usepackage{tikz-3dplot}
\usetikzlibrary{calc,intersections}
%\usetikzlibrary{arrows.meta,patterns,angles,backgrounds}
%\usepackage{animate}
%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
%\pgfplotsset{compat=newest, every axis/.append style={line width=1pt}}
%\PassOptionsToPackage{dvipdfmx}{graphicx}
\nofiles

% フォントはお好みで
%\usepackage{txfonts}

\mathversion{bold}
\renewcommand{\familydefault}{\sfdefault}
\renewcommand{\seriesdefault}{bx}
\renewcommand{\kanjifamilydefault}{\gtdefault}
\renewcommand{\kanjiseriesdefault}{bx}
\setbeamerfont{title}{size=\normalsize,series=\bfseries}
\setbeamerfont{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{frametitle}[default][center]
\usefonttheme{professionalfonts}

% 参考にしたURL
% http://windom.phys.hirosaki-u.ac.jp/fswiki/wiki.cgi?page=LaTeX+Beamer%A4%C7%A5%D7%A5%EC%A5%BC%A5%F3%A5%C6%A1%BC%A5%B7%A5%E7%A5%F3

\newcommand{\Slash}[1]{\ooalign{\hfil\kern-3pt／\hfil\crcr$#1$}}
\everymath{\displaystyle}

\def\maruwaku#1{\begin{tikzpicture}[scale=0.7, baseline={([yshift=-22pt] current bounding box.north)}]
\filldraw[color=CUDBlue, line width=1pt, rounded corners=2pt] (-0.1,0)--(2.1,0)--(2.1,1.1)--(-0.1,1.1)--cycle;
\draw(1,0.5) node[white]{#1};
\end{tikzpicture}
}

\setbeamersize{text margin left=5mm,text margin right=5mm}
\fboxrule=0.8pt

\makeatletter
\def\hooklen#1#2{\settowidth{\@tempdima}{\(#1\)}
%\advance\@tempdima by.3ex
% ↑ 数式モードで式の前後に入るスペースを制御したかったが、
%    難しいのでやめた。段々難解なコードになっているのでやめた方がよい？
\hbox to\@tempdima{\hfil \(#2\)\hfil}}
%■等号付き不等号 by 美文書作成入門
\newcommand{\myleqq}{\mathrel{\mathpalette\gl@align<}}
\newcommand{\mygeqq}{\mathrel{\mathpalette\gl@align>}}
\newcommand{\gl@align}[2]{\lower.6ex\vbox{\baselineskip\z@skip\lineskip\z@
	\ialign{$\m@th#1\hfil##\hfil$\crcr#2\crcr=\crcr}}}
\makeatother

% カラーユニバーサルデザインを調べたつもりだがあまり自信がありません
% http://www.fukushihoken.metro.tokyo.jp/kiban/machizukuri/kanren/color.files/colorudguideline.pdf
% http://jfly.iam.u-tokyo.ac.jp/colorset/

% ■ アクセントカラー小面積を目立たせる高彩度色
\definecolor{CUDRed}{RGB}{255,75,0}
\definecolor{CUDGreen}{RGB}{3,175,122}
\definecolor{CUDBlue}{RGB}{0,90,255}
\definecolor{CUDCyan}{RGB}{77,196,255}
\definecolor{CUDMagenta}{RGB}{153,0,153}
\definecolor{CUDYellow}{RGB}{255,241,0}
\definecolor{CUDBrown}{RGB}{128,64,0}

\definecolor{CUDOrange}{RGB}{246,170,0}

% ■ ベースカラー広い面積の塗り分けに用いる低・中彩度色
\definecolor{CUDPink}{RGB}{255,202,191}
\definecolor{CUDBrightGreen}{RGB}{119,217,168}
\definecolor{CUDLime}{RGB}{216,242,85}
\definecolor{CUDCream}{RGB}{255,255,128}
\definecolor{CUDBrightCyan}{RGB}{191,228,255}
%\definecolor{CUD}{RGB}{}%

\setbeamercolor{CUDBrightGreen}{fg=black,bg=CUDBrightGreen!50}
\setbeamercolor{CUDCream}{fg=black,bg=CUDCream!75}


\begin{document}

\title{プレ高数学科}\author{gbb60166}

%■■■ \hyperlink \beamergotobutton ボタンを大きくする
%https://tex.stackexchange.com/q/108174
\setbeamertemplate{button}{\tikz
  \node[inner xsep=3pt,
  draw=structure!80,
  text=white,
  fill=structure!50,
  rounded corners=3pt]  {\fontsize{9pt}{9pt}\selectfont\insertbuttontext};}
%\setbeamertemplate{button}{size=\Large}
%\setbeamerfont{button}{size=\Large}

\newcommand{\drawcompass}[3]{%
%　\drawcompass{針を刺す座標}{鉛筆先の座標}{持ち手の高さ}
% ■改造してこのファイル専用にしてるので、他のファイルへ流用禁止！
	\begin{scope}[CUDBlue,semithick]
	%\tiny
	\fontsize{5}{5}\selectfont
	\coordinate(Pgbb) at ($ #2!0.5!#1!#3!-90:#1 $);%コンパスの持ち手
	\coordinate(Ugbb) at ($ #2!4ex!-90:#1 $);% 鉛筆先の少し上
	\filldraw[fill=white]($ #2!0.8ex!#1!2ex!-90:#1 $)--#2%鉛筆三角
		--($ #2!-0.8ex!#1!2ex!-90:#1 $);
	\fill($ #2!0.4ex!#1!1ex!-90:#1 $)--#2% 鉛筆芯
		--($ #2!-0.4ex!#1!1ex!-90:#1 $)--cycle;
	\filldraw[CUDBlue,fill=white]($ #2!0.8ex!#1!2ex!-90:#1 $)%鉛筆本体
		--($ #2!0.8ex!#1!10ex!-90:#1 $)
		--($ #2!-0.8ex!#1!10ex!-90:#1 $)
		--($ #2!-0.8ex!#1!2ex!-90:#1 $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ #2!0.3ex!#1!2ex!-90:#1 $)%本体の中線
		--($ #2!0.3ex!#1!10ex!-90:#1 $)
		--($ #2!-0.3ex!#1!10ex!-90:#1 $)
		--($ #2!-0.3ex!#1!2ex!-90:#1 $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ #2!1ex!#1!3ex!-90:#1 $)%鉛筆を巻く金具
		--($ #2!1ex!#1!6ex!-90:#1 $)--($ #2!-1ex!#1!6ex!-90:#1 $)
		--($ #2!-1ex!#1!3ex!-90:#1 $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ #1!2ex!(Pgbb)!0.5ex!-90:#1 $)% 針先から持ち手交点
		--($ (Pgbb)!0.5ex!-90:#1 $)--($ (Pgbb)!-0.5ex!-90:#1 $)
		--($ #1!2ex!(Pgbb)!-0.5ex!-90:#1 $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ #1!2ex!(Pgbb)!0.2ex!-90:#1 $)% 針先
		--#1--($ #1!2ex!(Pgbb)!-0.2ex!-90:#1 $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ (Ugbb)!-0.45ex!-90:(Pgbb) $)% 鉛筆先の少し上から持ち手交点
		--($ (Pgbb)!0.45ex!-90:(Ugbb) $)
		--($ (Pgbb)!-0.45ex!-90:(Ugbb) $)
		--($ (Ugbb)!0.45ex!-90:(Pgbb) $)--cycle;
	\filldraw[fill=white,draw=CUDBlue]
		($ #2!0.5!#1!0.5ex!#1!#3-1ex!-90:#1 $)%持ち手
		--($ #2!0.5!#1!0.5ex!#1!#3+3ex!-90:#1 $)
		--($ #2!0.5!#1!-0.5ex!#1!#3+3ex!-90:#1 $)
		--($ #2!0.5!#1!-0.5ex!#1!#3-1ex!-90:#1 $)--cycle;
	\fill[CUDBlue]($ #2!0.5!#1!1ex!#1!#3-3ex!-90:#1 $)%留め具
		--($ #2!0.5!#1!1ex!#1!#3+1ex!-90:#1 $)
		--($ #2!0.5!#1!-1ex!#1!#3+1ex!-90:#1 $)
		--($ #2!0.5!#1!-1ex!#1!#3-3ex!-90:#1 $)--cycle;
	%\foreach \p in {A,B,Pgbb,Ugbb}
	%	\fill[red](\p) circle(0.1ex);%■試行錯誤時の目印
	\end{scope}
	}

%■■■■■■■■■■■■■　テスト領域　■■■■■■■■■■■■■■


%\end{document}
%■■■■■■■■■■■■■　完成品　■■■■■■■■■■■■■■

\begin{frame}[t,label=mondai]
\frametitle{今週の問題}
\begin{tikzpicture}[scale=1.8, thick, line join=round,
	>=stealth, baseline={([yshift=-12pt] current bounding box.north)}]
%\draw[help lines](-1.1,-1.1) grid (1.1,1.1);
\useasboundingbox(-1.1,-1.1) rectangle (1.1,1.1);
\coordinate (O) at (0,0);
\filldraw[fill=CUDCream,draw=black] (0,0) circle (1);
\fill[CUDRed] (O) circle (1pt);
\end{tikzpicture}
\hfill
\begin{minipage}[t]{0.68\textwidth}
コンパスだけを使って円を描き、その円周を$4$等分しなさい。

\centerline{\footnotesize たけしのコマ大数学科 DVDBOX 第$3$期}
\vskip-8pt
\centerline{\footnotesize $6$時限、問\ajMaru{26}、ナポレオン}

\medskip
\centerline{\textcolor{CUDRed}{\footnotesize ※円と円の接点は、
	ハッキリしないので使用不可}}

\medskip
\begin{spacing}{0.9}
\small
ナポレオンは数学愛好者で、遠征に行った先で数学の問題を
いろいろと収集したそうです。
\end{spacing}

\vskip2ex
\centerline{\hyperlink{chottomate}{\beamergotobutton{ヒントはこちら}}}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{解答}
\begin{tikzpicture}[scale=1.5, thick, line join=round,
	>=stealth, baseline={([yshift=-12pt] current bounding box.north)}]
%　計算して正確に描画しているつもりだが、どこかでポカしているかもしれません
%　foreach構文でもっとシンプルに書いた方が良いですね
\footnotesize
\visible<3->{\filldraw[fill=CUDCream,draw=black] (0,0) circle (1);}
\visible<2->{\coordinate[label=below:O] (O) at (0,0);
	\fill[CUDRed] (O) circle (1pt);}
\visible<2-3>{\drawcompass{(0,0)}{(1,0)}{9ex}}
\visible<4-5>{\drawcompass{(90:1)}{(30:1)}{9ex}
	\draw[CUDMagenta](-50:1)++(0,1)
		arc [start angle=-50, end angle=-10,radius=1];
	}
\visible<5->{\coordinate[label=right:A] (A) at (30:1);
	\fill[CUDRed] (A) circle (1pt);
	}
\visible<6-7>{\drawcompass{(30:1)}{(-30:1)}{9ex}
	\draw[CUDMagenta](-110:1)++($ ({cos(30)},{sin(30)}) $)
		arc [start angle=-110, end angle=-70,radius=1];
	}
\visible<7->{\coordinate[label=right:B] (B) at (-30:1);
	\fill[CUDRed] (B) circle (1pt);
	}
\visible<8-9>{\drawcompass{(-30:1)}{(-90:1)}{9ex}
	\draw[CUDMagenta](-170:1)++($ ({cos(30)},{-sin(30)}) $)
		arc [start angle=-170, end angle=-130,radius=1];
	}
\visible<9->{\coordinate[label=below:C] (C) at (-90:1);
	\fill[CUDRed] (C) circle (1pt);
	}
\visible<10-11>{\drawcompass{(-90:1)}{(-150:1)}{9ex}
	\draw[CUDMagenta](-230:1)++(0,-1)
		arc [start angle=-230, end angle=-190,radius=1];
	}
\visible<11->{\coordinate[label=left:D] (D) at (-150:1);
	\fill[CUDRed] (D) circle (1pt);
	}
\visible<12-13>{\drawcompass{(-150:1)}{(150:1)}{9ex}
	\draw[CUDMagenta](-290:1)++($ ({-cos(30)},{-sin(30)}) $)
		arc [start angle=-290, end angle=-250,radius=1];
	}
\visible<13->{\coordinate[label=left:E] (E) at (150:1);
	\fill[CUDRed] (E) circle (1pt);
	}
\visible<14-15>{\drawcompass{(150:1)}{(90:1)}{9ex}
	\draw[CUDMagenta](-350:1)++($ ({-cos(30)},{sin(30)}) $)
		arc [start angle=-350, end angle=-310,radius=1];
	}
\visible<15->{\coordinate[label=above:F] (F) at (90:1);
	\fill[CUDRed] (F) circle (1pt);
	}
\visible<16>{\drawcompass{(-90:1)}{(150:1)}{7ex}
	\draw[<->,CUDGreen,ultra thick](150:1)
		-- node[fill=white,inner sep=1pt]{\scriptsize\(\sqrt{3}\)}
		(-90:1);
	\draw($(E)!6pt!(F)$)--($(E)!6pt!(F)!6pt!-90:(F)$)--($(E)!6pt!(C)$);
	\draw[<->,CUDRed,very thick](E)
		-- node[fill=white,inner sep=2pt]{\scriptsize\(1\)} (F);
	\draw[<->,CUDRed,very thick](C)
		-- node[fill=white,inner sep=2pt]{\scriptsize\(2\)} (F);
	}
\visible<17>{\drawcompass{(90:1)}{($ ({-sqrt(2)},0) $)}{7ex}}
\visible<17-19>{\draw[CUDMagenta]($ (-155:{sqrt(3)}) $)++(0,1)
		arc [start angle=-155, end angle=-135,radius={sqrt(3)}];
	}
\visible<18-19>{\drawcompass{(-90:1)}{($ ({-sqrt(2)},0) $)}{7ex}
	\draw[CUDMagenta]($ (155:{sqrt(3)}) $)++(0,-1)
		arc [start angle=155, end angle=135,radius={sqrt(3)}];
	}
\visible<19->{\coordinate[label=below:P] (P) at ($ ({-sqrt(2)},0) $);
	\fill[CUDRed] (P) circle (1pt);
	}
\visible<20>{\drawcompass{($ ({-sqrt(2)},0) $)}{(0,0)}{8ex}
	\draw[<->,CUDGreen,ultra thick]($ ({-sqrt(2)},0) $)
		-- node[fill=white,inner sep=1pt]{\scriptsize\(\sqrt{2}\)}
		(0,0);
	\draw[<->,CUDRed,very thick](P)-- node[fill=white,inner sep=1pt]
		{\scriptsize\(\sqrt{3}\)} (F);
	\draw[<->,CUDRed,very thick](F)-- node[fill=white,inner sep=2pt]
		{\scriptsize\(1\)} (O);
	}
%%%%%%%%%%%%
\visible<21-22>{\drawcompass{(90:1)}{(0:1)}{8ex}
	\draw[CUDBlue]($ (-55:{sqrt(2)}) $)++(0,1)
		arc [start angle=-55, end angle=-35,radius={sqrt(2)}];
	}
\visible<22->{\coordinate[label=left:U] (U) at (0:1);
	\fill[CUDGreen] (U) circle (1.6pt);
	}
\visible<23-24>{\drawcompass{(0:1)}{(-90:1)}{8ex}
	\draw[CUDBlue]($ (-145:{sqrt(2)}) $)++(1,0)
		arc [start angle=-145, end angle=-125,radius={sqrt(2)}];
	}
\visible<24->{\fill[CUDGreen] (C) circle (1.6pt);}
\visible<25-26>{\drawcompass{(-90:1)}{(-180:1)}{8ex}
	\draw[CUDBlue]($ (-235:{sqrt(2)}) $)++(0,-1)
		arc [start angle=-235, end angle=-215,radius={sqrt(2)}];
	}
\visible<26->{\coordinate[label=right:V] (V) at (-180:1);
	\fill[CUDGreen] (V) circle (1.6pt);
	}
\visible<27-28>{\drawcompass{(-180:1)}{(90:1)}{8ex}
	\draw[CUDBlue]($ (-325:{sqrt(2)}) $)++(-1,0)
		arc [start angle=-325, end angle=-305,radius={sqrt(2)}];
	}
\visible<28->{\fill[CUDGreen] (F) circle (1.6pt);}
\end{tikzpicture}
\hfill
\begin{minipage}[t]{0.5\textwidth}
\only<-3>{まず円を描く（円の半径を$1$とします）}
\only<4-15>{円の半径で、円周を区切ると$6$等分できる}
\only<16>{ECの長さが\(\sqrt{3}\)となるので、長さを測りとって}
\only<17-19>{F, Cから等距離の点を作図する}
\only<20>{OPの長さが\(\sqrt{2}\)となるので、長さを測りとって}
\only<21->{円周を等分すると$4$等分できる}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t,label=chottomate]
\frametitle{考え直しませんか？}
\begin{tikzpicture}[scale=1.8, thick, line join=round,  >=stealth,
	baseline={([yshift=-12pt] current bounding box.north)}]
%\draw[help lines](-1.1,-1.1) grid (1.1,1.1);
\useasboundingbox(-1.1,-1.1) rectangle (1.1,1.1);
\coordinate(O) at (0,0);
\filldraw[fill=CUDCream,draw=black] (0,0) circle (1);
\fill[CUDRed] (O) circle (1pt);
\end{tikzpicture}
\hfill
\begin{minipage}[t]{0.68\textwidth}
ヒントを見ずに、もう少し自分で考えませんか？

\vskip3zh
\centerline{\hyperlink{mondai}{\beamerreturnbutton{問題に戻る}}
	\hskip3ex\hyperlink{hint}{\beamergotobutton{やっぱりヒントを見る}}}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t,label=hint]
\frametitle{ヒント}
\begin{tikzpicture}[scale=1.8, thick, line join=round,  >=stealth,
	baseline={([yshift=-12pt] current bounding box.north)}]
%\draw[help lines](-1.1,-1.1) grid (1.1,1.1);
\useasboundingbox(-1.1,-1.1) rectangle (1.1,1.1);
\coordinate (O) at (0,0);
\scriptsize
\filldraw[fill=CUDCream,draw=black] (0,0) circle (1);
\fill[CUDRed] (O) circle (1pt);
\draw(0:1)--(270:1)--(180:1)--(90:1);
\fill[CUDGreen](0:1) circle (1pt)
	(90:1) circle (1pt)
	(180:1) circle (1pt)
	(270:1) circle (1pt);
\draw[<->,CUDRed,ultra thick](90:1)--
	node[fill=white,inner sep=1pt]{\(\sqrt{2}\)}(0:1);
\end{tikzpicture}
\hfill
\begin{minipage}[t]{0.68\textwidth}
円周を$4$等分するには、長さ\(\sqrt{2}\)を作る必要があります。

\vskip3zh
\centerline{\hyperlink{mondai}{\beamerreturnbutton{問題に戻る}}}

\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%














\end{document}

\textcolor{CUDRed}{

