summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/pst-eucl/Exemples/hyperbole_in.tex
blob: 2f8dfa13a273a32de933caf6943c845ca6a012a7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
\newcommand{\Sommet}{1.4142135623730951}
\newcommand{\PosFoyer}{2}
\newcommand{\HypAngle}{0}
\setcounter{i}{1}
\newcounter{CoefDiv}\setcounter{CoefDiv}{20}
\newcounter{Inc}\setcounter{Inc}{2}
\newcounter{n}\setcounter{n}{2}
%% rayon des cercles successifs utilisés pour trouver les points de H
%% on choisit \Rii=\Ri+2\Sommet (définition de l'hyperbole)
\newcommand{\Ri}{% c'est du postscript
  \PosFoyer\space\Sommet\space sub \arabic{i}\space\arabic{CoefDiv}\space div add}
\newcommand{\Rii}{\Ri\space\Sommet\space 2 mul add}
\pstGeonode[PosAngle=90]{O}(\PosFoyer;\HypAngle){F}
\pstSymO[PosAngle=180]{O}{F}\pstLineAB{F}{F'}
%% TRACÉ DES ASYMPTOTES
\pstCircleOA{O}{F}
%% positionnement des deux sommets de H
\pstGeonode[PosAngle=-135](\Sommet;\HypAngle){S}
\pstGeonode[PosAngle=-45](-\Sommet;\HypAngle){S'}
%% l'intersection de la droite perpendiculaire à (FF') passant par S,
%% coupe les asymptotes sur le cercle de diamètre [FF'] (cette droite est une tangente)
\pstRotation[RotAngle=90, PointSymbol=none]{S}{O}[B]
\pstInterLC[PosAngleA=90, PosAngleB=-90]{S}{B}{O}{F}{A_1}{A_2}
\pstLineAB[nodesepA=-3,nodesepB=-5]{A_1}{O}
\pstLineAB[nodesepA=-3,nodesepB=-5]{A_2}{O}
%% cos(\Psi)=OS/OF (c-a-d \Sommet/\PosFoyer)
%% ici \sqrt(2)/2, donc \Psi=45 => hyperbole équilatère
\pstMarkAngle[LabelSep=.8, MarkAngleRadius=.7, arrows=->,
  LabelSep=1.1]{F}{O}{A_1}{$\Psi$}
\ncline[linecolor=red]{A_1}{A_2}
\pstRightAngle[RightAngleSize=.15]{A_1}{S}{O}
\psset{PointName=none}
\whiledo{\value{n}<8}{%
  \psset{RadiusA=\pstDistVal{\Ri},RadiusB=\pstDistVal{\Rii},PointSymbol=none}
  \pstInterCC{F}{}{F'}{}{M\arabic{n}}{P\arabic{n}}
  \pstInterCC{F'}{}{F}{}{M'\arabic{n}}{P'\arabic{n}}
  %% bcp de points au début, moins ensuite
  %% n -> numéro du point, i -> taille des cercles
  %% Inc -> incrément variable de i (2^n)
  \stepcounter{n}\addtocounter{i}{\value{Inc}}
  \addtocounter{Inc}{\value{Inc}}}%% fin de whiledo
\psset{linecolor=blue}
%% tracé des quatres 1/2 branches de l'hyperbole
\pstGenericCurve[GenCurvFirst=S]{M}{2}{7}
\pstGenericCurve[GenCurvFirst=S]{P}{2}{7}
\pstGenericCurve[GenCurvFirst=S']{M'}{2}{7}
\pstGenericCurve[GenCurvFirst=S']{P'}{2}{7}
%% pour vérif le trace paramètrique
%\parametricplot[linecolor=black, linewidth=.25\pslinewidth]{-1}{1}
%  {t dup tx@EcldDict begin sh exch ch end \Sommet\space mul exch
%   \PosFoyer\space dup mul \Sommet\space dup mul sub sqrt mul}
%\parametricplot[linecolor=black, linewidth=.25\pslinewidth]{-1}{1}
%  {t dup tx@EcldDict begin sh exch ch end neg \Sommet\space mul exch
%    \PosFoyer\space dup mul \Sommet\space dup mul sub sqrt mul}