%
%	gbb60166@gmail.com	https://unilab.gbb60166.jp/prekou/prekou.htm
%
% aspectratio= は 1610, 169, 149, 54, 32 の中から選べる（省略時は 43）
% C:\texlive\2024\texmf-dist\tex\latex\beamer\beamer.cls
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfpagemode=FullScreen},aspectratio=169]{beamer}
%\documentclass[20pt,dvipdfmx,usepdftitle=false,hyperref={pdfstartview={XYZ null null 8.00}},aspectratio=169]{beamer}
\documentclass[20pt,dvipdfmx,usepdftitle=false,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,tsayusen,shiika,sfkanbun,jdkintou,plext}
\usepackage{type1cm,furikana}
\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{tikz-3dplot}
\usetikzlibrary{calc}
%\usetikzlibrary{arrows.meta,patterns,angles,intersections,backgrounds}
%\usepackage{animate}
%\usepackage{pgfplots}
%\pgfplotsset{compat=newest}
%\pgfplotsset{compat=newest, every axis/.append style={line width=1pt}}
%\PassOptionsToPackage{dvipdfmx}{graphicx}
\nofiles

\hypersetup{% Jul 18 2023
	pdftitle={プレ高数学科（LaTeX Beamer で汎用PDFプレゼンを作る）},
	pdfauthor={gbb60166@gmail.com},
	pdfsubject={https://unilab.gbb60166.jp/prekou/prekou.htm}
	}

% フォントはお好みで
%\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}

