├── .gitignore ├── README.md ├── bin └── pygmentize-wraper.sh ├── lgpl.txt └── tex ├── geometry-commomun.sty ├── geometry_en.pdf ├── geometry_en.tex ├── geometry_fr.pdf ├── geometry_fr.tex ├── include ├── affinite_cercle_ellipse_tgtes.asy ├── affinite_line.asy ├── all_apollonius.asy ├── angabscissa.asy ├── angle_inscrit.asy ├── angpoint_circle.asy ├── angpoint_ellipse.asy ├── antipedal.asy ├── apollonius.asy ├── arc_1.asy ├── arc_2.asy ├── arc_3.asy ├── arc_inter_points.asy ├── arc_mult_div_1.asy ├── arc_mult_div_2.asy ├── arc_mult_div_3.asy ├── arcfromcenter_hyperbola.asy ├── arcfromfocus_hyperbola.asy ├── arcfromfocus_parabola.asy ├── arcsubtended.asy ├── bisector_line.asy ├── bisector_vertex.asy ├── canoniccoord.asy ├── cartesiancoord.asy ├── cevian.asy ├── chaine_pappus.asy ├── circle_2pt_tangent.asy ├── circle_dot.asy ├── circle_inversion.asy ├── circle_loop.asy ├── circlepointradius.asy ├── circles_point.asy ├── circumarc_def.asy ├── complementary_arc.asy ├── conic_5_points.asy ├── conic_base.asy ├── conic_ellipse.asy ├── conj_hyperbole.asy ├── convert-encode.sh ├── curabscissa.asy ├── curpoint_circle.asy ├── curpoint_ellipse.asy ├── curpoint_line.asy ├── curpoint_parabola.asy ├── defaultcoord.asy ├── defaultmassformat.asy ├── deftorel.asy ├── dot_arc.asy ├── dot_hyperbola.asy ├── dot_parabola.asy ├── ellipse_dot.asy ├── ellipses_angle.asy ├── excircle_intro.asy ├── extouch.asy ├── hyperbola_to_path.asy ├── hyperbole_def_1.asy ├── inter_conic.asy ├── intouch.asy ├── inversion_circle_droite.asy ├── inversion_damier.asy ├── inversion_pre.asy ├── isogonaux.asy ├── isotomic.asy ├── line_angle1.asy ├── line_base.asy ├── line_segment.asy ├── locate_vector.asy ├── locate_vector2.asy ├── makefile ├── mass_ex1.asy ├── mass_ex2.asy ├── mass_ex3.asy ├── medial.asy ├── orthic.asy ├── ove.asy ├── pappus_construct.asy ├── pappus_variante.asy ├── parabola_to_path.asy ├── parabole_3_points.asy ├── parallel.asy ├── perpendicular.asy ├── perpendicularmark_line.asy ├── point1.asy ├── point2.asy ├── point3.asy ├── point4.asy ├── point5.asy ├── point6.asy ├── point_vector.asy ├── projectionAB.asy ├── projectionABCD.asy ├── projection_line.asy ├── reflect.asy ├── reflect_dir.asy ├── relabscissa.asy ├── relpoint_circle.asy ├── relpoint_ellipse.asy ├── relpoint_line.asy ├── reltodef.asy ├── scale.asy ├── scale2.asy ├── scaleABCD.asy ├── scaleO.asy ├── sector_line.asy ├── simson.asy ├── somme_point.asy ├── somme_point_vecteur.asy ├── somme_vector.asy ├── somme_vector2.asy ├── subarc_point.asy ├── symmedian.asy ├── symmedian_intro.asy ├── tangent_hyperbola.asy ├── tangentes_parabola.asy ├── tangentes_point_cercle.asy ├── tangentes_point_ellipse.asy ├── tangential.asy ├── tangents_hyperbola.asy ├── tgt_circle_vector.asy ├── th_pascal.asy ├── transform_arc.asy ├── transform_arc_circle.asy ├── triangleAbc.asy ├── triangleabc.asy ├── unit_vector.asy ├── vector_point.asy ├── xscale1.asy ├── xscale2.asy ├── yscale1.asy └── yscale2.asy └── makefile /.gitignore: -------------------------------------------------------------------------------- 1 | *.fdb_latexmk 2 | *.aux 3 | *.idx 4 | *.ilg 5 | *.ind 6 | *.out 7 | *.log 8 | *.toc 9 | *.eps 10 | *.pdf 11 | !tex/geometry_en.pdf 12 | !tex/geometry_fr.pdf 13 | *.html 14 | *.synctex.gz 15 | tex/include/*.tex 16 | en/include/*.tex 17 | tex/vcolors/*.* 18 | 19 | pygmentizedformat/ 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Documentation of the Asymptote Geometry Module 2 | 3 | The source code of the documentation of the official [Asymptote geometry module](https://github.com/vectorgraphics/asymptote/blob/master/base/geometry.asy). 4 | The generated documentation (a translation of the original in French) can be found [in English here](https://github.com/pivaldi/asymptote-geometry-documentation/blob/master/tex/geometry_en.pdf). 5 | The original French documentation [is here](https://github.com/pivaldi/asymptote-geometry-documentation/blob/master/tex/geometry_fr.pdf). 6 | -------------------------------------------------------------------------------- /bin/pygmentize-wraper.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | FILE_WITHOUT_EXT=${1%.*} 4 | [ "$FILE_WITHOUT_EXT" == "" ] && FILE_WITHOUT_EXT=$1 5 | 6 | pygmentize -f latex -- "${FILE_WITHOUT_EXT}.asy" | \ 7 | sed '/{Verbatim}/d' > "${FILE_WITHOUT_EXT}.tex" 8 | 9 | -------------------------------------------------------------------------------- /lgpl.txt: -------------------------------------------------------------------------------- 1 | GNU LESSER GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | 9 | This version of the GNU Lesser General Public License incorporates 10 | the terms and conditions of version 3 of the GNU General Public 11 | License, supplemented by the additional permissions listed below. 12 | 13 | 0. Additional Definitions. 14 | 15 | As used herein, "this License" refers to version 3 of the GNU Lesser 16 | General Public License, and the "GNU GPL" refers to version 3 of the GNU 17 | General Public License. 18 | 19 | "The Library" refers to a covered work governed by this License, 20 | other than an Application or a Combined Work as defined below. 21 | 22 | An "Application" is any work that makes use of an interface provided 23 | by the Library, but which is not otherwise based on the Library. 24 | Defining a subclass of a class defined by the Library is deemed a mode 25 | of using an interface provided by the Library. 26 | 27 | A "Combined Work" is a work produced by combining or linking an 28 | Application with the Library. The particular version of the Library 29 | with which the Combined Work was made is also called the "Linked 30 | Version". 31 | 32 | The "Minimal Corresponding Source" for a Combined Work means the 33 | Corresponding Source for the Combined Work, excluding any source code 34 | for portions of the Combined Work that, considered in isolation, are 35 | based on the Application, and not on the Linked Version. 36 | 37 | The "Corresponding Application Code" for a Combined Work means the 38 | object code and/or source code for the Application, including any data 39 | and utility programs needed for reproducing the Combined Work from the 40 | Application, but excluding the System Libraries of the Combined Work. 41 | 42 | 1. Exception to Section 3 of the GNU GPL. 43 | 44 | You may convey a covered work under sections 3 and 4 of this License 45 | without being bound by section 3 of the GNU GPL. 46 | 47 | 2. Conveying Modified Versions. 48 | 49 | If you modify a copy of the Library, and, in your modifications, a 50 | facility refers to a function or data to be supplied by an Application 51 | that uses the facility (other than as an argument passed when the 52 | facility is invoked), then you may convey a copy of the modified 53 | version: 54 | 55 | a) under this License, provided that you make a good faith effort to 56 | ensure that, in the event an Application does not supply the 57 | function or data, the facility still operates, and performs 58 | whatever part of its purpose remains meaningful, or 59 | 60 | b) under the GNU GPL, with none of the additional permissions of 61 | this License applicable to that copy. 62 | 63 | 3. Object Code Incorporating Material from Library Header Files. 64 | 65 | The object code form of an Application may incorporate material from 66 | a header file that is part of the Library. You may convey such object 67 | code under terms of your choice, provided that, if the incorporated 68 | material is not limited to numerical parameters, data structure 69 | layouts and accessors, or small macros, inline functions and templates 70 | (ten or fewer lines in length), you do both of the following: 71 | 72 | a) Give prominent notice with each copy of the object code that the 73 | Library is used in it and that the Library and its use are 74 | covered by this License. 75 | 76 | b) Accompany the object code with a copy of the GNU GPL and this license 77 | document. 78 | 79 | 4. Combined Works. 80 | 81 | You may convey a Combined Work under terms of your choice that, 82 | taken together, effectively do not restrict modification of the 83 | portions of the Library contained in the Combined Work and reverse 84 | engineering for debugging such modifications, if you also do each of 85 | the following: 86 | 87 | a) Give prominent notice with each copy of the Combined Work that 88 | the Library is used in it and that the Library and its use are 89 | covered by this License. 90 | 91 | b) Accompany the Combined Work with a copy of the GNU GPL and this license 92 | document. 93 | 94 | c) For a Combined Work that displays copyright notices during 95 | execution, include the copyright notice for the Library among 96 | these notices, as well as a reference directing the user to the 97 | copies of the GNU GPL and this license document. 98 | 99 | d) Do one of the following: 100 | 101 | 0) Convey the Minimal Corresponding Source under the terms of this 102 | License, and the Corresponding Application Code in a form 103 | suitable for, and under terms that permit, the user to 104 | recombine or relink the Application with a modified version of 105 | the Linked Version to produce a modified Combined Work, in the 106 | manner specified by section 6 of the GNU GPL for conveying 107 | Corresponding Source. 108 | 109 | 1) Use a suitable shared library mechanism for linking with the 110 | Library. A suitable mechanism is one that (a) uses at run time 111 | a copy of the Library already present on the user's computer 112 | system, and (b) will operate properly with a modified version 113 | of the Library that is interface-compatible with the Linked 114 | Version. 115 | 116 | e) Provide Installation Information, but only if you would otherwise 117 | be required to provide such information under section 6 of the 118 | GNU GPL, and only to the extent that such information is 119 | necessary to install and execute a modified version of the 120 | Combined Work produced by recombining or relinking the 121 | Application with a modified version of the Linked Version. (If 122 | you use option 4d0, the Installation Information must accompany 123 | the Minimal Corresponding Source and Corresponding Application 124 | Code. If you use option 4d1, you must provide the Installation 125 | Information in the manner specified by section 6 of the GNU GPL 126 | for conveying Corresponding Source.) 127 | 128 | 5. Combined Libraries. 129 | 130 | You may place library facilities that are a work based on the 131 | Library side by side in a single library together with other library 132 | facilities that are not Applications and are not covered by this 133 | License, and convey such a combined library under terms of your 134 | choice, if you do both of the following: 135 | 136 | a) Accompany the combined library with a copy of the same work based 137 | on the Library, uncombined with any other library facilities, 138 | conveyed under the terms of this License. 139 | 140 | b) Give prominent notice with the combined library that part of it 141 | is a work based on the Library, and explaining where to find the 142 | accompanying uncombined form of the same work. 143 | 144 | 6. Revised Versions of the GNU Lesser General Public License. 145 | 146 | The Free Software Foundation may publish revised and/or new versions 147 | of the GNU Lesser General Public License from time to time. Such new 148 | versions will be similar in spirit to the present version, but may 149 | differ in detail to address new problems or concerns. 150 | 151 | Each version is given a distinguishing version number. If the 152 | Library as you received it specifies that a certain numbered version 153 | of the GNU Lesser General Public License "or any later version" 154 | applies to it, you have the option of following the terms and 155 | conditions either of that published version or of any later version 156 | published by the Free Software Foundation. If the Library as you 157 | received it does not specify a version number of the GNU Lesser 158 | General Public License, you may choose any version of the GNU Lesser 159 | General Public License ever published by the Free Software Foundation. 160 | 161 | If the Library as you received it specifies that a proxy can decide 162 | whether future versions of the GNU Lesser General Public License shall 163 | apply, that proxy's public statement of acceptance of any version is 164 | permanent authorization for you to choose that version for the 165 | Library. 166 | -------------------------------------------------------------------------------- /tex/geometry-commomun.sty: -------------------------------------------------------------------------------- 1 | %%% geometry-commomun.sty --- 2 | 3 | %% Author: Philippe Ivaldi 4 | %% Version: $Id: geometry-commomun.sty,v 0.0 2011/06/27 Philippe Ivaldi Exp $ 5 | 6 | %% Put this file into your TEXINPUTS and the following into your preamble: 7 | %% \usepackage[OPTIONS]{geometry-commomun} 8 | 9 | %%% Code: 10 | 11 | \NeedsTeXFormat{LaTeX2e}[1995/12/01] 12 | \def\@rcs@ $#1Date: #2 #3$$#4Revision: #5$ {% 13 | \ProvidesPackage{geometry-commomun}[#2 v#5 ]} 14 | \@rcs@ $Date: 2011/06/27 22:22:28 $$Revision: 0.0 $ 15 | 16 | \DeclareOption{}{%%% 17 | } 18 | 19 | %% \DeclareOption*{\PassOptionsToPackage{\CurrentOption}{}} 20 | \ExecuteOptions{} 21 | \ProcessOptions 22 | 23 | 24 | 25 | %%%% ############# 26 | %%%% Main code # 27 | %%%% ############# 28 | 29 | \RequirePackage[a4paper,centering, 30 | left=1cm,right=1cm, 31 | top=1.5cm,bottom=2cm, 32 | nohead,nomarginpar]{geometry} 33 | \RequirePackage[utf8]{inputenc} 34 | \RequirePackage[T1]{fontenc} 35 | \RequirePackage{framed} 36 | \RequirePackage[hyperref]{xcolor} 37 | \RequirePackage{ifthen} 38 | \RequirePackage{fancyvrb} 39 | \RequirePackage{graphicx} 40 | \RequirePackage{amsmath,amssymb} 41 | \RequirePackage{mathrsfs} 42 | \RequirePackage[hyperindex]{hyperref} 43 | \RequirePackage{makeidx} 44 | \RequirePackage[stable]{footmisc} 45 | \RequirePackage{titlesec} 46 | \RequirePackage[nottoc]{tocbibind} 47 | \RequirePackage{units} 48 | \RequirePackage{tabularx} 49 | \RequirePackage[titles]{tocloft} 50 | \RequirePackage{lmodern} 51 | \RequirePackage{framed} 52 | \RequirePackage{xspace} 53 | \definecolor{bg-color}{rgb}{0.96,1,0.95} 54 | \definecolor{shadecolor}{rgb}{0.96,1,0.95} 55 | \definecolor{brick}{HTML}{7B0C00} 56 | 57 | %File `pygmentizedformat.tex` Generated by calling `pygmentize -S default -f latex -a full` 58 | \input{pygmentizedformat/default.tex} 59 | 60 | 61 | % *=======================================================* 62 | % *.................Index sur une colonne.................* 63 | \makeatletter 64 | \renewenvironment{theindex} 65 | {\if@twocolumn 66 | \@restonecolfalse 67 | \else 68 | \@restonecoltrue 69 | \fi 70 | \section*{\indexname}% 71 | \@mkboth{\MakeUppercase\indexname}% 72 | {\MakeUppercase\indexname}% 73 | \thispagestyle{plain}\parindent\z@ 74 | \parskip\z@ \@plus .3\p@\relax 75 | \columnseprule \z@ 76 | \columnsep 35\p@ 77 | \let\item\@idxitem} 78 | {\if@restonecol\onecolumn\else\clearpage\fi} 79 | \makeatother 80 | \newcommand*{\mainidx}[1]{\textbf{\hyperpage{#1}}} 81 | % *=======================================================* 82 | 83 | \newif\ifVcompile 84 | \newcounter{example} 85 | \stepcounter{example} 86 | 87 | % *=======================================================* 88 | % *..........Definition de l'environnement vasy...........* 89 | % *=======================================================* 90 | \fvset{resetmargins=true} 91 | \makeatletter 92 | 93 | \newsavebox{\image} 94 | 95 | \newcommand{\vasy}[1] 96 | {% 97 | \noindent\begin{shaded} 98 | \noindent\begin{tabularx}{\textwidth}{|X} 99 | \hspace*{0mm}\hfill\fcolorbox{white}{white}{% 100 | \includegraphics{./include/#1.pdf}}% 101 | \hfill\hspace*{0mm}\\\hline 102 | \vspace*{0mm}\BVerbatimInput[commandchars=\\\{\},fontfamily=tt]{./include/#1.tex} 103 | \end{tabularx} 104 | \end{shaded} 105 | \stepcounter{example}% 106 | } 107 | 108 | \newcommand{\bvasy}[1] 109 | {% 110 | \sbox{\image}{\includegraphics{./include/#1.pdf}}% 111 | \noindent\begin{shaded} 112 | \noindent\begin{tabular}{c|c}\fcolorbox{white}{white}{\parbox[c]{\wd\image}{\usebox{\image}}}& 113 | \begin{tabularx}{\textwidth}{X} 114 | \vspace*{0mm}\BVerbatimInput[commandchars=\\\{\},fontfamily=tt]{./include/#1.tex}\\ 115 | \end{tabularx} 116 | \end{tabular} 117 | \end{shaded}\stepcounter{example}% 118 | } 119 | 120 | \def\aVerbatim{\FV@Environment{Verbatim}{aVerbatim}} 121 | \def\FVB@aVerbatim{\FVB@VerbatimOut{aVerbatim.aux}}% 122 | \def\FVE@aVerbatim{% 123 | \FVE@VerbatimOut% 124 | \noindent\begin{shaded}\noindent\VerbatimInput[frame=none]{aVerbatim.aux}\end{shaded} 125 | } 126 | \DefineVerbatimEnvironment{aVerbatim}{aVerbatim}{} 127 | 128 | \newcommand{\lang}{FR} 129 | \newcounter{tmpfile} 130 | \def\Vcolor{\FV@Environment{BVerbatim}{Vcolor}} 131 | \def\FVB@Vcolor{\FVB@VerbatimOut{./vcolors/vcolor\thetmpfile\lang.asy}}% 132 | \def\FVE@Vcolor{% 133 | \FVE@VerbatimOut% 134 | \ifVcompile\immediate\write18{../bin/pygmentize-wraper.sh ./vcolors/vcolor\thetmpfile\lang}\fi% 135 | \colorbox{bg-color}{\BVerbatimInput[commandchars=\\\{\},fontfamily=tt,baseline=t]{./vcolors/vcolor\thetmpfile\lang.tex}}% 136 | \stepcounter{tmpfile}% 137 | \par% 138 | } 139 | \DefineVerbatimEnvironment{Vcolor}{Vcolor}{} 140 | 141 | \makeatother 142 | 143 | \newcommand{\asymptote}{\textsc{asymptote}\xspace} 144 | \newcommand{\Asymptote}{\textsc{asymptote}} 145 | \newcommand\circonflexe{\^{}} 146 | \renewcommand{\vec}[1]{\overrightarrow{#1}} 147 | \newcommand{\code}[1]{\Verb+{#1}+} 148 | \newcommand{\param}[1]{\Verb+{#1}+} 149 | \newcommand{\mparam}[1]{\mbox{\param{#1}}} 150 | \newenvironment{modif}{\color{red}\bf}{} 151 | \newenvironment{ajout}{\color{red}\bf}{} 152 | 153 | %% 154 | %% TOC configuration. 155 | %% 156 | 157 | \setlength{\cftbeforesecskip}{0.1ex} 158 | \setlength{\cftbeforesubsecskip}{0.1ex} 159 | \renewcommand{\cftsecfont}{\normalfont} 160 | \renewcommand{\cftsecpagefont}{\normalfont} 161 | \renewcommand{\cftsecleader}{\cftdotfill{\cftdotsep}} 162 | 163 | %% 164 | %% Configure titles. 165 | %% 166 | 167 | \titleformat{name=\section}{\normalfont\rmfamily\Large\bfseries\color{brick}}{\thesection.}{1em}{} 168 | \titleformat{name=\section,numberless}{\normalfont\rmfamily\Large\bfseries\color{brick}}{}{0em}{} 169 | \titleformat{name=\subsection}{\normalfont\rmfamily\Large\bfseries\color{brick}}{\thesubsection.}{1em}{} 170 | \titleformat{name=\subsubsection}{\normalfont\rmfamily\large\bfseries\color{brick}}{\thesubsubsection.}{1em}{} 171 | 172 | 173 | \endinput 174 | 175 | %%% Local Variables: 176 | %%% TeX-auto-save: nil 177 | %%% TeX-auto-parse-length: 99999 178 | %%% End: 179 | 180 | -------------------------------------------------------------------------------- /tex/geometry_en.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pivaldi/asymptote-geometry-documentation/046641ef00771d6f075d6b896f54dd6ca6bb9e3e/tex/geometry_en.pdf -------------------------------------------------------------------------------- /tex/geometry_fr.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/pivaldi/asymptote-geometry-documentation/046641ef00771d6f075d6b896f54dd6ca6bb9e3e/tex/geometry_fr.pdf -------------------------------------------------------------------------------- /tex/include/affinite_cercle_ellipse_tgtes.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(12cm,0); draw(Ox()^^Oy()); real a=3, b=2; 2 | circle C=circle(origin,a), Cp=circle(origin,b); 3 | draw(C, 0.8*blue); draw(Cp, 0.8*green); 4 | 5 | transform T=scale(b/a,Ox(),Oy()), Tp=scale(a/b,Oy(),Ox()); 6 | ellipse e=T*C; draw(e, bp+0.8*red); 7 | 8 | point H=(a/2,0), Hp=(0,-b/2); dot("$H$", H, S); dot("$H'$", Hp); 9 | line L=line(H,false,H+N), Lp=line(Hp,false,Hp+W); 10 | point M=intersectionpoints(L,C)[0], NN=intersectionpoints(Lp,Cp)[0]; 11 | point Mp=T*M, NNp=Tp*NN; L=segment(H,M); Lp=segment(Hp,NNp); 12 | dot("$M$", M, NE); dot("$M'$", Mp, NE); dot("$N$", NN, SW); dot("$N'$", NNp, NE); 13 | draw(L, dashed); draw(Lp, dashed); 14 | 15 | segment SS=segment(origin,M), SSp=segment(origin,NN); 16 | draw(SS, 0.8*blue); draw(SSp, 0.8*green); 17 | 18 | line tgM=tangents(C, M)[0]; point P=intersectionpoint(tgM,Ox()); 19 | draw(tgM, 0.8*blue); dot("$P$", P, dir(60)); 20 | 21 | line tgN=tangents(Cp, NN)[0]; point Pp=intersectionpoint(tgN,Oy()); 22 | draw(tgN, 0.8*green); dot("$P'$", Pp, dir(30)); 23 | 24 | perpendicularmark(tgM,SS, 0.8*blue); perpendicularmark(tgN,SSp, quarter=2, 0.8*green); 25 | 26 | line tgMp=line(P, Mp), tgNp=line(Pp, NNp); 27 | draw(tgMp, 0.8*red); draw(tgNp, 0.8*red); 28 | 29 | draw(Mp+2tgMp.u--Mp-2tgMp.u, bp+0.8*red, Arrows(3mm)); 30 | draw(NNp+2tgNp.u--NNp-2tgNp.u, bp+0.8*red, Arrows(3mm)); 31 | addMargins(5mm,5mm); 32 | -------------------------------------------------------------------------------- /tex/include/affinite_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6.5cm,0); 3 | pen bpp=linewidth(bp); 4 | line AB=line(origin, E), CD=line(2*NE+N, 2*NE+SE); 5 | draw(AB, bpp); draw(CD, bpp); 6 | 7 | transform dilatation=scale(1.5,AB,CD); 8 | 9 | path cle=shift(NE)*unitcircle; 10 | draw(cle,bpp); 11 | 12 | draw(dilatation*cle, 0.8*red+bpp); 13 | draw(inverse(dilatation)*cle, 0.8*blue+bpp); 14 | draw(box((-0.5,-0.5), (2.75,3)), invisible); 15 | -------------------------------------------------------------------------------- /tex/include/all_apollonius.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(18cm,0); int shx=18; 3 | circle C1=circle((point)(0,0),2), C2=circle((point)(5,5), 3), C3=circle((point)(6,-2),1); 4 | picture disc; 5 | fill(disc,(path)C1); fill(disc,(path)C2); fill(disc,(path)C3); 6 | transform tv=shift(S), th=shift(E); 7 | int k=0, l=0; 8 | for (int i=0; i < 2 ; ++i) 9 | for (int j=0; j < 2; ++j) { 10 | picture[] tpic; tpic[0]=new picture; tpic[1]=new picture; 11 | add(tpic[0], disc); add(tpic[1], disc); 12 | inversion S1=inversion(C2,C3, sgnd(i-1)), S2=inversion(C1,C3, sgnd(j-1)); 13 | line cl=line(S1.C,S2.C); 14 | point M=relpoint(C3,0.125), M2=S2*M, M1=S1*M; 15 | circle C=circle(M,M2,M1); 16 | line L=radicalline(C,C3); 17 | point H=intersectionpoint(L,cl); 18 | circle Cp=circle(H,C3.C); 19 | point[] T=intersectionpoints(Cp,C3); 20 | point[][] Tp= new point[][] {{S2*T[0], S1*T[0]},{S2*T[1], S1*T[1]}}; 21 | draw(tpic[0], circle(T[0],Tp[0][0],Tp[0][1]), bp+0.8*red); 22 | draw(tpic[1], circle(T[1],Tp[1][0],Tp[1][1]), bp+0.8*red); 23 | add(tv^(shx*(i+1))*th^(shx*(l))*tpic[0]); 24 | l=(l+2)%4; ++k; 25 | add(tv^(shx*(i+1))*th^(shx*(l+1))*tpic[1]); 26 | } 27 | -------------------------------------------------------------------------------- /tex/include/angabscissa.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | abscissa x=angabscissa(30); 4 | 5 | ellipse el=ellipse(origin(),2,1,45); 6 | draw(el,linewidth(bp)); 7 | 8 | point M=point(el,x); 9 | draw(M--el.F1--el.F2); 10 | dot("$F_1$", el.F1, SE); dot("$F_2$", el.F2, NW); 11 | markangle((string)x.x, el.F2, el.F1, M); 12 | draw(tangent(el,x), linewidth(bp)); 13 | -------------------------------------------------------------------------------- /tex/include/angle_inscrit.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(7cm,0); 2 | point A=(-1,0), B=(1,0); 3 | dot("$A$", A, S); dot("$B$", B, S); 4 | pen bpp=linewidth(bp); 5 | 6 | arc Ac=arcsubtended(A,B,30); draw(Ac, bpp); 7 | dot("$O$", Ac.el.C); 8 | markarc("$\alpha$", Ac, n=2, radius=1cm, 9 | sectorpen=bpp, markpen=currentpen); 10 | 11 | for (int i=0; i < 3; ++i) { 12 | point M=relpoint(Ac, 0.25+0.25*i); 13 | draw(M--A^^M--B, linewidth(bp)); 14 | markangle("$\frac{\alpha}{2}$", A, M, B); } 15 | -------------------------------------------------------------------------------- /tex/include/angpoint_circle.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((0,0), i=(1,0.5), 4 | j=(-0.5,.75)); 5 | show(currentcoordsys, xpen=invisible); 6 | point A=(2.5,2); dot("$A$", A, S, red); 7 | real R=2; 8 | circle C=circle(A,R); 9 | draw(C, linewidth(bp)); 10 | 11 | dot("angpoint(C, 0)", angpoint(C,0), 2W); 12 | dot("angpoint(C, 45)", angpoint(C,45), 2N); 13 | dot("angpoint(C, 135)", angpoint(C,135), 2E); 14 | dot("angpoint(C, 270)", angpoint(C, 270), 2NW); 15 | dot("angpoint(C, -45)", angpoint(C, -45), 2W); 16 | -------------------------------------------------------------------------------- /tex/include/angpoint_ellipse.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | currentcoordsys=cartesiansystem((0,0),i=(1,0.5),j=(-0.5,.75)); 3 | show(currentcoordsys, xpen=invisible); 4 | ellipse el=ellipse((point)(4,2),3,2,20); 5 | draw(el); dot("$C$",el.C,2W,red); dot("$F_1$",el.F1,S); dot("$F_2$",el.F2,S); 6 | point P=angpoint(el, 0); dot("angpoint(el, 0)", P,E); draw(el.F1--P); 7 | point M=angpoint(el, 90); dot("angpoint(el, 90)", M,NW); draw(el.F1--M); 8 | dot("angpoint(el, 180)", angpoint(el,180), W); 9 | dot("angpoint(el, 270)", angpoint(el,270), SE); 10 | dot("angpoint(el, 370)", angpoint(el,370), NE); 11 | dot("angpoint(el, -45)", angpoint(el,-45), SE); 12 | point P=angpoint(el, 90, fromCenter); dot("angpoint(el,90,fromCenter)", P,NW); 13 | point Q=angpoint(el, -45, fromCenter); dot("angpoint(el,-45,fromCenter)", Q,S); 14 | draw(el.C--P); draw(el.C--Q); 15 | -------------------------------------------------------------------------------- /tex/include/antipedal.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | triangle t=triangleabc(5,6,7); 3 | label(t); draw(t, linewidth(bp)); 4 | point P=0.5*t.B+0.3*t.C; 5 | dot("$P$", P, 2*dir(60)); 6 | 7 | triangle Pt=pedal(t,P); 8 | currentpen=0.8*blue; draw(Pt); 9 | segment psA=segment(P,Pt.A); 10 | segment psB=segment(P,Pt.B); 11 | segment psC=segment(P,Pt.C); 12 | draw(psA); draw(psB); draw(psC); 13 | perpendicularmark(t.BC,psA); 14 | perpendicularmark(t.CA,psB); 15 | perpendicularmark(t.AB,psC); 16 | 17 | triangle APt=antipedal(t, P); 18 | currentpen=0.8*red; draw(APt); 19 | segment apsA=segment(P,t.A); 20 | segment apsB=segment(P,t.B); 21 | segment apsC=segment(P,t.C); 22 | draw(apsA); draw(apsB); draw(apsC); 23 | perpendicularmark(APt.BC,apsA); 24 | perpendicularmark(APt.CA,apsB); 25 | perpendicularmark(APt.AB,apsC); 26 | -------------------------------------------------------------------------------- /tex/include/apollonius.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(9.5cm,0); usepackage("mathrsfs"); currentpen=fontsize(8); pen bpp=linewidth(bp); 3 | circle C1=circle((point)(0,0),2), C2=circle((point)(5,5), 3), C3=circle((point)(6,-2),1); 4 | draw(Label("$\mathscr{C}_1$",Relative(0.375)), C1, bp+0.8*red); 5 | draw("$\mathscr{C}_2$", C2, bp+0.8*red); 6 | dot(C1.C, 0.8*red); dot(C2.C, 0.8*red); dot(C3.C, 0.8*red); 7 | inversion S1=inversion(C2,C3), S2=inversion(C1,C3); 8 | dot("$S_1$", S1.C, 2S+W); dot("$S_2$", S2.C, 2S); 9 | line cl=line(S1.C,S2.C); draw(cl); 10 | point M=relpoint(C3,0.125), M2=S2*M, M1=S1*M; 11 | dot("$M$", M, 2*E); dot("$M_2$", M2, NW); dot("$M_1$", M1, 2*dir(-10)); 12 | draw(segment(S2.C,M2), dashed+grey); draw(segment(S1.C,M1), dashed+grey); 13 | circle C=circle(M,M2,M1); 14 | draw(Label("$\mathscr{C}$", Relative(0.375)), C, lightblue); 15 | line L=radicalline(C,C3); draw("$(d)$", L, grey); 16 | point H=intersectionpoint(L,cl); dot("$H$", H, 2*dir(260)); 17 | circle Cp=circle(H,C3.C); 18 | clipdraw(Label("$\mathscr{C'}$", Relative(0.9)), Cp, lightblue); 19 | point[] T=intersectionpoints(Cp,C3); 20 | point[][] Tp= new point[][] {{S2*T[0], S1*T[0]},{S2*T[1], S1*T[1]}}; 21 | draw(S2.C--Tp[0][0], dashed+grey); draw(S1.C--Tp[0][1], dashed+grey); 22 | draw(S2.C--Tp[1][0], dashed+grey); draw(S1.C--Tp[1][1], dashed+grey); 23 | dot(Label("$T_0$",UnFill), T[0], 2*dir(-20)); 24 | dot(Label("$T_1$",UnFill), T[1], W); 25 | dot("$T''_0$", Tp[0][0], SW); dot("$T'_0$", Tp[0][1], NE); 26 | dot("$T''_1$", Tp[1][0], W); dot("$T'_1$", Tp[1][1], N); 27 | draw(Label("$\mathscr{T}_0$", Relative(0.375)), circle(T[0],Tp[0][0],Tp[0][1]), bpp); 28 | draw(Label("$\mathscr{T}_1$", Relative(0.375)), circle(T[1],Tp[1][0],Tp[1][1]), bpp); 29 | draw(Label("$\mathscr{C}_3$",Relative(0.625),UnFill), C3, bp+0.8*red); 30 | -------------------------------------------------------------------------------- /tex/include/arc_1.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(6cm,0); 2 | real a=2, b=1.5; 3 | point A=(1,1); dot("$A$", A, red); 4 | ellipse EL=ellipse(A,a,b,90); draw(EL, bp+grey); 5 | dot("$F_1$", EL.F1, S); dot("$F_2$", EL.F2, N); 6 | draw(EL.F1--EL.F2); 7 | arc AE=arc(EL, 45, 270); 8 | draw(AE, linewidth(bp), Arrow(3mm), BeginBar); 9 | point Bp=point(AE, 0), Ep=relpoint(AE,1); 10 | draw(EL.F1--Bp); draw(EL.F1--Ep); 11 | markangle(format("$%0g^\circ$",AE.angle1), 12 | EL.F2,EL.F1,Bp, radius=1.5cm, Arrow); 13 | markangle(Label(format("$%0g^\circ$",AE.angle2), 14 | Relative(0.35)), 15 | EL.F2, EL.F1, Ep, radius=0.75cm, Arrow); 16 | -------------------------------------------------------------------------------- /tex/include/arc_2.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | real a=2, b=1; 3 | point A=(1,1); dot("$A$",A,S,red); 4 | ellipse EL=ellipse(A,a,b); 5 | arc AE=arc(EL, 45, 210, fromCenter); 6 | draw(AE, linewidth(bp), Arrow(3mm), BeginBar); 7 | arc AEp=arc(EL, 45, 210, fromCenter, CW); 8 | draw(AEp, bp+0.8*red, Arrow(3mm)); 9 | circle C=circle(A,a); arc AC=arc(C, 45, 210); 10 | draw(AC, linewidth(bp), Arrow(3mm), BeginBar); 11 | arc ACp=arc(C, 45, 210, CW); 12 | draw(ACp, bp+0.8*red, Arrow(3mm)); 13 | markarc(format("$%0g^\circ$",degrees(AC)), 14 | AC, radius=1.5cm, Arrow); 15 | markarc(format("$%0g^\circ$",degrees(ACp)), 16 | ACp, markpen=0.8*red, Arrow); 17 | -------------------------------------------------------------------------------- /tex/include/arc_3.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | real a=2, b=1; 3 | point A=(1,1); dot("$A$",A,S,red); 4 | ellipse EL=ellipse(A,a,b); 5 | arc AE=arc(EL, 210, 45, fromCenter); 6 | draw(AE, linewidth(bp), Arrow(3mm), BeginBar); 7 | arc AEp=arc(EL, 210, 45, fromCenter, CW); 8 | draw(AEp, bp+0.8*red, Arrow(3mm)); 9 | circle C=circle(A,a); arc AC=arc(C, 210, 45); 10 | draw(AC, linewidth(bp), Arrow(3mm), BeginBar); 11 | arc ACp=arc(C, 210, 45, CW); 12 | draw(ACp, bp+0.8*red, Arrow(3mm)); 13 | markarc(format("$%0g^\circ$",degrees(AC)), 14 | AC, radius=1.5cm, Arrow); 15 | markarc(format("$%0g^\circ$",degrees(ACp)), 16 | ACp, markpen=0.8*red, Arrow); 17 | -------------------------------------------------------------------------------- /tex/include/arc_inter_points.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm); 2 | point A=(-1,0), B=(1,1), C=(0,1), D=(1,-1); 3 | dot("$A$",A,S); dot("$B$",B,S); dot("$C$",C,SW); dot("$D$",D,SW); 4 | ellipse el=ellipse((point)(0,0.5),2,1); 5 | line l1=line(A,B), l2=line(C,D); draw(l1); draw(l2); 6 | point[] J=intersectionpoints(l1,el), K=intersectionpoints(l2,el); 7 | draw(arc(el, J[0],K[0]), 1mm+0.8yellow); draw(arc(el, K[0],J[1]), 1mm+0.8red); 8 | draw(arc(el, J[1],K[1]), 1mm+0.8blue); draw(arc(el, K[1],J[0]), 1mm+0.8green); 9 | dot("$J_0$", J[0], 2N); dot("$J_1$", J[1], 2S); 10 | dot("$K_0$", K[0], 2NE) ; dot("$K_1$", K[1], 2dir(-35)); 11 | -------------------------------------------------------------------------------- /tex/include/arc_mult_div_1.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | 3 | point A=(1,1); dot("$A$",A,S,red); 4 | arc C=arc(circle(A,2), 45, 210); 5 | draw(C,linewidth(3mm)); 6 | markarc(format("%0g",degrees(C)), C, Arrow); 7 | 8 | draw(0.5*C,1.5mm+yellow); 9 | 10 | arc Cp=C/3; 11 | draw(Cp, 0.75mm+blue); 12 | markarc(format("%0g",degrees(Cp)), 13 | radius=25mm, Cp, blue, Arrow); 14 | -------------------------------------------------------------------------------- /tex/include/arc_mult_div_2.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | point C=(1,1); dot("$C$", C, 2*dir(80), red); 3 | arc a=arc(ellipse(C,2,1,45),90,0,fromCenter); 4 | draw(a, linewidth(3mm)); 5 | markarc(format("%0g", degrees(a)), 6 | radius=-0.5*markangleradius(), a); 7 | 8 | draw(0.5*a, 1.5mm+yellow); 9 | 10 | arc ap=a/3; 11 | draw(ap, 0.75mm+blue); 12 | markarc(format("%0g", degrees(ap)), 13 | radius=1.5*markangleradius(),ap,blue); 14 | -------------------------------------------------------------------------------- /tex/include/arc_mult_div_3.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | point C=(1,1); dot("$C$", C, dir(30), red); 3 | 4 | arc a=arc(ellipse(C,2,1,45), -45, 45); 5 | draw(a, linewidth(3mm)); 6 | dot("$F_1$", a.el.F1, dir(210), red); 7 | markarc(format("%0g", degrees(a)), 8 | radius=2.5*markangleradius(), a); 9 | 10 | draw(0.5*a, 1.5mm+yellow); 11 | 12 | arc ap=a/3; 13 | draw(ap, 0.75mm+blue); 14 | markarc(format("%0g", degrees(ap)), 15 | radius=1.5*markangleradius(),ap,blue); 16 | -------------------------------------------------------------------------------- /tex/include/arcfromcenter_hyperbola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(12cm); 2 | coordsys R=currentcoordsys; show(R); 3 | point C=(3,1.25); dot("$C$", C, 2*dir(120), red); 4 | hyperbola H=hyperbola(C, 2, 1.5, -10); draw(H, linewidth(bp)); 5 | coordsys Rp=canonicalcartesiansystem(H); 6 | show(Label("$O'$", align=SW,blue), Label("$\vec{u}$",blue), 7 | Label("$\vec{v}$",blue), Rp, ipen=blue); 8 | dot("$0$", angpoint(H,0,fromCenter), 2*dir(120)); 9 | dot("$180$", angpoint(H,180,fromCenter), 2*dir(30)); 10 | draw(arcfromcenter(H,-20,30), bp+red); dot("$F_1$", H.F1, N+NW); 11 | point P=angpoint(H,30,fromCenter); dot("$30$", P, NW); 12 | segment s=segment(C, P); draw(s); 13 | markangle("$30^\circ$", Ox(Rp), (line) s, radius=2cm, Arrow); 14 | -------------------------------------------------------------------------------- /tex/include/arcfromfocus_hyperbola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | point C=(4,2); dot("$C$", C, E+NE, red); 3 | hyperbola H=hyperbola(C,1,1,-20); draw(H, linewidth(bp)); 4 | coordsys R=currentcoordsys; show(R); 5 | coordsys Rp=canonicalcartesiansystem(H); 6 | show(Label("$O'$",align=SW,blue), Label("$\vec{u}$",blue), Label("$\vec{v}$",blue), 7 | Rp, ipen=blue); 8 | dot("$180$", angpoint(H,180), N+2E); 9 | dot("$-80$", angpoint(H,-80), NE); 10 | point P=angpoint(H,70); dot("$70$", P, SE); 11 | draw(arcfromfocus(H,70,-80), bp+red); 12 | segment s=segment(H.F1,P); draw(s); line l=line(H.F1,H.F1-Rp.i); 13 | dot("$F_1$", H.F1, N+NW); markangle("$70^\circ$",l,(line)s,Arrow); 14 | addMargins(rmargin=3cm); 15 | -------------------------------------------------------------------------------- /tex/include/arcfromfocus_parabola.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm); 3 | show(currentcoordsys); 4 | 5 | point F=(1,0.5); dot("$F$",F,E,red); 6 | parabola p=parabola(F,0.2,110); draw(p); 7 | 8 | coordsys Rp=canonicalcartesiansystem(p); 9 | show(Label("$O'$",align=NW+W,blue), Label("$\vec{u}$",blue), 10 | Label("$\vec{v}$",blue), Rp, ipen=blue); 11 | 12 | dot("180", angpoint(p,180), dir(-30)); 13 | point P=angpoint(p,55); dot("55",P,NE); 14 | 15 | segment s=segment(F,P); draw(s); 16 | line l=line(F,F+Rp.i); 17 | markangle("$"+(string)degrees(l,s)+"^\circ$",l,(line)s,Arrow); 18 | 19 | dot("-55", point(arcfromfocus(p,-55,-55,1),0), W); 20 | dot("-90", point(arcfromfocus(p,-90,-90,1),0), W); 21 | draw(arcfromfocus(p,55,-90), bp+0.8*red, Arrow(3mm)); 22 | -------------------------------------------------------------------------------- /tex/include/arcsubtended.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(7cm,0); 2 | point A=(-1,0), B=(1,0); 3 | dot("$A$", A, 2W, red); dot("$B$", B, 2E, red); 4 | 5 | real[] angles=new real[] {60, 110, -60, -110}; 6 | pen[] p=new pen[] {red, blue+red, blue, cyan}; 7 | int i=0; 8 | 9 | for(real a:angles) { 10 | arc arcsubtended=arcsubtended(A,B,a); 11 | draw(arcsubtended, bp+0.8*p[i]); 12 | for (int j=0; j < 2; ++j) { 13 | point M=relpoint(arcsubtended, 0.25+0.5*j); 14 | draw(A--M--B, 0.8*p[i]); 15 | real gle=degrees(B-M)-degrees(A-M); 16 | markangle(Label(format("%0g",-gle),UnFill), 17 | B, M, A, radius=sgn(-gle)*30, Arrow, 0.8*p[i]); } 18 | ++i; } 19 | -------------------------------------------------------------------------------- /tex/include/bisector_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | point A=(0,0), B=(2*Cos(40),2*Sin(40)); line l1=line(A,B); 4 | draw(l1, linewidth(bp)); 5 | line l2=rotate(100,A)*l1; 6 | draw(l2, linewidth(bp)); 7 | line bis=bisector(l1,l2); draw(bis, bp+blue); 8 | line Bis=bisector(l1,l2,false); draw(Bis, bp+0.8*red); 9 | markangleradiusfactor *= 4; 10 | marker mark2=StickIntervalMarker(2, 1, red, true); 11 | markangle(2, l1, l2, red, mark2); 12 | markangle(2, reverse(l2), reverse(l1), radius=-markangleradius(), 13 | red, mark2); 14 | markangleradiusfactor *= 3/2; 15 | marker mark1=StickIntervalMarker(2, 2, blue, true); 16 | markangle(2, l1, reverse(l2), radius=-markangleradius(), 17 | blue, mark1); 18 | markangle(2, reverse(l1), l2, radius=-markangleradius(), 19 | blue, mark1); 20 | draw(box((-1,-1),(1,1)), invisible); 21 | -------------------------------------------------------------------------------- /tex/include/bisector_vertex.asy: -------------------------------------------------------------------------------- 1 | size(7cm); import geometry; 2 | triangle t=triangleabc(4,5,6); 3 | drawline(t, linewidth(bp)); 4 | line ba=bisector(t.VA), bb=bisector(t.VB); 5 | line bc=bisector(t.VC); draw(ba^^bb^^bc); 6 | markangle((line) t.AB, (line) t.AC, StickIntervalMarker(2,1)); 7 | markangle((line) t.BC, (line) t.BA, StickIntervalMarker(2,2)); 8 | markangle((line) t.CA, (line) t.CB, StickIntervalMarker(2,3)); 9 | -------------------------------------------------------------------------------- /tex/include/canoniccoord.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | 4 | show(defaultcoordsys); 5 | ellipse el=ellipse((point)(2,4),3,2,45); 6 | dot("$F_1$", el.F1, dir(-45)); 7 | dot("$F_2$", el.F2, dir(-45)); 8 | draw(el, linewidth(bp), Arrow(3mm)); 9 | show("$C$", "$\vec{u}$" ,"$\vec{v}$", 10 | canonicalcartesiansystem(el)); 11 | -------------------------------------------------------------------------------- /tex/include/cartesiancoord.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-1,1)); 4 | 5 | show("$O'$","$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 6 | show("$O''$","$\vec{u'}$", "$\vec{v'}$", 7 | rotate(90)*R, xpen=invisible); 8 | show(defaultcoordsys); 9 | -------------------------------------------------------------------------------- /tex/include/cevian.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | triangle t=triangleabc(5,6,7); label(t); draw(t, linewidth(bp)); 3 | point P=0.6*t.B+0.25*t.C; dot("$P$", P, dir(60), 0.8*red); 4 | triangle C1=cevian(t, P); 5 | label("$A'$","$B'$","$C'$", C1, 0.8*red); draw(C1, bp+0.8*red, dot); 6 | draw(t.A--C1.A, 0.8*red); draw(t.B--C1.B, 0.8*red); draw(t.C--C1.C, 0.8*red); 7 | 8 | point Ma=midpoint(t.BC), Mb=midpoint(t.AC), Mc=midpoint(t.BA); 9 | dot("$M_1$",Ma,-dir(t.VA)); dot("$M_2$",Mb,-dir(t.VB)); dot("$M_3$",Mc,-dir(t.VC)); 10 | draw(t.A--Ma^^t.B--Mb^^t.C--Mc, grey); dot("$G$", centroid(t), 2*dir(-65), grey); 11 | 12 | point App=rotate(180,Ma)*C1.A, Bpp=rotate(180,Mb)*C1.B, Cpp=rotate(180,Mc)*C1.C; 13 | draw(C1.A--App, 0.8*green, StickIntervalMarker(2,1,0.8*green)); 14 | draw(C1.B--Bpp, 0.8*green, StickIntervalMarker(2,2,0.8*green)); 15 | draw(C1.C--Cpp, 0.8*green, StickIntervalMarker(2,3,0.8*green)); 16 | 17 | triangle C2=triangle(App,Bpp,Cpp); 18 | label("$A''$","$B''$","$C''$", C2, 0.8*blue); draw(C2, bp+0.8*blue, dot); 19 | segment sA=segment(t.A,C2.A), sB=segment(t.B,C2.B); 20 | point PP=intersectionpoint(sA,sB); 21 | dot("$P'$", PP, dir(100), 0.8*blue); 22 | draw(sA, 0.8*blue); draw(sB, 0.8*blue); draw(segment(t.C,C2.C), 0.8*blue); 23 | -------------------------------------------------------------------------------- /tex/include/chaine_pappus.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm); 2 | 3 | inversion inv=inversion(1,(-4.5,0)); 4 | path g1=inv*line((-1,0),(-1,1)), 5 | g2=inv*line((1,0),(1,1)); 6 | fill(g1,lightgrey); draw(g1,linewidth(bp)); 7 | unfill(g2); draw(g2,linewidth(bp)); 8 | 9 | int n=40; 10 | for (int i=-n; i <= n; ++i) { 11 | path g=inv*circle((point)(0,2*i),1); 12 | fill(g,(1-abs(i)/n)*yellow); 13 | draw(g,bp+red); draw(g,blue); 14 | } 15 | shipout(bbox(5mm,Fill(rgb(0.95,0.95,0.8)))); 16 | -------------------------------------------------------------------------------- /tex/include/circle_2pt_tangent.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm,0); 3 | pen bpp=linewidth(bp); 4 | line l=line(origin,(1,-0.25)); draw("$(d)$", l, bpp); 5 | point A=(1,1.5), B=(0.75,2.5); 6 | line AB=line(A,B); 7 | point B1=reflect(l)*B, I=intersectionpoint(l,AB), B2=rotate(180,I)*B; 8 | dot("$I$", I, NE); dot("$B_1$", B1, SW); dot("$B_2$", B2, SE); 9 | 10 | draw(B--B1, grey+dashed, StickIntervalMarker(2,2,grey)); 11 | markrightangle(B,midpoint(B--B1),I, grey); 12 | draw(B--B2, grey+dashed, StickIntervalMarker(2,1,grey)); 13 | draw(complementary(segment(B,B2))); 14 | 15 | circle C=circle(A,B1,B2); draw(C, 0.8*blue); 16 | point[] T=intersectionpoints(l,C); 17 | dot("$T_0$",T[0], NE); dot("$T_1$",T[1], N+NW); 18 | 19 | circle C1=circle(A,B,T[0]), C2=circle(A,B,T[1]); 20 | clipdraw(C1, bpp+0.8*red); clipdraw(C2, bpp+0.8*red); 21 | dot("$O_1$", C1.C, W); dot("$O_2$", C2.C, SW); dot("$A$", A, NE); dot("$B$", B, NE); 22 | 23 | draw(A--T[0]--B1, grey); markangle(A,T[0],B1, grey); 24 | draw(A--T[1]--B1, grey); markangle(B1,T[1],A, grey); 25 | draw(B2--B1, grey); markangle(A,B2,B1, grey); 26 | -------------------------------------------------------------------------------- /tex/include/circle_dot.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7cm,0); 3 | currentcoordsys=cartesiansystem((2,2), i=(-1,-1), 4 | j=(0,1)); 5 | show("$O'$","$\vec{u}$", "$\vec{v}$", 6 | currentcoordsys, ipen=blue, xpen=invisible); 7 | show(defaultcoordsys); 8 | circle C=circle((point)(0.5,-1), 3); 9 | draw(C, 2bp+0.8*blue, Arrow(3mm)); 10 | circle Cp=circle(point(defaultcoordsys,(1,1)), 4); 11 | draw(Cp, dotsize()+0.8*red, Arrow(3mm)); 12 | dot((path)Cp); 13 | -------------------------------------------------------------------------------- /tex/include/circle_inversion.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | 4 | triangle t=triangleabc(4,5,6); 5 | circle C=circumcircle(t), inC=incircle(t); 6 | 7 | draw(inC, bp+0.8*red); 8 | draw(C, bp+0.8*blue); 9 | draw(t, linewidth(bp)); 10 | 11 | draw(inC*t, linewidth(bp)); 12 | draw(inC*C, bp+0.8*blue); 13 | -------------------------------------------------------------------------------- /tex/include/circle_loop.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(3cm,0); 3 | circle cle1=circle((point)(0,0), 1); 4 | circle cle2=circle((point)(sqrt(2),sqrt(2)), 1); 5 | draw(cle1); draw(cle2); 6 | dot(intersectionpoints(cle1, cle2)); 7 | -------------------------------------------------------------------------------- /tex/include/circlepointradius.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((1,1), i=(1,1), 4 | j=(-0.5,.75)); 5 | show("$O'$","$\vec{u}$", "$\vec{v}$", currentcoordsys, 6 | ipen=blue, xpen=invisible); 7 | show(defaultcoordsys); 8 | real R=2; 9 | circle C=circle((point)(0,0), R); 10 | draw(C, bp+0.8*blue); 11 | circle Cp=circle(point(defaultcoordsys,(0,0)), R); 12 | draw(Cp, bp+0.8*red); 13 | -------------------------------------------------------------------------------- /tex/include/circles_point.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(9cm); 3 | green=0.8green; blue=0.8blue; red=0.8red; 4 | pen bpp=linewidth(bp); 5 | point A=(-1,0), B=(2,0), C=(0,2); 6 | draw(line(A,B),bpp); draw(line(A,C),bpp); 7 | draw(line(B,C),bpp); 8 | circle cc=circle(A,B,C); 9 | draw(cc, bp+blue); dot(cc.C, blue); 10 | circle ic=incircle(A,B,C); 11 | draw(ic, bp+red); dot(ic.C, red); 12 | circle ec=excircle(A,B,C); 13 | clipdraw(ec, bp+green); dot(ec.C, green); 14 | ec=excircle(A,C,B); 15 | clipdraw(ec, bp+green); dot(ec.C, green); 16 | ec=excircle(C,B,A); 17 | clipdraw(ec, bp+green); dot(ec.C, green); 18 | dot("G", centroid(A,B,C), NE); 19 | -------------------------------------------------------------------------------- /tex/include/circumarc_def.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | point A=(-1,0), B=(3,-1), C=(0,1), D=(0,-2); 4 | 5 | draw(arccircle(A,C,B), dotsize()+0.8*red); 6 | draw(arccircle(A,D,B), dotsize()+0.8*red); 7 | 8 | dot("$A$", A, NW); dot("$B$", B, E); 9 | dot("$C$", C, NW); dot("$D$", D, SW); 10 | -------------------------------------------------------------------------------- /tex/include/complementary_arc.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | ellipse EL=ellipse(origin,2,1); 4 | arc AE=arc(EL, 210, 45, fromCenter); 5 | draw(AE, linewidth(bp), Arrow(3mm)); 6 | draw(complementary(AE), bp+0.8*red, Arrow(3mm)); 7 | -------------------------------------------------------------------------------- /tex/include/conic_5_points.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(18cm,0); 3 | point B=(1.75,3), C=(-1,2), D=(-1.5,-0.5), F=(1.5,-1); 4 | 5 | for (int i=0; i < 360; i += 21) { 6 | point A=shift(D)*dir(i); 7 | dot(A,red); 8 | conic co=conic(A,B,C,D,F); 9 | draw(co, co.e < 1 ? black : 0.8*blue); 10 | } 11 | -------------------------------------------------------------------------------- /tex/include/conic_base.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm,0); 3 | point F=(0,0); dot("F", F); 4 | line l=line((1,0),(1,1)); 5 | draw(l); 6 | pen[] p=new pen[] {black,red,blue,green}; 7 | for (int i=0; i < 4; ++i) { 8 | conic co=conic(F,l,0.5*i); 9 | draw(co, bp+0.8*p[i]); 10 | } 11 | draw(box((-1,-1.25), (3.5,1.25)), invisible); 12 | -------------------------------------------------------------------------------- /tex/include/conic_ellipse.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm); 3 | point F=(-1,0); line D=line(N,S); 4 | conic co=conic(F, D, 0.85); dot("$F$", F); draw(co, linewidth(bp)); 5 | 6 | ellipse el=(ellipse)co; dot("$C$", el.C, S); 7 | distance(format("$2c=%f$", el.c),el.F1, el.F2, 3cm, joinpen=dashed); 8 | distance(format("$2a=%f$", el.a), relpoint(el,0), relpoint(el,0.5), 3cm, 9 | joinpen=dashed); 10 | distance(format("$2b=%f$", el.b), relpoint(el,0.25), relpoint(el,0.75), 5.25cm, 11 | joinpen=dashed); 12 | dot("$F'$", el.F2, W); 13 | -------------------------------------------------------------------------------- /tex/include/conj_hyperbole.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm); 3 | 4 | point P1=(-3,0), P2=(3,0); 5 | draw(box((-5,-5),(5,5)), invisible); 6 | 7 | hyperbola H=hyperbola(P1,P2,2.2); 8 | 9 | draw(H, linewidth(bp)); 10 | draw(H.A1^^H.A2, grey); 11 | 12 | draw(conj(H), bp+0.8*red); 13 | -------------------------------------------------------------------------------- /tex/include/convert-encode.sh: -------------------------------------------------------------------------------- 1 | find . -maxdepth 1 -name "*.asy" -type f -print -exec iconv -f iso-8859-1 -t utf-8 "{}" -o utf8/"{}" \; 2 | -------------------------------------------------------------------------------- /tex/include/curabscissa.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4.5cm); 2 | currentcoordsys=rotate(45)*defaultcoordsys; 3 | show(currentcoordsys); 4 | abscissa cur=curabscissa(pi); 5 | ellipse el=ellipse(origin(),2,1,-45); draw(el,linewidth(bp)); 6 | circle c=circle(origin(),1); draw(c,linewidth(bp)); 7 | dot(point(el,cur), red); dot(point(c,cur), red); 8 | -------------------------------------------------------------------------------- /tex/include/curpoint_circle.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); real R=2; 3 | currentcoordsys=cartesiansystem((0,0), i=(1,0.5), 4 | j=(-0.5,.75)); 5 | show(currentcoordsys, xpen=invisible); 6 | point A=(2.5,2); dot("$A$", A, S, red); 7 | circle C=circle(A,R); draw(C, linewidth(bp)); 8 | draw(rotate(A-point(C,0))*("$R="+(string)R+"$"), 9 | A--point(C,0), S, Arrows); 10 | 11 | dot("curpoint(C, 0)", curpoint(C,0), 2W); 12 | dot("curpoint(C, pi)", curpoint(C,pi), 2SE); 13 | dot("curpoint(C, 3*pi/2)", curpoint(C,3*pi/2), 2E); 14 | dot("curpoint(C, -pi)", curpoint(C, -pi), 2NW); 15 | dot("curpoint(C, 2pi)", curpoint(C, 2*pi), 2E); 16 | -------------------------------------------------------------------------------- /tex/include/curpoint_ellipse.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(7cm,0); 2 | show(currentcoordsys, xpen=invisible); 3 | ellipse el=ellipse((point)(2,2),2,1,25); 4 | draw(el, linewidth(bp)); 5 | real L=arclength(el); 6 | dot("0", curpoint(el,0), dir(25)); 7 | dot("L/4", curpoint(el,L/4), dir(115)); 8 | dot("3*L/4", curpoint(el,3*L/4), -dir(115)); 9 | dot("-L/2", curpoint(el, -L/2), -dir(25)); 10 | dot("11*L/8", curpoint(el, 11*L/8), dir(145)); 11 | label("L=arclength(el)",(2,0.25)); 12 | -------------------------------------------------------------------------------- /tex/include/curpoint_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(0,6cm); 3 | 4 | point A=(0,0), B=(0,2); 5 | line l=line(A,B); show(l); 6 | 7 | dot("curpoint(l,0.75)", curpoint(l,0.75)); 8 | dot("curpoint(l,-0.75)", curpoint(l,-0.75)); 9 | dot("curpoint(l,1.5)", curpoint(l,1.5)); 10 | dot("curpoint(l,-1.5)", curpoint(l,-1.5)); 11 | 12 | addMargins(bmargin=5mm); 13 | -------------------------------------------------------------------------------- /tex/include/curpoint_parabola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(6cm); 2 | 3 | point F=(1,-1.5); dot("$F$",F,N,red); 4 | parabola p=parabola(F,0.2,110); draw(p); 5 | 6 | dot("0",curpoint(p,0),SE); 7 | dot("0.5",curpoint(p,0.5)); 8 | dot("-0.5",curpoint(p,-0.5),SW); 9 | dot("-2",curpoint(p,-2),SW); 10 | dot("2",curpoint(p,2),E); 11 | -------------------------------------------------------------------------------- /tex/include/defaultcoord.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | show(defaultcoordsys); 4 | show("$O'$", shift((1,1))*currentcoordsys); 5 | -------------------------------------------------------------------------------- /tex/include/defaultmassformat.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | mass M=mass((0,0), 1); dot("M", M); 4 | 5 | defaultmassformat="$%L(%.4g)$"; 6 | dot("M", M+(1,0)); 7 | -------------------------------------------------------------------------------- /tex/include/deftorel.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-1,1)); 4 | pair M=R*(0.5,0.5); 5 | dot("", M); 6 | show(R); 7 | -------------------------------------------------------------------------------- /tex/include/dot_arc.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | ellipsenodesnumberfactor=100; 4 | point A=(1,1); dot("$A$",A,S,red); 5 | ellipse EL=ellipse(A,2,1); 6 | dot((path)arc(EL, 210, 45, fromCenter)); 7 | circle C=circle(A,2); 8 | dot((path)arc(C, 210, 45)); 9 | -------------------------------------------------------------------------------- /tex/include/dot_hyperbola.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm,0); 3 | 4 | point P1=(-3,0), P2=(3,0); 5 | draw(box((-8,-4),(8,4)), invisible); 6 | 7 | dot((path)hyperbola(P1,P2,2.7)); 8 | 9 | hyperbolanodesnumberfactor=30; 10 | dot((path)hyperbola(P2,P1,2.7)); 11 | -------------------------------------------------------------------------------- /tex/include/dot_parabola.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | 4 | point F=(2,-1.5); 5 | dot("$F$",F,N,red); 6 | parabola p=parabola(F,0.2,90); 7 | 8 | draw(box((0.6,-1.75),(3,0.5)), invisible); 9 | parabolanodesnumberfactor=50; 10 | dot((path)p); 11 | -------------------------------------------------------------------------------- /tex/include/ellipse_dot.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm,0); 3 | ellipsenodesnumberfactor=50; 4 | ellipse e=ellipse(origin, 4, 2, 180); 5 | draw(e, Arrow); 6 | dot((path)e); 7 | -------------------------------------------------------------------------------- /tex/include/ellipses_angle.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm); 3 | 4 | currentcoordsys=rotate(20)*defaultcoordsys; 5 | show(currentcoordsys); 6 | 7 | ellipse e0=ellipse((point)(0,0), 3, 1); 8 | draw(e0, linewidth(bp), Arrow); 9 | 10 | ellipse e1=ellipse((point)(0,0), 3, 1, 45); 11 | draw(e1, bp+0.8*red, Arrow); 12 | 13 | ellipse e2=ellipse((point)(0,0), 1, 3, 45); 14 | draw(e2, bp+0.8*blue, Arrow); 15 | -------------------------------------------------------------------------------- /tex/include/excircle_intro.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | 4 | triangle t=triangle((-1,0), (2,0), (0,2)); 5 | 6 | drawline(t, linewidth(bp)); 7 | label(t,alignFactor=4); 8 | 9 | clipdraw(excircle(t.AB), bp+0.8green); 10 | clipdraw(excircle(t.BC), bp+0.8green); 11 | clipdraw(excircle(t.AC), bp+0.8green); 12 | 13 | draw(box((-2.5,-3), (3.5,3.5)), invisible); 14 | -------------------------------------------------------------------------------- /tex/include/extouch.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(6cm,0); 2 | 3 | triangle t=triangle((-1,0), (2,0), (0,2)); 4 | drawline(t, linewidth(bp)); 5 | label(t,alignFactor=4); 6 | 7 | circle c1=excircle(t.AB), c2=excircle(t.BC); 8 | circle c3=excircle(t.AC); 9 | clipdraw(c1, bp+0.8green); 10 | clipdraw(c2, bp+0.8green); 11 | clipdraw(c3, bp+0.8green); 12 | dot(c1.C^^c2.C^^c3.C, green); 13 | draw(extouch(t), bp+0.8green, dot); 14 | -------------------------------------------------------------------------------- /tex/include/hyperbola_to_path.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm,0); 3 | 4 | point P1=(-3,0), P2=(3,0); 5 | hyperbola H=hyperbola(P1,P2,2.95); 6 | 7 | draw(box((-6,-1),(-3.5,1)), dashed); 8 | draw((path)H, 2*bp+dashed); 9 | 10 | H.bmin=(-5.5,0); 11 | H.bmax=(-2.5,1.25); 12 | draw(box(H.bmin,H.bmax), red); 13 | draw((path)H, bp+red); 14 | -------------------------------------------------------------------------------- /tex/include/hyperbole_def_1.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(6cm); 2 | pen Red=0.8*red; point P1=(-3,0), P2=(3,0); 3 | draw(box((-5,-5),(5,5)), invisible); 4 | hyperbola Hf=hyperbola(P1,P2,2); 5 | draw(Hf, linewidth(bp)); dot("$C$", Hf.C, N); 6 | dot("$F_1$", Hf.F1); dot("$F_2$", Hf.F2, W); 7 | dot("$V_1$", Hf.V1, E); dot("$V_2$", Hf.V2, W); 8 | distance("$a$", Hf.C, Hf.V1, 2cm, joinpen=dotted); 9 | distance("$c$", Hf.C, Hf.F1, -2cm, joinpen=dotted); 10 | hyperbola Hv=hyperbola(P1,P2,1.5,byvertices); 11 | draw(Hv, bp+Red); 12 | dot("$V'_1$",Hv.V1, W, Red); dot("$V'_2$",Hv.V2, Red); 13 | dot("$F'_1$",Hv.F1, W, Red); dot("$F'_2$",Hv.F2, Red); 14 | -------------------------------------------------------------------------------- /tex/include/inter_conic.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm); conic co[]; 2 | co[0]=conic((-4.58,1.25), line((-5.45545,1.25), (-5.45545,2.12287)), 0.9165); 3 | draw(co[0]); 4 | co[1]=conic((0,-1),line((0,-3.5),(-1,-3.5)),1); draw(co[1]); 5 | co[2]=conic((-1.2,0), line((-5/6,0),(-5/6,-1)),1.2); draw(co[2]); 6 | dotfactor *= 2; 7 | for (int i=0; i < 3; ++i) 8 | for (int j=i+1; j < 3; ++j) 9 | dot(intersectionpoints(co[i],co[j]), red); 10 | addMargins(lmargin=10mm,bmargin=10mm); 11 | -------------------------------------------------------------------------------- /tex/include/intouch.asy: -------------------------------------------------------------------------------- 1 | size(8.5cm,0);import geometry; 2 | triangle t=triangleabc(5,6,7); 3 | drawline(t, linewidth(bp)); 4 | draw(incircle(t)); 5 | triangle itr=intouch(t); 6 | draw(itr,bp+0.8*green); dot(itr, 0.8*red); 7 | point Ge=gergonne(t); 8 | dot("$G_e$", Ge, 2*dir(-10)); 9 | draw(line(Ge,t.A), 0.8*green); 10 | draw(line(Ge,t.B), 0.8*green); 11 | draw(line(Ge,t.C), 0.8*green); 12 | addMargins(1cm,1cm); 13 | -------------------------------------------------------------------------------- /tex/include/inversion_circle_droite.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm); 3 | 4 | circle C=circle((point)(0,0),1); 5 | draw(C, linewidth(bp)); 6 | 7 | point O=dir(45); 8 | dot("$O$",O); 9 | 10 | inversion inv=inversion(3,O); 11 | circle Cp=inv*C; 12 | draw(Cp); 13 | 14 | dot(intersectionpoints(C,Cp), red); 15 | -------------------------------------------------------------------------------- /tex/include/inversion_damier.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm,0); 3 | int n=12; segment[] S; 4 | inversion inv=inversion(1,(n/2+0.45,n/2+0.45)); 5 | transform tv=shift(0,1), th=shift(1,0); 6 | for (int i=0; i < n; ++i) 7 | for (int j=0; j < n; ++j) { 8 | for (int l=0; l < 4 ; ++l) 9 | S[l]=segment(point(tv^i*th^j*unitsquare,l), point(tv^i*th^j*unitsquare,(l+1)%4)); 10 | path g; 11 | for (int l=0; l < 4; ++l) g=g--(path)(inv*S[l]); 12 | g=g--cycle; 13 | if((i+j)%2 == 0) draw(g); else fill(g); 14 | } 15 | -------------------------------------------------------------------------------- /tex/include/inversion_pre.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6.5cm,0); currentpen=linewidth(bp); 3 | point O=origin, M=(2,1), P=(2,-1); 4 | dot("O", O, W); 5 | inversion t=inversion(2,O); 6 | point Mp=t*M, Pt=t*P; 7 | circle C=circle(M,P,Mp); draw(C); 8 | dot("M", M, N, blue); dot("P", P, S, blue); 9 | dot("M'", Mp, red); dot("P'", Pt, red); 10 | circle Ct=circle(t); clipdraw(Ct, 0.8*red); 11 | point[] T=intersectionpoints(C,Ct); 12 | draw(line(O,false,T[0])); draw(line(O,false,T[1])); 13 | -------------------------------------------------------------------------------- /tex/include/isogonaux.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | triangle t=triangleabc(5,6,7); draw(t, linewidth(bp)); 3 | point P=0.5*t.B+0.3*(t.C-t.B); dot("$P$", P, N, 0.8*red); 4 | 5 | point Q=isogonalconjugate(t,P); dot("$Q$", Q, dir(-30)); 6 | point Q1=projection(t.AB)*Q; segment sq1=segment(Q,Q1); 7 | point Q2=projection(t.BC)*Q; segment sq2=segment(Q,Q2); 8 | point Q3=projection(t.AC)*Q; segment sq3=segment(Q,Q3); 9 | draw(sq1); draw(sq2); draw(sq3); 10 | dot("$Q_1$", Q1, SE); dot("$Q_2$", Q2); dot("$Q_3$", Q3, NW); 11 | 12 | point P1=projection(t.AB)*P; segment sp1=segment(P,P1); 13 | point P2=projection(t.BC)*P; segment sp2=segment(P,P2); 14 | point P3=projection(t.AC)*P; segment sp3=segment(P,P3); 15 | draw(sp1, 0.8*red); draw(sp2, 0.8*red); draw(sp3, 0.8*red); 16 | dot("$P_1$",P1,SW,0.8*red); dot("$P_2$",P2,0.8*red); dot("$P_3$",P3,NW,0.8*red); 17 | 18 | perpendicularmark(t.AB,sq1); perpendicularmark(t.BC,sq2); 19 | perpendicularmark(reverse(t.AC),sq3); perpendicularmark(t.AB,sp1, red); 20 | perpendicularmark(t.BC,sp2, red); perpendicularmark(reverse(t.AC),sp3, red); 21 | 22 | circle C=circle(Q1,Q2,Q3); draw(C, 0.8*blue); 23 | draw(segment(Q,P), 0.8*blue, StickIntervalMarker(2,2, 0.8*blue)); 24 | dot("$C$", C.C, S, 0.8*blue); 25 | -------------------------------------------------------------------------------- /tex/include/isotomic.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | triangle t=triangleabc(5,6,7); label(t); draw(t, linewidth(bp)); 3 | point P=0.6*t.B+0.25*t.C; dot("$P$", P, dir(60), 0.8*red); 4 | draw(segment(isotomic(t.VA,P))^^segment(isotomic(t.VB,P))^^segment(isotomic(t.VC,P)), 5 | 0.8*blue); 6 | draw(segment(cevian(t.VA,P))^^segment(cevian(t.VB,P))^^segment(cevian(t.VC,P)), 7 | 0.8*red); 8 | triangle t1=cevian(t,P); label("$P_1$", "$P_2$", "$P_3$", t1); draw(t1, bp+0.8*red); 9 | triangle t2=isotomic(t,P); label("$Q_1$", "$Q_2$", "$Q_3$", t2); draw(t2, bp+0.8*blue); 10 | dot("$Q$", isotomicconjugate(t,P), dir(100), 0.8*blue); 11 | 12 | point Ma=midpoint(t.BC), Mb=midpoint(t.AC), Mc=midpoint(t.BA); 13 | dot("$M_1$",Ma,-dir(t.VA)); dot("$M_2$",Mb,-dir(t.VB)); dot("$M_3$",Mc,-dir(t.VC)); 14 | draw(t.A--Ma^^t.B--Mb^^t.C--Mc, grey); dot("$G$", centroid(t), 2*dir(-65), grey); 15 | draw(t1.A--t2.A, 0.8*green, StickIntervalMarker(2,1,0.8*green)); 16 | draw(t1.B--t2.B, 0.8*green, StickIntervalMarker(2,2,0.8*green)); 17 | draw(t1.C--t2.C, 0.8*green, StickIntervalMarker(2,3,0.8*green)); 18 | -------------------------------------------------------------------------------- /tex/include/line_angle1.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | coordsys R=cartesiansystem((1,-2), i=(1,0.5), j=(-1,1)); 4 | show("$O_{1}$", "$\vec{u}$", Label("$\vec{v}$", align=E), 5 | R, ipen=blue, ypen=invisible); 6 | show(defaultcoordsys, ypen=invisible); 7 | point A=point(R,(1,1)); dot("A", A, NW); 8 | 9 | line l=line(A, 30); 10 | draw(l, bp+blue); 11 | markangle("$30^\circ$", Ox(R), l, grey); 12 | 13 | A=changecoordsys(defaultcoordsys, A); 14 | line ll=line(A, 40); 15 | draw(ll, bp+red); 16 | markangle("$40^\circ$", Ox, ll, grey); 17 | draw(box((-0.6,-2.8), (2,-0.3)), invisible); 18 | -------------------------------------------------------------------------------- /tex/include/line_base.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | linemargin=2mm; 4 | point A=(0,0), B=(2, 0), C=(3,1), D=(1,1); 5 | dot("A", A, NW); dot("B", B, SE); dot("C", C); 6 | dot("D", D, W); 7 | 8 | line AB=line(A, B); 9 | line CB=line(C, false, B); 10 | line CD=line(C, false, D, false); 11 | line AD=line(A, false, D); 12 | 13 | draw("(AB)", AB); draw("[CB)", CB); 14 | draw(Label("[CD]",Relative(0.5),align=N), CD); 15 | draw("[AD)", AD); draw(box((-1,-2),(4,3))); 16 | -------------------------------------------------------------------------------- /tex/include/line_segment.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | point A=SW, B=NE; 4 | label("$A$", A, NW); label("$B$", B, SE); 5 | 6 | line l=line(A,B); 7 | draw(l, bp+red); 8 | 9 | segment s=l; 10 | draw(s, linewidth(3bp)); 11 | draw(line(rotate(90,midpoint(s))*s)); 12 | draw(box(2*A,2*B), invisible); 13 | -------------------------------------------------------------------------------- /tex/include/locate_vector.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4cm,0); 2 | currentcoordsys=cartesiansystem((1.25,0.75), i=(1,1), j=(-1,1)); 3 | coordsys Rp=currentcoordsys; coordsys R=defaultcoordsys; 4 | show(R); 5 | show("$O'$","$\vec{u}$","$\vec{v}$", Rp, xpen=invisible); 6 | point P=(0.75,0.5); dot("$P$",P); vector w=P; 7 | pen bpp=linewidth(bp); 8 | draw("$\vec{w}$", origin()--origin()+w, W, bpp, Arrow(3mm)); 9 | draw("$\vec{w}$", origin--locate(w), E, bpp, Arrow(3mm)); 10 | -------------------------------------------------------------------------------- /tex/include/locate_vector2.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4cm,0); 2 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-0.75,1)); 3 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 4 | show(currentcoordsys); 5 | 6 | vector w=vector(R, (1,1)); 7 | show("$\vec{w}$", w, linewidth(bp), Arrow(3mm)); 8 | dot("w", w, N); dot("point(w)", point(w), N); 9 | -------------------------------------------------------------------------------- /tex/include/makefile: -------------------------------------------------------------------------------- 1 | ASYCMD=asy -f pdf -tex pdflatex 2 | ALL=asy 3 | SRC= $(wildcard *.asy) 4 | OBJ= $(SRC:.asy=.pdf) 5 | TEX= $(SRC:.asy=.tex) 6 | 7 | all: $(ALL) 8 | asy: $(TEX) $(OBJ) 9 | 10 | %.pdf: %.asy 11 | $(ASYCMD) $< 12 | 13 | %.tex: %.asy 14 | ../../bin/pygmentize-wraper.sh $< 15 | 16 | clean: 17 | @rm -f *.eps; rm -f *.log; rm -f *.dvi 18 | 19 | .PHONY : clean mrproper asy 20 | 21 | mrproper: clean 22 | @rm -f *.pdf; rm -f *.tex 23 | -------------------------------------------------------------------------------- /tex/include/mass_ex1.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | mass A=mass((1,0), 3); 4 | mass B=mass((0,1), sqrt(3)); 5 | point C=(0.25,0); // C inherits of a weight of 1 by default. 6 | 7 | dot("B", B, N); dot("C", C, S); dot("A", A, S); 8 | draw(A--B--C--cycle, linewidth(bp)); 9 | dot("G", masscenter(A,B,mass(C)), 2NE); 10 | -------------------------------------------------------------------------------- /tex/include/mass_ex2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | int n=50; 4 | mass[] M; 5 | real m, step=360/n; 6 | pair dir; 7 | for (int i=0; i < 2*n; ++i) { 8 | dir=dir(i*step); 9 | m=i+1; 10 | M.push(mass(m*dir, m)); 11 | dot(locate(M[i])); 12 | } 13 | dot("G",masscenter(... M), red); 14 | -------------------------------------------------------------------------------- /tex/include/mass_ex3.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7cm,0); 3 | int[][] parties(int n) { 4 | int[][] oi; 5 | 6 | void loop(int[] arr, int i) { 7 | oi.push(arr); 8 | for (int j=i; j < arr.length; ++j) { 9 | int[] tt=copy(arr); 10 | tt[j]=1; 11 | loop(tt, j+1);}} 12 | loop(sequence(new int(int n){return 0;}, n), 0); 13 | return oi;} 14 | 15 | int n=6; 16 | real step=360/n; 17 | point[] M; 18 | 19 | for (int i=0; i < n; ++i) { 20 | M[i]=mass(dir(i*step), 1); 21 | dot(M[i],linewidth(2mm));} 22 | 23 | int[][] part=parties(n); int l=part.length; 24 | point[][] group=new point[l][]; 25 | 26 | for (int i=0; i < l; ++i) 27 | for (int j=0; j < n; ++j) 28 | if(part[i][j] == 1) group[i].push(M[j]); 29 | 30 | point[][] partbar=new point[l][2]; 31 | 32 | for (int i=0; i < l; ++i) { 33 | if(group[i].length > 0) partbar[i][0]=masscenter(...group[i]); 34 | for (int j=0; j < group[i].length; ++j) 35 | draw(group[i][j]--partbar[i][0]); 36 | if(group[i].length > 0) dot(partbar[i][0], 0.8*red);} 37 | -------------------------------------------------------------------------------- /tex/include/medial.asy: -------------------------------------------------------------------------------- 1 | size(8cm); 2 | import geometry; 3 | 4 | triangle t=triangleabc(6,5,4); 5 | drawline(t, linewidth(bp)); 6 | line ma=median(t.VA), mb=median(t.VB); 7 | line mc=median(t.VC); draw(ma^^mb^^mc); 8 | 9 | draw(segment(t.AB), StickIntervalMarker(2,1)); 10 | draw(segment(t.BC), StickIntervalMarker(2,2)); 11 | draw(segment(t.CA), StickIntervalMarker(2,3)); 12 | 13 | triangle med=medial(t); 14 | draw(med,bp+0.8*green); dot(med, 0.8*red); 15 | addMargins(1cm,1cm); 16 | -------------------------------------------------------------------------------- /tex/include/orthic.asy: -------------------------------------------------------------------------------- 1 | size(8cm); 2 | import geometry; 3 | 4 | triangle t=triangleabc(3,4,6); 5 | drawline(t, linewidth(bp)); 6 | line hc=altitude(t.AB), hb=altitude(t.AC); 7 | line ha=altitude(t.BC); draw(hc^^hb^^ha); 8 | dot("H", orthocentercenter(t)); 9 | 10 | perpendicularmark(t.AB,hc,quarter=-1); 11 | perpendicularmark(t.AC,hb,quarter=-1); 12 | perpendicularmark(t.BC,ha); 13 | 14 | triangle ort=orthic(t); 15 | draw(ort,bp+0.8*green); dot(ort, 0.8*red); 16 | addMargins(1cm,1cm); 17 | -------------------------------------------------------------------------------- /tex/include/ove.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | point A=(-1,1), B=(1,-1); 4 | point M=(A+B)/2; 5 | 6 | point P=rotate(90,M)*B; 7 | arc A1=arccircle(A,B,45), A2=arccircle(B,A,-45,CW), 8 | A3=arccircle(P,relpoint(A2,1),-90,CW), 9 | A4=arccircle(M,A,180); 10 | draw(A1^^A2^^A3^^A4, linewidth(bp)); 11 | shipout(bbox()); 12 | -------------------------------------------------------------------------------- /tex/include/pappus_construct.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(7cm,0); 2 | inversion inv=inversion(10,(-4,0)); 3 | line l1=line((-1,0),(-1,1)), l2=line((1,0),(1,1)); 4 | draw(l1, bp+0.8*blue); draw(l2, bp+0.8*green); 5 | clipdraw(inv*l1,bp+0.8*blue); 6 | clipdraw(inv*l2,bp+0.8*green); 7 | int n=10; 8 | for (int i=0; i <= n; ++i) { 9 | circle C=circle((point)(0,2*i),1); 10 | circle Cp=inv*C; 11 | draw(Cp,bp+(1-abs(i/4))*red); 12 | if(abs(i) < 4){ 13 | draw(C,bp+(1-abs(i/4))*red); 14 | draw((1,2*i)--inv*(1,2*i),0.8*green); 15 | draw((-1,2*i)--inv*(-1,2*i),0.8*blue); 16 | } 17 | } 18 | addMargins(1mm,1mm); 19 | -------------------------------------------------------------------------------- /tex/include/pappus_variante.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | point P=(0,-4.5); dot(P); inversion inv=inversion(1,P); 3 | line l1=line((0,0),(1,0.35)), l2=line((0,0),(-1,0.35)); 4 | path g1=inv*l1, g2=inv*l2; 5 | fill(g1^^g2,evenodd+lightgrey); draw(g1,linewidth(bp)); draw(g2,linewidth(bp)); 6 | 7 | for (int i:new int[]{-1,1}) { 8 | point P=(i*0.1,0); triangle t=triangle(shift(P)*vline,l1,l2); int n=15; 9 | for (int j=0; j <= n; ++j) { 10 | circle C=excircle(t.AB); 11 | t=triangle(shift(angpoint(C,(i-1)*90))*vline,l1,l2); 12 | circle Cp=inv*C; path g=Cp; fill(g,0.95*yellow); draw(g,bp+red); draw(g,blue); }} 13 | shipout(bbox(5mm,Fill(rgb(0.95,0.95,0.8)))); 14 | -------------------------------------------------------------------------------- /tex/include/parabola_to_path.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm); 3 | 4 | point F=(2,-1.5); 5 | dot("$F$",F,N,red); 6 | parabola p=parabola(F,0.2,90); 7 | 8 | draw(box((0.1,-1),(3,0.5)), dashed); 9 | draw((path)p, 2*bp+dashed); 10 | 11 | p.bmin=(0,-0.4); 12 | p.bmax=(2.5,0.75); 13 | draw(box(p.bmin,p.bmax), red); 14 | draw((path)p, bp+red); 15 | -------------------------------------------------------------------------------- /tex/include/parabole_3_points.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(9cm,0); 3 | 4 | draw(box((-2,-3),(6,3)), invisible); 5 | point M1=(0,0), M2=(4,-2), M3=(2,1); 6 | pen[] p=new pen[] {black,red,blue,green}; 7 | parabola P; 8 | for (int i=0; i < 4; ++i) { 9 | P=parabola(M1,M2,M3,rotate(45*i)*Ox()); 10 | draw(P, bp+0.8*p[i]); 11 | } 12 | dot(scale(0.75)*"$M_1$", M1, 2*dir(175)); 13 | dot(scale(0.75)*"$M_2$", M2, 2*dir(25)); 14 | dot(scale(0.75)*"$M_3$", M3, 2*dir(80)); 15 | -------------------------------------------------------------------------------- /tex/include/parallel.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | coordsys R=cartesiansystem((1,-2), i=(1,1), j=(-1,1)); 4 | show("$O$","$\vec{u}$","$\vec{v}$", R, ypen=invisible); 5 | 6 | pen bpp=linewidth(bp); 7 | point A=(0,0), B=(2, 0.5), C=(3,2); 8 | vector w=vector(R, (1.5,2)); line AB=line(A,B); 9 | 10 | dot("A", A, NW); dot("B", B, NE); dot("C", C, N); 11 | show("$\vec{w}$", w, bpp+0.8*red, Arrow(3mm)); 12 | draw(AB, bpp+0.8*blue); 13 | draw(parallel(C, AB), bpp+0.8*blue); 14 | draw(parallel(B, w), bpp+0.8*red); 15 | draw(parallel(A, R.i), bpp); 16 | draw(box((-1,-3),(4,3)), invisible); 17 | -------------------------------------------------------------------------------- /tex/include/perpendicular.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | pen bpp=linewidth(bp); 4 | coordsys R=cartesiansystem((0.5,-2), i=(1,1), j=(-1,1)); 5 | show("$O$","$\vec{u}$","$\vec{v}$", R, xpen=bpp, 6 | ypen=invisible); 7 | point A=(0,1), B=(2,2); 8 | vector w=vector(R, (2,2)); line AB=line(A,B); 9 | dot("A", A, 2*dir(165)); dot("B", B, N); 10 | show(Label("$\vec{w}$",Relative(0.75)), w, bp+0.8*red, 11 | Arrow(3mm)); 12 | draw(AB, bp+0.8*blue); 13 | draw(perpendicular(B, AB), bp+0.8*blue); 14 | draw(perpendicular(B, w), bp+0.8*red); 15 | draw(perpendicular(A, R.i), bpp); 16 | draw(box((-1,-3),(4,3)), invisible); 17 | -------------------------------------------------------------------------------- /tex/include/perpendicularmark_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | transform t=rotate(135); 4 | line l1=t*line((0,0),E); line l2=t*line((0,0),N); 5 | 6 | perpfactor *=5.5; 7 | perpendicularmark(l1,l2, Fill(0.8*green)); 8 | perpendicularmark(l1,l2, quarter=2, Fill(0.8*blue)); 9 | perpendicularmark(l1,l2, quarter=3, Fill(0.8*red)); 10 | perpendicularmark(l1,l2, quarter=4, Fill(0.8*yellow)); 11 | 12 | pen bpp=linewidth(bp); position pos=Relative(0.75); 13 | show(Label("$u_1$",pos), l1.u, bpp, Arrow(3mm)); 14 | show(Label("$u_2$",pos,align=SE), l2.u, bpp, Arrow(3mm)); 15 | show("", -l1.u, invisible); show("", -l2.u, invisible); 16 | -------------------------------------------------------------------------------- /tex/include/point1.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | show(currentcoordsys, xpen=invisible); 4 | pair M=(1,1); dot("$M$", M, W, linewidth(2mm)); 5 | point P=(1,1); dot("$P$", P, red); 6 | -------------------------------------------------------------------------------- /tex/include/point2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((3,0), i=(1,1), j=(-1,1)); 4 | show("$O_1$", "$\vec{u_1}$", "$\vec{v_1}$", currentcoordsys, xpen=invisible); 5 | point A=(1,1); 6 | dot("$A$", A); 7 | coordsys Rp=rotate(90)*currentcoordsys; 8 | show("$O_2$", "$\vec{u_2}$", "$\vec{v_2}$", Rp, xpen=invisible); 9 | point B=point(Rp, (1,1)); 10 | dot("$B$", B); 11 | -------------------------------------------------------------------------------- /tex/include/point3.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | currentcoordsys=cartesiansystem((3,0), (1,0), (1,1)); 4 | show("", currentcoordsys); 5 | point A=(1,1); 6 | dot("$A$", A); draw(locate(0)--A); 7 | draw(locate((0,1))--A, dashed); draw(locate((1,0))--A, dashed); 8 | -------------------------------------------------------------------------------- /tex/include/point4.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((2,3), i=(1,0), j=(0.5,1)); 4 | show(currentcoordsys); 5 | show(Label("$O_1$",blue), Label("$\vec{u}$",blue), 6 | Label("$\vec{v}$",blue), R, xpen=invisible, ipen=blue); 7 | pair A=(3,1); 8 | dot("", A, red); 9 | point B=point(R, A/R); 10 | dot("", B, W, blue); 11 | -------------------------------------------------------------------------------- /tex/include/point5.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | currentcoordsys=cartesiansystem((0,0), i=(1,0), j=(0.5,1)); 4 | show(currentcoordsys); 5 | coordsys R=cartesiansystem((4,3), i=(-1,0), j=(-0.5,1)); 6 | show(Label("$O_1$",blue), Label("$\vec{u}$",align=S,blue), 7 | Label("$\vec{v}$",align=E,blue), R, xpen=invisible, ipen=blue); 8 | point A=(3,1); 9 | dot("", A, red); 10 | point B=changecoordsys(R, A); 11 | dot("", B, W, blue); 12 | -------------------------------------------------------------------------------- /tex/include/point6.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((1,2), i=(1,0.5), j=(-1,1)); 4 | show(R); 5 | 6 | for (int i=0; i < 360; i += 10) { 7 | pen p=(i/360)*red; 8 | dot(point(R, R.polar(1,radians(i))), p); 9 | } 10 | 11 | point A=point(R, R.polar(1,radians(40))); 12 | draw((string)abs(A), R.O--A); 13 | -------------------------------------------------------------------------------- /tex/include/point_vector.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4cm,0); 2 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-0.75,1)); 3 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 4 | show(currentcoordsys); 5 | point M=point(R, (1,1)); dot("M", M, N); 6 | dot("vector(M)", vector(M), N); 7 | show(Label(scale(0.75)*"$\vec{O_1M}$", Relative(0.75)), 8 | M, linewidth(bp), Arrow(3mm)); 9 | -------------------------------------------------------------------------------- /tex/include/projectionAB.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | point A=(2,2); point B=(4,1); point M=(4,3); 4 | path cle=shift(3,2.5)*scale(.25)*unitcircle; 5 | draw(cle, linewidth(bp)); 6 | 7 | transform proj=projection(A,B); 8 | point Mp=proj*M; 9 | 10 | draw(proj*cle, 1mm+red); 11 | dot("A", A, unit(A-B)); dot("B", B, unit(B-A)); 12 | dot("M", M, unit(M-Mp)); 13 | dot("M'", Mp, unit(Mp-M), red); 14 | draw(M--Mp, grey); draw(A--B); 15 | markrightangle(M,Mp,A, grey); 16 | -------------------------------------------------------------------------------- /tex/include/projectionABCD.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm); 3 | point A=(2,2); point B=(4,1); point C=(3.75,3); 4 | point D=(3.5,4); point M=(2.5,3.5); 5 | path cle=shift(2.5,3)*scale(0.25)*unitcircle; 6 | draw(cle, linewidth(bp)); draw(line(C,D), grey); 7 | 8 | transform proj=projection(A,B,C,D); 9 | point Mp=proj*M; 10 | 11 | draw(proj*cle, 1mm+red); 12 | dot("A", A, unit(A-B)); dot("B", B, unit(B-A)); 13 | dot("C", C); dot("D", D); dot("M", M, unit(M-Mp)); 14 | dot("M'", Mp, 2*unit(Mp-M), red); 15 | draw(M--Mp, grey); draw(A--B); 16 | -------------------------------------------------------------------------------- /tex/include/projection_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7.5cm,0); dotfactor*=1.5; 3 | currentcoordsys=rotate(20)*defaultcoordsys; 4 | show(currentcoordsys, xpen=invisible, ypen=red); 5 | 6 | point A=(-1,-3), B=(5,2); 7 | line l1=line(A,B); draw(l1, linewidth(bp)); 8 | dot("$A$", A, SE); dot("$B$", B, NW); 9 | point M=(3,-3); dot("$M$", M); 10 | 11 | point P=projection(l1)*M; 12 | dot("$P$", P, 2W); draw(M--P); 13 | markrightangle(l1.A, P, M); 14 | 15 | point Q=vprojection(l1)*M; 16 | dot("$Q$", Q, 2W); draw(M--Q); 17 | 18 | point R=hprojection(l1)*M; 19 | dot("$R$", R, 2W); draw(M--R); 20 | 21 | point S=projection(l1,line((0,0),(0,1)))*M; 22 | dot("$S$", S, 2W); draw(M--S, red); 23 | draw(box((-1,-4),(5,5)), invisible); 24 | -------------------------------------------------------------------------------- /tex/include/reflect.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | point A=origin, B=NE, M=2*B+N; 4 | dot("A", A, I*unit(A-B)); dot("B", B, I*unit(A-B)); 5 | 6 | line AB=line(A,B); 7 | draw(AB, linewidth(bp)); 8 | transform reflect=reflect(AB); 9 | 10 | point Mp=reflect*M; 11 | dot("M",M, unit(M-Mp)); dot("M'", Mp, unit(Mp-M), red); 12 | draw(segment(M,Mp), grey, StickIntervalMarker(2,2,grey)); 13 | -------------------------------------------------------------------------------- /tex/include/reflect_dir.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm,0); 3 | line AB=line(origin, NE), CD=line(2*NE+N, 2*NE+SE); 4 | draw(AB, linewidth(bp)); draw(CD, linewidth(bp)); 5 | transform reflect=reflect(AB,CD); 6 | 7 | point M=1.75*NE+0.5N, Mp=reflect*M; 8 | dot("M",M, unit(M-Mp)); dot("M'", Mp, unit(Mp-M), red); 9 | draw(segment(M,Mp), grey, StickIntervalMarker(2,2,grey)); 10 | draw(box((1,1), (2.2,2.2)), invisible); 11 | -------------------------------------------------------------------------------- /tex/include/relabscissa.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4.5cm); 2 | currentcoordsys=rotate(45)*defaultcoordsys; 3 | show(currentcoordsys); 4 | abscissa rel=relabscissa(0.5); 5 | ellipse el=ellipse(origin(),2,1,-45); draw(el,linewidth(bp)); 6 | circle c=circle(origin(),1); draw(c,linewidth(bp)); 7 | dot(point(el,rel), red); dot(point(c,rel), red); 8 | -------------------------------------------------------------------------------- /tex/include/relpoint_circle.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((0,0), i=(1,0.5), 4 | j=(-0.5,.75)); 5 | show(currentcoordsys, xpen=invisible); 6 | 7 | point A=(2.5,2); dot("$A$", A, S, red); 8 | real R=2; 9 | circle C=circle(A,R); 10 | draw(C, linewidth(bp)); 11 | 12 | dot("relpoint(C, 0)", relpoint(C,0), 2W); 13 | dot("relpoint(C, 0.25)", relpoint(C,0.25), 2SE); 14 | dot("relpoint(C, 0.5)", relpoint(C,0.5), 2E); 15 | dot("relpoint(C, -0.25)", relpoint(C, -0.25), 2NW); 16 | dot("relpoint(C, 1.125)", relpoint(C, 1.125), 2N); 17 | -------------------------------------------------------------------------------- /tex/include/relpoint_ellipse.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | show(currentcoordsys, xpen=invisible); 4 | point A=(2.5,2); dot("$A$", A, S, red); 5 | ellipse el=ellipse(A,2,1,45); 6 | draw(el, linewidth(bp)); 7 | 8 | dot("relpoint(el, 0)", relpoint(el,0), 2S); 9 | dot("relpoint(el, 0.25)", relpoint(el,0.25), 2S); 10 | dot("relpoint(el, 0.5)", relpoint(el,0.5), 2S+E); 11 | dot("relpoint(el, -0.25)", relpoint(el, -0.25), 2SW); 12 | dot("relpoint(el, 1.125)", relpoint(el, 1.125), 2W); 13 | -------------------------------------------------------------------------------- /tex/include/relpoint_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(0,6cm); 3 | 4 | point A=(0,0), B=(0,2); 5 | line l=line(A,B); show(l); 6 | 7 | dot("relpoint(l,0.75)", relpoint(l,0.75)); 8 | dot("relpoint(l,-0.75)", relpoint(l,-0.75)); 9 | dot("relpoint(l,1.5)", relpoint(l,1.5)); 10 | dot("relpoint(l,-1.5)", relpoint(l,-1.5)); 11 | 12 | addMargins(bmargin=5mm); 13 | -------------------------------------------------------------------------------- /tex/include/reltodef.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-1,1)); 4 | coordsys Rp=cartesiansystem((-2,-1), i=(-1,1), j=(-1,-1)); 5 | pair M=R*(1,1); 6 | dot("$M$", M); 7 | pair P=Rp*(M/R); 8 | dot("$P$", P); 9 | show(R, xpen=invisible); 10 | show("$O'$", "$\vec{u}$", "$\vec{v}$", Rp, xpen=invisible); 11 | -------------------------------------------------------------------------------- /tex/include/scale.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7.5cm,0); 3 | pen bpp=linewidth(bp); real k=sqrt(2); 4 | 5 | point A=(0,0); dot("A", A, SW); 6 | point B=(1,2); dot("B", B, N); 7 | point M=(-1,1); 8 | dot("M", M, -dir(M--A,M--B)); 9 | 10 | point Ap=scale(k, M)*A; 11 | dot("A'", Ap, SW, red); 12 | point Bp=scale(k, M)*B; 13 | dot("B'", Bp, N, red); 14 | 15 | draw(M--Ap, grey); draw(M--Bp, grey); 16 | draw(A--B, bpp); 17 | draw(rotate(unit(Bp-Ap))*"$k\times AB$", 18 | Ap--Bp, bpp+red); 19 | -------------------------------------------------------------------------------- /tex/include/scale2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7.5cm,0); 3 | pen bpp=linewidth(bp); 4 | point A=(0,0); dot("A", A, SW); 5 | point B=(1,2); dot("B", B, NW); 6 | point C=(-1,1); dot("C", C,N); 7 | path g=A--B--C--cycle; draw(g, bpp); 8 | point M=(0,1); 9 | path gp=scale(2, M)*g; draw(gp, bpp); 10 | for (int i=0; i < 3; ++i) draw(M--point(gp,i)); 11 | dot("A'", point(gp,0), SW); 12 | dot("B'", point(gp,1), NW); 13 | dot("C'", point(gp,2), N); 14 | -------------------------------------------------------------------------------- /tex/include/scaleABCD.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | pen bpp=linewidth(bp); real k=sqrt(2); 4 | point A=(0,0), B=(2,0), C=(3.5,1); 5 | point D=(4,2), M=(6,3); 6 | path cle=shift(1,2)*unitcircle; 7 | draw(cle, bpp); 8 | draw(line(A,B)); 9 | draw(line(C,D), grey); 10 | 11 | transform dilate=scale(k,A,B,C,D); 12 | draw(dilate*cle, bpp+red); 13 | point Mp=dilate*M; 14 | 15 | point P=intersectionpoint(line(A,B), line(M,Mp)); 16 | draw(line(P,M), grey); 17 | dot("A", A, S); dot("B", B, S); dot("C", C); 18 | dot("D", D); dot("M", M, W); dot("P", P, NW); 19 | dot("M'", Mp, W, red); 20 | distance("$k\times PM$", P, Mp, 6mm, grey, 21 | joinpen=grey+dashed); 22 | -------------------------------------------------------------------------------- /tex/include/scaleO.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4.5cm,0); 2 | currentcoordsys=cartesiansystem((2,1), i=(1,0.5), j=(-1,1)); 3 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", currentcoordsys, 4 | xpen=invisible); show(defaultcoordsys, xpen=invisible); 5 | 6 | real k=sqrt(2); point P=(1,1); dot("P", P); 7 | 8 | point P1=scale(k)*P, P2=scaleO(k)*P; dot("scale(k)*P", P1, N); 9 | dot("scaleO(k)*P", P2, W); draw((0,0)--locate(P1)); 10 | draw(origin()--P2); 11 | -------------------------------------------------------------------------------- /tex/include/sector_line.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(10cm,0); 3 | point A=(0,0), B=(3,0), C=(0.795,1.5); 4 | dot(A); dot(B); dot(C); 5 | pen pb=0.8*blue, pr=0.8*red, py=0.8*yellow, bpp=linewidth(bp); 6 | line AB=line(A,B), AC=line(A,C), BC=line(B,C); 7 | draw(AB, bpp); draw(AC, bpp); draw(BC, bpp); 8 | 9 | line bA1=sector(3,AB,AC), bA2=sector(3,2,AB,AC); 10 | line bB1=sector(3,AB,BC), bB2=sector(3,2,AB,BC); 11 | line bC1=sector(3,AC,BC), bC2=sector(3,2,AC,BC); 12 | draw(bA1, bpp+pb); draw(bA2, bpp+pb); 13 | draw(bB1, bpp+pr); draw(bB2, bpp+pr); 14 | draw(bC1, bpp+py); draw(bC2, bpp+py); 15 | 16 | markangleradiusfactor *= 8; 17 | markangle(BC, reverse(AB), pr, StickIntervalMarker(3,1,pr,true)); 18 | markangleradiusfactor /= 3; 19 | markangle(reverse(AC), reverse(BC), py, StickIntervalMarker(3,2,py,true)); 20 | markangleradiusfactor *= 3/2; 21 | markangle(AB, AC, pb, StickIntervalMarker(3,3,pb,true)); 22 | -------------------------------------------------------------------------------- /tex/include/simson.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | triangle t=triangleabc(5,6,7); 3 | label(t, alignFactor=4); 4 | drawline(t, linewidth(bp)); 5 | circle C=circle(t); draw(C, bp+dashed); 6 | pen[] p=new pen[] {0.8*red,0.8*blue, 7 | 0.8*green, 0.8*yellow}; 8 | for (int i=0; i < 4; ++i) { 9 | real x=35+i*90; point P=angpoint(C,x); 10 | dot("$P_"+(string)i+"$",P,dir(x),p[i]); 11 | for (int j=1; j < 4; ++j) { 12 | segment Sg=segment(pedal(t.side(j),P)); 13 | draw(Sg,p[i]); 14 | markrightangle(P,Sg.B,t.vertex(j),p[i]); 15 | } 16 | drawline(pedal(t,P), bp+p[i]); 17 | } 18 | addMargins(1cm,1cm); 19 | -------------------------------------------------------------------------------- /tex/include/somme_point.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | show(currentcoordsys); 4 | coordsys R=cartesiansystem((2,2), i=(1,0.5), j=(-1,1)); 5 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 6 | 7 | point M=(-1,1); dot("M", M); 8 | 9 | point P=point(R, (1,1)); dot("P", P); 10 | 11 | point Q=M+P; dot("Q=M+P", Q); 12 | -------------------------------------------------------------------------------- /tex/include/somme_point_vecteur.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | show(currentcoordsys, xpen=invisible); 4 | coordsys R=cartesiansystem((2,2), i=(1,0.5), j=(-1,1)); 5 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 6 | 7 | point M=(-1,1); dot("M", M); 8 | point P=point(R, (1,1)); dot("P", P); 9 | vector w=P; show("$\vec{w}$", w, linewidth(bp), Arrow(3mm)); 10 | point Q=M+w; dot("Q=M+w", Q); 11 | -------------------------------------------------------------------------------- /tex/include/somme_vector.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | pen bpp=linewidth(bp); 4 | currentcoordsys=cartesiansystem((0,0), i=(1,1), j=(-1,1)); 5 | show(currentcoordsys, xpen=invisible); 6 | 7 | vector u=(0.5,1), v=rotate(-135)*u/2; 8 | show("$\vec{u}$", u, bpp, Arrow(3mm)); 9 | show("$\vec{v}$", v, bpp, Arrow(3mm)); 10 | show(Label("$\vec{u}+\vec{v}$",EndPoint), u+v, bpp, Arrow(3mm)); 11 | -------------------------------------------------------------------------------- /tex/include/somme_vector2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(8cm,0); 3 | pen bpp=linewidth(bp); 4 | currentcoordsys=cartesiansystem((0,0), i=(1,1), j=(-1,1)); 5 | show(currentcoordsys, xpen=invisible); 6 | 7 | vector u=(0.5,1), v=rotate(-135)*u/2; 8 | show("$\vec{u}$", u, bpp, Arrow(3mm)); 9 | show("$\vec{v}$", v, bpp, Arrow(3mm)); 10 | point P=(1,-1); dot("P", P, SW); 11 | draw(Label("$\vec{u}$",align=W), P--(P+u), bpp, Arrow(3mm)); 12 | draw("$\vec{v}$", P--(P+v), bpp, Arrow(3mm)); 13 | draw("$\vec{u}+\vec{v}$", P--(P+(u+v)), bpp, Arrow(3mm)); 14 | -------------------------------------------------------------------------------- /tex/include/subarc_point.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm); 2 | point A=(-1,0), B=(1,1), C=(0,0), D=(1,-1); 3 | dot("$A$",A,S); dot("$B$",B,S); dot("$D$",D,SW); 4 | arc c=arc(ellipse(C,2,1,20), 0, 270); draw(complementary(c),dashed+grey); 5 | line l1=line(A,B), l2=line(C,D); 6 | point[] J=intersectionpoints(l1,c), K=intersectionpoints(l2,c); 7 | draw(arc(c,J[0],K[0]), 2bp+0.8yellow); draw(arc(c,K[0],J[1]), 2bp+0.8red); 8 | draw(arc(c,J[1],relpoint(c,1)), 2bp+0.8green); draw(arc(c,point(c,0),J[0]), 2bp+0.8blue); 9 | dot("$J_0$",J[0],2N); dot("$J_1$",J[1],N+2W); dot("$K_0$",K[0],2N); 10 | draw(c, bp+white); draw(l1^^l2); 11 | -------------------------------------------------------------------------------- /tex/include/symmedian.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | triangle t=triangle((-1,0), (2,0), (0,2)); drawline(t, linewidth(bp)); 3 | label(t,alignFactor=2, alignAngle=90); 4 | triangle st=symmedial(t); draw(st, bp+0.8green); 5 | label("$A'$", "$B'$", "$C'$", st, alignAngle=45, 0.8green); 6 | line mA=median(t.VA); draw(mA, blue); dot("$M_A$",midpoint(t.BC), 1.5E, blue); 7 | draw(segment(t.BC), bp+blue, StickIntervalMarker(2,2,blue)); 8 | line bA=bisector(t.VA); draw(bA, grey); dot("$B_A$", bisectorpoint(t.BC)); 9 | line sA=symmedian(t.VA); draw(sA, 0.8*green); 10 | draw(symmedian(t.VB), 0.8*green); draw(symmedian(t.VC), 0.8*green); 11 | point sP=symmedian(t); dot("$K$", sP, 2*dir(125)); 12 | markangle(sA, (line) t.AC, radius=2cm, StickIntervalMarker(1,1)); 13 | markangle((line) t.AB, mA, radius=2cm, StickIntervalMarker(1,1)); 14 | markangle(mA, sA, radius=10cm, StickIntervalMarker(2,2)); 15 | -------------------------------------------------------------------------------- /tex/include/symmedian_intro.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(17cm); 2 | triangle t=triangle((-2,0), (2,0), (-0.5,1)); 3 | draw(t, linewidth(2*bp)); 4 | circle ct=circle(t); clipdraw(ct, bp+grey); 5 | 6 | triangle itr=tangential(t); 7 | drawline(itr, bp+0.8*red); dot(itr, 0.8*red); 8 | line syma=line(itr.A,t.A), symb=line(itr.B,t.B); 9 | line symc=line(itr.C,t.C); draw(syma^^symb^^symc, linewidth(bp)); 10 | dot("$K$", intersectionpoint(syma,symb), 2*dir(-120)); 11 | 12 | draw(line(ct.C,t.A,false), grey); 13 | perpendicularmark(line(ct.C,t.A),itr.BC,quarter=2, grey); 14 | draw(line(ct.C,t.B,false), grey); 15 | perpendicularmark(line(ct.C,t.B),itr.AC,quarter=3, grey); 16 | draw(line(ct.C,t.C,false), grey); 17 | perpendicularmark(line(ct.C,t.C),itr.AB,quarter=3, grey); 18 | 19 | triangle st=symmedial(t); draw(st, bp+0.8green); 20 | 21 | line mA=median(t.VA); draw(mA, bp+0.8*blue); 22 | dot("$M_A$",midpoint(t.BC), N, 0.8*blue); 23 | draw(segment(t.BC), bp+0.8*blue, StickIntervalMarker(2,2,0.8*blue)); 24 | 25 | line bA=bisector(t.VA); draw(bA, grey); 26 | dot("$B_A$", bisectorpoint(t.BC), N); 27 | 28 | line sA=symmedian(t.VA); draw(sA, 0.8*green); 29 | 30 | draw(symmedian(t.VB), 0.8*green); draw(symmedian(t.VC), 0.8*green); 31 | 32 | point sP=symmedian(t); dot(sP); 33 | 34 | markangle(sA, (line) t.AC, radius=3.5cm, grey, StickIntervalMarker(1,1,grey)); 35 | markangle((line) t.AB, mA, radius=3.5cm, grey, StickIntervalMarker(1,1,grey)); 36 | markangle(sA, mA, dir(-10), radius=4cm, grey, StickIntervalMarker(2,2,grey)); 37 | 38 | label("$A$",t.A,NW); label("$B$",t.B,NE); label("$C$",t.C,2*dir(115)); 39 | label("$T_A$",itr.A,4*dir(itr.VA)); label("$T_B$",itr.B,4*dir(itr.VB)); label("$T_C$",itr.C,2*I*dir(itr.VC)); 40 | label("$A'$", "$B'$", "$C'$", st, 45, 3, 0.8green); 41 | 42 | addMargins(1cm,2cm,1cm,1cm); 43 | shipout(format="pdf",bbox(Fill(rgb(0.96,1,0.95)))); 44 | -------------------------------------------------------------------------------- /tex/include/tangent_hyperbola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(0,10cm); 2 | pen bl=0.8blue, re=0.8*red; 3 | draw(box((-2.25,-1.5),(-0.75,1)), invisible); 4 | hyperbola h=hyperbola(origin,1.2,1); 5 | draw((path)h, linewidth(bp)); 6 | draw("directrix", h.D1); dot("$F_1$", h.F1, NW); 7 | 8 | line axis=line(h.F1,h.F2); draw(axis); 9 | point M=point(h,angabscissa(70)); dot(M, bl); 10 | line tgt=tangent(h,angabscissa(70)); draw(tgt, bp+bl); 11 | point P=intersectionpoint(tgt,h.D1); dot(P, bl); 12 | draw(P--h.F1--M, grey); markrightangle(P,h.F1,M, grey); 13 | 14 | line lr=perpendicular(h.F1, axis); draw(lr); 15 | point[] plr=intersectionpoints(h,lr); 16 | dot(plr, re); 17 | distance(Label("latus rectum",Fill(white)), 18 | plr[0], plr[1], -2cm, grey, dotted); 19 | for (int i=0; i < 2; ++i) { 20 | draw(tangents(h,plr[i])[0], bp+re); } 21 | -------------------------------------------------------------------------------- /tex/include/tangentes_parabola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(8cm,0); 2 | point F=(0,0); dot("$F$", F, NE); 3 | parabola p=parabola(F, 0.1, 30); 4 | draw(p, linewidth(bp)); 5 | point C=shift(2*(p.V-p.F))*p.V; 6 | circle cle=circle(C, 0.2); 7 | draw(cle); 8 | for (int i=0; i < 360; i+=90) { 9 | point M=C+0.2*dir(i+30); 10 | dot(scale(0.75)*("$M_"+(string)(i/90)+"$"), 11 | M, unit(M-C)); 12 | line[] tgt=tangents(p, M); 13 | draw(tgt, 0.8*red); 14 | for (int i=0; i < tgt.length; ++i) { 15 | dot(intersectionpoints(p, tgt[i]), blue); 16 | } } 17 | -------------------------------------------------------------------------------- /tex/include/tangentes_point_cercle.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(7.5cm,0); 3 | 4 | point A=(2.5,-1); dot("$A$", A, SW); 5 | circle C=circle(A,1); draw(C, linewidth(bp)); 6 | 7 | path Cp=shift(A)*scale(2)*unitcircle; 8 | draw(Cp, grey); 9 | for (int i=0; i < 360; i+=45) { 10 | point M=relpoint(Cp, i/360); 11 | dot(format("$M_%f$", i/45), M, 2*unit(M-A)); 12 | draw(tangents(C, M), 0.8*red); 13 | } 14 | addMargins(10mm,10mm); 15 | -------------------------------------------------------------------------------- /tex/include/tangentes_point_ellipse.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(7.5cm,0); 2 | point A=(2.5,-1); dot(A); 3 | ellipse C=ellipse(A,3,1); draw(C,linewidth(bp)); 4 | path Cp=shift(A)*xscale(2)*scale(3)*unitcircle; 5 | draw(Cp, grey); 6 | for (int i=0; i < 360; i+=45) { 7 | point M=relpoint(Cp, i/360); dot(M); 8 | draw(tangents(C, M), 0.8*red); 9 | } 10 | addMargins(10mm,10mm); 11 | -------------------------------------------------------------------------------- /tex/include/tangential.asy: -------------------------------------------------------------------------------- 1 | size(7cm); import geometry; 2 | triangle t=triangleabc(3,4,6); 3 | draw(t, linewidth(bp)); 4 | clipdraw(circle(t), linewidth(bp)); 5 | triangle itr=tangential(t); 6 | drawline(itr, bp+0.8*green); dot(itr, 0.8*red); 7 | line syma=line(itr.A,t.A), symb=line(itr.B,t.B); 8 | line symc=line(itr.C,t.C); draw(syma^^symb^^symc); 9 | dot("$K$", intersectionpoint(syma,symb), 10 | 2*dir(-120)); 11 | label(t,alignFactor=2,UnFill); 12 | label("$T_A$","$T_B$","$T_C$", itr, alignFactor=4, 13 | UnFill); 14 | addMargins(1cm,1cm); 15 | -------------------------------------------------------------------------------- /tex/include/tangents_hyperbola.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | draw(box((-5,-3),(5,3)), invisible); 3 | hyperbola h=hyperbola(origin,1.5,1); 4 | draw(h, linewidth(bp)); 5 | 6 | for (int i=0; i < 360; i +=45 ) { 7 | point M=(1.5*Cos(i), Sin(i)); 8 | dot(M); draw(tangents(h,M)); } 9 | draw(ellipse(origin,1.5,1), grey); 10 | -------------------------------------------------------------------------------- /tex/include/tgt_circle_vector.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(5cm); 3 | 4 | circle cle=circle((point)(2,1),1.5); 5 | draw(cle, linewidth(bp)); 6 | dot("$C$", cle.C); 7 | 8 | vector v=(-1,-2); 9 | show("$\vec{v}$",v); 10 | 11 | line tgt=tangent(cle,v); 12 | draw(tgt, bp+0.8*red); 13 | draw("$\vec{v'}$",cle.C--(cle.C+tgt.v), Arrow); 14 | dot(point(cle,v)); 15 | -------------------------------------------------------------------------------- /tex/include/th_pascal.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6.5cm,0); 3 | draw(unitcircle, grey); 4 | point[] P; 5 | real[] a=new real[]{0, 20, 60, 90, 240, 280}; 6 | real cor=24.0036303043338; 7 | for (int i=0; i < 6; ++i) { 8 | P.push((Cos(a[i]-cor),Sin(a[i]-cor))); 9 | } 10 | pen[] p=new pen[] {0.8*blue, 0.8*yellow, 0.8*green}; 11 | line[] l; 12 | for (int i=0; i < 6; ++i) { 13 | l.push(line(P[i],P[(i+1)%6])); 14 | draw(l[i], p[i%3]); 15 | draw(P[i]--P[(i+1)%6], linewidth(bp)); 16 | } 17 | point[] inter; 18 | for (int i=0; i < 3; ++i) { 19 | inter.push(intersectionpoint(l[i],l[(i+3)%6])); 20 | dot(inter[i], 1.5*dotsize()+0.8*red); 21 | } 22 | draw(line(inter[0],inter[1]), bp+0.8*red); 23 | draw(box((-1,-2.722), (2.229,2.905)), invisible); 24 | -------------------------------------------------------------------------------- /tex/include/transform_arc.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(10cm,0); 2 | currentcoordsys=rotate(20)*defaultcoordsys; 3 | point C=(1,1); dot(C); 4 | ellipse el=ellipse(C,2,1); draw(el, grey); 5 | arc AE=arc(el, 45, 180, fromCenter); draw(AE, linewidth(bp), Arrow(3mm)); 6 | draw(scale(0.5,C)*AE, bp+0.8red, Arrow(3mm)); 7 | draw(scale(-0.5,C)*AE, bp+0.8blue,Arrow(3mm)); 8 | draw(scale(1.1,C)*AE, bp+0.8*yellow, Arrow(3mm)); 9 | transform t=scale(-0.5,line(el.F1,el.F2), line(S,N)); 10 | draw(t*AE, bp+0.8(red+blue), Arrow(3mm)); 11 | -------------------------------------------------------------------------------- /tex/include/transform_arc_circle.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(6cm,0); 2 | point C=(0,0); dot(C); 3 | ellipse el=circle(C,2); draw(el, grey); 4 | arc AE=arc(el, 45, 180, fromCenter); 5 | 6 | draw(AE, linewidth(bp), Arrow(3mm)); 7 | draw(scale(0.5,C)*AE, bp+0.8red, Arrow(3mm)); 8 | draw(scale(-0.5,C)*AE, bp+0.8blue,Arrow(3mm)); 9 | draw(scale(1.1,C)*AE, bp+0.8*yellow, Arrow(3mm)); 10 | 11 | transform t=scale(-0.5,Ox(), Oy()); 12 | draw(t*AE, bp+0.8(red+blue), Arrow(3mm)); 13 | -------------------------------------------------------------------------------- /tex/include/triangleAbc.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | 3 | size(5cm); 4 | 5 | currentcoordsys=cartesiansystem(i=(1,0.5),j=(-0.25,.75)); 6 | show(currentcoordsys); 7 | 8 | triangle t=triangleAbc(-60,2,3,angle=45,(1,1)); 9 | show(Lb="2", Lc="3",t); 10 | markangle("$60^\circ$",t.C,t.A,t.B, Arrow); 11 | -------------------------------------------------------------------------------- /tex/include/triangleabc.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm); 3 | 4 | currentcoordsys=cartesiansystem(i=(1,0.5), j=(-0.25,.75)); 5 | show(currentcoordsys); 6 | 7 | triangle t=triangleabc(3,4,5, (1,1)); 8 | show(La="3", Lb="4", Lc="5", t); 9 | -------------------------------------------------------------------------------- /tex/include/unit_vector.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(4cm,0); 3 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-0.75,1)); 4 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 5 | show(currentcoordsys, xpen=invisible); 6 | 7 | point A=point(R, (1,1)); dot("A", A); point B=point(R, (2,2)); 8 | dot("B", B); point M=unit(B-A); dot("M", M); 9 | dot("unit(B-A)", unit(B-A), N); 10 | dot("A+unit(B-A)", A+unit(B-A), W); 11 | -------------------------------------------------------------------------------- /tex/include/vector_point.asy: -------------------------------------------------------------------------------- 1 | import geometry; size(4cm,0); pen bpp=linewidth(bp); 2 | coordsys R=cartesiansystem((2,1), i=(1,1), j=(-0.75,1)); 3 | show("$O_1$", "$\vec{u}$", "$\vec{v}$", R, xpen=invisible); 4 | show(currentcoordsys); vector w=vector(R, (1,1)); 5 | show("$\vec{w}$", w, bpp, Arrow(3mm)); 6 | show("$\vec{w}$", locate(w), bpp, Arrow(3mm)); 7 | draw((1,2)--locate(w), green); 8 | draw((1,2)--point(w), blue); 9 | -------------------------------------------------------------------------------- /tex/include/xscale1.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | real k=sqrt(2); 4 | point A=(1,2); dot("A", A, S); 5 | point M=(-1,1); dot("M", M, W); 6 | 7 | point Ap=xscale(k, M)*A; dot("A'", Ap, red); 8 | label("A'=xscale(k,M)*A", (0.75,1.125), red); 9 | 10 | point P=extension(A, Ap, M, M+N); 11 | dot("P", P, W); draw(M--P); draw(P--Ap); 12 | perpendicularmark(P, dir(-45)); 13 | distance("$k\times PA$", P, Ap, -3mm, grey); 14 | -------------------------------------------------------------------------------- /tex/include/xscale2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((2,1), i=(1,0.5), j=(-0.75,1)); 4 | show(currentcoordsys, ipen=blue, jpen=red, xpen=invisible); 5 | 6 | real k=sqrt(2); 7 | point A=(2,1.25); 8 | point M=(-0.75,0.25); dot("M", M, W); 9 | 10 | point Ap=xscale(k, M)*A; 11 | dot("A'", Ap, red); dot("A", A, I*unit(A-Ap)); 12 | 13 | point P=intersectionpoint(line(A,Ap), line(M,M+N)); 14 | dot("P", P, W); draw(M--P, red); draw(P--Ap, blue); 15 | distance("$k\times PA$", P, Ap, -3mm, grey); 16 | -------------------------------------------------------------------------------- /tex/include/yscale1.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | real k=sqrt(2); 4 | point A=(2,1); 5 | point M=(-1,-1); dot("M", M, W); 6 | 7 | point Ap=yscale(k, M)*A; 8 | dot("A'", Ap, red); dot("A", A, I*unit(A-Ap)); 9 | label("A'=yscale(k,M)*A", (0,1), red); 10 | 11 | point P=intersectionpoint(line(A,Ap), line(M,M+E)); 12 | dot("P", P); draw(M--P); draw(P--Ap); 13 | perpendicularmark(P, dir(135)); 14 | distance("$k\times PA$",P,Ap,-12mm,grey,grey+dashed); 15 | -------------------------------------------------------------------------------- /tex/include/yscale2.asy: -------------------------------------------------------------------------------- 1 | import geometry; 2 | size(6cm,0); 3 | currentcoordsys=cartesiansystem((2,1), i=(1,0.5), j=(-0.75,1)); 4 | show(currentcoordsys, ipen=blue, jpen=red, xpen=invisible); 5 | 6 | real k=sqrt(2); 7 | point A=(2,1); 8 | point M=(-2,-1); dot("M", M, W); 9 | 10 | point Ap=yscale(k, M)*A; 11 | dot("A'", Ap, -I*unit(A-Ap), red); dot("A", A, -I*unit(A-Ap)); 12 | point P=intersectionpoint(line(A,Ap), line(M,M+E)); 13 | dot("P", P, locate(unit(A-Ap))); draw(M--P, blue); draw(P--Ap, red); 14 | distance("$k\times PA$", P, Ap, 3mm, grey); 15 | -------------------------------------------------------------------------------- /tex/makefile: -------------------------------------------------------------------------------- 1 | INCLUDE_DIR=include 2 | SRC= $(wildcard *.tex) 3 | PDF= $(SRC:.tex=.pdf) 4 | 5 | LATEX=pdflatex 6 | LATEX_OPT=--shell-escape -synctex=1 7 | 8 | all: pdf 9 | 10 | quick: geometry_en.tex 11 | $(LATEX) $(LATEX_OPT) $< 12 | 13 | pdf: $(PDF) 14 | 15 | %.pdf: %.tex 16 | @(cd $(INCLUDE_DIR) && $(MAKE)) 17 | $(LATEX) $(LATEX_OPT) $< 18 | makeindex $(<:.tex=.idx) 19 | $(LATEX) $(LATEX_OPT) $< 20 | 21 | 22 | $(SRC): pygmentizedformat/default.tex geometry-commomun.sty 23 | 24 | pygmentizedformat/default.tex: 25 | mkdir -p pygmentizedformat/ 26 | pygmentize -S default -f latex -a full > $@ 27 | 28 | 29 | view: pdf 30 | xpdf $< 31 | 32 | clean: 33 | @(cd $(INCLUDE_DIR) && $(MAKE) $@) 34 | rm -f *.asy; rm -f *.aux; rm -f *.dvi; rm -f *.toc; rm -f *.html;\ 35 | rm -f *.log; rm -f .*.log; rm -f *.out; rm -f *.idx; \ 36 | rm -f *.ind; rm -f *.ilg; rm -f *.synctex.gz 37 | 38 | clean-all: 39 | make clean 40 | rm -rf pygmentizedformat/ 41 | rm -rf vcolors 42 | rm -f $(PDF) 43 | 44 | .PHONY : clean view clean-all 45 | 46 | --------------------------------------------------------------------------------