\makeatletter
\newcommand*{\Cotation}{\@ifstar{\def\MonOp{\lput*}\cotation@}{\def\MonOp{\aput}\cotation@}}
\newcommand*{\cotation@}[1][linewidth=0.4pt,linestyle=dashed,dash=1pt 1pt]{\@ifnextchar[{\cotation@i[#1]}{\cotation@i[#1][linewidth=1pt]}}
\def\cotation@i[#1][#2](#3,#4)(#5,#6)#7#8{\@ifnextchar[{\cotation@ii[#1][#2](#3,#4)(#5,#6){#7}{#8}}{\cotation@ii[#1][#2](#3,#4)(#5,#6){#7}{#8}[0.7ex]}}
\def\cotation@ii[#1][#2](#3,#4)(#5,#6)#7#8[#9]{ \pstVerb{ /signe {dup 0 eq {pop 0}{dup 0 lt {pop 1 neg}{pop 1} ifelse} ifelse} def /depass 0.15 #7 abs add #7 signe mul #5 #3 sub dup mul #6 #4 sub dup mul add sqrt div def /decalx #4 #6 sub depass mul def /decaly #5 #3 sub depass mul def} \psline[#1](! #3 #4)(! #3 decalx add #4 decaly add) \psline[#1](! #5 #6)(! #5 decalx add #6 decaly add) \pcline[offset=#7,#2]{<->}(! #3 #4)(! #5 #6) \setlength{\pslabelsep}{#9} \MonOp{:U}{#8}}
\newcommand*{\TraceEllipse}{\@ifstar{\TraceEllipse@{linestyle=none}}{\TraceEllipse@{linestyle=dashed}}}
\newcommand*{\TraceEllipse@}[1]{\@ifnextchar[{\TraceEllipse@i{#1}}{\TraceEllipse@i{#1}[linewidth=1pt]}}
\def\TraceEllipse@i#1[#2]#3#4#5{ \pstVerb{/AAsin {dup 1 gt {pop 90}{dup 1 neg lt {pop 90 neg}{asin} ifelse} ifelse} def /AAngl #3 #5 div AAsin def} \psellipticarc[#2,#1](0,0)(! #4 #5){! AAngl}{! 180 AAngl sub} \psellipticarc[linestyle=solid,#2](0,0)(! #4 #5){! AAngl 180 add neg}{! AAngl} \ignorespaces
}
\newcommand*{\TraceCone}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\TraceCone@}{\def\OpEllipse{\TraceEllipse}\TraceCone@}}
\newcommand*{\TraceCone@}[4][linewidth=1pt]{% Trace un cône dont la base horizontale est centrée sur l'origine
\pstVerb{ /bb #2 #3 mul def /yy bb dup mul #4 div def /xx 1 yy #4 div sub sqrt #2 mul def /ycoupe {#4 0 lt {bb}{yy} ifelse} def } \OpEllipse[#1]{ycoupe}{#2}{bb} \psline[#1](! xx neg yy)(! 0 #4)(! xx yy) \ignorespaces
}
\makeatother
\newcommand*{\NomPoints}[8][dotsize=3pt]{% Affiche les noms des points remarquables du cône ou du cylindre
\pstVerb{ /Corr 0.12 def /OrdSommet #4 abs Corr 1.6 mul add def /xCentre {#4 0 lt {0}{Corr neg} ifelse} def /ySommet {#4 0 lt {OrdSommet neg}{OrdSommet} ifelse} def /xDiametre #2 Corr add def } \ifdim #4cm<0cm\def\PC{b}\def\PS{t}\else\def\PC{br}\def\PS{b}\fi
\rput[r](! xDiametre neg 0){#5}
\rput[\PC](! xCentre Corr){#6}
\rput[l](! xDiametre 0){#7}
\rput[\PS](! 0 ySommet){#8}
\psdots[#1](0,0)
}
\makeatletter
\newcommand*{\AxesFigure}[1][linewidth=0.7pt,linestyle=dashed]{\@ifnextchar[{\AxesFigure@i[#1]}{\AxesFigure@i[#1][linewidth=0.5pt,linestyle=dashed]}}
\def\AxesFigure@i[#1][#2]{\@ifnextchar[{\AxesFigure@ii[#1][#2]}{\AxesFigure@ii[#1][#2][linewidth=0.5pt]}}
\def\AxesFigure@ii[#1][#2][#3]{\@ifnextchar[{\AxesFigure@iii[#1][#2][#3]}{\AxesFigure@iii[#1][#2][#3][0.2]}}
\def\AxesFigure@iii[#1][#2][#3][#4]#5#6#7{ \psline[#1](! 0 0)(! 0 #7)
\psline[#2](! #5 neg 0)(! #5 0)
\pstVerb{/yy {#7 0 lt {#4 neg}{#4} ifelse} def}
\psline[#3](! 0 yy)(! #4 yy)(! #4 0)
}
\newcommand*{\SectionCone}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\SectionCone@}{\def\OpEllipse{\TraceEllipse}\SectionCone@}}
\newcommand*{\SectionCone@}[5][linewidth=1pt]{% Affiche la section du cône
\pstVerb{ /rr #2 #4 #5 sub mul #4 div def /bb #3 rr mul def /yy bb dup mul #4 div def } \rput(0,#5){\OpEllipse[#1]{bb dup mul #4 div}{rr}{bb}}
}
\newcommand*{\AxesSectionCone}[1][linewidth=0.5pt,linestyle=dashed]{\@ifnextchar[{\AxesSectionCone@i[#1]}{\AxesSectionCone@i[#1][linewidth=0.5pt]}}
\def\AxesSectionCone@i[#1][#2]{\@ifnextchar[{\AxesSectionCone@ii[#1][#2]}{\AxesSectionCone@ii[#1][#2][0.2]}}
\def\AxesSectionCone@ii[#1][#2][#3]#4#5#6#7{ \rput(! 0 #7){\AxesFigure[linestyle=none][#1][#2][#3]{#4 #6 abs #7 abs sub mul #6 abs div}{#5}{#6}}}
\makeatother
\newcommand*{\NomSectionCone}[8][dotsize=3pt]{%
\rput(! 0 #5){\NomPoints[#1]{#2 #4 abs #5 abs sub mul #4 div}{#3}{#4}{#6}{#7}{#8}{}}
}
\makeatletter
\newcommand*{\TraceCylindre}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\TraceCylindre@}{\def\OpEllipse{\TraceEllipse}\TraceCylindre@}}
\newcommand*{\TraceCylindre@}[4][linewidth=1pt]{%
\pstVerb{/rr #2 abs def /hh #3 abs def /bb rr bb mul def}
\OpEllipse[#1]{0}{rr}{bb} \psellipse[#1](! 0 #4)(! rr bb) \psline[#1](! rr neg 0)(! rr neg #4)\psline[#1](! rr 0)(! rr #4) \ignorespaces
}
\newcommand*{\TraceSphere}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\TraceSphere@}{\def\OpEllipse{\TraceEllipse}\TraceSphere@}}
\newcommand*{\TraceSphere@}[1][linewidth=1pt]{\@ifnextchar[{\TraceSphere@i[#1]}{\TraceSphere@i[#1][linewidth=0.7pt]}}
\def\TraceSphere@i[#1][#2]#3#4{ \pscircle[#1](! 0 0){#3}
\OpEllipse[#2]{0}{#3}{#4 #3 mul}
}
\newcommand*{\AxesSphere}[1][linewidth=0.7pt,linestyle=dashed]{\@ifnextchar[{\AxesSphere@i[#1]}{\AxesSphere@i[#1][linewidth=0.5pt,linestyle=dashed]}}
\def\AxesSphere@i[#1][#2]{\@ifnextchar[{\AxesSphere@ii[#1][#2]}{\AxesSphere@ii[#1][#2][linewidth=0.5pt]}}
\def\AxesSphere@ii[#1][#2][#3]{\@ifnextchar[{\AxesSphere@iii[#1][#2][#3]}{\AxesSphere@iii[#1][#2][#3][0.2]}}
\def\AxesSphere@iii[#1][#2][#3][#4]#5#6{ \AxesFigure[#1][#2][#3][#4]{#5}{0.5}{#5 1.1 mul}
\AxesFigure[#1][linestyle=none][linestyle=none][#4]{#5}{0.5}{#5 1.1 mul neg}
}
\newcommand*{\SectionSphere}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\SectionSphere@}{\def\OpEllipse{\TraceEllipse}\SectionSphere@}}
\newcommand*{\SectionSphere@}[4][linewidth=0.7pt]{%
\pstVerb{/rr #4 dup mul #3 dup mul 1 sub div #2 dup mul add sqrt def} \rput(! 0 #4){\OpEllipse[#1]{#3 dup mul #4 mul 1 #3 dup mul sub div}{rr}{rr #3 mul}}}
\newcommand*{\AxesSectionSphere}[1][linewidth=0.5pt,linestyle=dashed]{\@ifnextchar[{\AxesSectionSphere@i[#1]}{\AxesSectionSphere@i[#1][linewidth=0.5pt]}}
\def\AxesSectionSphere@i[#1][#2]{\@ifnextchar[{\AxesSectionSphere@ii[#1][#2]}{\AxesSectionSphere@ii[#1][#2][0.2]}}
\def\AxesSectionSphere@ii[#1][#2][#3]#4#5#6{ \rput(! 0 #6){\AxesFigure[linestyle=none][#1][#2][#3]{#6 dup mul #5 dup mul 1 sub div #4 dup mul add sqrt}{#5}{#4}}}
\makeatother
\newcommand*{\NomSectionSphere}[7][dotsize=3pt]{%
\rput(! 0 #4){\NomPoints[#1]{#4 dup mul #3 dup mul 1 sub div #2 dup mul add sqrt}{#3}{1}{#5}{#6}{#7}{}}
}
\makeatletter
\newcommand*{\Calotte}{\@ifstar{\def\OpEllipse{\TraceEllipse*}\Calotte@}{\def\OpEllipse{\TraceEllipse}\Calotte@}}
\newcommand*{\Calotte@}[1][B]{\@ifnextchar[{\Calotte@i[#1]}{\Calotte@i[#1][linewidth=1pt]}}
\def\Calotte@i[#1][#2]#3#4#5{ \pstVerb{ /RR #3 dup mul def /kk #4 dup mul def /zz #5 dup mul def /rr zz kk 1 sub div RR add sqrt def /yy #5 1 kk sub div def /AAangle yy #3 div asin def } \ifx B#1 \psellipticarc[linestyle=solid,#2](! 0 0)(! #3 #3){! AAangle 180 add neg}{! AAangle}
\rput(! 0 #5){\OpEllipse[#2]{rr #4 mul}{rr}{rr #4 mul}} \fi
\ifx H#1 \psellipticarc[linestyle=solid,#2](! 0 0)(! #3 #3){! AAangle}{! 180 AAangle sub}
\rput(! 0 #5){\OpEllipse[#2]{yy #5 sub}{rr}{rr #4 mul}} \fi
}
\makeatother

—
Syracuse — Dernière modification : 29 février 2008 (0.08s - 3952724 - 9 janvier 2009)