\newcommand{\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
\newcommand{\hooklen}[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{CUDBrightCyan}{fg=black,bg=CUDBrightCyan}
\setbeamercolor{CUDCream}{fg=black,bg=CUDCream!75}

%\setbeamercolor{frametitle}{use=structure,fg=white,bg=structure.fg}
%\setbeamercolor{palette primary}{use=structure,fg=white,bg=structure.fg}
%\setbeamercolor{frametitle}{bg=CUDOrange}
%\setbeamercolor{palette primary}{bg=CUDOrange}
%\setbeamercolor{frametitle}{bg=CUDCyan!25,fg=black}
%\setbeamercolor{palette primary}{bg=CUDCyan!25,fg=black}
%\setbeamercolor{frametitle}{bg=CUDCream!75,fg=black!80}
%\setbeamercolor{palette primary}{bg=CUDCream!75,fg=black!80}

\newcommand{\myfrac}[2]{\mathchoice%■ 修正 Oct 8,2023
	{%\fontsize{20}{20}\selectfont%	\displaystyle
		\frac{\raisebox{-.6ex}{\(#1\)}}{\raisebox{.4ex}{\(#2\)}}}%
	{\textstyle{\frac{#1}{#2}}}%	\textstyle
	{%\fontsize{13}{13}\selectfont%	\scriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	{%\fontsize{11}{11}\selectfont%	\scriptscriptstyle
		\frac{\raisebox{0ex}{\(#1\)}}{\raisebox{-.4ex}{\(#2\)}}}%
	}


\begin{document}

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

% 昔書いたコードの流用なので分かりにくいです。時間があれば修正するかも…

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


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

\begin{frame}[t]
\frametitle{公式（三角形の面積$S$）}
\centerline{%
\begin{minipage}[c]{0.98\textwidth}
\begin{beamercolorbox}[wd=\textwidth,ht=4ex,dp=2.6ex,shadow=true,
	rounded=true, center]{CUDCream}
\( S=\myfrac{\,1\,}{2}bc\sin A=\myfrac{\,1\,}{2}ca\sin B
	=\myfrac{\,1\,}{2}ab\sin C \)
\end{beamercolorbox}
\end{minipage}
}

\vskip3ex
\centerline{\textcolor{CUDRed}{\Large 教科書の言い分はこれだけど…}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{公式（三角形の面積$S$）}
\centerline{%
\begin{minipage}[c]{0.76\textwidth}
\begin{beamercolorbox}[wd=\textwidth,ht=4ex,dp=2.6ex,shadow=true,
	rounded=true, center]{CUDCream}
\( S= \myfrac{\,1\,}{2}\times\text{辺}\times\text{辺}\times
	\sin\text{\kana{間}{あいだ}の角度} \)
\end{beamercolorbox}
\end{minipage}
}

\vskip3ex
\centerline{\textcolor{CUDRed}{\LARGE 覚えるのはこれひとつ}}
\bigskip
\centerline{\textcolor{CUDRed}{\large こっちがわかりやすい（たぶん…）}}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{三角形の面積$S$を求めよ（その$1$）}
\begin{minipage}{0.35\textwidth}
\begin{tikzpicture}[ultra thick,scale=1, line join=round]
\coordinate(O) at (0,0);
\coordinate(A) at (60:4);%極座標（角度：半径）
\coordinate(B) at (5,0);

\draw[line cap=round](A)--(B);
\draw[CUDRed,line cap=round](A)--(O)--(B);

\draw[dashed] (O) to[out=-30,in=210]
	node[CUDGreen,inner sep=2pt, semithick, fill=white]{\small $5$} (B);

\draw[dashed] (O) to[out=90,in=210]
	node[CUDGreen,inner sep=2pt, semithick, fill=white]{\small $4$} (A);

\draw[CUDRed,line width=2pt](20pt,0)
	arc [start angle=0, end angle=60, radius=20pt];
\draw(O)++(36pt,20pt) node[CUDRed]{$60^\circ$};
\visible<5->{%
	\begin{scope}[scale=1.4,xshift=3em,yshift=6ex,semithick]
	\filldraw[fill=CUDBrightCyan,draw=black](0,0)
		--(1,0)--($ (1,{sqrt(3)}) $)--cycle;
	\draw[CUDBlue](0.3,0.9) node{\scriptsize$2$}
			(0.5,-0.3) node{\scriptsize$1$}
			(1.3,0.8) node{\scriptsize$\sqrt{3}$};
	\draw(1,0)++(-6pt,0)--++(0,6pt)--++(6pt,0);
	\draw[CUDRed](6pt,0)
		arc [start angle=1, end angle=59, radius=6pt];
	\draw(14pt,6pt) node[CUDRed]{\fontsize{6pt}{6pt}\selectfont
					\( 60^\circ \)};
	\end{scope}
	}
\end{tikzpicture}
\end{minipage}
\pause
%
%
\begin{minipage}{0.6\textwidth}
\vspace*{-1zh}
	\begin{eqnarray*}
	& & \alt<2>{\myfrac{\,1\,}{2}\times\text{\textcolor{CUDGreen}{辺}}\times\text{\textcolor{CUDGreen}{辺}}\times\sin\text{\textcolor{CUDRed}{角度}}}
		{\myfrac{\,1\,}{2}\times\makebox[1zw]{\textcolor{CUDGreen}{\(5\)}}\times\makebox[1zw]{\textcolor{CUDGreen}{\(4\)}}\times
		\alt<4->{\textcolor{CUDBlue}{\sin\makebox[2zw]{\(60^\circ\)}}}{\sin\makebox[2zw]{\textcolor{CUDRed}{\(60^\circ\)}}}} \\\pause[6]
	&=& \myfrac{\,1\,}{2}\times5\times4\times
		\textcolor{CUDBlue}{\myfrac{\sqrt{3}}{2}} \\ \pause
	&=& \myfrac{\,1\,}{\Slash{2}}\times5\times\Slash{4}\times
		\myfrac{\sqrt{3}}{\Slash{2}} \\ \pause
	&=& \quad 5\sqrt{3} \quad\text{\□答}
	\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
% ■ このページはソースを改良した
\frametitle{三角形の面積$S$を求めよ（その$2$）}
\begin{minipage}{0.35\textwidth}
\begin{tikzpicture}[scale=0.6,ultra thick, line join=round,
	gbb/.style={fill=white,inner sep=2pt},
	>=stealth, baseline=(current bounding box.north)]
\coordinate(A) at (0,0);
\coordinate(B) at (220:10);
\coordinate(C) at (265:8);

\draw[line cap=round](B)--(C);
\draw[CUDRed,line cap=round](B)--(A)--(C);

\begin{scope}
\clip (A)--(B)--(C)--cycle;
\draw[CUDRed] (A) circle (3ex);
\end{scope}

\draw[dashed,text=CUDGreen](B) to[out=60,in=190] node[gbb]{\small $10$}(A)
	to[out=-70,in=60] node[gbb]{\small $8$}(C);
\draw[CUDRed](A) node[xshift=-0.8em,yshift=-3ex]{\footnotesize $45^\circ$};

\visible<5->{\begin{scope}[scale=2.8,xshift=-3em,yshift=-1ex,semithick]
	\filldraw[fill=CUDBrightCyan,draw=black](0,0)--(1,0)--(1,1)--cycle;
	\draw[CUDBlue](0.2,0.7) node{\scriptsize$\sqrt{2}$}
		(0.5,-0.2) node{\scriptsize$1$}
		(1.2,0.5) node{\scriptsize$1$};
	\draw(1,0)++(-6pt,0)--++(0,6pt)--++(6pt,0);
	\draw[CUDRed](6pt,0) arc [start angle=1, end angle=44, radius=6pt];
	\draw(14pt,6pt) node[CUDRed]{\footnotesize\( 45^\circ \)};
	\end{scope}
	}
\end{tikzpicture}
\end{minipage}
\pause
%
%
\begin{minipage}{0.6\textwidth}
\vspace*{-1zh}
	\begin{eqnarray*}
	& & \alt<2>{\myfrac{\,1\,}{2}\times\text{\textcolor{CUDGreen}{辺}}\times\text{\textcolor{CUDGreen}{辺}}\times\sin\text{\textcolor{CUDRed}{角度}}}
		{\myfrac{\,1\,}{2}\times\makebox[1zw]{\textcolor{CUDGreen}{\(10\)}}\times\makebox[1zw]{\textcolor{CUDGreen}{\(8\)}}\times
		\alt<4->{\textcolor{CUDBlue}{\sin\makebox[2zw]{\(45^\circ\)}}}{\sin\makebox[2zw]{\textcolor{CUDRed}{\(45^\circ\)}}}} \\\pause\pause\pause\pause
	&=& \myfrac{\,1\,}{2}\times10\times8\times\textcolor{CUDBlue}{\myfrac{1}{\sqrt{2}}} \\ \pause
	&=& \myfrac{40}{\sqrt{2}} \pause
=\myfrac{40\textcolor{CUDRed}{\scriptstyle\times\sqrt{2}}}{
\sqrt{2}\textcolor{CUDRed}{\scriptstyle\times\sqrt{2}}} \pause
=\myfrac{40\sqrt{2}}{2} \\ \pause
	& & \hspace*{.4\textwidth} =20\sqrt{2} \quad\text{\□答}
	\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{三角形の面積$S$を求めよ（その$3$）}
%\vspace*{-16ex}
%\begin{minipage}{0.35\textwidth}
\begin{tikzpicture}[very thick,scale=1, line join=round, >=stealth,
	baseline={( [yshift=-10ex] current bounding box.north)}]
\coordinate(O) at (0,0);
\coordinate(A) at (120:4);%極座標（角度：半径）
\coordinate(B) at (3,0);

\draw[line cap=round](A)--(B);
\draw[CUDRed,line cap=round](A)--(O)--(B);

\draw[dashed](O) to[out=-30,in=210]
	node[CUDGreen,inner sep=2pt, semithick, fill=white]{\small $6$} (B);
\draw[dashed] (O) to[out=150,in=270]
	node[CUDGreen,inner sep=2pt, semithick, fill=white]{\small $8$} (A);

\draw[CUDRed](9pt,0)
	arc [start angle=0, end angle=120, radius=9pt];
\draw(O)++(6pt,24pt) node[CUDRed]{\scriptsize$120^\circ$};
\visible<5->{%
	\begin{scope}[xshift=-0.2em,yshift=-6ex,thick]
	\draw[->](-1.5,0)--++(2,0);
	\draw[->](0,-0.5)--++(0,2);
	\filldraw[very thick,fill=CUDBrightCyan!75,text=CUDBlue]
		(0,0)
		--(-1,1.732) node[pos=0.3,above]{\scriptsize$2$}
		-- node[left,CUDBlue]{\scriptsize$\sqrt{3}$} (-1,0)
		-- node[yshift=-1ex,CUDBlue]{\scriptsize$-1$} cycle;
	\draw(-1,0)++(6pt,0)--++(0,6pt)--++(-6pt,0);
	\draw[CUDRed](6pt,0)
		arc [start angle=1, end angle=119, radius=6pt];
	\draw(12pt,12pt) node[CUDRed]
		{\fontsize{8pt}{8pt}\selectfont$120^\circ$};
	\end{scope}
	}
\end{tikzpicture}
%\end{minipage}
\pause
%
%
\begin{minipage}{0.6\textwidth}
\vspace*{-1zh}
	\begin{eqnarray*}
	& & \alt<2>{\myfrac{\,1\,}{2}\times\text{\textcolor{CUDGreen}{辺}}\times\text{\textcolor{CUDGreen}{辺}}\times\sin\text{\textcolor{CUDRed}{角度}}}
		{\myfrac{\,1\,}{2}\times\makebox[1zw]{\textcolor{CUDGreen}{\(8\)}}\times\makebox[1zw]{\textcolor{CUDGreen}{\(6\)}}\times
		\alt<4->{\textcolor{CUDBlue}{\sin\makebox[2zw]{\(120^\circ\)}}}{\sin\makebox[2zw]{\textcolor{CUDRed}{\(120^\circ\)}}}} \\\pause\pause\pause\pause
	&=& \myfrac{\,1\,}{2}\times8\times6\times
		\textcolor{CUDBlue}{\myfrac{\sqrt{3}}{2}} \\ \pause
	&=& \myfrac{\,1\,}{\,\Slash{2}}\times\Slash{8}^{\raisebox{0.5ex}{\textcolor{CUDOrange}{$4$}}}
		\hskip-0.7em
		\times
		\Slash{6}^{\raisebox{0.5ex}{\textcolor{CUDOrange}{$3$}}}
		\hskip-0.7em
		\times
		\myfrac{\sqrt{3}}{\,\Slash{2}} \\ \pause
	&=& \hskip2em \textcolor{CUDOrange}{12}\sqrt{3} \quad\text{\□答}
	\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{三角形の面積$S$を求めよ（その$4$）}
\begin{minipage}{0.35\textwidth}
% ■ このページはソースを改良した
\begin{tikzpicture}[scale=2.5,ultra thick, line join=round,
	gbb/.style={fill=white,inner sep=2pt},
	>=stealth, baseline=(current bounding box.north)]
\coordinate(A) at (0,0);
\coordinate(B) at (110:2);
\coordinate(C) at ($ (170:{sqrt(3)}) $);

\draw[line cap=round](B)--(C);
\draw[CUDRed,line cap=round](B)--(A)--(C);

\begin{scope}
\clip (A)--(B)--(C)--cycle;
\draw[CUDRed](A) circle (0.8ex);
\end{scope}

\draw[dashed,text=CUDGreen](B) to[out=-45,in=90] node[gbb]{\small $2$}(A)
	to[out=200,in=-45] node[gbb]{\small $\sqrt{3}$}(C);
\draw[CUDRed](A) node[xshift=-1.2em,yshift=2.4ex]{\footnotesize $60^\circ$};

\visible<5->{\begin{scope}[scale=0.6,xshift=-4em,yshift=6ex,semithick]
	\filldraw[fill=CUDBrightCyan,draw=black](0,0)
		--(1,0)--($ (1,{sqrt(3)}) $)--cycle;
	\draw[CUDBlue](0.3,0.9) node{\scriptsize$2$}
			(0.5,-0.3) node{\scriptsize$1$}
			(1.3,0.8) node{\scriptsize$\sqrt{3}$};
	\draw(1,0)++(-6pt,0)--++(0,6pt)--++(6pt,0);
	\draw[CUDRed](6pt,0) arc [start angle=1, end angle=59, radius=6pt];
	\draw(14pt,6pt) node[CUDRed]{\footnotesize\( 60^\circ \)};
	\end{scope}
	}
\end{tikzpicture}
\end{minipage}
\pause
%
%
\begin{minipage}{0.6\textwidth}
\vspace*{-1.4zh}
	\begin{eqnarray*}
	& & \alt<2>{\myfrac{\,1\,}{2}\times\text{\textcolor{CUDGreen}{辺}}\times\text{\textcolor{CUDGreen}{辺}}\times\sin\text{\textcolor{CUDRed}{角度}}}
		{\myfrac{\,1\,}{2}\times\makebox[1zw]{\textcolor{CUDGreen}{\(\sqrt{3}\)}}\times\makebox[1zw]{\textcolor{CUDGreen}{\(2\)}}\times
		\alt<4->{\textcolor{CUDBlue}{\sin\makebox[2zw]{\(60^\circ\)}}}{\sin\makebox[2zw]{\textcolor{CUDRed}{\(60^\circ\)}}}} \\\pause\pause\pause\pause
	&=& \myfrac{\,1\,}{2}\times\sqrt{3}\times2\times\textcolor{CUDBlue}{\myfrac{\sqrt{3}}{2}} \\ \pause
	&=& \myfrac{\,1\,}{2}\times\sqrt{3}\times\Slash{2}\times\myfrac{\sqrt{3}}{\Slash{2}} \\ \pause
	&=& \quad\myfrac{\lower.5ex\hbox{\,\(3\)\,}}{\lower-.3ex\hbox{\(2\)}} \quad\text{\□答}\ 
	\textcolor{CUDRed}{\scriptstyle (\sqrt{3}\times\sqrt{3}\:=\:3 \text{です})}
	\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%



\end{document}

