%
%	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,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{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

\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{内接円の半径$r$と三角形の面積}
\begin{minipage}[t]{0.36\textwidth}
\begin{tikzpicture}[thick, scale=1.3, 
	baseline={( [yshift=-36pt] current bounding box.north)}]
%三角形の頂点を設定し，三角形を描く
\coordinate (B) at (0,0);% node [below left] at (B) {\footnotesize B};
\coordinate (C) at (4,0);% node [below right] at (C) {\footnotesize C};
\coordinate (A) at (3,3);% node [above] at (A) {\footnotesize A};
%各辺上で一定の長さの点を設定する
\coordinate (s) at ($(B)!1cm!(C)$);
\coordinate (t) at ($(B)!1cm!(A)$);
\coordinate (u) at ($(C)!1cm!(B)$);
\coordinate (v) at ($(C)!1cm!(A)$);
\coordinate (w) at ($(A)!1cm!(B)$);
\coordinate (z) at ($(A)!1cm!(C)$);
%内角の二等分線
\path (B)--($4*(s)!.5!(t)$) [name path=line B];
%\path (C)--($(u)!.5!(v)!-2.4!(C)$) [name path=line C];
\path (A)--($(z)!.5!(w)!-2.2!(A)$) [name path=line A];
%角の二等分線の交点（＝内心）
\path [name intersections={of=line B and line A}];
\coordinate (I) at (intersection-1);% node [above right] at (I) {\scriptsize I};
\only<1,4>{\fill[CUDPink] (B)--(C)--(I)--cycle;}
\only<2,4>{\fill[CUDBrightGreen] (A)--(C)--(I)--cycle;}
\only<3,4>{\fill[CUDBrightCyan] (A)--(B)--(I)--cycle;}

\draw[very thick] (B)--(C)--(A)--cycle;
\draw(B)--(I)--(C);
\draw(A)--(I);

\coordinate (D) at ($(B)!(I)!(C)$);% node [below] at (D) {\footnotesize D};
\draw[CUDBlue] (I)--(D);
\draw ($(D)!5pt!(B)$) |- ($(D)!5pt!-90:(B)$);%直角記号

\coordinate (F) at ($(A)!(I)!(B)$);% node [above left] at (F) {\footnotesize F};
\draw[CUDBlue] (I)--(F);
% ■傾いた直角記号を書く
\draw ($(F)!5pt!(A)$)--($(F)!5pt!(A)!5pt!90:(B)$)--($(F)!5pt!(I)$);

\coordinate (E) at ($(A)!(I)!(C)$);% node [above right] at (E) {\footnotesize E};
\draw[CUDBlue] (I)--(E);
% ■傾いた直角記号を書く
\draw ($(E)!5pt!(C)$)--($(E)!5pt!(C)!5pt!-90:(C)$)--($(E)!5pt!(I)$);

%内心円（半径はPからBCに下ろした垂線の長さ）
\draw[CUDRed] let \p1=($(B)!(I)!(A)-(I)$), \n1={veclen(\x1,\y1)} in circle [at=(I), radius=\n1];
\fill[CUDRed](I) circle (1.6pt);

\begin{scope}[CUDBlue,inner sep=1pt]
\footnotesize
\draw($(D)!0.5!(I)$) node[fill=white]{$r$};
\draw($(E)!0.5!(I)$) node[fill=white]{$r$};
\draw($(F)!0.5!(I)$) node[fill=white]{\footnotesize$r$};
\end{scope}

\begin{scope}[inner sep=1pt]
\small
\draw[dashed](A) to[out=200,in=70] node[fill=white]{$c$}(B);
\draw[dashed](B) to[out=-20,in=200] node[fill=white]{$a$}(C);
\draw[dashed](A) to[out=-45,in=80] node[circle,fill=white]{$b$}(C);
\end{scope}
\end{tikzpicture}
\end{minipage}
\begin{minipage}[t]{0.6\textwidth}
\vspace*{-6ex}
\begin{eqnarray*}
\only<1>{\text{面積} &=& \text{底辺}\!\times\!\text{高さ}\div2 \\
	&=& a \times r\div2 \\[1ex]
	&=& \textcolor{CUDRed}{\myfrac{\,ar \vphantom{b}\,}{2}}
	}
\only<2>{\text{面積} &=& \text{底辺}\!\times\!\text{高さ}\div2 \\
	&=& b \times r\div2 \\[1ex]
	&=& \textcolor{CUDGreen}{\myfrac{\,br\,}{2}}
	}
\only<3>{\text{面積} &=& \text{底辺}\!\times\!\text{高さ}\div2 \\
	&=& c \times r\div2 \\[1ex]
	&=& \textcolor{CUDBlue}{\myfrac{\,cr \vphantom{b}\,}{2}}
	}
\only<4>{& & \text{三角形の面積} \\[1ex]
	&=& \textcolor{CUDRed}{\myfrac{\,ar\,}{2}}+
		\textcolor{CUDGreen}{\myfrac{\,br\,}{2}}+
		\textcolor{CUDBlue}{\myfrac{\,cr\,}{2}}\\[1ex]
	&=& \myfrac{\,r\,}{2}(a+b+c)
	}
\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\begin{frame}[t]
\frametitle{\small 三辺の長さが\(5,6,7\)で
面積\(6\sqrt{6}\)のとき内接円の半径$r$？}
\begin{minipage}[t]{0.36\textwidth}
\begin{tikzpicture}[thick, scale=0.8, 
	baseline={( [yshift=-36pt] current bounding box.north)}]
\coordinate (B) at (0,0);
\coordinate (C) at (5,0);
\path($ ({7*cos(45)},{7*sin(45)}) $)
	arc[start angle=45, end angle=60, radius=7][name path=arc B];
\path(5,6) arc [start angle=90, end angle=120, radius=6][name path=arc C];
\path [name intersections={of=arc B and arc C}];
\coordinate (A) at (intersection-1);
\draw(B)--(A)--(C)--cycle;

\begin{scope}[inner sep=1pt]
\small
\draw[dashed](A) to[out=200,in=90] node[fill=white]{$7$}(B);
\draw[dashed](B) to[out=-20,in=200] node[fill=white]{$5$}(C);
\draw[dashed](A) to[out=-45,in=70] node[circle, fill=white]{$6$}(C);
\end{scope}
%各辺上で一定の長さの点を設定する
\coordinate (s) at ($(B)!1cm!(C)$);
\coordinate (t) at ($(B)!1cm!(A)$);
%\coordinate (u) at ($(C)!1cm!(B)$);
%\coordinate (v) at ($(C)!1cm!(A)$);
\coordinate (w) at ($(A)!1cm!(B)$);
\coordinate (z) at ($(A)!1cm!(C)$);
%内角の二等分線
\path (B)--($5*(s)!.5!(t)$) [name path=line B];
\path (A)--($(z)!.5!(w)!-4!(A)$) [name path=line A];
%角の二等分線の交点（＝内心）
\path [name intersections={of=line B and line A}];
\coordinate (I) at (intersection-1);
%内心円（半径はPからBCに下ろした垂線の長さ）
\draw[CUDRed] let \p1=($(B)!(I)!(A)-(I)$), \n1={veclen(\x1,\y1)}
	in circle [at=(I), radius=\n1];
\coordinate (D) at ($(B)!(I)!(C)$);% node [below] at (D) {\footnotesize D};
\draw[CUDBlue] (I)--(D);
\draw ($(D)!8pt!(B)$) |- ($(D)!8pt!-90:(B)$);%直角記号
\draw($(D)!0.5!(I)$) node[CUDBlue, inner sep=2pt, fill=white]{\footnotesize$r$};
\fill[CUDRed](I) circle (1.6pt);
\end{tikzpicture}
\end{minipage}
\begin{minipage}[t]{0.6\textwidth}
\vspace*{-6ex}
\begin{eqnarray*}
\pause
\text{面積} &=& \myfrac{\,r\,}{2}(a+b+c) \pause\\[1ex]
6\sqrt{6} &=& \myfrac{\,r\,}{2}(5+6+7) \pause\\[1ex]
6\sqrt{6} &=& 9r \\[1ex]
\myfrac{6\sqrt{6}}{9} &=& r \qquad \pause r
	=\myfrac{2\sqrt{6}}{3}\ \text{\□答}
\end{eqnarray*}
\end{minipage}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%






\end{document}

\textcolor{CUDRed}{

