From: Jean-Michel Sarlat Date: Thu, 11 Aug 2011 07:22:10 +0000 (+0200) Subject: Réinitialisation du projet X-Git-Url: https://melusine.eu.org/syracuse/G/git/?a=commitdiff_plain;h=ad5e6752247d5d6dcaf41a2c63f2aa979437820e;p=mp-solid.git Réinitialisation du projet --- ad5e6752247d5d6dcaf41a2c63f2aa979437820e diff --git a/README b/README new file mode 100644 index 0000000..f13353d --- /dev/null +++ b/README @@ -0,0 +1,3 @@ + + *jeu. 11 août 2011 09:20:33 CEST : Réinitialisation du projet suite à des + manipulations intempestives de ma part (JMS) \ No newline at end of file diff --git a/doc.pdf b/doc.pdf new file mode 100644 index 0000000..0e29534 Binary files /dev/null and b/doc.pdf differ diff --git a/doc/Dessinons.tex b/doc/Dessinons.tex new file mode 100644 index 0000000..570cd3a --- /dev/null +++ b/doc/Dessinons.tex @@ -0,0 +1,618 @@ +\chapter{Dessinons !} +\begin{flushleft} + {\em Je compterai toujours, pour ma part, au nombre des heures les + plus douces, les plus heureuses de ma vie, celles où j'ai pu + saisir dans l'espace et étudier sans trève quelques-uns de ces + êtres géométriques qui flottent en quelque sorte autour de nous.} +\par\hfill{\sc Gaston Darboux} +\end{flushleft} +\section{La lecture externe} +Avant de se lancer dans les calculs, profitons du fait que de nombreux +logiciels de contruction 3D exportent leurs données dans divers +formats de fichiers. Pourquoi donc ne pas s'en servir, couplé à \MP, +pour représenter de tels objets ? +\subsection{Les fichiers \texttt{OFF}} +Si vous disposez d'un +fichier \texttt{toto.off}, on l'utilisera comme ceci : +\begin{center} + \macro{\verb!LectureOFF("toto.off")!} +\end{center} +\begin{Danger} + \begin{itemize} + \item Avant l'utilisation des fichiers \verb!OFF!, il faudra + s'assurer qu'ils aient une syntaxe du type + \begin{lstlisting}[frame=tb] + nbsommets nbfaces + + x1 y1 z1 + x2 y2 z2 + ... + nbsommetsface1 1 2 3 + nbsommetsface2 2 3 4 + ... + \end{lstlisting} + \item Suivant les fichiers \texttt{OFF}, il y aura deux paramètres + à modifier : \param{\texttt{echelle}} qui applique un coefficient + divisant les données numériques du fichier par la valeur + choisie; \param{\texttt{debut}} qui indiquera quel est le chiffre + correspondant au premier sommet (bien souvent, c'est 0 mais pour + quelques fichiers, cela peut-être 1). + \item Le paramètre \param{\texttt{invnormale}} devra {\em parfois} être + adapté. Par défaut, il est à 1. On devra le mettre parfois comme + étant égal à $-1$. + \end{itemize} +\end{Danger} +\begin{figure}[h] +\centering +\includegraphics[scale=0.9]{figures/OFF1.pdf} +\caption{Un tricératops.} +\end{figure} +\begin{minipage}{\linewidth} + \begin{lstlisting}[frame=tb] +%fichier off:http://www.irit.fr/~Loic.Barthe/Enseignements/TPs_OpenGL/L3_IUP_SI/TP7/Maillages/triceratops.off +echelle:=2; +debut:=0; + +invnormale:=-1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-25,10,50); +outcolor:=0.8*white; +incolor:=gris; +LectureOFF("triceratops.off"); +finespace; + \end{lstlisting} +\end{minipage} +\par +L'exemple\footnote{Assez long en compilation, 28 secondes environ.} +ci-dessous montre un {\em noeud creusé}. Pour cela, on a un paramètre + booléen \verb!Creux! (positionné à \verb!true! par défaut) qui + permet d'indiquer si le solide envisagé est creusé ou pas. Ce + paramètre n'est, pour le moment, disponible que pour la lecture des + fichiers externes. +\par\noindent +\begin{minipage}{6cm} + \includegraphics[scale=0.5]{figures/OFF11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + %www-c.inria.fr/gamma/download/download.php + echelle:=2; debut:=1; + Creux:=false; + outcolor:=0.5[jaune,white]; + incolor:=0.5[bleu,white]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,-25,10,50); + LectureOFF("10-61.off"); + finespace; + \end{lstlisting} +\end{minipage} +\par +Pour ne pas abuser, un dernier exemple.\\ +\begin{minipage}{6cm} + \includegraphics[scale=0.7]{figures/OFF21.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + echelle:=5; + debut:=1; + arcenciel:=true; + invnormale:=-1; + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,20,50); + LectureOFF("5_1.pc.off"); + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Les fichiers \texttt{OBJ}} +Si vous disposez d'un +fichier \texttt{toto.obj}, on l'utilisera comme ceci : +\begin{center} + \macro{\verb!LectureOBJ("toto.obj")!} +\end{center} +\begin{Danger} + \begin{itemize} + \item Avant l'utilisation des fichiers \verb!OBJ!, il faudra + s'assurer qu'ils aient une syntaxe du type + \begin{lstlisting}[frame=tb] + v x1 y1 z1 + v x2 y2 z2 + ... + v xn yn zn + f nbsommetsface1 1 2 3 ... + f nbsommetsface2 2 3 4 ... + ... + \end{lstlisting} + \par En effet, certains fichiers \texttt{OBJ} contiennent + également les descriptions des vecteurs normaux aux faces. Ils + ne sont pas nécessaires pour nous car \MP\ fait les calculs + nécessaires\footnote{Il pourrait cependant être utile d'utiliser + directement de tels fichiers pour gagner du temps de compilation.}. + \item Suivant les fichiers \texttt{OBJ}, il y aura à modifier le paramètre \param{\texttt{echelle}}. + \item Le paramètre \param{\texttt{invnormale}} devra {\em parfois} être + adapté. Par défaut, il est à 1. On devra le mettre parfois comme + étant égal à $-1$. + \end{itemize} +\end{Danger} +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/OBJ1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] +%http://www-c.inria.fr/gamma/download/ +echelle:=50; + +figureespace(-10u,-10u,10u,20u); +Initialisation(2500,80,-70,50); +outcolor:=0.7[rose,white]; +incolor:=jaune; +LectureOBJ("../../data/Midpoly_04.obj"); +finespace; + \end{lstlisting} +\end{minipage} +\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/OBJ11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] +%http://www-c.inria.fr/gamma/download/ +%avec modification +echelle:=0.25; + +figureespace(-10u,-10u,10u,20u); +Initialisation(2500,-80,80,50); +outcolor:=0.7[rose,white]; +incolor:=jaune; +LectureOBJ("../../data/Y3483.obj"); +finespace; + \end{lstlisting} +\end{minipage} +\section{Les courbes} +%\subsection{\ldots du type $(x,y,z)=(f(t),g(t),h(t))$} +Pour tracer une fonction du type $M(x,y,z)=(f(t),g(t),h(t))$, on +utilisera la macro +\texttt{Fonction}. +\begin{center} + \macro{\verb!Fonction(expr fn,tmin,tmax,pas)!} +\end{center} +où \param{\verb!fn!} est un type \verb!string! donnant les fonctions $f$, $g$ +et $h$ (ne pas oublier de la mettre sous forme d'un triplet); +\param{\verb!tmin!} et \param{\verb!tmax!} sont les bornes de +l'intervalle de tracé et \param{\verb!pas!} le pas d'incrémentation +pour positionner les points et les relier ensuite. +\par\begin{minipage}{6cm} + \includegraphics{figures/courbe11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(5,30,50,20); + draw Fonction("(sin(t),cos(t),t/3)",-2,25,0.01); + finespace; + \end{lstlisting} +\end{minipage} +\par +\begin{minipage}{6cm} + \includegraphics[scale=0.7]{figures/courbe21.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(5,30,20,20); + draw Fonction("(cos(t)*(1+abs(t)/5),1.5*sin(t),0.2*t)",-15,15,0.1); + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Les tubes : 1\ier\ essai} +On a une amélioration graphique : la possibilité de tracer les courbes +sous forme de tube avec la macro \verb!Tube! : +\begin{center} + \macro{\texttt{Tube(expr Fn,dp,ds,rayon,tmin,nbp,pas)}} +\end{center} +où \param{\verb!Fn!}, \param{\verb!dp!} et \param{\verb!ds!} sont des +types \texttt{string} représentant respectivement la fonction de +référence sur laquelle le tube est construit; la dérivée première et +la dérivée seconde. Pourquoi ? Pour calculer les vecteurs $(\vecteur +T, \vecteur N, \vecteur B)$ constituant le repère de Frenet local +attaché à la courbe. Il est d'ailleurs vivement recommandé de les +calculer à la main ou à l'aide d'un logiciel de calcul formel. +\\Une fois ceci fait, \param{\texttt{tmin}} la valeur du paramètre de départ, +\param{\texttt{nbp}} le nombre de pas voulus, \param{\texttt{pas}} le +pas pour passer d'un point à un autre. +\par +Voici plusieurs exemples pour que ce soit plus clair: +\par +\begin{minipage}{7.5cm} + \includegraphics[width=7.5cm]{figures/npresentation1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-20u,10u,10u); + Initialisation(1000,15,70,50); + outcolor:=0.5[green,white]; + draw Tube("(2*cosd(t)+cosd(3*t),2*sind(t)-sind(3*t),2*sqrt(2)*sind(2*t))","(-2*sind(t)-3*sind(3*t),2*cosd(t)-3*cosd(3*t),4*sqrt(2)*cosd(2*t))","(-2*cosd(t)-9*cosd(3*t),-2*sind(t)+9*sind(3*t),-8*sqrt(2)*sind(2*t))",0.1,90,180,1.5); + finespace; + end +\end{lstlisting} +\end{minipage} +\par +\begin{minipage}{7.5cm} + \includegraphics[width=7.5cm]{figures/courbe12.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(5,30,50,20); +outcolor:=0.5[red,white]; + draw Tube("(sin(t),cos(t),t/3)","(cos(t),-sin(t),1/3)","(-sin(t),-cos(t),0)",0.1,-2,270,0.1); + finespace; +\end{lstlisting} +\end{minipage} +\par +\begin{minipage}{7.5cm} + \includegraphics[width=7.5cm]{figures/courbe22.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-20u,10u,10u); + Initialisation(5,30,20,20); + outcolor:=0.5[blue,white]; + draw Tube("(cos(t)*(1+abs(t)/5),1.5*sin(t),0.2*t)","if t>=0:(-sin(t)*(1+t/5)+cos(t)/5,1.5*cos(t),0.2) else: (-sin(t)*(1-t/5)-cos(t)/5,1.5*cos(t),0.2) fi", "if t>=0:(-cos(t)*(1+t/5)-2*sin(t)/5,-1.5*sin(t),0) else: (-cos(t)*(1-t/5)+2*sin(t)/5,-1.5*sin(t),0) fi",0.075,-15,300,0.1); + finespace; +\end{lstlisting} +\end{minipage} +\par +\begin{minipage}{7.5cm} + \includegraphics[width=7.5cm]{figures/npresentation2.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} +\begin{lstlisting}[frame=tb] + figureespace(-10u,-20u,10u,10u); + Initialisation(1000,15,20,50); + outcolor:=0.5[jaune,white]; + draw Tube("(cos(t),1.5*sin(t),0.2*t)","(-sin(t),1.5*cos(t),0.2)","(-cos(t),-1.5*sin(t),0)",0.1,0,180,0.1); + finespace; +\end{lstlisting} +\end{minipage} +\subsection{Les tubes : 2\ieme\ essai} +Cependant, pour obtenir l'image ci-dessous tirée de la documentation de +\texttt{pst-solides3d}\footnote{Mais celle présente dans cette + documentation a été compilée par \MP.}, cela ne marche pas ! +\begin{figure}[h] + \centering + \includegraphics[scale=0.5]{figures/hypotube1.pdf} + \caption{Hypocycloïde en tube} + \label{fig-hypotube} +\end{figure} +J'ai donc crée une deuxième macro permettant de construire de telles +figures. En fait, le problème venait de l'inversion des normales au +passage des points d'inflexion. De plus, grâce à un document trouvé +sur la toile\footnote{Malheureusement, je ne dispose plus de + l'adresse. Par contre, l'auteur est Loïc {\sc Barthe} de l'équipe + Vortex de l'IRIT-UPS Toulouse.}, il n'est plus nécessaire d'utiliser +la dérivée seconde. La macro utilisable est +\begin{center} + \macro{\verb!Tuben(expr Fn,dp,rayon,tmin,nbp,pas,couleur)!} +\end{center} +avec les mêmes conventions que lors du premier essai. Pour obtenir la +figure \ref{fig-hypotube}, on utilisera alors le code +\begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + + nb:=16; unit:=0.8; + + Initialisation(1000,20,45,37.5); + for k=-5 upto 5: + draw Projette((k,-5,0))--Projette((k,5,0)); + draw Projette((-5,k,0))--Projette((5,k,0)); + endfor; + eclairage:=false; + outcolor:=blanc; + draw Tuben("(4*cos(t)+cos(4*t)/2,4*sin(t)-sin(4*t)/2,1)","(-4*sin(t)-2*sin(4*t),4*cos(t)-2*cos(4*t),0)",1,0,102,0.06283); + + finespace; +\end{lstlisting} +\`A noter que le paramètre \param{\verb!unit!} permet de faire un +agrandissement (ou une réduction) de la figure. Par défaut, +\texttt{unit=1}. De plus, il existe le paramètre \param{\verb!nb!} qui permet +de moduler le nombre de points sur le cercle permettant de tracer le tube. +\par Et pour finir, étant fan de Gaston Lagaffe, je me permets de reprendre +le ressort-siège de la documentation de \texttt{pst-solides3d}. +\par\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=6cm]{figures/ressortgaston1.pdf} + \caption{Siège-ressort de Gaston Lagaffe} + \label{fig:exsyr1} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + + nb:=6; + Initialisation(1000,20,20,25); + arcenciel:=true; + draw Tuben("((t**2+3)*sin(15*t),(t**2+3)*cos(15*t),2*t)","(2*t*sin(15*t)+15*((t**2)+3)*cos(15*t),2*t*cos(15*t)-15*((t**2)+3)*sin(15*t),2)",0.2,-2,360,1/90); + + finespace; + + \end{lstlisting} +\end{minipage} +\section{Les surfaces} +\subsection{Les surfaces en $z$} +De la forme $z=f(x,y)$, on utilisera alors +\begin{center} + \macro{\verb!Surfz(fn,xmin,xmax,ymin,ymax,nbl,nbp)!} +\end{center} +avec \param{\verb!fn!} la fonction écrite sous un type \verb!string!, +\param{\verb!xmin!}, \param{\verb!xmax!}, \param{\verb!ymin!} et \param{\verb!ymax!} les bornes des +intervalles de tracés, \param{\verb!nbl!} le nombre de lignes suivant les +$y$\footnote{Il en est ainsi car j'ai suivi la méthode décrite + dans le livre de Raymond Dony. Il est à noter également que pour des + impératifs de temps de compilation et de poids des images, les deux + paramètres \param{\verb!nbp!} et \param{\verb!nbl!} sont des multiples de 3.} et +\param{\verb!nbp!} le nombre de points utilisés sur chaque ligne pour tracer +la surface. +\par Les trois exemples ci-dessous ont donné des temps de compilation +de l'ordre de 40 secondes. +\par +\begin{lstlisting}[frame=tb] + verbatimtex + %&latex + \documentclass[12pt]{article} + \usepackage{fourier} + \begin{document} + etex + + invnormalelum:=-1; + + figureespace(-10u,-10u,10u,10u); + Initialisation(300,15,35.264,10); + incolor:=0.5[green,white]; + outcolor:=0.25[orange,white]; + draw SurfZ("4*cos(X++Y)*mexp(-(X++Y)*50)",-15,15,-10,10,60,150); + label(btex $f(z)=4*\cos\left(\sqrt{x^2+y^2}\right)*\textrm{e}^{-50*\sqrt{x^2+y^2}}\mbox{ avec }\left\{\begin{array}{l} + x\in[-15,15]\\ + y\in[-10,10]\\ + \end{array} + \right.$ etex,u*(0,-5)); + finespace; + \end{lstlisting} +\[\includegraphics{figures/Surfz11.pdf}\] +\begin{lstlisting}[frame=tb] + verbatimtex + %&latex + \documentclass[12pt]{article} + \usepackage{fourier} + \usepackage{amsmath} + \begin{document} + etex + + invnormalelum:=-1; + + figureespace(-10u,-10u,10u,10u); + Initialisation(300,70,30,10); + incolor:=0.5[jaune,white]; + outcolor:=0.8[violet,white]; + arcenciel:=true; + draw SurfZ("if (X=0) and (Y=0):10 else:10*sin((X++Y))/(X++Y) fi",-8,8,-8,8,60,150); + label(btex $f(z)=10\times\dfrac{\sin\left(\sqrt{x^2+y^2}\right)}{\sqrt{x^2+y^2}}\mbox{ avec }\left\{\begin{array}{l} + x\in[-8,8]\\ + y\in[-8,8]\\ + \end{array} + \right.$ etex,u*(0,-4)); + finespace; +\end{lstlisting} +\par +\[\includegraphics{figures/Surfz21.pdf}\] +\L'exemple précédent montre l'utilisation du paramètre +\param{\texttt{invnormalelum}} permettant d'opposer la normale permettant la +détermination de la quantité lumineuse. De plus, la gestion de la +lumière est un peu différente lors du tracé des surfaces en $z$. En +effet, on a parfois besoin de voir ce qui se passe dans la partie cachée\ldots +\begin{lstlisting}[frame=tb] + verbatimtex + % &latex + \documentclass[12pt]{article} + \usepackage{fourier} + \usepackage{amsmath} + \begin{document} + etex + + invnormalelum:=-1; + + figureespace(-10u,-10u,10u,10u); + Initialisation(300,45,35,10); + incolor:=0.5[jaune,white]; + outcolor:=0.8[violet,white]; + draw SurfZ("if X=0:if Y=0:10 else:10*sin(Y)/Y fi else:if Y=0:10*sin(X)/X else: 10*sin(X)/X*sin(Y)/Y fi fi",-10,10,-12,12,60,150); + label(btex $f(z)=10\times\dfrac{\sin x}x\dfrac{\sin y}y\mbox{ avec }\left\{\begin{array}{l} + x\in[-10,10]\\ + y\in[-12,12]\\ + \end{array} + \right.$ etex,u*(0,-4)); + finespace; + end +\end{lstlisting} +\[\includegraphics{figures/Surfz31.pdf}\] +\subsection{\ldots paramétrées $M(u,v)=(f(u,v),g(u,v),h(u,v))$} +\begin{Danger} + Attention, il faut une orientation correcte des faces créees. Il sera + donc nécessaire d'utiliser, {\em parfois}, \param{\texttt{invnormale}}. +\end{Danger} +Utilisons la macro +\begin{center} + \macro{\verb!Sparam(expr fn,umin,umax,upas,vmin,vmax,vpas)!} +\end{center} +où \param{\texttt{fn}} est un type \texttt{string} représentant la fonction +$M(u,v)$ donnée sous forme d'un triplet; les autres paramètres parlant +d'eux mêmes. +\\Voici plusieurs exemples : +\par%\vfill\par +\begin{minipage}{6cm} +\includegraphics[width=5cm]{figures/Sparam11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,-30,15,75); + outcolor:=0.5[red,white]; + incolor:=0.5[jaune,white]; + draw Sparam("((1+0.5*cos(u))*cos(v),(1+0.5*cos(u))*sin(v),0.5*sin(u))",-pi,pi/12,pi/15,2*pi/3,2*pi,pi/20); + finespace; + \end{lstlisting} +\end{minipage} +\par\vfill\par +\begin{minipage}{6cm} +\includegraphics[width=5cm]{figures/Sparam31.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(50,-110,10,100); + outcolor:=0.5[orange,white]; + incolor:=0.25[gris,white]; + draw Sparam("(u,v,u*u-v*v)",-1,1,0.05,-1,1,0.05); + finespace; + \end{lstlisting} +\end{minipage} +\par\vfill\par +\begin{minipage}{6cm} +\includegraphics[width=5cm]{figures/Sparam51.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,10,20,100); + incolor:=0.75[jaune,white]; + outcolor:=0.5[green,white]; + draw Sparam("(u*cos(v)*sin(pi/6),u*sin(v)*sin(pi/6),u*cos(pi/6))",-2,-0.1,0.2,-2.6,2.6,0.2); + finespace; + \end{lstlisting} +\end{minipage} +\par\vfill\par +\begin{minipage}{6cm} +\includegraphics[width=5cm]{figures/Sparam81.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(50,0,-20,100); + incolor:=0.75[orange,white]; + outcolor:=0.5[blue,white]; + draw Sparam("(cos(v)*sqrt(1+u*u),sin(v)*sqrt(1+u*u),0.6*u)",-1,1.5,0.1,-5*pi/6,5*pi/6,pi/36); + finespace; + \end{lstlisting} +\end{minipage} +\par\vfill\par +\begin{minipage}{9cm} +\begin{figurefixe} +\centering +\includegraphics[width=7.5cm]{figures/Sparam91.pdf} +\caption{Une nappe cylindrique} +\label{fig:exsyr2} +\end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(100,5,10,25); + incolor:=0.5[jaune,white]; + outcolor:=0.75[violet,blanc]; + drawarrow Projette((0,0,0))--Projette((0,3,3)) withpen pencircle scaled2bp; + for l=-1 upto 5: + draw Projette((l,-1,0))--Projette((l,5,0)) withcolor gris; + draw Projette((-1,l,0))--Projette((5,l,0)) withcolor gris; + endfor; + TraceAxes; + drawarrow Projette((0,0,0))--Projette((0,3,3)) withpen pencircle scaled2bp; + draw Sparam("(6*(cos(u)**3)*sin(u),4*cos(u)*cos(u)+v,v)",0,2*pi,pi/30,0,2*sqrt(2),0.1); + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Les solides de révolution} +C'est un cas particulier des surfaces paramétrées. La syntaxe est donc +très voisine : +\begin{center} + \macro{\verb!Revolution(fn,umin,umax,upas,vmin,vmax,vpas)!} +\end{center} +avec les mêmes notations que précédemment {\em sauf} que \param{\verb!fn!} +doit représenter un chemin \MP. Voici quelques exemples. +\par\begin{minipage}{6cm} + \includegraphics[width=6cm]{figures/revolution11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + r=2; R=8; h=3; + + path pp; + pp=(R,-h/2)--((R+r)/2,h/2)--(r,-h/2)--cycle; + + incolor:=0.5[jaune,white]; + outcolor:=0.8[bleu,white]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,40,25); + draw Revolution("pp",0,length pp,0.1,0,2*pi,pi/12); + finespace; +\end{lstlisting} +\end{minipage} +\par\begin{minipage}{6cm} + \includegraphics[width=6cm]{figures/revolution21.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + r=3; R=8; h=6; + + path pp; + pp=(r,h/2)--(r,-h/2)--(R,-h/2)--(R,-h/2+1)--(R-1.5,-h/2+1)--(R-1.5,h/2-1)--(R,h/2-1)--(R,h/2)--cycle; + + incolor:=0.5[jaune,white]; + outcolor:=0.8[bleu,white]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,20,25); + draw Revolution("pp",0,length pp,0.25,0,2*pi,pi/12); + finespace; + \end{lstlisting} +\end{minipage} +\par Et pour tirer profit des courbes de Bezier +\par\begin{minipage}{6cm} + \includegraphics[width=6cm]{figures/revolution31.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + path pp; + pp=(3,-7)..(1,-6)..(5,0.5)..(5,3)..(1,3)..(1,4)..(2,5); + + incolor:=0.5[jaune,white]; + outcolor:=0.8[bleu,white]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,20,25); + draw Revolution("pp",0,length pp,0.2,0,2*pi,pi/12); + finespace; + \end{lstlisting} +\end{minipage} \ No newline at end of file diff --git a/doc/Fusion.tex b/doc/Fusion.tex new file mode 100644 index 0000000..19d50d0 --- /dev/null +++ b/doc/Fusion.tex @@ -0,0 +1,1270 @@ +\chapter{La fusion d'objets} +Un petit aperçu\ldots +\[\includegraphics{figures/fusion1.pdf}\] +\begin{Danger} + Tout ce qui est relatif à la fusion d'objets n'est {\em valable} que + pour ce chapitre. Ce n'est pas implanté pour les surfaces, les courbes,\ldots +\end{Danger} +\section{Quels objets fusionner ?} +Avant de voir ce que nous permet la fusion, voyons quels objets sont +mis à notre disposition : \texttt{tétraèdre régulier}, \texttt{cube} +et \texttt{pavé droit}, \texttt{octaèdre régulier}, \texttt{dodécaèdre + régulier}, \texttt{icosaèdre régulier}, \texttt{prisme} et +\texttt{prisme creux}, \texttt{cylindre de révolution creux} et +\texttt{plein}, \texttt{cône de révolution creux} et \texttt{plein}, +\texttt{tronc de cône de révolution creux} et \texttt{plein}, +\texttt{sphère}, \texttt{calotte sphérique creuse} et \texttt{pleine}, +\texttt{tore}, \texttt{anneau}, \texttt{tube}, \texttt{grille}, +\texttt{ruban}, \texttt{biface}, \texttt{OFF}, \texttt{OBJ} et \texttt{New}. +\begin{Danger} + Dans ce chapitre, aucun de ces objets n'est dessiné ! Mais ils sont + numérotés. Ainsi pour les afficher, Il faut impérativement utiliser + la macro + \begin{center} + \macro{\verb!AffichageObjet1!} + \end{center} + 1 étant le numéro de l'objet à afficher. +\end{Danger} + + Voici comment les définir : + +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\multicolumn{1}{c}{\textcolor{red}{Tétraèdre régulier}}&\verb!"a=3"! +(\texttt{a} rayon de la sphère circonscrite)&\includegraphics[width=5.5cm]{figures/objettetraedre1.pdf}&%\\ + \begin{verbatim} + Objettetraedre1("a=1"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Cube}}&\verb!"a=3"!&\includegraphics[width=5.5cm]{figures/objetcube1.pdf}&%\\ + \begin{verbatim} + %subh:=9; + Objetcube1("a=4"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Octaèdre régulier}}&\verb!"a=3"! +(\texttt{a} rayon de la sphère circonscrite)&\includegraphics[width=5.5cm]{figures/objetoctaedre1.pdf}&%\\ + \begin{verbatim} + Objetoctaedre1("a=1"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Dodécaèdre régulier}}&\verb!"a=3"! +(\texttt{a} rayon de la sphère circonscrite)&\includegraphics[width=5.5cm]{figures/objetdodecaedre1.pdf}&%\\ + \begin{verbatim} + Objetdodecaedre1("a=1"); + AffichageObjet1; + \end{verbatim}\\ +\end{tabular} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\multicolumn{1}{c}{\textcolor{red}{Icosaèdre régulier}}&\verb!"a=3"! +(\texttt{a} rayon de la sphère circonscrite)&\includegraphics[width=5.5cm]{figures/objeticosaedre1.pdf}&%\\ + \begin{verbatim} + Objeticosaedre1("a=1"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Pavé droit}}&\verb!"L=2","H=1",!\par\verb!"P=0.5"!&\includegraphics[width=5.5cm]{figures/objetpave1.pdf}&%\\ + \begin{verbatim} + %subh:=9; + Objetpave1("L=2","H=6","P=4"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Prisme plein}}&\verb!("axe=(0,1,2)"!% +\par\verb!,"h=3")!\par +\verb!(Liste sommets)!&\includegraphics[width=5.5cm]{figures/objetprisme1.pdf}&%\\ + \begin{verbatim} + %nb:=4;subh:=20; + ObjetPrisme1("axe=(0,0.5,1)",% +"h=2")% +((1,0,0),(2,3,0),(-1,4,0)); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Prisme creux}}&\verb!("axe=(0,1,2)"!% +\par\verb!,"h=3")!\par +\verb!(Liste sommets)!&\includegraphics[width=5.5cm]{figures/objetprisme2.pdf}&%\\ + \begin{verbatim} + %nb:=4;subh:=20; + creux:true; + Objetprisme1("axe=(0,0.5,1)",% +"h=2")% +((1,0,0),(2,3,0),(-1,4,0)); + AffichageObjet1; + \end{verbatim}\\ +\end{tabular} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\multicolumn{1}{c}{\textcolor{red}{Tore}}&\verb!"R=3","r=2"!&\includegraphics[width=5.5cm]{figures/objettore1.pdf}&%\\ + \begin{verbatim} + %nb:=24;subh:=36; + Objettore1("R=4","r=1"); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Tube plein}\footnotemark}&\verb!"F(t)","F'(t)"!, + \verb!rayon!, \verb!umin!, \verb!nb de points!, \verb!pas!&\includegraphics[width=5.5cm]{figures/objettube1.pdf}&%\\ + \begin{verbatim} + %nb:=16;subh:=18; + ObjetTube1("(% + 2*(1+cos(t)),2*tan(t/2),2*sin(t)% + )","(% + -2*sin(t),2/((cos(t/2))**2),2*cos(t)% + )", 1,-2.7468,71,0.0763); + AffichageObjet1; + \end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{Tube creux}}&\verb!"F(t)","F'(t)"!, + \verb!rayon!, \verb!umin!, \verb!nb de points!, \verb!pas!&\includegraphics[width=5.5cm]{figures/objettube2.pdf}&%\\ + \begin{verbatim} + %nb:=16;subh:=18; + creux:=true; + ObjetTube1("(% + 2*(1+cos(t)),2*tan(t/2),2*sin(t)% + )","(% + -2*sin(t),2/((cos(t/2))**2),2*cos(t)% + )",1,-2.7468,71,0.0763); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Cylindre de révolution creux}&\verb!"r=1","h=2"!&\includegraphics[width=5.5cm]{figures/objetcylindre1.pdf}&%\\ + \begin{verbatim} + creux:=true; + %nb:=24;subh:=9; + Objetcylindre1("r=2","h=4"); + AffichageObjet1; + \end{verbatim}\\ +\end{tabular} +\footnotetext{Le tube représenté ici est relatif à la courbe {\em + horoptère}.} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\textcolor{red}{Cylindre de révolution plein}&\verb!"r=1","h=2"!&\includegraphics[width=5.5cm]{figures/objetcylindre2.pdf}&%\\ + \begin{verbatim} + creux:=false; + %nb:=24;subh:=9; + Objetcylindre1("r=2","h=4"); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Cône de ré\-vo\-lu\-tion creux}&\verb!"r=1","h=2"!&\includegraphics[width=5.5cm]{figures/objetcone1.pdf}&%\\ + \begin{verbatim} + creux:=true; + %nb:=24;subh:=9; + Objetcone1("r=1.5","h=4"); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Cône de ré\-vo\-lu\-tion plein}&\verb!"r=1","h=2"!&\includegraphics[width=5.5cm]{figures/objetcone2.pdf}&%\\ +\begin{verbatim} + creux:=false; + %nb:=24;subh:=9; + Objetcone1("r=1.5","h=4"); + AffichageObjet1; +\end{verbatim}\\ +\textcolor{red}{Tronc de cône creux}&\verb!"r=1"!, \verb!"h=2"!, \verb!"H=5"!&\includegraphics[width=5.5cm]{figures/objettronccone1.pdf}&%\\ + \begin{verbatim} + creux:=true; + %nb:=24;subh:=9; + Objettronccone1("r=2","h=4","H=5"); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Tronc de cône plein}&\verb!"r=1"!, \verb!"h=2"!, \verb!"H=5"!&\includegraphics[width=5.5cm]{figures/objettronccone2.pdf}&%\\ +\begin{verbatim} + creux:=false; + %nb:=24;subh:=9; + Objettronccone1("r=2","h=2","H=3"); + AffichageObjet1; +\end{verbatim}\\ +\end{tabular} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} + \multicolumn{1}{c}{\textcolor{red}{Sphère}}&\verb!"R=3"!&\includegraphics[width=5.5cm]{figures/objetsphere1.pdf}&%\\ +\begin{verbatim} + %nb:=24;subh:=18; + Objetsphere1("R=2"); + AffichageObjet1; +\end{verbatim}\\ + \textcolor{red}{Calotte sphérique pleine}&\verb!"r=3"!, + \verb!"phib=-pi/4"!, \verb!"phih=pi/6"! (en radians)&\includegraphics[width=5.5cm]{figures/objetcalotte1.pdf}&%\\ + \begin{verbatim} + %nb:=24;subh:=24; + Objetcalotte1(% + "R=4","phib=-pi/3","phih=pi/4"); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Calotte sphérique creuse}&\verb!"r=3"!, + \verb!"phib=-pi/4"!, \verb!"phih=pi/6"! (en radians)&\includegraphics[width=5.5cm]{figures/objetcalotte2.pdf}&%\\ + \begin{verbatim} + %nb:=24;subh:=24; + Objetcalotte1(% + "R=4","phib=-pi/3","phih=pi/4"); + AffichageObjet1; + \end{verbatim}\\ + \textcolor{red}{Anneau à section rectangulaire}&\verb!"R=3"!, \verb!"r=1"!, \verb!"h=2"!&\includegraphics[width=5.5cm]{figures/objetanneau1.pdf}&%\\ + \begin{verbatim} + %subh:=24; + Objetanneau1("R=4","r=3","h=1.5"); + AffichageObjet1; + \end{verbatim}\\ +\textcolor{red}{Grille dans le plan $(xOy)$}&\verb!"am=-3"!, +\verb!"an=2"!, \verb!"bm=-2"!, \verb!"bn=4"!&\includegraphics[width=5.5cm]{figures/objetgrille1.pdf}&%\\ + \begin{verbatim} + %nb:=10;subh:=6; + Objetgrille1("am=-2.5","an=2.5",% +"bm=-1.5","bn=1.5"); + AffichageObjet1; + \end{verbatim}\\ +\end{tabular} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\textcolor{red}{Ruban d'axe $(Oz)$}&\verb!"h=2"!, +\verb!Liste des!, \verb!sommets!&\includegraphics[width=5.5cm]{figures/objetruban1.pdf}&%\\ + \begin{verbatim} +%subh:=3; +ObjetRuban2("h=2")((0,0,0),% +(2,2,0),(4,0,0),(6,2,0)); +AffichageObjet2; + \end{verbatim}\\ + \multicolumn{1}{c}{\textcolor{red}{Biface\footnotemark}}&\verb!Liste! \verb!des! \verb!sommets!&\includegraphics[width=5.5cm]{figures/objetbiface1.pdf}&%\\ +\begin{verbatim} +ObjetBiface1((5,0,0) for % +t=0.06544 step 0.06544% + until pi:% +,(5*(cos(t)**2),% +(3*sin(t)*((cos(t))**3))% +,0) endfor); +AffichageObjet1; +\end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{\texttt{OFF}}}&\verb!Nom! \verb!du! \verb!fichier!&\includegraphics[width=5.5cm]{figures/objetoff1.pdf}&%\\ +\begin{verbatim} +debut:=0; +echelle:=15000; +ObjetOFF1("Kangaroo.off"); +AffichageObjet1; +\end{verbatim}\\ +\multicolumn{1}{c}{\textcolor{red}{\texttt{OBJ}}}&\verb!Nom! \verb!du! \verb!fichier!&\includegraphics[width=5.5cm]{figures/objetobj1.pdf}&%\\ +\begin{verbatim} +echelle:=200; +ObjetOFF1("Midpoly_03-1.obj"); +AffichageObjet1; +\end{verbatim}\\ +\end{tabular} +\footnotetext{Sur la figure proposée, il y a en fait quatre solides + biface.} +\end{center} +\begin{center} +\begin{tabular}{m{2.5cm}m{2.75cm}m{6cm}>{\footnotesize}m{6.5cm}} +\multicolumn{1}{c}{\textcolor{red}{New}}&\verb!Liste! \verb!des! + \verb!sommets!, \verb!Liste! \verb!des! \verb!faces!&\includegraphics[width=5.5cm]{figures/objetnew1.pdf}&%\\ +\begin{verbatim} +%hexaedre tetrakis +ObjetNew1((0,0,-3*sqrt(6)/4),% +(-sqrt(3)/2,-3/2,-sqrt(6)/4),% +(sqrt(3),0,-sqrt(6)/4),% +(-sqrt(3)/2,3/2,-sqrt(6)/4),% +(sqrt(3)/2,-3/2,sqrt(6)/4),% +(-sqrt(3),0,sqrt(6)/4),% +(sqrt(3)/2,3/2,sqrt(6)/4),% +(0,0,3*sqrt(6)/4),% +(-3*sqrt(3)/4,0,-3*sqrt(6)/8),% +(3*sqrt(3)/8,-9/8,-3*sqrt(6)/8),% +(3*sqrt(3)/8,9/8,-3*sqrt(6)/8),% +(-3*sqrt(3)/8,-9/8,3*sqrt(6)/8),% +(-3*sqrt(3)/8,9/8,3*sqrt(6)/8),% +(3*sqrt(3)/4,0,3*sqrt(6)/8)% +)(3,0,1,8,% +3,0,8,3,% +3,3,8,5,% +3,1,5,8,% +3,0,9,1,% +3,0,2,9,% +3,2,4,9,% +3,1,9,4,% +3,0,3,10,% +3,0,10,2,% +3,2,10,6,% +3,3,6,10,% +3,2,13,4,% +3,2,6,13,% +3,6,7,13,% +3,4,13,7,% +3,3,5,12,% +3,3,12,6,% +3,6,12,7,% +3,5,7,12,% +3,1,11,5,% +3,1,4,11,% +3,4,7,11,% +3,5,11,7% +); +\end{verbatim}\\ +\end{tabular} +\end{center} +Pour beaucoup de ces objets, les \param{\verb!nb!} et/ou +\param{\verb!subh!} sont requis et ont la possibilité d'être modifiés. Ils +représentent le maillage sur chacun des objets. De manière générale, +\param{\verb!nb!} représente le maillage de \og la base\fg\ du solide +et \param{\verb!subh!} représente le maillage \og vertical\fg\ de +l'objet. +\par Pour les objets possédant une version creuse, c'est le paramètre +booléen \param{\verb!creux!} qui fait la différence. Sa valeur par +défaut est \verb!false!. +\subsection{Compléments sur l'objet \texttt{ruban}} +Le ruban est un paravent. Il s'agit simplement de positionner les +sommets dans le plan $(Oxy)$ et de donner la hauteur du paravent +souhaité. +\\Il n'est pas toujours nécessaire de prendre une ligne \og brisée\fg\ +comme support de base pour le ruban. +\paragraph{Exemple 1 : Un paravent sinusoïdal}\hfill\newline +\begin{figure}[!ht] + \centering + \includegraphics[scale=0.9]{figures/rubansinus1.pdf} + \caption{Un paravent sinusoïdal} + \label{fig:exsyr3} +\end{figure} +\begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,20,25); + nb:=10; subh:=26; + eclairage:=false;%<-pour obtenir la grille en blanc + outcolor:=blanc; + Objetgrille1("am=-5","an=5","bm=-13","bn=13"); + AffichageObjet1; + eclairage:=true; + outcolor:=0.5[rouge,blanc]; incolor:=0.5[vert,blanc]; + subh:=3; + ObjetRuban2("h=2")(for t=-4*pi step (pi/12) until 47*pi/12:(2*sin(t),t,0), endfor(0,4*pi,0)); + AffichageObjet2; + TraceAxes; + finespace; +\end{lstlisting} +\paragraph{Exemple 2 : Un paravent d'amour}\hfill\newline +\begin{figure}[!ht] + \centering + \includegraphics{figures/rubancardioide1.pdf} + \caption{Un paravent d'amour} +\end{figure} +\begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,20,25); + nb:=17; subh:=20; + eclairage:=false; + drawoptions(withcolor gris); + outcolor:=blanc; + Objetgrille1("am=-5.5","an=3","bm=-5","bn=5"); + AffichageObjet1; + drawoptions(); + eclairage:=true; + outcolor:=0.5[rouge,blanc]; incolor:=0.5[vert,blanc]; + subh:=3; + ObjetRuban2("h=2")(for t=-pi step pi/36 until 35*pi/36:1.5*(2*cos(t)-cos(2*t),2*sin(t)-sin(2*t),0), endfor(-4.5,0,0)); + AffichageObjet2; + TraceAxesD(3.5,5.5,4); + finespace; +\end{lstlisting} +\subsection{Compléments sur l'objet \texttt{prisme}} +Si l'on souhaite définir un prisme avec une base peu courante, on +utilisera la macro \macro{\verb!ObjetPrisme!} (avec une majuscule) de +la même façon que la macro \macro{\verb!Objetprisme!} en définissant +l'axe, la hauteur et la liste des sommets formant la base. +\paragraph{Exemple 1 : Prisme droit à section carrée + arrondie}\hfill\newline +\begin{minipage}{9cm} + \begin{figurefixe} + \centering + \includegraphics[width=8cm]{figures/prismearrondi1.pdf} + \caption{Prisme droit à section carrée arrondie} + \label{fig:exsyr4} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + outcolor:=0.5[orange,blanc]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(1500,-25,30,20); + eclairage:=false; + nb:=4;subh:=4; + Objetgrille0("am=-2","an=2","bm=-2","bn=2"); + AffichageObjet0; + ObjetPrisme1("axe=(0,0,1)","h=6")(for k=0 step 10 until 90:(1+cosd(k),1+sind(k),0),endfor for k=90 step 10 until 180:(cosd(k)-1,1+sind(k),0), endfor for k=180 step 10 until 270:(cosd(k)-1,sind(k)-1,0), endfor for k=270 step 10 until 350:(cosd(k)+1,sind(k)-1,0), endfor (2,1,0)); + AffichageObjet1; + TraceAxesD(2,2,2); + finespace; + \end{lstlisting} +\end{minipage} +\paragraph{Exemple 2 : Demi-prisme droit à section couronne circulaire}\hfill\newline +\begin{minipage}{9cm} + \begin{figurefixe} + \centering + \includegraphics[width=8cm]{figures/demiprisme1.pdf} + \label{fig:exsyr5} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,30,25); + outcolor:=blanc; + subh:=10; + Objetgrille1("am=-5","an=5","bm=-5","bn=5"); + AffichageObjet1; + outcolor:=jaune; incolor:=rouge; + nb:=1; subh:=5; + angx:=90; TR:=(0,4,0); + ObjetPrisme2("axe=(0,0,1)","h=8",for k=0 step 10 until 180:(3*cosd(k),3*sind(k),0), endfor for k=180 step -10 until 0:(cosd(k),sind(k),0), endfor(3,0,0)); + AffichageObjet2; + TraceAxes; + finespace; +\end{lstlisting} +\end{minipage} +\par +\begin{minipage}{9cm} + \begin{figurefixe} + \centering + \includegraphics[width=8cm]{figures/demiprisme2.pdf} + \label{fig:exsyr6} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,30,25); + outcolor:=blanc; + subh:=10; + Objetgrille1("am=-5","an=5","bm=-5","bn=5"); + AffichageObjet1; + outcolor:=jaune; incolor:=rouge; + nb:=1; subh:=5; + angx:=90; TR:=(0,4,0); + creux:=true;%<-changement en solide creux + ObjetPrisme2("axe=(0,0,1)","h=8",for k=0 step 10 until 180:(3*cosd(k),3*sind(k),0), endfor for k=180 step -10 until 0:(cosd(k),sind(k),0), endfor(3,0,0)); + AffichageObjet2; + TraceAxes; + finespace; + \end{lstlisting} +\end{minipage} +\paragraph{Exemple 2: Prisme droit creux dont la section est un + bifolium régulier}\hfill\newline +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/prismebifolium1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,30,25); + outcolor:=blanc; + subh:=10; + Objetgrille1("am=-5","an=5","bm=-5","bn=5"); + AffichageObjet1; + outcolor:=vert; incolor:=orange; + nb:=1; subh:=5; + creux:=true; + ObjetPrisme2("axe=(0,0,1)","h=6",for k=0 step 5 until 175:(12*sind(k)*(cosd(k)**3),12*(sind(k)**2)*(cosd(k)**2),0),endfor (0,0,0)); + AffichageObjet2; + TraceAxes; + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Compléments sur les objets \texttt{cylindre} et \texttt{cone}} +S'il l'on veut généraliser la notion de cylindre, la macro +\macro{\texttt{Objetcylindre}} ne suffit pas. En effet, il devient nécessaire de +définir une courbe {\em directrice} et la direction de {\em l'axe du + cylindre}.\\ +\`A cet effet, la macro \macro{\texttt{ObjetCylindre}} ({\em notez la + majuscule}) a été défini. +\begin{center} + \macro{\verb!ObjetCylindre1(fn,umin,umax,vmin,vmax)!} +\end{center} +Proposons un exemple. +\begin{figure}[h] + \centering + \includegraphics{figures/cylindreastroide1.pdf} + \caption{Cylindre à base astroïdale et d'axe $(0;0;1)$} +\end{figure} +Définissons la courbe spatiale \param{\verb!fn!} : +\verb!(3*(cos(u)**3),3*(sin(u)**3),-2+v)! de paramètre {\em obligatoire} +\verb!u! et \verb!v!. C'est une astroïde tracé dans +le plan $z=-2$. Les paramètres seront donc \param{\verb!umin!$=\pi$}; +\param{\verb!umax!$=-\pi$}, \param{\verb!vmin!=$0$} et (par exemple) +\param{\verb!vmax!$=4$} pour aller jusqu'au plan $z=2$.. +Le code dont résulte la figure ci-dessus est donc +\begin{lstlisting}[frame=tb] + nb:=24; subh:=12; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,20,50); + arcenciel:=true; + incolor:=0.75[orange,blanc]; + ObjetCylindre1("(3*(cos(u)**3),3*(sin(u)**3),-2+v)",pi,-pi,0,4); + AffichageObjet1; + finespace; +\end{lstlisting} +\par Si l'on souhaite avoir maintenant le même cylindre partant du +plan $z=0$ mais d'axe $(0;1;2)$, on codera alors +\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/cylindreastroide2.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + nb:=24; subh:=12; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,20,50); + arcenciel:=true; + incolor:=0.75[orange,blanc]; + ObjetCylindre1("(3*(cos(u)**3),3*(sin(u)**3)+v,2*v)",pi,-pi,0,2); + AffichageObjet1; + finespace; + \end{lstlisting} +\end{minipage} +L'usage de la macro \macro{\verb!ObjetCone!} (toujours avec la +majuscule) est le même pour la généralisation des cônes. Toutefois, il +faut ici définir une origine et les deux nappes du cône seront +symétriques par rapport à cette origine. +\begin{center} + \macro{\verb!ObjetCone1(fn,umin,umax,zbas,"orig=...")!} +\end{center} +Il ne faut pas oublier de +placer la courbe directrice dans le même plan que le plan de base du cône.\\Pour mieux exploiter cette +fonctionnalité, voici l'exemple d'un cône dont la directrice est une +branche d'épicycloïde et dont l'origine est le point $(0;1;3)$. +\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/coneepi1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + nb:=48;subh:=8; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,-10,15,30); + outcolor:=0.5[vert,blanc]; + incolor:=orange; + r:=1; q:=4; + draw Fonction("(r*((q+1)*cos(t)-cos((q+1)*t)),r*((q+1)*sin(t)-sin((q+1)*t)),0)",-pi,pi,0.0628) withpen pencircle scaled1.5bp withcolor bleu; + ObjetCone1("(r*((q+1)*cos(u)-cos((q+1)*u)),r*((q+1)*sin(u)-sin((q+1)*u)),0)",0,pi,-2,"orig=(0,1,3)"); + AffichageObjet1; + TraceAxes; + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Compléments sur les objets \texttt{anneau}} +L'objet \macro{\texttt{Objetanneau}} propose {\em par défaut} une +section rectangulaire. +\par +\begin{minipage}{8cm} + \includegraphics{figures/sectionanneau1.pdf} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \[\includegraphics{figures/Sectionanneau1.pdf}\] + \begin{lstlisting} + Objetannneau1("R=8","r=6","h=3"); + \end{lstlisting} +\end{minipage} +\par Pour utiliser une autre section telle que celle-ci +\[\includegraphics{figures/sectionanneau2.pdf}\] +on utilisera +\begin{center} + \macro{\verb!ObjetAnneau1("nbp=...",pp)!} +\end{center} +où \param{\verb!nbp!} est le nombre de sommets de la section et +\param{\verb!pp!} un chemin \MP\ représentant la section souhaitée. +\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/Sectionanneau2.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,30,25); + arcenciel:=true; + incolor:=jaune; + R:=4; + subh:=24; + path pp; + pp=for k=0 step 10 until 90:(R+1+cosd(k),1+sind(k))-- endfor for k=90 step 10 until 180:(R+cosd(k)-1,1+sind(k))-- endfor for k=180 step 10 until 270:(R+cosd(k)-1,sind(k)-1)-- endfor for k=270 step 10 until 350:(R+cosd(k)+1,sind(k)-1)-- endfor (R+2,1)--cycle; + ObjetAnneau1("nbp=42",pp); + AffichageObjet1; + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Compléments sur l'objet \texttt{new}} +La déclaration des sommets se fait sous forme de triplets. La +déclaration des faces se faisant quant à elle, sous la forme d'un +$n+1$-uplet où $n$ est le nombre de sommets composant la face; le +premier nombre étant d'ailleurs égal à $n$ suivi des nombres +représentant les sommets de cette face : \texttt{3 4 7 8} représente +une face triangulaire (3) composée des sommets 4, 7 et 8 {\em donnés + dans le sens trigonométrique si l'on regarde la face de + l'extérieur}. +\par La déclaration des sommets et des faces peut aussi être plus +complexes. Cet exemple, repris de la documentation de +\verb!pst-solides3d! montre comment on peut définir à l'aide de +boucles la liste des sommets et la liste des faces. +\par +\begin{minipage}{6cm} +\includegraphics[width=6cm]{figures/hyperboloiderayonconstant1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + Initialisation(500,30,20,25); + a=20;b=36;h=8; + zz=-h/2; + ObjetNew1((sqrt(1+((zz+h)**2)/4),0,zz+h) + for m=a downto 0: + for n=if m=a:b-1 else:b fi downto 1: + ,(sqrt(1+((zz+h*m/a)**2)/4)*cosd(n*(360 div b)),sqrt(1+((zz+h*m/a)**2)/4)*sind(n*(360 div b)),zz+h*m/a) + endfor + endfor + )(4,a*b,b+a*b,b-1+a*b,a*b-1 + for m=a downto 1: + for n=if m=a:m*b-1 else: m*b fi downto (m-1)*b+2: + ,4,n,b+n,(b-1)+n,n-1 + endfor + ,4,m*b+1,(m+1)*b,m*b,(m-1)*b+1 + endfor + ); + \end{lstlisting} +\end{minipage} +\subsection{Numéroter et enlever des facettes} +Lorsque le paramètre booléen \param{\verb!numeroteface!} est +positionné à \verb!true!, on numérote {\em toutes} les faces {\em + visibles} du solide. La police utilisée est \verb!cmr5!; on peut +bien évidemment la modifier grâce à \verb!defaultfont!. +\par +\begin{minipage}{6cm} +\includegraphics[width=6cm]{figures/cubenumerote1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + defaultfont:="cmr7"; + Initialisation(1500,30,20,20); + numeroteface:=true;%<- + subh:=5; + Objetcube1("a=2"); + AffichageObjet1; + TraceAxesD(4,4,4); + \end{lstlisting} +\end{minipage} +\par Une fois ceci fait, si le booléen \param{\verb!creux!} est positionné +à \verb!true! alors on peut enlever des facettes pour voir ce qu'il se +passe à l'intérieur de l'objet considéré. On définit alors l'objet +puis on indique quelles sont les numéros des faces que l'on souhaite +enlever grâce à \macro{\verb!ObjetEnleve1(...)!} +\par +\begin{minipage}{6cm} + \includegraphics[width=6cm]{figures/cubecreuse1.pdf} +\end{minipage} +\hfill +\begin{minipage}{11cm} + \begin{lstlisting}[frame=tb] + Initialisation(1500,30,30,50); + subh:=5; + creux:=true;%<- + Objetcube1("a=3"); + ObjetEnleve1(7,12,17,31,33,37,41,43,131,133,141,143); + AffichageObjet1; + \end{lstlisting} +\end{minipage} +\begin{Danger} + Les numéros des faces à enlever doivent être donnés dans l'ordre croissant. +\end{Danger} +Si l'on souhaite enlever beaucoup de faces, une boucle \verb!for! est +possible au prix d'un petit changement de syntaxe. +\begin{multicols}{2} + \begin{center} + \includegraphics{figures/torecreuse1.pdf} + \end{center} + \begin{lstlisting}[frame=tb] + nb:=16; subh:=18; + + figureespace(-10u,-10u,10u,10u); + Initialisation(1000,30,20,30); + numeroteface:=true; + arcenciel:=true; + incolor:=0.5[gris,white]; + Objettore1("R=2","r=1"); + AffichageObjet1; + finespace; + \end{lstlisting} + \par\columnbreak\par + \begin{center} + \includegraphics{figures/torecreuse2.pdf} + \end{center} + \begin{lstlisting}[frame=tb] + numeroteface:=false; + + figureespace(-10u,-10u,10u,10u); + Initialisation(1000,30,20,30); + creux:=true; + arcenciel:=true; + incolor:=0.5[gris,white]; + Objettore1("R=2","r=1"); + string Face; + Face=""&for k=133 step 2 until 193:decimal(k)&","&""& endfor decimal(195)&""; + ObjetEnleve1(scantokens Face); + AffichageObjet1; + finespace; + \end{lstlisting} +\end{multicols} +\subsection{Transparence} +Elle est implantée grâce au booléen \param{\verb!Transparence!} +positionné à \verb!false! par défaut. La couleur de transparence +choisie est \param{\verb!fillcolor!} positionnée à gray par défaut. +\begin{Danger} + C'est une notion gourmande en ressources. Aussi, il est plutôt + conseillé de l'utiliser avec des objets {\em simples}. +\end{Danger} +\begin{figure}[ht] + \centering + \includegraphics{figures/J671.pdf} + \caption{Polygone de Johnson : J67} +\end{figure} +\section{Et pour les bouger ?} +On dispose (et certains codes de la partie précédente l'ont montré) : +\begin{itemize} + \item des rotations autour des axes $(Ox)$, $(Oy)$ et $(Oz)$; + \item des translations; + \item de transformations définies par l'utilisateur. +\end{itemize} +\subsection{Les rotations et translations} +L'ordre choisi pour les utiliser est la rotation d'axe $(Ox)$; puis +celle d'axe $(Oy)$; puis celle d'axe $(Oz)$ et enfin la +translation. Les rotations sont définis par trois angles +\param{\verb!angx!}, \param{\verb!angy!} et \param{\verb!angz!}. +\begin{figure}[h] + \centering + \subfigure[Position% + initiale]{\includegraphics[width=4cm]{figures/rotation1.pdf}}\hfill + \subfigure[Position \texttt{angx:=90}]{\includegraphics[width=4cm]{figures/rotation2.pdf}}\hfill + \subfigure[Position \texttt{angy:=-45}]{\includegraphics[width=4cm]{figures/rotation3.pdf}}\hfill + \subfigure[Position \texttt{angz:=57}]{\includegraphics[width=4cm]{figures/rotation4.pdf}}\hfill + \caption{Utilisation des rotations.} +\end{figure} +\par Pour les translations, le paramètre est \param{\verb!TR!} de type +\verb!color!. +\begin{figure}[h] + \centering + \includegraphics{figures/translation1.pdf} + \caption{Utilisation des translations.} +\end{figure} +\begin{Danger} + Si un fichier \MP\ comporte plusieurs figures, n'oubliez pas de + remettre les paramètres angulaires et de translation à leur valeur + d'origine. Sinon, vous pourriez bien vous tirer les cheveux pour + savoir où se situe votre erreur\footnotemark\ldots +\end{Danger} +\footnotetext{Croyez-moi par expérience ;-)} +\subsection{Les transformations propres à l'utilisateur} +On dispose d'un booléen \param{\verb!transformation!} (positionné à +\texttt{false} par défaut) pour indiquer la transformation nécessaire +des sommets de l'objet considéré. +\\La transformation proprement dite, quant à elle, doit être définie +par une macro \macro{Transform} (attention à la majuscule). +\paragraph{Facteurs d'échelle} +\[\left\{\begin{array}{l} +x'=1,25x\\ +y'=0,75y\\ +z=0,5z\\ +\end{array} +\right.\] +\begin{lstlisting}[frame=tb] + vardef Transform(expr PT)= + save $; + color $; + Xpart($)=1.25*Xpart(PT); + Ypart($)=0.75*Ypart(PT); + Zpart($)=0.5*Zpart(PT); + $ + enddef; + + outcolor:=jaune; incolor:=0.5[vert,blanc]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,50,20,15); + nb:=24; subh:=36; + outcolor:=0.5[rouge,blanc]; + Objettore1("R=4","r=2"); + AffichageObjet1; + TraceAxes; + finespace; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,50,20,15); + nb:=24; subh:=36; + transformation:=true;%<-Pour appliquer la transformation choisie. + outcolor:=0.5[rouge,blanc]; + Objettore1("R=4","r=2"); + AffichageObjet1; + TraceAxes; + finespace; + end +\end{lstlisting} +\[\includegraphics{figures/Facteurechelle1.pdf}\kern1cm\includegraphics{figures/Facteurechelle2.pdf}\] +\paragraph{Transformation liée à la distance du point à l'origine} +\[\left\{\begin{array}{l} +x'=(0,5\sqrt{x^2+y^2+z^2}+1-0,5\sqrt3)x\\ +y'=(0,5\sqrt{x^2+y^2+z^2}+1-0,5\sqrt3)y\\ +z'=(0,5\sqrt{x^2+y^2+z^2}+1-0,5\sqrt3)z\\ +\end{array} +\right.\] +\begin{lstlisting}[frame=tb] + vardef Transform(expr PT)= + save $; color $; + Xpart($)=Xpart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + Ypart($)=Ypart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + Zpart($)=Zpart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + $ + enddef; + + arcenciel:=true; + + figureespace(-6u,-6u,6u,6u); + fill feuillet; + Initialisation(500,60,20,50); + subh:=9; + transformation:=true; + Objetcube1("a=3"); + AffichageObjet1; + finespace; +\end{lstlisting} +\begin{figure}[!h] + \centering + \includegraphics{figures/Transforigine1.pdf} + \caption{Déformation d'un cube} + \label{fig:exsyr7} +\end{figure} +\paragraph{Torsion d'une poutre} +\[M'=\mbox{Rotation}(M,(Oz),10\mbox{\degres}*z_{M})\] +appliqué à un prisme de hauteur 10. +\begin{figure}[!ht] + \centering + \subfigure[Avant + torsion]{\includegraphics{figures/Torsion1.pdf}}\kern1cm\subfigure[Après torsion]{\includegraphics{figures/Torsion2.pdf}} + \caption{Torsion d'une poutre} + \label{fig:exsyr8} +\end{figure} +\begin{lstlisting}[frame=tb] + vardef Transform(expr PT)=%pour la torsion. + save $; color $; + angz:=subh*(Zpart(PT)); + $=RotXYZ(PT); + $ + enddef; + + unit:=0.75; + + figureespace(-2u,-2u,2u,10u); + Initialisation(500,50,20,35); + outcolor:=blanc; + subh:=8; + Objetgrille1("am=-2","an=2","bm=-2","bn=2"); + nb:=2; subh:=20; + outcolor:=0.5[rouge,blanc]; + Objetprisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); + nbobj:=2; + DessineFusion; + finespace; + + figureespace(-2u,-2u,2u,10u); + Initialisation(500,50,20,25); + outcolor:=blanc; + subh:=8; + Objetgrille1("am=-2","an=2","bm=-2","bn=2"); + nb:=2; subh:=20; + transformation:=true; + outcolor:=0.5[rouge,blanc]; + Objetprisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); + nbobj:=2; + DessineFusion; + finespace; +\end{lstlisting} +\paragraph{Flexion d'une poutre encastrée} +On exerce une force au sommet de la poutre dans la direction +$(Ox)$. La rotation se fait alors suivant l'axe $(Oy)$ d'un angle +proportionnel à la force exercée et à la distance au sol. +\begin{figure}[!ht] + \centering + \subfigure[Avant + flexion]{\includegraphics{figures/Flexion1.pdf}}\kern1cm\subfigure[Après flexion]{\includegraphics{figures/Flexion2.pdf}} + \caption{Flexion d'une poutre encastrée} +\end{figure} +\begin{lstlisting}[frame=tb] + vardef Transform(expr PT)=%pour la flexion. + save $; color $; + angy:=2*(Zpart(PT)); + $=RotXYZ(PT); + $ + enddef; + + unit:=0.75; + + figureespace(-3u,-3u,3u,10u); + Initialisation(500,50,20,35); + outcolor:=blanc; + subh:=8; + Objetgrille1("am=-2","an=2","bm=-2","bn=2"); + nb:=2; subh:=20; + transformation:=true; + outcolor:=0.5[rouge,blanc]; + ObjetPrisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); + nbobj:=2; + DessineFusion; + finespace; +\end{lstlisting} +Voici enfin l'exemple de la banane ! Il m'a été demandé pour un cours de topologie. Je n'y comprends rien :) mais cela montre {\em l'enchaînement} de deux transformations : +\begin{itemize} +\item la première est appliquée à l'objet \texttt{sphere}; +\item la deuxième est aplliquée à l'objet résultant de la première transformation. +\end{itemize} +\begin{figure}[!ht] + \centering + \subfigure[Avant + les transformations]{\includegraphics{figures/Banane1.pdf}}\kern1cm\subfigure[Après les transformations]{\includegraphics{figures/Banane2.pdf}} + \caption{Transformation d'une sphère en \og banane\fg} +\end{figure} +\begin{lstlisting}[frame=tb] + vardef Transform(expr PT)= + save $ ; color $ ; + Xpart($)=0.6*Xpart(PT); + Ypart($)=0.6*Ypart(PT); + Zpart($)=1.75*Zpart(PT); + $ +enddef ; + +figureespace(-7u,-7u,7u,7u); +fill feuillet; +Initialisation(1500,-60,10,50); +nb:=12; +subh:=12; +outcolor:=jaune; +Objetsphere1("R=2"); + +transformation:=true; +ObjetDeplacement2(1); + +vardef Transform(expr PT)= + save $ ; color $ ; + angy:=10*(Zpart(PT)); + $=RotXYZ(PT); + $ +enddef ; + +outcolor:=jaune; +ObjetDeplacement3(2); +AffichageObjet3; +\end{lstlisting} +\section{Ces objets, on peut les couper ?} +\begin{Danger} + Il n'y a que la section d'un objet par un plan qui est implanté. Et + même avec cela, les \texttt{arithmetic overflow} sont assez + courants. On peut avoir également des erreurs de précisions qui + entraînent certaines représentations non conformes.\\Malgré ces + limitations, \MP\ est capable de nous procurer de bien jolies + figures. On peut l'aider en modifiant les paramètres + \param{\texttt{nb}} et \param{\texttt{subh}} pour permettre de + lever ces {\em petits} soucis. +\end{Danger} +On va donc pouvoir couper les différents objets par un plan. Les +objets seront {\em nécessairement} creux. Pour cela, on va définir un +plan par la macro \macro{\verb!ObjetPlan!} qui accepte comme paramètres +trois points formant le plan. Définir un plan par une équation +cartésienne ou par un point et un vecteur normal n'est pas implanté. +On écrira donc\par +\begin{lstlisting}[frame=tb] + ObjetPlan1("An=(0,0,0)","Bn=(1,2,0.25)","Cn=(4,-2,1)"); +\end{lstlisting} +pour définir le plan d'équation $x=4z$. +Une fois le plan défini, on utilise la macro +\macro{\verb!ObjetSepare2(5,7)!} où 2 est le numéro de l'objet à +couper; 5 et 7 étant les numéros des objets résultants de la coupe : 7 +pour la partie \og haute\fg\, 5 pour la partie \og base\fg. +\par Dans l'exemple ci-dessous, on a coupé une sphère de centre $O$ et +de rayon 1 par le plan $x+y+z=1$. +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics{figures/sectionsphere1.pdf} + \caption{Section d'une sphère.} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-100u,-100u,100u,100u); + Initialisation(2500,60,30,75); + creux:=true; + outcolor:=jaune; + incolor:=0.5[vert,white]; + nb:=30; + subh:=19; + Objetsphere15("R=1"); + Objetplan21("An=(1,0,0)","Bn=(0,1,0)",% +"Cn=(0,0,1)"); + ObjetSepare15(3,4); + AffichageObjet3; + TraceAxesD(2,2,2); + finespace; +\end{lstlisting} +\end{minipage} +\par Voici la section d'un tore par le plan d'équation $x=4z$. +\par +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=8cm]{figures/sectiontore1.pdf} + \caption{Section d'un tore.} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} +\begin{lstlisting}[frame=tb] + figureespace(-100u,-100u,100u,100u); + Initialisation(2500,60,30,75); + creux:=true; + outcolor:=jaune; + incolor:=0.5[vert,white]; + nb:=30; + subh:=20; + Objettore15("R=2","r=0.75"); + Objetplan21("An=(1,0,0.25)","Bn=(2,1,0.5)","Cn=(-1,0,-0.25)"); + ObjetSepare15(3,4); + AffichageObjet3; + finespace; +\end{lstlisting} +\end{minipage} +\par Un autre exemple (voir figure \ref{fig:sectioncube}) où on coupe +un cube d'arête 2 centré sur $O$ par le même plan d'équation $x=4z$ +que ci-dessus. +\begin{figure}[!ht] + \centering + \subfigure[Section d'un + cube]{\includegraphics{figures/sectioncube1.pdf}}\hfill\subfigure[en + vue de + dessus]{\includegraphics{figures/sectioncube3.pdf}}\hfill\subfigure[en vue de face]{\includegraphics{figures/sectioncube2.pdf}} + \caption{Sections d'un cube} + \label{fig:sectioncube} +\end{figure} +\begin{lstlisting}[frame=tb] + figureespace(-100u,-100u,100u,100u); + Initialisation(2500,60,30,75); + creux:=true; + outcolor:=jaune; + incolor:=0.5[vert,white]; + nb:=30; + subh:=5; + Objetcube15("a=2"); + Objetplan21("An=(1,0,0.25)","Bn=(0,1,0)","Cn=(4,0,1)"); + ObjetSepare15(3,4); + AffichageObjet4; + TraceAxesD(2,2,2); + finespace; +\end{lstlisting} +\newpage +On peut également enchaîner les coupes\footnote{Mais là, je ne + garantis pas les résultats.}.\par +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=8cm]{figures/doublesectioncone1.pdf} + \caption{Double section d'un cône} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + figureespace(-100u,-100u,100u,100u); + Initialisation(2500,-60,30,75); + creux:=true; + outcolor:=jaune; + incolor:=0.5[vert,white]; + nb:=30; subh:=11; + angx:=90; TR:=(0,5,0); + Objetcone15("r=2","h=10"); + angx:=0; TR:=(0,0,0); + Objetplan21("An=(1,-1,0)","Bn=(2,-2,1)","Cn=(-2,2,1)"); + ObjetSepare15(1,2); + Objetplan22("An=(1,1,0)","Bn=(2,2,1)","Cn=(-2,-2,1)"); + ObjetSepare1(3,4); + AffichageObjet3; + finespace; +\end{lstlisting} +\end{minipage} +\section{La fusion ? C'est parti !} +Une fois que l'on dispose de tous ces objets, on peut les fusionner +pour créer une scène. La méthode mise en place est la suivante : +\begin{itemize} +\item On définit les objets les uns après les autres en leur + attribuant, si besoin est, les couleurs \param{\verb!outcolor!} et \param{\verb!incolor!}; +\item puis on fusionne tous ces objets. Simple, non ? +\end{itemize} +Prenons un exemple:\par +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=6cm]{figures/fusionsyr1.pdf} + \caption{Un tore et un cône} + \label{fig:fusionsyr1} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + %5'' + figureespace(-10u,-10u,10u,10u); + Initialisation(500,10,20,50); + outcolor:=rouge; + nb:=18; subh:=24; + Objetcone1("r=2.5","h=5"); + outcolor:=bleu; + angy:=20; TR:=(0,0,2); + Objettore2("R=2","r=0.5"); + nbobj:=2; + DessineFusion; + finespace; + \end{lstlisting} +\end{minipage} +Convaincu de la simplicité ? Non ? Alors en voici un autre :\par +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=7cm]{figures/fusionphan1.pdf} + \caption{Une hélice entourant un cylindre} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + %30'' + figureespace(-10u,-10u,10u,10u); + Initialisation(500,60,40,50); + angy:=90; TR:=(-1,0,0); + nb:=18; subh:=24; + outcolor:=blanc; + Objetcylindre1("r=0.5","h=7"); + TR:=(0,0,0); + nb:=12; + ObjetTube2("(sin(t),cos(t),t/5)","(cos(t),-sin(t),1/5)",0.25,-5,165,0.2); + nbobj:=2; + DessineFusion; + finespace; + \end{lstlisting} +\end{minipage} +La fusion se fait donc par l'usage de la macro +\macro{\verb!DessineFusion!} qui fusionne tous les objets créés +précédemment. Elle dépend de \param{nbobj} qui lui indique le nombre +d'objets à fusionner. La numérotation des objets prend ici tout son +sens. C'est ce qui permet à la macro de retrouver ses petits\ldots +\par\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/fusionhorop1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + figureespace(-20u,-20u,20u,20u); + Initialisation(500,60,20,30); + creux:=true; + nb:=16; subh:=18; + outcolor:=blanc; + incolor:=0.5[vert,white]; + angx:=90; TR:=(2,9,0); + Objetcylindre1("r=1","h=18"); + outcolor:=0.5[jaune,blanc]; + incolor:=0.5[violet,blanc]; + angx:=0; TR:=(0,0,0); + ObjetTube2("(2*(1+cos(t)),2*tan(t/2),2*sin(t))","(-2*sin(t),2/((cos(t/2))**2),2*cos(t))",1,-2.7468,71,0.0763); + nbobj:=2; + DessineFusion; + finespace; + \end{lstlisting} +\end{minipage} +\par Un autre exemple avec des solides creusés manuellement.\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/fusionsolidescreux1.pdf} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + nb:=12; subh:=36; + + figureespace(-10u,-10u,10u,10u); + Initialisation(1500,20,20,50); + creux:=true; + outcolor:=0.5[jaune,white]; + incolor:=0.5[vert,white]; + Objetanneau1("R=4","r=3","h=1.5"); + ObjetEnleve1(135,136,137,138,% +139,140,150,151,152,153,154,155); + angx:=90; + TR:=(0,0,2); + outcolor:=0.5[bleu,white]; + incolor:=0.5[rouge,white]; + Objetsphere2("R=2"); + ObjetEnleve2(232,233,234,235,% +236,237,238,239); + nbobj:=2; + DessineFusion; + finespace; +\end{lstlisting} +\end{minipage} +\subsection{Deux anneaux} +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/exfusion1.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + outcolor:=0.5[rouge,blanc]; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,40,20,100); + nb:=10; + ObjetTube1("(cos(t),sin(t),0.25)","(-sin(t),cos(t),0)",0.15,0,50,0.12566); + angx:=90; TR:=(-1,-0.1,0.5); + ObjetTube2("(cos(t),sin(t),0.25)","(-sin(t),cos(t),0)",0.15,0,50,0.12566); + nbobj=2; + DessineFusion; + finespace; + \end{lstlisting} +\end{minipage} +\subsection{Trois calottes} +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/exfusion11.pdf} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + outcolor:=0.5[ciel,blanc]; incolor:=0.5[jaune,blanc]; + + nb:=24; + + figureespace(-10u,-10u,10u,10u); + Initialisation(500,30,10,50); + angy:=80; + subh:=24; + creux:=true; + Objetcalotte1("R=2","phib=-pi/2","phih=pi/6"); + outcolor:=0.5[rouge,blanc]; + incolor:=0.5[vert,blanc]; + TR:=(1,0,0); + Objetcalotte2("R=1.5","phib=-pi/2","phih=pi/6"); + outcolor:=0.5[orange,blanc]; + incolor:=0.5[gris,blanc]; + TR:=(2,0,0); + Objetcalotte3("R=1","phib=-pi/2","phih=pi/6"); + nbobj:=3; + DessineFusion; + finespace; + \end{lstlisting} +\end{minipage} \ No newline at end of file diff --git a/doc/Historique.tex b/doc/Historique.tex new file mode 100644 index 0000000..197f14a --- /dev/null +++ b/doc/Historique.tex @@ -0,0 +1,30 @@ +\chapter{Historique} +\begin{description} +\item[25/01/2011] Modification de l'objet \texttt{Deplacement} (gestion des couleurs). Modification mineure de la documentation (Ajout d'un exemple dans la partie transformation de la section 3). +\item[27/11/2010] Corrections de \texttt{Redundant equation}. +\item[31/08/2008] Ajout de la transparence pour l'affichage des objets. +\item[21/08/2008] Ajout des objets \texttt{OFF}, \texttt{OBJ}, + \texttt{tetraedre}, \texttt{octaedre}, \texttt{dodecaedre} et + \texttt{icosaedre}. +\item[16/08/2008] Ajout de l'objet \texttt{New}. +\item[13/08/2008] Ajout des objets \texttt{Fusion} et \texttt{Déplacement}. +\item[12/08/2008] Possibilité de couper un objet par un plan. +\item[05/08/2008] Possibilité de numéroter et d'enlever des faces. +\item[01/08/2008] Ajout des solides \texttt{biface} et \texttt{calotte + sphérique pleine}. +\item[30/07/2008] Redéfinition de l'affichage et de la fusion + d'objets. Ajout des solides \texttt{grille} et \texttt{ruban}. +\item[29/07/2008] Debut de la mise en place des transformations + (uniquement disponible pour les objets). +\item[28/07/2008] Ajout d'objets et de la fusion. +\item[19/07/2008] Ajout de la gestion de la lumière. +\item[18/07/2008] Ajout de l'espace de couleurs HSV. +\item[26/06/2008] Ajout des solides de révolution. Premiers essais sur + la fusion de deux objets. +\item[25/06/2008] Ajout des surfaces $z=f(x,y)$. +\item[24/06/2008] Ajout \og des tubes\fg\ dans la représentation des + courbes. Ajout des surfaces paramétrées. +\item[23/06/2008] Lancement de la première version très {\em + expérimentale}. Tout est encore en vrac. La lecture de fichiers + externes au format \verb!OFF! est possible. +\end{description} \ No newline at end of file diff --git a/doc/Hommage.tex b/doc/Hommage.tex new file mode 100644 index 0000000..ab13ac2 --- /dev/null +++ b/doc/Hommage.tex @@ -0,0 +1,377 @@ +\chapter{\texttt{pst-solides3d}} +Bien qu'il y ait de nombreux exemples empruntés à +\texttt{pst-solides3d} dans les parties précédentes, cette partie +constitue un hommage au travail des auteurs de ce package. C'est ma +façon de les remercier pour les conseils, les encouragements et les +approfondissements qu'ils m'ont apportés. +\par C'est également ici que l'on trouvera certaines fonctionnalités +avancées {\em non documentées} et/ou {\em non implantées}. +\paragraph{Exemple 1}\hfill\newline +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=7cm]{figures/hommage11.pdf} + \caption{Une spirale conique} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + %1'9" + figureespace(-10u,-10u,10u,10u); + Initialisation(200,20,20,15); + arcenciel:=true; + incolor:=gris; + draw Tuben("(0.5*t*sin(0.707)*cos(t),0.5*sin(0.707)*t*sin(t),-0.5*t*cos(0.707))","(0.5*sin(0.707)*(cos(t)-t*sin(t)),0.5*sin(0.707)*(sin(t)+t*cos(t)),-0.5*cos(0.707))",0.4,-25.4,508,0.1); + finespace; +\end{lstlisting} +\end{minipage} +\paragraph{Exemple 2}\hfill\newline + \begin{figure}[!ht] + \centering + \includegraphics[scale=0.9]{figures/hommage21.pdf} + \caption{La surface $z=\dfrac{\sin(x^2+y^2)}3$} + \end{figure} +\begin{lstlisting}[frame=tb] + satu:=1; + + %1'9" + figureespace(-10u,-10u,10u,10u); + Initialisation(5000,30,30,40); + arcenciel:=true; + incolor:=0.9[gris,blanc]; + draw SurfZ("sin((X**2+Y**2)/3)",-5,5,-5,5,90,120); + TraceAxesD(4,3,3); + finespace; +\end{lstlisting} +\paragraph{Exemple 3}\hfill\newline +\begin{figure}[!ht] + \centering + \includegraphics{figures/hommage31.pdf} + \caption{La surface $z=xy(x^2-y^2)$} +\end{figure} +\begin{lstlisting}[frame=tb] + %1" + figureespace(-10u,-10u,10u,10u); + Initialisation(500,50,60,40); + arcenciel:=true; + incolor:=0.9[gris,blanc]; + draw SurfZ("X*Y*(X**2-Y**2)*0.1",-3,3,-3,3,30,60); + TraceAxesD(3,3,5); + finespace; +\end{lstlisting} +\paragraph{Exemple 4}\hfill\newline +\begin{minipage}{8cm} + \begin{figurefixe} + \centering + \includegraphics[width=7cm]{figures/hommage41.pdf} + \caption{Un coquillage} + \end{figurefixe} +\end{minipage} +\hfill +\begin{minipage}{10cm} + \begin{lstlisting}[frame=tb] + %2" + figureespace(-10u,-10u,10u,10u); + Initialisation(2000,20,-10,25); + arcenciel:=true; + incolor:=0.5[gris,white]; + draw Sparam("(1.21**v*(sin(u)*cos(u)),1.21**v*(sin(u)**2*sin(v)),1.21**v*(sin(u)**2*cos(v)))",pi/24,11*pi/12,pi/24,0,10*pi/4,pi/24); + TraceAxesD(8,5,5); + finespace; +\end{lstlisting} +\end{minipage} +\paragraph{Exemple 5} Cet exemple nous permet d'utiliser le paramètre +\param{\verb!Ferme1!} qui indique si le solide \no1 est \og fermé\fg +(c'est-à-dire sans creux visibles) ou non (c'est-à-dire avec des creux +visibles ou si l'on souhaite voir l'intérieur du solide). L'intérêt +réside dans une diminution du nombre de faces à traiter; ce qui +contribue à un meilleur temps de compilation.\\Ici, les +paramètres \param{\verb!Ferme1!}\ldots sont tous à \texttt{true} : en +effet, on ne souhaite pas voir l'intérieur des champignons. +\begin{figure} + \centering + \includegraphics[width=7cm]{figures/hommage51.pdf} + \caption{Des champignons} +\end{figure} +\begin{lstlisting}[frame=tb]% + figureespace(-10u,-10u,10u,10u); + Initialisation(500,20,10,10); + + vardef Pp(expr R,h)=(0,0)-- + for k=-33 step 10 until 43: + (cosd(k)*0.5*h-0.2*h,0.3*h+0.5*h*sind(k))-- + endfor + for l=0 step 15 until 90: + (0.8*R*cosd(l)+0.2*R,0.8*R*sind(l)+0.6*h)-- + endfor + (0,h) + enddef;%pour la section des champignons + + outcolor:=blanc; + nb:=30;subh:=15; + h=10;R=5; + Ferme1:=true;%pour ne pas tenir compte des faces non vues + ObjetAnneau1("nbp=18",Pp(R,h)); + angx:=-20; + outcolor:=0.5[rouge,blanc]; + TR:=(-4,2.5,0); + h:=5;R:=2.5; + Ferme2:=true; + ObjetAnneau2("nbp=18",Pp(R,h)); + angx:=30; + TR:=(-4,-4,0); + h:=4;R:=2; + outcolor:=0.5[jaune,white]; + Ferme3:=true; + ObjetAnneau3("nbp=18",Pp(R,h)); + nbobj:=3; + DessineFusion; + finespace; +\end{lstlisting} + \paragraph{Exemple 6} Manuel Luque a proposé un + document\footnote{\url{http://melusine.eu.org/syracuse/mluque/solides3d2007/fusee_tintin/objectif_fusee.pdf}} sur la fusée lunaire utilisée par Tintin dans les deux tomes \og Objetif Lune\fg\ et \og On a marché sur la Lune\fg. J'ai donc repris comme base son travail. + \begin{figure}[!ht] + \centering + \includegraphics{figures/fuseetintin1.pdf} + \caption{La fusée de Tintin} + \end{figure} + \begin{lstlisting}[frame=tb]% + %Il est nécessaire de redéfinir l'ordre des rotations. + vardef Transform(expr PT)=RotX(RotY(RotZ(PT))) + enddef; + + transformation:=true; + + %30" + figureespace(-10u,-10u,10u,10u); + fill feuillet; + for k=1 upto 100: + fill fullcircle scaled (2*uniformdeviate(1)*mm) shifted((uniformdeviate(1))[coinbg,coinbd]+uniformdeviate(1)*(coinhg-coinbg)) withcolor jaune; + endfor; + + Initialisation(500,-50,20,50); + unit:=0.2; + traits:=false; + angx:=-80; + angy:=20; + outcolor:=rouge; + path rocket[]; + rocket1=(0,4.6)--(-0.8,4.6)--(-0.85,5.6)--(-0.95,6.6)--(-1.05,7.6)--(-1.1,8.6)--(-1.2,9.6); + rocket2=(-1.2,9.6)--(-1.25,10.6)--(-1.3,11.6)--(-1.35,12.6)--(-1.4,13.6)--(-1.4,14.6)--(-1.375,15.6)--(-1.27,16.6)--(-1.2,17.6)--(-1.05,18.6); + rocket3=(-1.05,18.6)--(-0.85,19.6)--(-0.65,20.6)--(-0.35,21.6)--(-0.1,22.2)--(-0.1,23.75)--(0,23.75); + subh:=24; + path propulsion; + propulsion=(0,4.6)--(-0.8,4.6)--(0,0); + perso1:=true; + Ferme1:=false; + string couleurperso; + couleurperso="if ((tapj mod 48)=0) or ((tapj mod 48)=1) or ((tapj mod 48)=2) or ((tapj mod 48)=6) or ((tapj mod 48)=7) or ((tapj mod 48)=8) or ((tapj mod 48)=12) or ((tapj mod 48)=13) or ((tapj mod 48)=14) or ((tapj mod 48)=18) or ((tapj mod 48)=19) or ((tapj mod 48)=20) or ((tapj mod 48)=27) or ((tapj mod 48)=28) or ((tapj mod 48)=29) or ((tapj mod 48)=33) or ((tapj mod 48)=34) or ((tapj mod 48)=35) or ((tapj mod 48)=39) or ((tapj mod 48)=40) or ((tapj mod 48)=41) or ((tapj mod 48)=45) or ((tapj mod 48)=46) or ((tapj mod 48)=47):red else: white fi;"; + ObjetAnneau1("nbp=10",rocket2); + outcolor:=rouge; + for k=3 upto 6: + Ferme[k]:=true; + endfor; + incolor:=0.5[jaune,orange]; + Ferme2:=false; + ObjetAnneau2("nbp=7",rocket1); + ObjetAnneau3("nbp=7",rocket3); + Ferme10:=true; + outcolor:=0.5[jaune,orange]; + ObjetAnneau10("nbp=3",propulsion); + outcolor:=rouge; + path amortisseur; + amortisseur=for k=-90 step 10 until 0:(cosd(k),sind(k)+1)--endfor for k=0 step 2 until 22:(cosd(k)*11.78-10.78,11.78*sind(k)+1)-- endfor (0,5.75); + TR:=Image((0,-5,0)); + ObjetAnneau4("nbp=22",amortisseur); + angz:=120; + TR:=(0,0,0); + TR:=Image((0,-5,0)); + ObjetAnneau5("nbp=22",amortisseur); + angz:=-120; + TR:=(0,0,0); + TR:=Image((0,-5,0)); + ObjetAnneau6("nbp=22",amortisseur); + TR:=(0,0,0); + angz:=0; + subh:=1; + ObjetBiface7((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + angz:=120; + ObjetBiface8((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + angz:=-120; + ObjetBiface9((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + nbobj:=10; + DessineFusion; + clip currentpicture to (fullcircle scaled 16cm); + finespace; + end + \end{lstlisting} +On voit ici apparaître les paramètres \param{\verb!perso!}. Ils ont +été spécialement crées pour cette fusée. En effet, le principal +problème pour définir cette fusée est l'alternance des couleurs +blanche et rouge sur le corps de la fusée. Aussi à l'aide de ces +paramètres, on peut faire adopter un style spécial à un objet. Par +contre, il existe une {\em contrainte} : la définition de ce style +spécial doit se faire par le \texttt{string} +\param{\verb!couleurperso!}. +\par Voici un autre exemple\par +\begin{minipage}{8cm} + \includegraphics[width=8cm]{figures/torecolore1.pdf} +\end{minipage} +\hfill +\begin{minipage}{9cm} + \begin{lstlisting}[frame=tb] + perso1:=true; + couleurperso:="if ((tapj div subh) mod 3)=0:if (tapj mod 3)=0: rouge elseif (tapj mod 3)=1: noir else: bleu fi elseif ((tapj div subh) mod 3)=1:if (tapj mod 3)=1: rouge elseif (tapj mod 3)=2: noir else: bleu fi elseif ((tapj div subh) mod 3)=2:if (tapj mod 3)=2: rouge elseif (tapj mod 3)=0: noir else: bleu fi fi;"; + + nb:=12; + subh:=18; + + figureespace(-10u,-10u,10u,10u); + Initialisation(1500,30,20,50); + angy:=25;angz:=-20; + Objettore1("R=3","r=1"); + AffichageObjet1; + finespace; + \end{lstlisting} +\end{minipage} +\paragraph{Exemple 7} Manuel a également construis une +image\footnote{D'autres sont également disponibles à l'adresse +\begin{center} +\url{http://melusine.eu.org/lab/bpst/pst- solides3d/tintin} +\end{center}} melant +le package \texttt{pst-map} et \texttt{pst-solides3d}. Il était +tentant alors de meler \texttt{mp-solides} et \texttt{mp-geo}. +\begin{figure}[!ht] + \centering + \includegraphics{figures/Terrefusee1.pdf} + \caption{La fusée s'éloignant de la Terre} +\end{figure} +\begin{lstlisting}[frame=tb] +%figure obtenue en modifiant un petit peu la macro + %originelle Mappemonde. + input mp-geo + input mp-solid; + + vardef mappemonde(expr longobs,latobs)= + projection:="non"; + Initialisation(5,longobs,latobs,500); + numeric phim,phip,phii;%phi moins -- phi plus - phi intermediaire + phim=Phi+arcsind(rayon/Rho)-90; + phip=Phi+90-arcsind(rayon/Rho); + color pte[]; + pte1=rayon*(cosd(phim)*cosd(Theta),cosd(phim)*sind(Theta),sind(phim)); + pte2=rayon*(cosd(phip)*cosd(Theta),cosd(phip)*sind(Theta),sind(phip)); + pte3=1/2[pte1,pte2]; + pte4-pte3=Normal((0,0,0),pte1,pte2); + if (Phi>90): + phip:=180-phip; + phii:=180-phim; + phim:=phip; + phip:=phii; + fi; + if (Phi<-90): + phip:=-180-phip; + phii:=-180-phim; + phim:=phip; + phip:=phii; + fi; + fill cercles(pte3,pte1,pte3,pte1,pte4) withcolor ciel; + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); + if volcans=true: + Lecturevolcans; + fi; + if lacs=true: + Lecturelacs; + Lecturelacssup; + fi; + Lectureiles; + if capitales=true: + Lecturecapitales; + fi; + if fleuves=true: + Lecturerivieres; + fi; + if maillage=true: + drawoptions(withcolor gris); + MaillageSphere; + drawoptions(); + fi; + if maille=true: + Maille; + fi; + draw cercles(pte3,pte1,pte3,pte1,pte4); + enddef; + + vardef Transform(expr PT)=RotY(RotX(RotZ(PT))) + enddef; + + transformation:=true; + + figureespace(-10u,-10u,10u,10u); + picture terre; + fleuves:=false; + lacs:=false; + capitales:=false; + terre=image( + mappemonde(80,20); + ); + fill feuillet; + for k=1 upto 100: + fill fullcircle scaled (2*uniformdeviate(1)*mm) shifted((uniformdeviate(1))[coinbg,coinbd]+uniformdeviate(1)*(coinhg-coinbg)) withcolor jaune; + endfor; + draw terre; + + Initialisation(500,160,20,50); + unit:=0.2; + traits:=false; + angy:=-60; + outcolor:=rouge; + path rocket[]; + rocket1=(0,4.6)--(-0.8,4.6)--(-0.85,5.6)--(-0.95,6.6)--(-1.05,7.6)--(-1.1,8.6)--(-1.2,9.6); + rocket2=(-1.2,9.6)--(-1.25,10.6)--(-1.3,11.6)--(-1.35,12.6)--(-1.4,13.6)--(-1.4,14.6)--(-1.375,15.6)--(-1.27,16.6)--(-1.2,17.6)--(-1.05,18.6); + rocket3=(-1.05,18.6)--(-0.85,19.6)--(-0.65,20.6)--(-0.35,21.6)--(-0.1,22.2)--(-0.1,23.75)--(0,23.75); + subh:=24; + perso1:=true; + Ferme1:=false; + string couleurperso; + couleurperso="if ((tapj mod 48)=0) or ((tapj mod 48)=1) or ((tapj mod 48)=2) or ((tapj mod 48)=6) or ((tapj mod 48)=7) or ((tapj mod 48)=8) or ((tapj mod 48)=12) or ((tapj mod 48)=13) or ((tapj mod 48)=14) or ((tapj mod 48)=18) or ((tapj mod 48)=19) or ((tapj mod 48)=20) or ((tapj mod 48)=27) or ((tapj mod 48)=28) or ((tapj mod 48)=29) or ((tapj mod 48)=33) or ((tapj mod 48)=34) or ((tapj mod 48)=35) or ((tapj mod 48)=39) or ((tapj mod 48)=40) or ((tapj mod 48)=41) or ((tapj mod 48)=45) or ((tapj mod 48)=46) or ((tapj mod 48)=47):red else: white fi;"; + TR:=(0,-15,0); + ObjetAnneau1("nbp=10",rocket2); + outcolor:=rouge; + for k=2 upto 6: + Ferme[k]:=true; + endfor; + ObjetAnneau2("nbp=7",rocket1); + ObjetAnneau3("nbp=7",rocket3); + path amortisseur; + amortisseur=for k=-90 step 10 until 0:(cosd(k),sind(k)+1)--endfor for k=0 step 2 until 22:(cosd(k)*11.78-10.78,11.78*sind(k)+1)-- endfor (0,5.75); + TR:=(0,-15,0)+(0,-5,0); + ObjetAnneau4("nbp=22",amortisseur); + angz:=150; + TR:=(0,0,0); + TR:=(0,-15,0)+Image((0,-5,0)); + ObjetAnneau5("nbp=22",amortisseur); + angz:=-90; + TR:=(0,0,0); + TR:=(0,-15,0)+Image((0,-5,0)); + ObjetAnneau6("nbp=22",amortisseur); + TR:=(0,-15,0)+(0,0,0); + angz:=0; + subh:=1; + ObjetBiface7((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + angz:=150; + ObjetBiface8((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + angz:=-90; + ObjetBiface9((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); + nbobj:=9; + DessineFusion; + finespace; + end +\end{lstlisting} \ No newline at end of file diff --git a/doc/Presentation.tex b/doc/Presentation.tex new file mode 100644 index 0000000..a704a79 --- /dev/null +++ b/doc/Presentation.tex @@ -0,0 +1,158 @@ +\chapter{Présentation} +\begin{flushleft} +{\em +Un mathématicien n'a pas parfaitement compris ses propres travaux tant +qu'il ne les a pas clarifiés au point de pouvoir aller dans la rue les +expliquer à la première personne venue.} +\par\hfill {\sc Joseph-Louis Lagrange} +\end{flushleft} +\begin{Danger} + Avant toutes choses, je tiens particulièrement à remercier + chaleureusement les auteurs de \texttt{pst-solides3d} pour leur aide + et leur accord quant à l'utilisation de la terminologie et de + nombreux exemples de leur documentation. +\end{Danger} +\section{Constitution du package} +\begin{itemize} +\item Fichier \texttt{mp-solid.mp}. +\item Documentation et exemples : \texttt{doc.tgz(pdf)}. +\end{itemize} +Ce package est disponible à l'url +\url{http://syracuse.eu.org/syracuse/...}. +\section{Introduction} +\'Emerveillé, comme tout à chacun, par les prouesses de +\texttt{pst-solides3d}, je me suis posé la question de savoir si cela +était réalisable avec \MP. Malheureuse question, car pas mal de temps +il m'a fallu\footnote{Yoda est avec moi !} pour aboutir à cette +première version\ldots Temps de codage, d'apprentissage, de révision +de mes connaissances mathématiques,\ldots ont été très chronophage.\\ +Mes sources d'inspiration ont été \verb!pst-solides3d! (en parcourant +le code), les auteurs ({\em merveilleux auteurs}) de ce package et le +livre \og Graphisme scientifique sur ordinateur\fg\ de Raymond {\sc Dony}. +\section{Le package} +\texttt{mp-solid} contient les macros nécessaires pour les tracés +demandés. Certaines macros ont été reprises de +\texttt{geometriesyr16}\footnote{Package dédié à la + géométrie. Disponible à \url{melusine.eu.org/syracuse/poulecl/geometriesyr16/}.}, +de \texttt{donymodule}\footnote{Package complémentaire de + \texttt{geometriesyr16} pour la gestion des figures géométriques de + l'espace. Disponible en téléchargeant \texttt{geometriesyr16}.}. Je +dois remercier également Anthony {\sc Phan} et son package +\texttt{m3D}\footnote{Disponible à l'adresse \url{http://www-math.univ-poitiers.fr/~phan/m3Dplain.html}} pour m'avoir +permis de clarifier certaines conventions dans les représentations +spatiales\ldots +\par \texttt{mp-solid} {\em semble} être moins gourmand en ressources +\MP\ que \verb!mp-geo!\footnote{Package permettant le tracé de + représentations terrestres spatiales ou planes disponibles à + l'adresse \begin{center} +\url{http://syracuse-dev.org/mpst-globe/browser/trunk/mp-geo} +\end{center} +}; cependant, pour +certains exemples, le temps de compilation est assez +long\footnote{Dans la mesure du possible, les temps de compilation + importants seront indiqués.}. +\section{Généralités} +\subsection{Le choix du point de vue} +\begin{figure}[h] + \centering + \includegraphics{figures/choixvue1.pdf} + \caption{Position du point de vue.} +\end{figure} +Les coordonnées de l'objet, ici le cube violet, sont données sous +forme de \texttt{color} dans le repère $Oxyz$. Les coordonnées du +point de vue $V$, sont données dans ce même repère en coordonnées +sphériques sous la forme +\begin{center} + \macro{\texttt{Initialisation(5,30,20,50)}} +\end{center} +5 étant le rayon de la sphère de centre $(0,0,0)$, $\phi=30$\degres\ et +$\theta=20$\degres. +\\L'écran est placé perpendiculairement à la direction $\vecteur{OV}$, +à une distance de $V$ égale à 50. +\begin{Danger} + Le rayon de la sphère n'est, {\em mathématiquement}, pas + important. En effet, la projection choisie est une projection + perspective. Seuls importent $\phi$, $\theta$ et la distance à + l'écran. +\par Par contre, il a un intérêt de précision dans les calculs de +\MP; c'est pour cela que bien souvent une valeur de 500 voire de +1\,000 sera choisie. +\end{Danger} +Les axes peuvent être représentés {\em en traits d'axes} par la macro +\macro{\verb!TraceAxesD(xmax,ymax,zmax)!} : les axes $[Ox)$, $[Oy)$, +$[Oz)$ seront représenté de l'origine respectivement jusqu'au point +$(\verb!xmax!;0;0)$, $(0;\verb!ymax!;0)$, $(0;0;\verb!zmax!)$. +\\Il existe une autre possibilité : \macro{\verb!TraceAxes!} qui trace +les axes en traits d'axes colorés mais avec $\verb!xmax!=\verb!ymax!=\verb!zmax!=5$. +\subsection{Les couleurs} +Pour la représentation des solides, il y a deux façons de définir la +coloration des faces : +\begin{itemize} +\item soit avec les paramètres de type \texttt{color} : + \param{\texttt{incolor}} (couleur intérieure) et + \param{\texttt{outcolor}} (couleur extérieure); +\item soit avec les paramètres \param{\texttt{arcenciel}} (de type + \texttt{boolean}) et \texttt{incolor}. +\end{itemize} +\begin{figure}[h] + \centering + \subfigure[\texttt{outcolor} et + \texttt{incolor}]{\includegraphics[scale=0.6]{figures/couleurs1.pdf}}\hfill\subfigure[\texttt{arcenciel} et \texttt{incolor}]{\includegraphics[scale=0.6]{figures/couleurs2.pdf}} + \caption{Exemples d'utilisation de \texttt{incolor}, \texttt{outcolor} et \texttt{arcenciel}.} +\end{figure} +Pour colorer, on dispose des espaces de couleur suivants : +\begin{itemize} + \item l'espace RGB (classique de \MP); + \item l'espace HSV.\par + \begin{figure}[h] + \centering + \includegraphics{figures/hsv1.pdf} + \caption{Une représentation de l'espace de couleurs HSV.} + \end{figure} + Ce dernier type n'étant pas implanté dans \MP, il + s'utilise de la façon suivante\footnote{Les formules de conversions + ont été obtenues à l'adresse \url{http://en.wikipedia.org/wiki/HSL_color_space}.}: + \begin{center} + \macro{\verb!Hsvtorgb(a,s,l)!} + \end{center} + où \param{\texttt{a}} est la teinte donnée sous la forme d'un angle compris + entre 0\degres\ et 360\degres, \param{\texttt{s}} la saturation + (entre 0 (non saturée) et 1 (saturée)), \param{\texttt{v}} la + valeur (qui peut se confondre avec la luminosité) (entre 0 et + 1). Par défaut, la saturation est égale à 0.45 et la luminosité à + 1. On peut les modifier à l'aide des paramètres numériques + \param{\texttt{satu}} et \param{\texttt{lum}}. Par exemple, on + peut obtenir les dégradés suivants : + \begin{figure}[ht] + \centering + \subfigure[degradé de rouge à vert dans l'espace + RGB]{\includegraphics[scale=0.5]{figures/grillergb1.pdf}}\hfill\subfigure[degradé de 0\degres\ à + 360\degres\ dans l'espace HSV (saturation et luminosité + maximale)]{\includegraphics[scale=0.5]{figures/grillehsv1.pdf}} + \hfill\subfigure[degradé de 0\degres\ à + 360\degres\ dans l'espace HSV (saturation à 0.5 et luminosité + maximale)]{\includegraphics[scale=0.5]{figures/grillehsv11.pdf}} + \caption{Dégradés dans les espaces de couleurs} + \end{figure} + \end{itemize} +\subsection{Gestion des ombres} +La lumière est gérée avec la méthode de {\sc Lambert}. Par défaut, la +gestion de la lumière est active. On peut la désactiver grâce au +booléen \param{\texttt{eclairage}}.\\Il n'y a pas de position par +défaut de la lumière, {\em il ne faut donc pas oublier de la + positionner}.\\L'intensité lumineuse se règle avec le +paramètre numérique \param{\texttt{intensite}}. Par défaut, elle est +réglée à 2. +\begin{figure}[h] + \centering + \subfigure[Sans + lumière]{\includegraphics[scale=0.7]{figures/noeud43.pdf}}\hfill\subfigure[Avec lumière]{\includegraphics[scale=0.7]{figures/noeud44.pdf}} + \caption{Utilisation ou non de la lumière} +\end{figure} +\par Voici trois exemples où la source lumineuse se déplace sur l'axe $z$ : +$(0;0;0)$ puis $(0;0;3)$ et enfin $(0;0;10)$. +\begin{figure}[ht] + \centering + \subfigure[Position 1]{\includegraphics[scale=0.35]{figures/source1.pdf}}\hfill\subfigure[Position 2]{\includegraphics[scale=0.35]{figures/source2.pdf}}\hfill\subfigure[Position 3]{\includegraphics[scale=0.35]{figures/source3.pdf}} + \caption{Diverses positions de la source lumineuse} +\end{figure} \ No newline at end of file diff --git a/doc/doc.tex b/doc/doc.tex new file mode 100644 index 0000000..a59c37f --- /dev/null +++ b/doc/doc.tex @@ -0,0 +1,110 @@ +\documentclass[12pt]{book} + +%by JCC +CP pour le lien lors d'une compilation avec pdflatex :) +\makeatletter +\newenvironment{figurefixe}{% +\begingroup +\parskip=0pt +% rôle de \caption +\def\caption##1{\refstepcounter{figure} + \protected@write\@auxout{}% + {\string\@writefile{lof}{\string\contentsline% + {figure}{\string\numberline {\thefigure}{\ignorespaces% +##1}}{\thepage}{figure.\thefigure}}}% + \par\bigskip + \hbox to \hsize{\hss \figurename~\thefigure\CaptionSeparator +##1\hss}}% + \par\bigskip +% rôle de \label +\def\label##1{\protected@write\@auxout{}% + {\string\newlabel {##1}{{\thefigure}{\thepage}}}}% +% préparation contenu +\par\vspace{-6pt}\hbox\bgroup\vbox\bgroup}{\egroup\egroup\par\null\endgroup} +\makeatother +%endJCC + +\usepackage[utf8]{inputenc} +\usepackage[T1]{fontenc} +\usepackage[frenchb]{babel} +\parindent0pt +\usepackage[a4paper,margin=1.25cm,includeheadfoot]{geometry} +\usepackage{graphicx} +\usepackage{fourier} +\usepackage[scaled=0.875]{helvet} +\usepackage{mflogo} +\usepackage[colorlinks=true]{hyperref} +\usepackage{url,calc,subfigure,tabularx,amsmath,multicol} +\usepackage{listings} +\lstset{language=metapost,breaklines=true,numbers=left,numberfirstline=true,stepnumber=5,numbersep=1pt,numberstyle=\tiny,firstnumber=1,basicstyle=\footnotesize,commentstyle=\itshape\color{red}}%numéroter les listings + +\newcommand{\macro}[1]{% +\colorbox{yellow}{#1}% +} + +\newcommand{\param}[1]{% +\colorbox{cyan}{#1}% +} + +\usepackage{tikz} +\usetikzlibrary{shapes} +\usetikzlibrary{topaths} +\newsavebox{\dangerbox} +\newlength{\marge}\setlength{\marge}{7.5mm} + +\newenvironment{Danger}{% + \begin{lrbox}{\dangerbox} + \begin{minipage}{\linewidth-\marge} +} +{% +\end{minipage}% + \end{lrbox} +\tikzstyle{mybox} = [draw=blue!20, fill=red!20, very thick, + rectangle, rounded corners, inner sep=10pt] +\par\noindent +\begin{tikzpicture} +\node [mybox] (box) {% + \begin{minipage}[t!]{\linewidth-\marge} + \usebox{\dangerbox} + \end{minipage} + }; +\end{tikzpicture} +\par +} + +\newcommand\abstractname{Résumé} + +\makeatletter + \newenvironment{abstract}{% + %\titlepage + \null\vfil + \@beginparpenalty\@lowpenalty + \begin{center}% + \bfseries \abstractname + \@endparpenalty\@M + \end{center}}% + {\par\vfil\null}%\endtitlepage} +\makeatother + +\input{christ5} +\title{\texttt{mp-solid}\[\includegraphics[scale=0.8]{figures/npresentation1.pdf}\]} +\author{Christophe Poulain} +\date{Version 1 -- \today%\par +\begin{abstract} +Package permettant de construire des solides, des courbes de + l'espace avec de nombreux apports dus à + \texttt{pst-solides3d}.\footnote{Remercions de suite Jean-Paul {\sc + Vignault} et Manuel {\sc Luque} pour ce magnifique (et le mot + est {\em faible}) package \texttt{pstricks}.} +\end{abstract} +} + +\begin{document} +\maketitle +\tableofcontents +\input{Presentation} +\input{Dessinons} +\input{Fusion} +\input{Hommage} +\input{Historique} +\listoffigures +\end{document} \ No newline at end of file diff --git a/doc/figures/Banane.1 b/doc/figures/Banane.1 new file mode 100644 index 0000000..7d15850 --- /dev/null +++ b/doc/figures/Banane.1 @@ -0,0 +1,1765 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -114 -114 114 114 +%%HiResBoundingBox: -113.3858 -113.3858 113.3858 113.3858 +%%Creator: MetaPost 1.208 +%%CreationDate: 2011.01.25:2231 +%%Pages: 1 +%%DocumentResources: procset mpost-minimal +%%DocumentSuppliedResources: procset mpost-minimal +%%EndComments +%%BeginProlog +%%BeginResource: procset mpost-minimal +/bd{bind def}bind def/fshow {exch findfont exch scalefont setfont show}bd +/fcp{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall}bd +/fmc{FontMatrix dup length array copy dup dup}bd/fmd{/FontMatrix exch def}bd +/Amul{4 -1 roll exch mul 1000 div}bd/ExtendFont{fmc 0 get Amul 0 exch put fmd}bd +/ScaleFont{dup fmc 0 get Amul 0 exch put dup dup 3 get Amul 3 exch put fmd}bd +/SlantFont{fmc 2 get dup 0 eq{pop 1}if Amul FontMatrix 0 get mul 2 exch put fmd}bd +%%EndResource +%%EndProlog +%%BeginSetup +%%EndSetup +%%Page: 1 1 +gsave newpath -113.3858 -113.3858 moveto +-113.3858 113.3858 lineto +113.3858 113.3858 lineto +113.3858 -113.3858 lineto + closepath clip + 0 0 0 setrgbcolor +newpath -113.3858 -113.3858 moveto +-113.3858 113.3858 lineto +113.3858 113.3858 lineto +113.3858 -113.3858 lineto + closepath fill + 0.00153 0.00153 0 setrgbcolor +newpath 26.36185 -41.70647 moveto +21.65222 -44.81277 lineto +25.00076 -42.6426 lineto +30.439 -39.06403 lineto + closepath fill + 0 0 0 setrgbcolor 0 0.25 dtransform truncate idtransform setlinewidth pop + [] 0 setdash 1 setlinejoin 10 setmiterlimit +newpath 26.36185 -41.70647 moveto +21.65222 -44.81277 lineto +25.00076 -42.6426 lineto +30.439 -39.06403 lineto + closepath stroke + 0.00156 0.00156 0 setrgbcolor +newpath -30.43861 -39.06403 moveto +-25.00038 -42.6426 lineto +-21.65108 -44.81316 lineto +-26.3607 -41.70685 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -30.43861 -39.06403 moveto +-25.00038 -42.6426 lineto +-21.65108 -44.81316 lineto +-26.3607 -41.70685 lineto + closepath stroke + 0.04031 0.04031 0 setrgbcolor +newpath 0.00076 -49.80965 moveto +0 -49.95193 lineto +3.26309 -49.79973 lineto +6.47125 -49.50829 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00076 -49.80965 moveto +0 -49.95193 lineto +3.26309 -49.79973 lineto +6.47125 -49.50829 lineto + closepath stroke + 0.04117 0.04117 0 setrgbcolor +newpath -6.46973 -49.50829 moveto +-3.26309 -49.80011 lineto +0 -49.95193 lineto +0.00076 -49.80965 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -6.46973 -49.50829 moveto +-3.26309 -49.80011 lineto +0 -49.95193 lineto +0.00076 -49.80965 lineto + closepath stroke + 0.08295 0.08295 0 setrgbcolor +newpath 30.6202 -37.88643 moveto +26.36185 -41.70647 lineto +30.439 -39.06403 lineto +35.35614 -34.81712 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 30.6202 -37.88643 moveto +26.36185 -41.70647 lineto +30.439 -39.06403 lineto +35.35614 -34.81712 lineto + closepath stroke + 0.08313 0.08313 0 setrgbcolor +newpath -35.35652 -34.81712 moveto +-30.43861 -39.06403 lineto +-26.3607 -41.70685 lineto +-30.61867 -37.88681 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -35.35652 -34.81712 moveto +-30.43861 -39.06403 lineto +-26.3607 -41.70685 lineto +-30.61867 -37.88681 lineto + closepath stroke + 0.05692 0.05692 0 setrgbcolor +newpath 5.64651 49.38545 moveto +11.20262 48.68698 lineto +6.46706 49.50905 lineto +3.25928 49.79973 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 5.64651 49.38545 moveto +11.20262 48.68698 lineto +6.46706 49.50905 lineto +3.25928 49.79973 lineto + closepath stroke + 0.05704 0.05704 0 setrgbcolor +newpath -3.26042 49.79973 moveto +-6.46896 49.50905 lineto +-11.20338 48.6866 lineto +-5.6469 49.38545 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -3.26042 49.79973 moveto +-6.46896 49.50905 lineto +-11.20338 48.6866 lineto +-5.6469 49.38545 lineto + closepath stroke + 0.07532 0.07532 0 setrgbcolor +newpath 19.12918 45.49446 moveto +24.99542 42.64565 lineto +21.6465 44.81621 lineto +16.5657 47.155 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 19.12918 45.49446 moveto +24.99542 42.64565 lineto +21.6465 44.81621 lineto +16.5657 47.155 lineto + closepath stroke + 0.07504 0.07504 0 setrgbcolor +newpath -16.56647 47.155 moveto +-21.64688 44.81583 lineto +-24.99504 42.64565 lineto +-19.12956 45.49408 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -16.56647 47.155 moveto +-21.64688 44.81583 lineto +-24.99504 42.64565 lineto +-19.12956 45.49408 lineto + closepath stroke + 0.13162 0.13162 0 setrgbcolor +newpath 9.56764 -48.36922 moveto +6.47125 -49.50829 lineto +11.20758 -48.68584 lineto +16.57143 -47.15309 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 9.56764 -48.36922 moveto +6.47125 -49.50829 lineto +11.20758 -48.68584 lineto +16.57143 -47.15309 lineto + closepath stroke + 0.13147 0.13147 0 setrgbcolor +newpath -16.57104 -47.15271 moveto +-11.20758 -48.68584 lineto +-6.46973 -49.50829 lineto +-9.5665 -48.36922 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -16.57104 -47.15271 moveto +-11.20758 -48.68584 lineto +-6.46973 -49.50829 lineto +-9.5665 -48.36922 lineto + closepath stroke + 0.16183 0.16183 0 setrgbcolor +newpath 34.35516 -33.4179 moveto +30.6202 -37.88643 lineto +35.35614 -34.81712 lineto +39.66942 -29.9736 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 34.35516 -33.4179 moveto +30.6202 -37.88643 lineto +35.35614 -34.81712 lineto +39.66942 -29.9736 lineto + closepath stroke + 0.16223 0.16223 0 setrgbcolor +newpath -39.66866 -29.97398 moveto +-35.35652 -34.81712 lineto +-30.61867 -37.88681 lineto +-34.35402 -33.41827 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -39.66866 -29.97398 moveto +-35.35652 -34.81712 lineto +-30.61867 -37.88681 lineto +-34.35402 -33.41827 lineto + closepath stroke + 0.15594 0.15594 0 setrgbcolor +newpath 12.93564 47.56393 moveto +19.12918 45.49446 lineto +16.5657 47.155 lineto +11.20262 48.68698 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 12.93564 47.56393 moveto +19.12918 45.49446 lineto +16.5657 47.155 lineto +11.20262 48.68698 lineto + closepath stroke + 0.15604 0.15604 0 setrgbcolor +newpath -11.20262 48.68698 moveto +-16.56647 47.155 lineto +-19.12956 45.49408 lineto +-12.93564 47.56393 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -11.20262 48.68698 moveto +-16.56647 47.155 lineto +-19.12956 45.49408 lineto +-12.93564 47.56393 lineto + closepath stroke + 0.2373 0.2373 0 setrgbcolor +newpath 37.5019 -28.37791 moveto +34.35516 -33.4179 lineto +39.66942 -29.9736 lineto +43.30177 -24.61815 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 37.5019 -28.37791 moveto +34.35516 -33.4179 lineto +39.66942 -29.9736 lineto +43.30177 -24.61815 lineto + closepath stroke + 0.2373 0.2373 0 setrgbcolor +newpath -43.30177 -24.61853 moveto +-39.66866 -29.97398 lineto +-34.35402 -33.41827 lineto +-37.50038 -28.37791 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -43.30177 -24.61853 moveto +-39.66866 -29.97398 lineto +-34.35402 -33.41827 lineto +-37.50038 -28.37791 lineto + closepath stroke + 0.21637 0.21637 0 setrgbcolor +newpath -0.00305 49.23935 moveto +3.25928 49.79973 lineto +-0.00076 49.95155 lineto +0 49.23897 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -0.00305 49.23935 moveto +3.25928 49.79973 lineto +-0.00076 49.95155 lineto +0 49.23897 lineto + closepath stroke + 0.21387 0.21387 0 setrgbcolor +newpath 0 49.23897 moveto +-0.00076 49.95155 lineto +-3.26042 49.79973 lineto +0.00305 49.23935 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0 49.23897 moveto +-0.00076 49.95155 lineto +-3.26042 49.79973 lineto +0.00305 49.23935 lineto + closepath stroke + 0.23483 0.23483 0 setrgbcolor +newpath 6.52008 48.81935 moveto +12.93564 47.56393 lineto +11.20262 48.68698 lineto +5.64651 49.38545 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 6.52008 48.81935 moveto +12.93564 47.56393 lineto +11.20262 48.68698 lineto +5.64651 49.38545 lineto + closepath stroke + 0.23422 0.23422 0 setrgbcolor +newpath -5.64651 49.38545 moveto +-11.20262 48.68698 lineto +-12.93564 47.56393 lineto +-6.52008 48.81935 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -5.64651 49.38545 moveto +-11.20262 48.68698 lineto +-12.93564 47.56393 lineto +-6.52008 48.81935 lineto + closepath stroke + 0.24875 0.24875 0 setrgbcolor +newpath -0.00534 49.23973 moveto +5.64651 49.38545 lineto +3.25928 49.79973 lineto +-0.00305 49.23935 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -0.00534 49.23973 moveto +5.64651 49.38545 lineto +3.25928 49.79973 lineto +-0.00305 49.23935 lineto + closepath stroke + 0.24835 0.24835 0 setrgbcolor +newpath 0.00305 49.23935 moveto +-3.26042 49.79973 lineto +-5.6469 49.38545 lineto +0.00534 49.23973 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00305 49.23935 moveto +-3.26042 49.79973 lineto +-5.6469 49.38545 lineto +0.00534 49.23973 lineto + closepath stroke + 0.30045 0.30045 0 setrgbcolor +newpath 0.00076 -48.81439 moveto +0.00076 -49.80965 lineto +6.47125 -49.50829 lineto +9.56764 -48.36922 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00076 -48.81439 moveto +0.00076 -49.80965 lineto +6.47125 -49.50829 lineto +9.56764 -48.36922 lineto + closepath stroke + 0.30063 0.30063 0 setrgbcolor +newpath -9.5665 -48.36922 moveto +-6.46973 -49.50829 lineto +0.00076 -49.80965 lineto +0.00076 -48.81439 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -9.5665 -48.36922 moveto +-6.46973 -49.50829 lineto +0.00076 -49.80965 lineto +0.00076 -48.81439 lineto + closepath stroke + 0.32169 0.32169 0 setrgbcolor +newpath 12.50114 -46.40198 moveto +9.56764 -48.36922 lineto +16.57143 -47.15309 lineto +21.65222 -44.81277 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 12.50114 -46.40198 moveto +9.56764 -48.36922 lineto +16.57143 -47.15309 lineto +21.65222 -44.81277 lineto + closepath stroke + 0.32098 0.32098 0 setrgbcolor +newpath -21.65108 -44.81316 moveto +-16.57104 -47.15271 lineto +-9.5665 -48.36922 lineto +-12.49962 -46.40198 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.65108 -44.81316 moveto +-16.57104 -47.15271 lineto +-9.5665 -48.36922 lineto +-12.49962 -46.40198 lineto + closepath stroke + 0.30838 0.30838 0 setrgbcolor +newpath 40.00702 -22.85194 moveto +37.5019 -28.37791 lineto +43.30177 -24.61815 lineto +46.19446 -18.84117 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.00702 -22.85194 moveto +37.5019 -28.37791 lineto +43.30177 -24.61815 lineto +46.19446 -18.84117 lineto + closepath stroke + 0.3085 0.3085 0 setrgbcolor +newpath -46.19408 -18.84155 moveto +-43.30177 -24.61853 lineto +-37.50038 -28.37791 lineto +-40.00511 -22.85194 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -46.19408 -18.84155 moveto +-43.30177 -24.61853 lineto +-37.50038 -28.37791 lineto +-40.00511 -22.85194 lineto + closepath stroke + 0.3092 0.3092 0 setrgbcolor +newpath -0.0061 49.24011 moveto +6.52008 48.81935 lineto +5.64651 49.38545 lineto +-0.00534 49.23973 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -0.0061 49.24011 moveto +6.52008 48.81935 lineto +5.64651 49.38545 lineto +-0.00534 49.23973 lineto + closepath stroke + 0.31107 0.31107 0 setrgbcolor +newpath 0.00534 49.23973 moveto +-5.64651 49.38545 lineto +-6.52008 48.81935 lineto +0.0061 49.24011 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00534 49.23973 moveto +-5.64651 49.38545 lineto +-6.52008 48.81935 lineto +0.0061 49.24011 lineto + closepath stroke + 0.37375 0.37375 0 setrgbcolor +newpath 41.82777 -16.93497 moveto +40.00702 -22.85194 lineto +46.19446 -18.84117 lineto +48.29712 -12.74185 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 41.82777 -16.93497 moveto +40.00702 -22.85194 lineto +46.19446 -18.84117 lineto +48.29712 -12.74185 lineto + closepath stroke + 0.37363 0.37363 0 setrgbcolor +newpath -48.29712 -12.74223 moveto +-46.19408 -18.84155 lineto +-40.00511 -22.85194 lineto +-41.82587 -16.93535 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -48.29712 -12.74223 moveto +-46.19408 -18.84155 lineto +-40.00511 -22.85194 lineto +-41.82587 -16.93535 lineto + closepath stroke + 0.37708 0.37708 0 setrgbcolor +newpath -0.00534 49.2405 moveto +5.64651 48.25325 lineto +6.52008 48.81935 lineto +-0.0061 49.24011 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -0.00534 49.2405 moveto +5.64651 48.25325 lineto +6.52008 48.81935 lineto +-0.0061 49.24011 lineto + closepath stroke + 0.379 0.379 0 setrgbcolor +newpath 0.0061 49.24011 moveto +-6.52008 48.81935 lineto +-5.64651 48.25325 lineto +0.00534 49.2405 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.0061 49.24011 moveto +-6.52008 48.81935 lineto +-5.64651 48.25325 lineto +0.00534 49.2405 lineto + closepath stroke + 0.43259 0.43259 0 setrgbcolor +newpath 42.93251 -10.72845 moveto +41.82777 -16.93497 lineto +48.29712 -12.74185 lineto +49.57275 -6.42433 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.93251 -10.72845 moveto +41.82777 -16.93497 lineto +48.29712 -12.74185 lineto +49.57275 -6.42433 lineto + closepath stroke + 0.43262 0.43262 0 setrgbcolor +newpath -49.57275 -6.42471 moveto +-48.29712 -12.74223 lineto +-41.82587 -16.93535 lineto +-42.9306 -10.72884 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -49.57275 -6.42471 moveto +-48.29712 -12.74223 lineto +-41.82587 -16.93535 lineto +-42.9306 -10.72884 lineto + closepath stroke + 0.44 0.44 0 setrgbcolor +newpath -0.00305 49.24088 moveto +3.26004 47.83897 lineto +5.64651 48.25325 lineto +-0.00534 49.2405 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -0.00305 49.24088 moveto +3.26004 47.83897 lineto +5.64651 48.25325 lineto +-0.00534 49.2405 lineto + closepath stroke + 0.4396 0.4396 0 setrgbcolor +newpath 0.00534 49.2405 moveto +-5.64651 48.25325 lineto +-3.26004 47.83897 lineto +0.00305 49.24088 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00534 49.2405 moveto +-5.64651 48.25325 lineto +-3.26004 47.83897 lineto +0.00305 49.24088 lineto + closepath stroke + 0.44107 0.44107 0 setrgbcolor +newpath 5.64651 48.25325 moveto +11.203 46.44089 lineto +12.93564 47.56393 lineto +6.52008 48.81935 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 5.64651 48.25325 moveto +11.203 46.44089 lineto +12.93564 47.56393 lineto +6.52008 48.81935 lineto + closepath stroke + 0.44043 0.44043 0 setrgbcolor +newpath -6.52008 48.81935 moveto +-12.93564 47.56393 lineto +-11.20262 46.44089 lineto +-5.64651 48.25325 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -6.52008 48.81935 moveto +-12.93564 47.56393 lineto +-11.20262 46.44089 lineto +-5.64651 48.25325 lineto + closepath stroke + 0.50397 0.50397 0 setrgbcolor +newpath 15.22102 -43.64128 moveto +12.50114 -46.40198 lineto +21.65222 -44.81277 lineto +26.36185 -41.70647 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 15.22102 -43.64128 moveto +12.50114 -46.40198 lineto +21.65222 -44.81277 lineto +26.36185 -41.70647 lineto + closepath stroke + 0.50418 0.50418 0 setrgbcolor +newpath -26.3607 -41.70685 moveto +-21.65108 -44.81316 lineto +-12.49962 -46.40198 lineto +-15.21873 -43.64128 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -26.3607 -41.70685 moveto +-21.65108 -44.81316 lineto +-12.49962 -46.40198 lineto +-15.21873 -43.64128 lineto + closepath stroke + 0.47186 0.47186 0 setrgbcolor +newpath 0.00305 49.24088 moveto +-3.26004 47.83897 lineto +0 47.68715 lineto +0 49.24126 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00305 49.24088 moveto +-3.26004 47.83897 lineto +0 47.68715 lineto +0 49.24126 lineto + closepath stroke + 0.47437 0.47437 0 setrgbcolor +newpath 0 49.24126 moveto +0 47.68715 lineto +3.26004 47.83897 lineto +-0.00305 49.24088 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0 49.24126 moveto +0 47.68715 lineto +3.26004 47.83897 lineto +-0.00305 49.24088 lineto + closepath stroke + 0.48428 0.48428 0 setrgbcolor +newpath 43.30254 -4.33769 moveto +42.93251 -10.72845 lineto +49.57275 -6.42433 lineto +50 0.00343 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.30254 -4.33769 moveto +42.93251 -10.72845 lineto +49.57275 -6.42433 lineto +50 0.00343 lineto + closepath stroke + 0.4845 0.4845 0 setrgbcolor +newpath -50 0.00305 moveto +-49.57275 -6.42471 lineto +-42.9306 -10.72884 lineto +-43.30063 -4.33769 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -50 0.00305 moveto +-49.57275 -6.42471 lineto +-42.9306 -10.72884 lineto +-43.30063 -4.33769 lineto + closepath stroke + 0.49417 0.49417 0 setrgbcolor +newpath 11.203 46.44089 moveto +16.56685 43.83316 lineto +19.12918 45.49446 lineto +12.93564 47.56393 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 11.203 46.44089 moveto +16.56685 43.83316 lineto +19.12918 45.49446 lineto +12.93564 47.56393 lineto + closepath stroke + 0.4942 0.4942 0 setrgbcolor +newpath -12.93564 47.56393 moveto +-19.12956 45.49408 lineto +-16.56609 43.83316 lineto +-11.20262 46.44089 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -12.93564 47.56393 moveto +-19.12956 45.49408 lineto +-16.56609 43.83316 lineto +-11.20262 46.44089 lineto + closepath stroke + 0.55325 0.55325 0 setrgbcolor +newpath 0.00114 -46.98372 moveto +0.00076 -48.81439 lineto +9.56764 -48.36922 lineto +12.50114 -46.40198 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00114 -46.98372 moveto +0.00076 -48.81439 lineto +9.56764 -48.36922 lineto +12.50114 -46.40198 lineto + closepath stroke + 0.55347 0.55347 0 setrgbcolor +newpath -12.49962 -46.40198 moveto +-9.5665 -48.36922 lineto +0.00076 -48.81439 lineto +0.00114 -46.98372 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -12.49962 -46.40198 moveto +-9.5665 -48.36922 lineto +0.00076 -48.81439 lineto +0.00114 -46.98372 lineto + closepath stroke + 0.5282 0.5282 0 setrgbcolor +newpath 42.93175 2.12631 moveto +43.30254 -4.33769 lineto +50 0.00343 lineto +49.57161 6.43005 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.93175 2.12631 moveto +43.30254 -4.33769 lineto +50 0.00343 lineto +49.57161 6.43005 lineto + closepath stroke + 0.52829 0.52829 0 setrgbcolor +newpath -49.57161 6.43005 moveto +-50 0.00305 lineto +-43.30063 -4.33769 lineto +-42.93022 2.12631 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -49.57161 6.43005 moveto +-50 0.00305 lineto +-43.30063 -4.33769 lineto +-42.93022 2.12631 lineto + closepath stroke + 0.53864 0.53864 0 setrgbcolor +newpath 16.56685 43.83316 moveto +21.64726 40.47546 lineto +24.99542 42.64565 lineto +19.12918 45.49446 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 16.56685 43.83316 moveto +21.64726 40.47546 lineto +24.99542 42.64565 lineto +19.12918 45.49446 lineto + closepath stroke + 0.53839 0.53839 0 setrgbcolor +newpath -19.12956 45.49408 moveto +-24.99504 42.64565 lineto +-21.64688 40.47546 lineto +-16.56609 43.83316 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -19.12956 45.49408 moveto +-24.99504 42.64565 lineto +-21.64688 40.47546 lineto +-16.56609 43.83316 lineto + closepath stroke + 0.56384 0.56384 0 setrgbcolor +newpath 41.82663 8.55522 moveto +42.93175 2.12631 lineto +49.57161 6.43005 lineto +48.2956 12.74834 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 41.82663 8.55522 moveto +42.93175 2.12631 lineto +49.57161 6.43005 lineto +48.2956 12.74834 lineto + closepath stroke + 0.56363 0.56363 0 setrgbcolor +newpath -48.29521 12.74796 moveto +-49.57161 6.43005 lineto +-42.93022 2.12631 lineto +-41.82472 8.55522 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -48.29521 12.74796 moveto +-49.57161 6.43005 lineto +-42.93022 2.12631 lineto +-41.82472 8.55522 lineto + closepath stroke + 0.57297 0.57297 0 setrgbcolor +newpath 21.64726 40.47546 moveto +26.35765 36.42578 lineto +30.43404 39.06784 lineto +24.99542 42.64565 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.64726 40.47546 moveto +26.35765 36.42578 lineto +30.43404 39.06784 lineto +24.99542 42.64565 lineto + closepath stroke + 0.57346 0.57346 0 setrgbcolor +newpath -24.99504 42.64565 moveto +-30.43442 39.06784 lineto +-26.35689 36.4254 lineto +-21.64688 40.47546 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.99504 42.64565 moveto +-30.43442 39.06784 lineto +-26.35689 36.4254 lineto +-21.64688 40.47546 lineto + closepath stroke + 0.5904 0.5904 0 setrgbcolor +newpath 40.00473 14.83688 moveto +41.82663 8.55522 lineto +48.2956 12.74834 lineto +46.19217 18.8469 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.00473 14.83688 moveto +41.82663 8.55522 lineto +48.2956 12.74834 lineto +46.19217 18.8469 lineto + closepath stroke + 0.59045 0.59045 0 setrgbcolor +newpath -46.19217 18.8469 moveto +-48.29521 12.74796 lineto +-41.82472 8.55522 lineto +-40.00359 14.8365 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -46.19217 18.8469 moveto +-48.29521 12.74796 lineto +-41.82472 8.55522 lineto +-40.00359 14.8365 lineto + closepath stroke + 0.59747 0.59747 0 setrgbcolor +newpath 26.35765 36.42578 moveto +30.61676 31.75201 lineto +35.3527 34.82132 lineto +30.43404 39.06784 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 26.35765 36.42578 moveto +30.61676 31.75201 lineto +35.3527 34.82132 lineto +30.43404 39.06784 lineto + closepath stroke + 0.59735 0.59735 0 setrgbcolor +newpath -30.43442 39.06784 moveto +-35.35194 34.82094 lineto +-30.61562 31.75163 lineto +-26.35689 36.4254 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -30.43442 39.06784 moveto +-35.35194 34.82094 lineto +-30.61562 31.75163 lineto +-26.35689 36.4254 lineto + closepath stroke + 0.60709 0.60709 0 setrgbcolor +newpath 37.49924 20.86487 moveto +40.00473 14.83688 lineto +46.19217 18.8469 lineto +43.2991 24.62425 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 37.49924 20.86487 moveto +40.00473 14.83688 lineto +46.19217 18.8469 lineto +43.2991 24.62425 lineto + closepath stroke + 0.60721 0.60721 0 setrgbcolor +newpath -43.2991 24.62387 moveto +-46.19217 18.8469 lineto +-40.00359 14.8365 lineto +-37.4981 20.86449 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -43.2991 24.62387 moveto +-46.19217 18.8469 lineto +-40.00359 14.8365 lineto +-37.4981 20.86449 lineto + closepath stroke + 0.61081 0.61081 0 setrgbcolor +newpath 30.61676 31.75201 moveto +34.35211 26.53503 lineto +39.66484 29.97894 lineto +35.3527 34.82132 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 30.61676 31.75201 moveto +34.35211 26.53503 lineto +39.66484 29.97894 lineto +35.3527 34.82132 lineto + closepath stroke + 0.61093 0.61093 0 setrgbcolor +newpath -35.35194 34.82094 moveto +-39.66522 29.97856 lineto +-34.35059 26.53503 lineto +-30.61562 31.75163 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -35.35194 34.82094 moveto +-39.66522 29.97856 lineto +-34.35059 26.53503 lineto +-30.61562 31.75163 lineto + closepath stroke + 0.61438 0.61438 0 setrgbcolor +newpath 34.35211 26.53503 moveto +37.49924 20.86487 lineto +43.2991 24.62425 lineto +39.66484 29.97894 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 34.35211 26.53503 moveto +37.49924 20.86487 lineto +43.2991 24.62425 lineto +39.66484 29.97894 lineto + closepath stroke + 0.6145 0.6145 0 setrgbcolor +newpath -39.66522 29.97856 moveto +-43.2991 24.62387 lineto +-37.4981 20.86449 lineto +-34.35059 26.53503 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -39.66522 29.97856 moveto +-43.2991 24.62387 lineto +-37.4981 20.86449 lineto +-34.35059 26.53503 lineto + closepath stroke + 0.61835 0.61835 0 setrgbcolor +newpath 3.26004 47.83897 moveto +6.46858 45.61882 lineto +11.203 46.44089 lineto +5.64651 48.25325 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 3.26004 47.83897 moveto +6.46858 45.61882 lineto +11.203 46.44089 lineto +5.64651 48.25325 lineto + closepath stroke + 0.61847 0.61847 0 setrgbcolor +newpath -5.64651 48.25325 moveto +-11.20262 46.44089 lineto +-6.46706 45.61882 lineto +-3.26004 47.83897 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -5.64651 48.25325 moveto +-11.20262 46.44089 lineto +-6.46706 45.61882 lineto +-3.26004 47.83897 lineto + closepath stroke + 0.67654 0.67654 0 setrgbcolor +newpath 17.67883 -40.13367 moveto +15.22102 -43.64128 lineto +26.36185 -41.70647 lineto +30.6202 -37.88643 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 17.67883 -40.13367 moveto +15.22102 -43.64128 lineto +26.36185 -41.70647 lineto +30.6202 -37.88643 lineto + closepath stroke + 0.67679 0.67679 0 setrgbcolor +newpath -30.61867 -37.88681 moveto +-26.3607 -41.70685 lineto +-15.21873 -43.64128 lineto +-17.6773 -40.13367 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -30.61867 -37.88681 moveto +-26.3607 -41.70685 lineto +-15.21873 -43.64128 lineto +-17.6773 -40.13367 lineto + closepath stroke + 0.72137 0.72137 0 setrgbcolor +newpath 0 47.68715 moveto +0.00038 45.31784 lineto +6.46858 45.61882 lineto +3.26004 47.83897 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0 47.68715 moveto +0.00038 45.31784 lineto +6.46858 45.61882 lineto +3.26004 47.83897 lineto + closepath stroke + 0.7222 0.7222 0 setrgbcolor +newpath -3.26004 47.83897 moveto +-6.46706 45.61882 lineto +0.00038 45.31784 lineto +0 47.68715 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -3.26004 47.83897 moveto +-6.46706 45.61882 lineto +0.00038 45.31784 lineto +0 47.68715 lineto + closepath stroke + 0.79416 0.79416 0 setrgbcolor +newpath 0.00153 -44.34929 moveto +0.00114 -46.98372 lineto +12.50114 -46.40198 lineto +15.22102 -43.64128 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -44.34929 moveto +0.00114 -46.98372 lineto +12.50114 -46.40198 lineto +15.22102 -43.64128 lineto + closepath stroke + 0.79468 0.79468 0 setrgbcolor +newpath -15.21873 -43.64128 moveto +-12.49962 -46.40198 lineto +0.00114 -46.98372 lineto +0.00153 -44.34929 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -15.21873 -43.64128 moveto +-12.49962 -46.40198 lineto +0.00114 -46.98372 lineto +0.00153 -44.34929 lineto + closepath stroke + 0.78708 0.78708 0 setrgbcolor +newpath 6.46858 45.61882 moveto +9.56497 42.61742 lineto +16.56685 43.83316 lineto +11.203 46.44089 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 6.46858 45.61882 moveto +9.56497 42.61742 lineto +16.56685 43.83316 lineto +11.203 46.44089 lineto + closepath stroke + 0.78671 0.78671 0 setrgbcolor +newpath -11.20262 46.44089 moveto +-16.56609 43.83316 lineto +-9.56383 42.61742 lineto +-6.46706 45.61882 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -11.20262 46.44089 moveto +-16.56609 43.83316 lineto +-9.56383 42.61742 lineto +-6.46706 45.61882 lineto + closepath stroke + 0.83572 0.83572 0 setrgbcolor +newpath 19.83566 -35.93903 moveto +17.67883 -40.13367 lineto +30.6202 -37.88643 lineto +34.35516 -33.4179 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 19.83566 -35.93903 moveto +17.67883 -40.13367 lineto +30.6202 -37.88643 lineto +34.35516 -33.4179 lineto + closepath stroke + 0.83594 0.83594 0 setrgbcolor +newpath -34.35402 -33.41827 moveto +-30.61867 -37.88681 lineto +-17.6773 -40.13367 lineto +-19.83337 -35.9394 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -34.35402 -33.41827 moveto +-30.61867 -37.88681 lineto +-17.6773 -40.13367 lineto +-19.83337 -35.9394 lineto + closepath stroke + 0.94049 0.94049 0 setrgbcolor +newpath 9.56497 42.61742 moveto +12.49847 38.88702 lineto +21.64726 40.47546 lineto +16.56685 43.83316 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 9.56497 42.61742 moveto +12.49847 38.88702 lineto +21.64726 40.47546 lineto +16.56685 43.83316 lineto + closepath stroke + 0.94067 0.94067 0 setrgbcolor +newpath -16.56609 43.83316 moveto +-21.64688 40.47546 lineto +-12.49695 38.88702 lineto +-9.56383 42.61742 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -16.56609 43.83316 moveto +-21.64688 40.47546 lineto +-12.49695 38.88702 lineto +-9.56383 42.61742 lineto + closepath stroke + 0.95654 0.95654 0 setrgbcolor +newpath 0.00038 45.31784 moveto +0.00038 42.17224 lineto +9.56497 42.61742 lineto +6.46858 45.61882 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00038 45.31784 moveto +0.00038 42.17224 lineto +9.56497 42.61742 lineto +6.46858 45.61882 lineto + closepath stroke + 0.9567 0.9567 0 setrgbcolor +newpath -6.46706 45.61882 moveto +-9.56383 42.61742 lineto +0.00038 42.17224 lineto +0.00038 45.31784 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -6.46706 45.61882 moveto +-9.56383 42.61742 lineto +0.00038 42.17224 lineto +0.00038 45.31784 lineto + closepath stroke + 0.97983 0.97983 0 setrgbcolor +newpath 21.65222 -31.12984 moveto +19.83566 -35.93903 lineto +34.35516 -33.4179 lineto +37.5019 -28.37791 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.65222 -31.12984 moveto +19.83566 -35.93903 lineto +34.35516 -33.4179 lineto +37.5019 -28.37791 lineto + closepath stroke + 0.9797 0.9797 0 setrgbcolor +newpath -37.50038 -28.37791 moveto +-34.35402 -33.41827 lineto +-19.83337 -35.9394 lineto +-21.64993 -31.13022 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -37.50038 -28.37791 moveto +-34.35402 -33.41827 lineto +-19.83337 -35.9394 lineto +-21.64993 -31.13022 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00076 -40.9565 moveto +0.00153 -44.34929 lineto +15.22102 -43.64128 lineto +17.67883 -40.13367 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00076 -40.9565 moveto +0.00153 -44.34929 lineto +15.22102 -43.64128 lineto +17.67883 -40.13367 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -17.6773 -40.13367 moveto +-15.21873 -43.64128 lineto +0.00153 -44.34929 lineto +0.00076 -40.9565 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -17.6773 -40.13367 moveto +-15.21873 -43.64128 lineto +0.00153 -44.34929 lineto +0.00076 -40.9565 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 12.49847 38.88702 moveto +15.21797 34.49135 lineto +26.35765 36.42578 lineto +21.64726 40.47546 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 12.49847 38.88702 moveto +15.21797 34.49135 lineto +26.35765 36.42578 lineto +21.64726 40.47546 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -21.64688 40.47546 moveto +-26.35689 36.4254 lineto +-15.21645 34.49135 lineto +-12.49695 38.88702 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.64688 40.47546 moveto +-26.35689 36.4254 lineto +-15.21645 34.49135 lineto +-12.49695 38.88702 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 23.09875 -25.78773 moveto +21.65222 -31.12984 lineto +37.5019 -28.37791 lineto +40.00702 -22.85194 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 23.09875 -25.78773 moveto +21.65222 -31.12984 lineto +37.5019 -28.37791 lineto +40.00702 -22.85194 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -40.00511 -22.85194 moveto +-37.50038 -28.37791 lineto +-21.64993 -31.13022 lineto +-23.09608 -25.78812 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -40.00511 -22.85194 moveto +-37.50038 -28.37791 lineto +-21.64993 -31.13022 lineto +-23.09608 -25.78812 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00038 42.17224 moveto +0.00114 38.30528 lineto +12.49847 38.88702 lineto +9.56497 42.61742 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00038 42.17224 moveto +0.00114 38.30528 lineto +12.49847 38.88702 lineto +9.56497 42.61742 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -9.56383 42.61742 moveto +-12.49695 38.88702 lineto +0.00114 38.30528 lineto +0.00038 42.17224 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -9.56383 42.61742 moveto +-12.49695 38.88702 lineto +0.00114 38.30528 lineto +0.00038 42.17224 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 15.21797 34.49135 moveto +17.6773 29.50516 lineto +30.61676 31.75201 lineto +26.35765 36.42578 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 15.21797 34.49135 moveto +17.6773 29.50516 lineto +30.61676 31.75201 lineto +26.35765 36.42578 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -26.35689 36.4254 moveto +-30.61562 31.75163 lineto +-17.6754 29.50478 lineto +-15.21645 34.49135 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -26.35689 36.4254 moveto +-30.61562 31.75163 lineto +-17.6754 29.50478 lineto +-15.21645 34.49135 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -36.86218 moveto +0.00076 -40.9565 lineto +17.67883 -40.13367 lineto +19.83566 -35.93903 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -36.86218 moveto +0.00076 -40.9565 lineto +17.67883 -40.13367 lineto +19.83566 -35.93903 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -19.83337 -35.9394 moveto +-17.6773 -40.13367 lineto +0.00076 -40.9565 lineto +0.00153 -36.86218 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -19.83337 -35.9394 moveto +-17.6773 -40.13367 lineto +0.00076 -40.9565 lineto +0.00153 -36.86218 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 24.15009 -20.00504 moveto +23.09875 -25.78773 lineto +40.00702 -22.85194 lineto +41.82777 -16.93497 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 24.15009 -20.00504 moveto +23.09875 -25.78773 lineto +40.00702 -22.85194 lineto +41.82777 -16.93497 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -41.82587 -16.93535 moveto +-40.00511 -22.85194 lineto +-23.09608 -25.78812 lineto +-24.14742 -20.00504 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -41.82587 -16.93535 moveto +-40.00511 -22.85194 lineto +-23.09608 -25.78812 lineto +-24.14742 -20.00504 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 17.6773 29.50516 moveto +19.83452 24.0139 lineto +34.35211 26.53503 lineto +30.61676 31.75201 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 17.6773 29.50516 moveto +19.83452 24.0139 lineto +34.35211 26.53503 lineto +30.61676 31.75201 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -30.61562 31.75163 moveto +-34.35059 26.53503 lineto +-19.83147 24.0139 lineto +-17.6754 29.50478 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -30.61562 31.75163 moveto +-34.35059 26.53503 lineto +-19.83147 24.0139 lineto +-17.6754 29.50478 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 24.7879 -13.87901 moveto +24.15009 -20.00504 lineto +41.82777 -16.93497 lineto +42.93251 -10.72845 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 24.7879 -13.87901 moveto +24.15009 -20.00504 lineto +41.82777 -16.93497 lineto +42.93251 -10.72845 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -42.9306 -10.72884 moveto +-41.82587 -16.93535 lineto +-24.14742 -20.00504 lineto +-24.78523 -13.8794 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -42.9306 -10.72884 moveto +-41.82587 -16.93535 lineto +-24.14742 -20.00504 lineto +-24.78523 -13.8794 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00114 38.30528 moveto +0.00114 33.78296 lineto +15.21797 34.49135 lineto +12.49847 38.88702 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00114 38.30528 moveto +0.00114 33.78296 lineto +15.21797 34.49135 lineto +12.49847 38.88702 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -12.49695 38.88702 moveto +-15.21645 34.49135 lineto +0.00114 33.78296 lineto +0.00114 38.30528 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -12.49695 38.88702 moveto +-15.21645 34.49135 lineto +0.00114 33.78296 lineto +0.00114 38.30528 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 19.83452 24.0139 moveto +21.65108 18.11256 lineto +37.49924 20.86487 lineto +34.35211 26.53503 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 19.83452 24.0139 moveto +21.65108 18.11256 lineto +37.49924 20.86487 lineto +34.35211 26.53503 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -34.35059 26.53503 moveto +-37.4981 20.86449 lineto +-21.6484 18.11256 lineto +-19.83147 24.0139 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -34.35059 26.53503 moveto +-37.4981 20.86449 lineto +-21.6484 18.11256 lineto +-19.83147 24.0139 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 25.00153 -7.51572 moveto +24.7879 -13.87901 lineto +42.93251 -10.72845 lineto +43.30254 -4.33769 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 25.00153 -7.51572 moveto +24.7879 -13.87901 lineto +42.93251 -10.72845 lineto +43.30254 -4.33769 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -43.30063 -4.33769 moveto +-42.9306 -10.72884 lineto +-24.78523 -13.8794 lineto +-24.99886 -7.51572 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -43.30063 -4.33769 moveto +-42.9306 -10.72884 lineto +-24.78523 -13.8794 lineto +-24.99886 -7.51572 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -32.13768 moveto +0.00153 -36.86218 lineto +19.83566 -35.93903 lineto +21.65222 -31.12984 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -32.13768 moveto +0.00153 -36.86218 lineto +19.83566 -35.93903 lineto +21.65222 -31.12984 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -21.64993 -31.13022 moveto +-19.83337 -35.9394 lineto +0.00153 -36.86218 lineto +0.00153 -32.13768 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.64993 -31.13022 moveto +-19.83337 -35.9394 lineto +0.00153 -36.86218 lineto +0.00153 -32.13768 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 21.65108 18.11256 moveto +23.09761 11.90071 lineto +40.00473 14.83688 lineto +37.49924 20.86487 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.65108 18.11256 moveto +23.09761 11.90071 lineto +40.00473 14.83688 lineto +37.49924 20.86487 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -37.4981 20.86449 moveto +-40.00359 14.8365 lineto +-23.09494 11.90071 lineto +-21.6484 18.11256 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -37.4981 20.86449 moveto +-40.00359 14.8365 lineto +-23.09494 11.90071 lineto +-21.6484 18.11256 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 24.78752 -1.02425 moveto +25.00153 -7.51572 lineto +43.30254 -4.33769 lineto +42.93175 2.12631 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 24.78752 -1.02425 moveto +25.00153 -7.51572 lineto +43.30254 -4.33769 lineto +42.93175 2.12631 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -42.93022 2.12631 moveto +-43.30063 -4.33769 lineto +-24.99886 -7.51572 lineto +-24.78485 -1.02425 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -42.93022 2.12631 moveto +-43.30063 -4.33769 lineto +-24.99886 -7.51572 lineto +-24.78485 -1.02425 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 23.09761 11.90071 moveto +24.14932 5.48553 lineto +41.82663 8.55522 lineto +40.00473 14.83688 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 23.09761 11.90071 moveto +24.14932 5.48553 lineto +41.82663 8.55522 lineto +40.00473 14.83688 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -40.00359 14.8365 moveto +-41.82472 8.55522 lineto +-24.14665 5.48553 lineto +-23.09494 11.90071 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -40.00359 14.8365 moveto +-41.82472 8.55522 lineto +-24.14665 5.48553 lineto +-23.09494 11.90071 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 24.14932 5.48553 moveto +24.78752 -1.02425 lineto +42.93175 2.12631 lineto +41.82663 8.55522 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 24.14932 5.48553 moveto +24.78752 -1.02425 lineto +42.93175 2.12631 lineto +41.82663 8.55522 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -41.82472 8.55522 moveto +-42.93022 2.12631 lineto +-24.78485 -1.02425 lineto +-24.14665 5.48553 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -41.82472 8.55522 moveto +-42.93022 2.12631 lineto +-24.78485 -1.02425 lineto +-24.14665 5.48553 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00114 33.78296 moveto +0.00153 28.68233 lineto +17.6773 29.50516 lineto +15.21797 34.49135 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00114 33.78296 moveto +0.00153 28.68233 lineto +17.6773 29.50516 lineto +15.21797 34.49135 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -15.21645 34.49135 moveto +-17.6754 29.50478 lineto +0.00153 28.68233 lineto +0.00114 33.78296 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -15.21645 34.49135 moveto +-17.6754 29.50478 lineto +0.00153 28.68233 lineto +0.00114 33.78296 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.0019 -26.86272 moveto +0.00153 -32.13768 lineto +21.65222 -31.12984 lineto +23.09875 -25.78773 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.0019 -26.86272 moveto +0.00153 -32.13768 lineto +21.65222 -31.12984 lineto +23.09875 -25.78773 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -23.09608 -25.78812 moveto +-21.64993 -31.13022 lineto +0.00153 -32.13768 lineto +0.0019 -26.86272 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -23.09608 -25.78812 moveto +-21.64993 -31.13022 lineto +0.00153 -32.13768 lineto +0.0019 -26.86272 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 28.68233 moveto +0.00153 23.09113 lineto +19.83452 24.0139 lineto +17.6773 29.50516 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 28.68233 moveto +0.00153 23.09113 lineto +19.83452 24.0139 lineto +17.6773 29.50516 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -17.6754 29.50478 moveto +-19.83147 24.0139 lineto +0.00153 23.09113 lineto +0.00153 28.68233 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -17.6754 29.50478 moveto +-19.83147 24.0139 lineto +0.00153 23.09113 lineto +0.00153 28.68233 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -21.12885 moveto +0.0019 -26.86272 lineto +23.09875 -25.78773 lineto +24.15009 -20.00504 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -21.12885 moveto +0.0019 -26.86272 lineto +23.09875 -25.78773 lineto +24.15009 -20.00504 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.14742 -20.00504 moveto +-23.09608 -25.78812 lineto +0.0019 -26.86272 lineto +0.00153 -21.12885 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.14742 -20.00504 moveto +-23.09608 -25.78812 lineto +0.0019 -26.86272 lineto +0.00153 -21.12885 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -19.83147 24.0139 moveto +-21.6484 18.11256 lineto +0.00114 17.1051 lineto +0.00153 23.09113 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -19.83147 24.0139 moveto +-21.6484 18.11256 lineto +0.00114 17.1051 lineto +0.00153 23.09113 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 23.09113 moveto +0.00114 17.1051 lineto +21.65108 18.11256 lineto +19.83452 24.0139 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 23.09113 moveto +0.00114 17.1051 lineto +21.65108 18.11256 lineto +19.83452 24.0139 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -15.03258 moveto +0.00153 -21.12885 lineto +24.15009 -20.00504 lineto +24.7879 -13.87901 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -15.03258 moveto +0.00153 -21.12885 lineto +24.15009 -20.00504 lineto +24.7879 -13.87901 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.78523 -13.8794 moveto +-24.14742 -20.00504 lineto +0.00153 -21.12885 lineto +0.00153 -15.03258 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.78523 -13.8794 moveto +-24.14742 -20.00504 lineto +0.00153 -21.12885 lineto +0.00153 -15.03258 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00114 17.1051 moveto +0.00114 10.82611 lineto +23.09761 11.90071 lineto +21.65108 18.11256 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00114 17.1051 moveto +0.00114 10.82611 lineto +23.09761 11.90071 lineto +21.65108 18.11256 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -21.6484 18.11256 moveto +-23.09494 11.90071 lineto +0.00114 10.82611 lineto +0.00114 17.1051 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.6484 18.11256 moveto +-23.09494 11.90071 lineto +0.00114 10.82611 lineto +0.00114 17.1051 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -8.67882 moveto +0.00153 -15.03258 lineto +24.7879 -13.87901 lineto +25.00153 -7.51572 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -8.67882 moveto +0.00153 -15.03258 lineto +24.7879 -13.87901 lineto +25.00153 -7.51572 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.99886 -7.51572 moveto +-24.78523 -13.8794 lineto +0.00153 -15.03258 lineto +0.00153 -8.67882 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.99886 -7.51572 moveto +-24.78523 -13.8794 lineto +0.00153 -15.03258 lineto +0.00153 -8.67882 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00114 10.82611 moveto +0.0019 4.3621 lineto +24.14932 5.48553 lineto +23.09761 11.90071 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00114 10.82611 moveto +0.0019 4.3621 lineto +24.14932 5.48553 lineto +23.09761 11.90071 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -23.09494 11.90071 moveto +-24.14665 5.48553 lineto +0.0019 4.3621 lineto +0.00114 10.82611 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -23.09494 11.90071 moveto +-24.14665 5.48553 lineto +0.0019 4.3621 lineto +0.00114 10.82611 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00153 -2.17781 moveto +0.00153 -8.67882 lineto +25.00153 -7.51572 lineto +24.78752 -1.02425 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00153 -2.17781 moveto +0.00153 -8.67882 lineto +25.00153 -7.51572 lineto +24.78752 -1.02425 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.78485 -1.02425 moveto +-24.99886 -7.51572 lineto +0.00153 -8.67882 lineto +0.00153 -2.17781 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.78485 -1.02425 moveto +-24.99886 -7.51572 lineto +0.00153 -8.67882 lineto +0.00153 -2.17781 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.0019 4.3621 moveto +0.00153 -2.17781 lineto +24.78752 -1.02425 lineto +24.14932 5.48553 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.0019 4.3621 moveto +0.00153 -2.17781 lineto +24.78752 -1.02425 lineto +24.14932 5.48553 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.14665 5.48553 moveto +-24.78485 -1.02425 lineto +0.00153 -2.17781 lineto +0.0019 4.3621 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.14665 5.48553 moveto +-24.78485 -1.02425 lineto +0.00153 -2.17781 lineto +0.0019 4.3621 lineto + closepath stroke +grestore +showpage +%%EOF diff --git a/doc/figures/Banane.2 b/doc/figures/Banane.2 new file mode 100644 index 0000000..51d4805 --- /dev/null +++ b/doc/figures/Banane.2 @@ -0,0 +1,1771 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -114 -114 114 114 +%%HiResBoundingBox: -113.3858 -113.3858 113.3858 113.3858 +%%Creator: MetaPost 1.208 +%%CreationDate: 2011.01.25:2231 +%%Pages: 1 +%%DocumentResources: procset mpost-minimal +%%DocumentSuppliedResources: procset mpost-minimal +%%EndComments +%%BeginProlog +%%BeginResource: procset mpost-minimal +/bd{bind def}bind def/fshow {exch findfont exch scalefont setfont show}bd +/fcp{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall}bd +/fmc{FontMatrix dup length array copy dup dup}bd/fmd{/FontMatrix exch def}bd +/Amul{4 -1 roll exch mul 1000 div}bd/ExtendFont{fmc 0 get Amul 0 exch put fmd}bd +/ScaleFont{dup fmc 0 get Amul 0 exch put dup dup 3 get Amul 3 exch put fmd}bd +/SlantFont{fmc 2 get dup 0 eq{pop 1}if Amul FontMatrix 0 get mul 2 exch put fmd}bd +%%EndResource +%%EndProlog +%%BeginSetup +%%EndSetup +%%Page: 1 1 +gsave newpath -113.3858 -113.3858 moveto +-113.3858 113.3858 lineto +113.3858 113.3858 lineto +113.3858 -113.3858 lineto + closepath clip +gsave newpath -113.3858 -113.3858 moveto +-113.3858 113.3858 lineto +113.3858 113.3858 lineto +113.3858 -113.3858 lineto + closepath clip + 0 0 0 setrgbcolor +newpath -113.3858 -113.3858 moveto +-113.3858 113.3858 lineto +113.3858 113.3858 lineto +113.3858 -113.3858 lineto + closepath fill + 0.3872 0.3872 0 setrgbcolor +newpath -25.62065 -26.24855 moveto +-20.43533 -38.28163 lineto +-16.96053 -38.34953 lineto +-21.85287 -27.108 lineto + closepath fill + 0 0 0 setrgbcolor 0 0.25 dtransform truncate idtransform setlinewidth pop + [] 0 setdash 1 setlinejoin 10 setmiterlimit +newpath -25.62065 -26.24855 moveto +-20.43533 -38.28163 lineto +-16.96053 -38.34953 lineto +-21.85287 -27.108 lineto + closepath stroke + 0.38235 0.38235 0 setrgbcolor +newpath -20.43533 -38.28163 moveto +-13.68752 -48.98415 lineto +-10.58807 -48.38562 lineto +-16.96053 -38.34953 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -20.43533 -38.28163 moveto +-13.68752 -48.98415 lineto +-10.58807 -48.38562 lineto +-16.96053 -38.34953 lineto + closepath stroke + 0.40631 0.40631 0 setrgbcolor +newpath -28.88603 -13.31367 moveto +-25.62065 -26.24855 lineto +-21.85287 -27.108 lineto +-24.93057 -15.03906 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -28.88603 -13.31367 moveto +-25.62065 -26.24855 lineto +-21.85287 -27.108 lineto +-24.93057 -15.03906 lineto + closepath stroke + 0.52075 0.52075 0 setrgbcolor +newpath 27.87132 -20.32204 moveto +30.06783 -28.7674 lineto +33.86803 -27.21748 lineto +31.79474 -18.41278 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.87132 -20.32204 moveto +30.06783 -28.7674 lineto +33.86803 -27.21748 lineto +31.79474 -18.41278 lineto + closepath stroke + 0.39001 0.39001 0 setrgbcolor +newpath -13.68752 -48.98415 moveto +-5.82123 -58.04787 lineto +-3.14827 -56.94542 lineto +-10.58807 -48.38562 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -13.68752 -48.98415 moveto +-5.82123 -58.04787 lineto +-3.14827 -56.94542 lineto +-10.58807 -48.38562 lineto + closepath stroke + 0.50656 0.50656 0 setrgbcolor +newpath 26.4656 -11.5284 moveto +27.87132 -20.32204 lineto +31.79474 -18.41278 lineto +30.46036 -9.2598 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 26.4656 -11.5284 moveto +27.87132 -20.32204 lineto +31.79474 -18.41278 lineto +30.46036 -9.2598 lineto + closepath stroke + 0.5242 0.5242 0 setrgbcolor +newpath 30.06783 -28.7674 moveto +32.85217 -36.68823 lineto +36.47156 -35.47783 lineto +33.86803 -27.21748 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 30.06783 -28.7674 moveto +32.85217 -36.68823 lineto +36.47156 -35.47783 lineto +33.86803 -27.21748 lineto + closepath stroke + 0.44101 0.44101 0 setrgbcolor +newpath -30.00069 0.0061 moveto +-28.88603 -13.31367 lineto +-24.93057 -15.03906 lineto +-25.98076 -2.59895 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -30.00069 0.0061 moveto +-28.88603 -13.31367 lineto +-24.93057 -15.03906 lineto +-25.98076 -2.59895 lineto + closepath stroke + 0.47903 0.47903 0 setrgbcolor +newpath 25.9819 -2.59972 moveto +26.4656 -11.5284 lineto +30.46036 -9.2598 lineto +30.0003 0.00496 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 25.9819 -2.59972 moveto +26.4656 -11.5284 lineto +30.46036 -9.2598 lineto +30.0003 0.00496 lineto + closepath stroke + 0.52106 0.52106 0 setrgbcolor +newpath 32.85217 -36.68823 moveto +35.96497 -43.95866 lineto +39.34212 -43.05153 lineto +36.47156 -35.47783 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 32.85217 -36.68823 moveto +35.96497 -43.95866 lineto +39.34212 -43.05153 lineto +36.47156 -35.47783 lineto + closepath stroke + 0.40619 0.40619 0 setrgbcolor +newpath -5.82123 -58.04787 moveto +2.67754 -65.30342 lineto +4.90303 -63.88206 lineto +-3.14827 -56.94542 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -5.82123 -58.04787 moveto +2.67754 -65.30342 lineto +4.90303 -63.88206 lineto +-3.14827 -56.94542 lineto + closepath stroke + 0.5163 0.5163 0 setrgbcolor +newpath 35.96497 -43.95866 moveto +39.1159 -50.51003 lineto +42.1833 -49.86229 lineto +39.34212 -43.05153 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 35.96497 -43.95866 moveto +39.1159 -50.51003 lineto +42.1833 -49.86229 lineto +39.34212 -43.05153 lineto + closepath stroke + 0.43774 0.43774 0 setrgbcolor +newpath 26.46637 6.23016 moveto +25.9819 -2.59972 lineto +30.0003 0.00496 lineto +30.46112 9.124 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 26.46637 6.23016 moveto +25.9819 -2.59972 lineto +30.0003 0.00496 lineto +30.46112 9.124 lineto + closepath stroke + 0.42728 0.42728 0 setrgbcolor +newpath 2.67754 -65.30342 moveto +11.32011 -70.71266 lineto +13.10005 -69.16428 lineto +4.90303 -63.88206 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 2.67754 -65.30342 moveto +11.32011 -70.71266 lineto +13.10005 -69.16428 lineto +4.90303 -63.88206 lineto + closepath stroke + 0.49063 0.49063 0 setrgbcolor +newpath -28.88374 13.15155 moveto +-30.00069 0.0061 lineto +-25.98076 -2.59895 lineto +-24.92905 9.71832 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -28.88374 13.15155 moveto +-30.00069 0.0061 lineto +-25.98076 -2.59895 lineto +-24.92905 9.71832 lineto + closepath stroke + 0.51566 0.51566 0 setrgbcolor +newpath 39.1159 -50.51003 moveto +42.00249 -56.32248 lineto +44.693 -55.8834 lineto +42.1833 -49.86229 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.1159 -50.51003 moveto +42.00249 -56.32248 lineto +44.693 -55.8834 lineto +42.1833 -49.86229 lineto + closepath stroke + 0.44794 0.44794 0 setrgbcolor +newpath 11.32011 -70.71266 moveto +19.65714 -74.35493 lineto +21.0167 -72.86263 lineto +13.10005 -69.16428 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 11.32011 -70.71266 moveto +19.65714 -74.35493 lineto +21.0167 -72.86263 lineto +13.10005 -69.16428 lineto + closepath stroke + 0.38559 0.38559 0 setrgbcolor +newpath 27.87247 14.74304 moveto +26.46637 6.23016 lineto +30.46112 9.124 lineto +31.79588 17.8566 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.87247 14.74304 moveto +26.46637 6.23016 lineto +30.46112 9.124 lineto +31.79588 17.8566 lineto + closepath stroke + 0.52454 0.52454 0 setrgbcolor +newpath 42.00249 -56.32248 moveto +44.3348 -61.41205 lineto +46.58241 -61.13281 lineto +44.693 -55.8834 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.00249 -56.32248 moveto +44.3348 -61.41205 lineto +46.58241 -61.13281 lineto +44.693 -55.8834 lineto + closepath stroke + 0.46286 0.46286 0 setrgbcolor +newpath 19.65714 -74.35493 moveto +27.30103 -76.39008 lineto +28.27492 -75.11635 lineto +21.0167 -72.86263 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 19.65714 -74.35493 moveto +27.30103 -76.39008 lineto +28.27492 -75.11635 lineto +21.0167 -72.86263 lineto + closepath stroke + 0.55402 0.55402 0 setrgbcolor +newpath -25.61722 25.58556 moveto +-28.88374 13.15155 lineto +-24.92905 9.71832 lineto +-21.84868 21.43631 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -25.61722 25.58556 moveto +-28.88374 13.15155 lineto +-24.92905 9.71832 lineto +-21.84868 21.43631 lineto + closepath stroke + 0.54633 0.54633 0 setrgbcolor +newpath 44.3348 -61.41205 moveto +45.8477 -65.81345 lineto +47.59178 -65.64789 lineto +46.58241 -61.13281 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 44.3348 -61.41205 moveto +45.8477 -65.81345 lineto +47.59178 -65.64789 lineto +46.58241 -61.13281 lineto + closepath stroke + 0.46262 0.46262 0 setrgbcolor +newpath 27.30103 -76.39008 moveto +33.94661 -77.02713 lineto +34.57108 -76.10245 lineto +28.27492 -75.11635 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.30103 -76.39008 moveto +33.94661 -77.02713 lineto +34.57108 -76.10245 lineto +28.27492 -75.11635 lineto + closepath stroke + 0.56989 0.56989 0 setrgbcolor +newpath 45.8477 -65.81345 moveto +46.31462 -69.54918 lineto +47.50748 -69.4603 lineto +47.59178 -65.64789 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 45.8477 -65.81345 moveto +46.31462 -69.54918 lineto +47.50748 -69.4603 lineto +47.59178 -65.64789 lineto + closepath stroke + 0.32745 0.32745 0 setrgbcolor +newpath 30.07011 22.74666 moveto +27.87247 14.74304 lineto +31.79588 17.8566 lineto +33.86993 25.99106 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 30.07011 22.74666 moveto +27.87247 14.74304 lineto +31.79588 17.8566 lineto +33.86993 25.99106 lineto + closepath stroke + 0.65155 0.65155 0 setrgbcolor +newpath 40.81192 -75.11482 moveto +43.46428 -74.94392 lineto +43.46428 -74.94392 lineto +42.46826 -74.07799 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.81192 -75.11482 moveto +43.46428 -74.94392 lineto +43.46428 -74.94392 lineto +42.46826 -74.07799 lineto + closepath stroke + 0.66885 0.66885 0 setrgbcolor +newpath 42.46826 -74.07799 moveto +43.46428 -74.94392 lineto +43.46428 -74.94392 lineto +44.20586 -73.16093 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.46826 -74.07799 moveto +43.46428 -74.94392 lineto +43.46428 -74.94392 lineto +44.20586 -73.16093 lineto + closepath stroke + 0.62796 0.62796 0 setrgbcolor +newpath -20.43 36.83014 moveto +-25.61722 25.58556 lineto +-21.84868 21.43631 lineto +-16.95633 32.13348 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -20.43 36.83014 moveto +-25.61722 25.58556 lineto +-21.84868 21.43631 lineto +-16.95633 32.13348 lineto + closepath stroke + 0.89389 0.89389 0 setrgbcolor +newpath 34.57108 -76.10245 moveto +39.68086 -75.99373 lineto +40.81192 -75.11482 lineto +36.84464 -74.41101 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 34.57108 -76.10245 moveto +39.68086 -75.99373 lineto +40.81192 -75.11482 lineto +36.84464 -74.41101 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.62488 -70.62798 moveto +44.20586 -73.16093 lineto +45.55817 -72.60971 lineto +46.31462 -69.54918 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.62488 -70.62798 moveto +44.20586 -73.16093 lineto +45.55817 -72.60971 lineto +46.31462 -69.54918 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -16.96053 -38.34953 moveto +-10.58807 -48.38562 lineto +-1.59836 -46.13762 lineto +-7.1415 -36.91711 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -16.96053 -38.34953 moveto +-10.58807 -48.38562 lineto +-1.59836 -46.13762 lineto +-7.1415 -36.91711 lineto + closepath stroke + 0.26889 0.26889 0 setrgbcolor +newpath 32.85522 30.1094 moveto +30.07011 22.74666 lineto +33.86993 25.99106 lineto +36.47499 33.38127 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 32.85522 30.1094 moveto +30.07011 22.74666 lineto +33.86993 25.99106 lineto +36.47499 33.38127 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -10.58807 -48.38562 moveto +-3.14827 -56.94542 lineto +4.85992 -54.12903 lineto +-1.59836 -46.13762 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -10.58807 -48.38562 moveto +-3.14827 -56.94542 lineto +4.85992 -54.12903 lineto +-1.59836 -46.13762 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 28.27492 -75.11635 moveto +34.57108 -76.10245 lineto +36.84464 -74.41101 lineto +31.70624 -72.74513 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 28.27492 -75.11635 moveto +34.57108 -76.10245 lineto +36.84464 -74.41101 lineto +31.70624 -72.74513 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 41.85143 -67.37442 moveto +43.62488 -70.62798 lineto +46.31462 -69.54918 lineto +45.8477 -65.81345 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 41.85143 -67.37442 moveto +43.62488 -70.62798 lineto +46.31462 -69.54918 lineto +45.8477 -65.81345 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -21.85287 -27.108 moveto +-16.96053 -38.34953 lineto +-7.1415 -36.91711 lineto +-11.40175 -26.68762 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.85287 -27.108 moveto +-16.96053 -38.34953 lineto +-7.1415 -36.91711 lineto +-11.40175 -26.68762 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 36.84464 -74.41101 moveto +40.81192 -75.11482 lineto +42.46826 -74.07799 lineto +40.15884 -72.40753 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 36.84464 -74.41101 moveto +40.81192 -75.11482 lineto +42.46826 -74.07799 lineto +40.15884 -72.40753 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 40.15884 -72.40753 moveto +42.46826 -74.07799 lineto +44.20586 -73.16093 lineto +43.62488 -70.62798 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.15884 -72.40753 moveto +42.46826 -74.07799 lineto +44.20586 -73.16093 lineto +43.62488 -70.62798 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -3.14827 -56.94542 moveto +4.90303 -63.88206 lineto +11.82404 -60.77309 lineto +4.85992 -54.12903 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -3.14827 -56.94542 moveto +4.90303 -63.88206 lineto +11.82404 -60.77309 lineto +4.85992 -54.12903 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 4.90303 -63.88206 moveto +13.10005 -69.16428 lineto +18.87474 -66.04462 lineto +11.82404 -60.77309 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 4.90303 -63.88206 moveto +13.10005 -69.16428 lineto +18.87474 -66.04462 lineto +11.82404 -60.77309 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 21.0167 -72.86263 moveto +28.27492 -75.11635 lineto +31.70624 -72.74513 lineto +25.6195 -69.99893 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.0167 -72.86263 moveto +28.27492 -75.11635 lineto +31.70624 -72.74513 lineto +25.6195 -69.99893 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 20.01 -31.38542 moveto +23.48137 -39.38446 lineto +32.85217 -36.68823 lineto +30.06783 -28.7674 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 20.01 -31.38542 moveto +23.48137 -39.38446 lineto +32.85217 -36.68823 lineto +30.06783 -28.7674 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 23.48137 -39.38446 moveto +27.44179 -46.63086 lineto +35.96497 -43.95866 lineto +32.85217 -36.68823 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 23.48137 -39.38446 moveto +27.44179 -46.63086 lineto +35.96497 -43.95866 lineto +32.85217 -36.68823 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 13.10005 -69.16428 moveto +21.0167 -72.86263 lineto +25.6195 -69.99893 lineto +18.87474 -66.04462 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 13.10005 -69.16428 moveto +21.0167 -72.86263 lineto +25.6195 -69.99893 lineto +18.87474 -66.04462 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 39.08234 -63.38844 moveto +41.85143 -67.37442 lineto +45.8477 -65.81345 lineto +44.3348 -61.41205 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.08234 -63.38844 moveto +41.85143 -67.37442 lineto +45.8477 -65.81345 lineto +44.3348 -61.41205 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 17.30614 -22.76993 moveto +20.01 -31.38542 lineto +30.06783 -28.7674 lineto +27.87132 -20.32204 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 17.30614 -22.76993 moveto +20.01 -31.38542 lineto +30.06783 -28.7674 lineto +27.87132 -20.32204 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 27.44179 -46.63086 moveto +31.57692 -53.05252 lineto +39.1159 -50.51003 lineto +35.96497 -43.95866 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.44179 -46.63086 moveto +31.57692 -53.05252 lineto +39.1159 -50.51003 lineto +35.96497 -43.95866 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.93057 -15.03906 moveto +-21.85287 -27.108 lineto +-11.40175 -26.68762 lineto +-14.08424 -15.75966 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.93057 -15.03906 moveto +-21.85287 -27.108 lineto +-11.40175 -26.68762 lineto +-14.08424 -15.75966 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 31.57692 -53.05252 moveto +35.56175 -58.62961 lineto +42.00249 -56.32248 lineto +39.1159 -50.51003 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 31.57692 -53.05252 moveto +35.56175 -58.62961 lineto +42.00249 -56.32248 lineto +39.1159 -50.51003 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 35.56175 -58.62961 moveto +39.08234 -63.38844 lineto +44.3348 -61.41205 lineto +42.00249 -56.32248 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 35.56175 -58.62961 moveto +39.08234 -63.38844 lineto +44.3348 -61.41205 lineto +42.00249 -56.32248 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 15.58952 -13.73215 moveto +17.30614 -22.76993 lineto +27.87132 -20.32204 lineto +26.4656 -11.5284 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 15.58952 -13.73215 moveto +17.30614 -22.76993 lineto +27.87132 -20.32204 lineto +26.4656 -11.5284 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 31.70624 -72.74513 moveto +36.84464 -74.41101 lineto +40.15884 -72.40753 lineto +36.67564 -69.9112 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 31.70624 -72.74513 moveto +36.84464 -74.41101 lineto +40.15884 -72.40753 lineto +36.67564 -69.9112 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 36.67564 -69.9112 moveto +40.15884 -72.40753 lineto +43.62488 -70.62798 lineto +41.85143 -67.37442 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 36.67564 -69.9112 moveto +40.15884 -72.40753 lineto +43.62488 -70.62798 lineto +41.85143 -67.37442 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -25.98076 -2.59895 moveto +-24.93057 -15.03906 lineto +-14.08424 -15.75966 lineto +-14.99939 -4.50592 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -25.98076 -2.59895 moveto +-24.93057 -15.03906 lineto +-14.08424 -15.75966 lineto +-14.99939 -4.50592 lineto + closepath stroke + 0.70834 0.70834 0 setrgbcolor +newpath -13.68103 46.52748 moveto +-20.43 36.83014 lineto +-16.95633 32.13348 lineto +-10.58197 41.49399 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -13.68103 46.52748 moveto +-20.43 36.83014 lineto +-16.95633 32.13348 lineto +-10.58197 41.49399 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 15.00092 -4.50668 moveto +15.58952 -13.73215 lineto +26.4656 -11.5284 lineto +25.9819 -2.59972 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 15.00092 -4.50668 moveto +15.58952 -13.73215 lineto +26.4656 -11.5284 lineto +25.9819 -2.59972 lineto + closepath stroke + 0.21841 0.21841 0 setrgbcolor +newpath 35.96802 36.75308 moveto +32.85522 30.1094 lineto +36.47499 33.38127 lineto +39.34517 39.94217 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 35.96802 36.75308 moveto +32.85522 30.1094 lineto +36.47499 33.38127 lineto +39.34517 39.94217 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 25.6195 -69.99893 moveto +31.70624 -72.74513 lineto +36.67564 -69.9112 lineto +32.23228 -66.53137 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 25.6195 -69.99893 moveto +31.70624 -72.74513 lineto +36.67564 -69.9112 lineto +32.23228 -66.53137 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 32.23228 -66.53137 moveto +36.67564 -69.9112 lineto +41.85143 -67.37442 lineto +39.08234 -63.38844 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 32.23228 -66.53137 moveto +36.67564 -69.9112 lineto +41.85143 -67.37442 lineto +39.08234 -63.38844 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 15.59029 4.65088 moveto +15.00092 -4.50668 lineto +25.9819 -2.59972 lineto +26.46637 6.23016 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 15.59029 4.65088 moveto +15.00092 -4.50668 lineto +25.9819 -2.59972 lineto +26.46637 6.23016 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -24.92905 9.71832 moveto +-25.98076 -2.59895 lineto +-14.99939 -4.50592 lineto +-14.08272 6.66504 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -24.92905 9.71832 moveto +-25.98076 -2.59895 lineto +-14.99939 -4.50592 lineto +-14.08272 6.66504 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 18.87474 -66.04462 moveto +25.6195 -69.99893 lineto +32.23228 -66.53137 lineto +27.09656 -62.18834 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 18.87474 -66.04462 moveto +25.6195 -69.99893 lineto +32.23228 -66.53137 lineto +27.09656 -62.18834 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 27.09656 -62.18834 moveto +32.23228 -66.53137 lineto +39.08234 -63.38844 lineto +35.56175 -58.62961 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.09656 -62.18834 moveto +32.23228 -66.53137 lineto +39.08234 -63.38844 lineto +35.56175 -58.62961 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 11.82404 -60.77309 moveto +18.87474 -66.04462 lineto +27.09656 -62.18834 lineto +21.58737 -56.80885 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 11.82404 -60.77309 moveto +18.87474 -66.04462 lineto +27.09656 -62.18834 lineto +21.58737 -56.80885 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 21.58737 -56.80885 moveto +27.09656 -62.18834 lineto +35.56175 -58.62961 lineto +31.57692 -53.05252 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.58737 -56.80885 moveto +27.09656 -62.18834 lineto +35.56175 -58.62961 lineto +31.57692 -53.05252 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 4.85992 -54.12903 moveto +11.82404 -60.77309 lineto +21.58737 -56.80885 lineto +16.05682 -50.35324 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 4.85992 -54.12903 moveto +11.82404 -60.77309 lineto +21.58737 -56.80885 lineto +16.05682 -50.35324 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 16.05682 -50.35324 moveto +21.58737 -56.80885 lineto +31.57692 -53.05252 lineto +27.44179 -46.63086 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 16.05682 -50.35324 moveto +21.58737 -56.80885 lineto +31.57692 -53.05252 lineto +27.44179 -46.63086 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 17.30766 13.49869 moveto +15.59029 4.65088 lineto +26.46637 6.23016 lineto +27.87247 14.74304 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 17.30766 13.49869 moveto +15.59029 4.65088 lineto +26.46637 6.23016 lineto +27.87247 14.74304 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -1.59836 -46.13762 moveto +4.85992 -54.12903 lineto +16.05682 -50.35324 lineto +10.87189 -42.84325 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -1.59836 -46.13762 moveto +4.85992 -54.12903 lineto +16.05682 -50.35324 lineto +10.87189 -42.84325 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 10.87189 -42.84325 moveto +16.05682 -50.35324 lineto +27.44179 -46.63086 lineto +23.48137 -39.38446 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 10.87189 -42.84325 moveto +16.05682 -50.35324 lineto +27.44179 -46.63086 lineto +23.48137 -39.38446 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -7.1415 -36.91711 moveto +-1.59836 -46.13762 lineto +10.87189 -42.84325 lineto +6.39076 -34.36775 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -7.1415 -36.91711 moveto +-1.59836 -46.13762 lineto +10.87189 -42.84325 lineto +6.39076 -34.36775 lineto + closepath stroke + 0.79175 0.79175 0 setrgbcolor +newpath -5.8136 54.44908 moveto +-13.68103 46.52748 lineto +-10.58197 41.49399 lineto +-3.14102 49.31717 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -5.8136 54.44908 moveto +-13.68103 46.52748 lineto +-10.58197 41.49399 lineto +-3.14102 49.31717 lineto + closepath stroke + 0.18335 0.18335 0 setrgbcolor +newpath 39.1182 42.67197 moveto +35.96802 36.75308 lineto +39.34517 39.94217 lineto +42.18636 45.66307 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.1182 42.67197 moveto +35.96802 36.75308 lineto +39.34517 39.94217 lineto +42.18636 45.66307 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 6.39076 -34.36775 moveto +10.87189 -42.84325 lineto +23.48137 -39.38446 lineto +20.01 -31.38542 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 6.39076 -34.36775 moveto +10.87189 -42.84325 lineto +23.48137 -39.38446 lineto +20.01 -31.38542 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -21.84868 21.43631 moveto +-24.92905 9.71832 lineto +-14.08272 6.66504 lineto +-11.3987 17.36374 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -21.84868 21.43631 moveto +-24.92905 9.71832 lineto +-14.08272 6.66504 lineto +-11.3987 17.36374 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -11.40175 -26.68762 moveto +-7.1415 -36.91711 lineto +6.39076 -34.36775 lineto +2.93121 -25.09995 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -11.40175 -26.68762 moveto +-7.1415 -36.91711 lineto +6.39076 -34.36775 lineto +2.93121 -25.09995 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 2.93121 -25.09995 moveto +6.39076 -34.36775 lineto +20.01 -31.38542 lineto +17.30614 -22.76993 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 2.93121 -25.09995 moveto +6.39076 -34.36775 lineto +20.01 -31.38542 lineto +17.30614 -22.76993 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -14.08424 -15.75966 moveto +-11.40175 -26.68762 lineto +2.93121 -25.09995 lineto +0.74692 -15.2813 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -14.08424 -15.75966 moveto +-11.40175 -26.68762 lineto +2.93121 -25.09995 lineto +0.74692 -15.2813 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.74692 -15.2813 moveto +2.93121 -25.09995 lineto +17.30614 -22.76993 lineto +15.58952 -13.73215 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.74692 -15.2813 moveto +2.93121 -25.09995 lineto +17.30614 -22.76993 lineto +15.58952 -13.73215 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 20.01305 21.82236 moveto +17.30766 13.49869 lineto +27.87247 14.74304 lineto +30.07011 22.74666 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 20.01305 21.82236 moveto +17.30766 13.49869 lineto +27.87247 14.74304 lineto +30.07011 22.74666 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -14.99939 -4.50592 moveto +-14.08424 -15.75966 lineto +0.74692 -15.2813 lineto +0.00076 -5.20439 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -14.99939 -4.50592 moveto +-14.08424 -15.75966 lineto +0.74692 -15.2813 lineto +0.00076 -5.20439 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.00076 -5.20439 moveto +0.74692 -15.2813 lineto +15.58952 -13.73215 lineto +15.00092 -4.50668 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.00076 -5.20439 moveto +0.74692 -15.2813 lineto +15.58952 -13.73215 lineto +15.00092 -4.50668 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -16.95633 32.13348 moveto +-21.84868 21.43631 lineto +-11.3987 17.36374 lineto +-7.1373 27.24266 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -16.95633 32.13348 moveto +-21.84868 21.43631 lineto +-11.3987 17.36374 lineto +-7.1373 27.24266 lineto + closepath stroke + 0.1742 0.1742 0 setrgbcolor +newpath 42.00554 47.90497 moveto +39.1182 42.67197 lineto +42.18636 45.66307 lineto +44.69528 50.58899 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.00554 47.90497 moveto +39.1182 42.67197 lineto +42.18636 45.66307 lineto +44.69528 50.58899 lineto + closepath stroke + 0.87347 0.87347 0 setrgbcolor +newpath 2.68517 60.51788 moveto +-5.8136 54.44908 lineto +-3.14102 49.31717 lineto +4.90952 55.53703 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 2.68517 60.51788 moveto +-5.8136 54.44908 lineto +-3.14102 49.31717 lineto +4.90952 55.53703 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 23.48557 29.47426 moveto +20.01305 21.82236 lineto +30.07011 22.74666 lineto +32.85522 30.1094 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 23.48557 29.47426 moveto +20.01305 21.82236 lineto +30.07011 22.74666 lineto +32.85522 30.1094 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 0.74844 4.80995 moveto +0.00076 -5.20439 lineto +15.00092 -4.50668 lineto +15.59029 4.65088 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 0.74844 4.80995 moveto +0.00076 -5.20439 lineto +15.00092 -4.50668 lineto +15.59029 4.65088 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -14.08272 6.66504 moveto +-14.99939 -4.50592 lineto +0.00076 -5.20439 lineto +0.74844 4.80995 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -14.08272 6.66504 moveto +-14.99939 -4.50592 lineto +0.00076 -5.20439 lineto +0.74844 4.80995 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -10.58197 41.49399 moveto +-16.95633 32.13348 lineto +-7.1373 27.24266 lineto +-1.59225 36.04736 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -10.58197 41.49399 moveto +-16.95633 32.13348 lineto +-7.1373 27.24266 lineto +-1.59225 36.04736 lineto + closepath stroke + 0.2044 0.2044 0 setrgbcolor +newpath 44.3367 52.52724 moveto +42.00554 47.90497 lineto +44.69528 50.58899 lineto +46.58394 54.80461 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 44.3367 52.52724 moveto +42.00554 47.90497 lineto +44.69528 50.58899 lineto +46.58394 54.80461 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 2.93388 14.45808 moveto +0.74844 4.80995 lineto +15.59029 4.65088 lineto +17.30766 13.49869 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 2.93388 14.45808 moveto +0.74844 4.80995 lineto +15.59029 4.65088 lineto +17.30766 13.49869 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 27.44598 36.36246 moveto +23.48557 29.47426 lineto +32.85522 30.1094 lineto +35.96802 36.75308 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.44598 36.36246 moveto +23.48557 29.47426 lineto +32.85522 30.1094 lineto +35.96802 36.75308 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -11.3987 17.36374 moveto +-14.08272 6.66504 lineto +0.74844 4.80995 lineto +2.93388 14.45808 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -11.3987 17.36374 moveto +-14.08272 6.66504 lineto +0.74844 4.80995 lineto +2.93388 14.45808 lineto + closepath stroke + 0.94925 0.94925 0 setrgbcolor +newpath 11.3285 64.78424 moveto +2.68517 60.51788 lineto +4.90952 55.53703 lineto +13.10806 60.1986 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 11.3285 64.78424 moveto +2.68517 60.51788 lineto +4.90952 55.53703 lineto +13.10806 60.1986 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 6.3942 23.46878 moveto +2.93388 14.45808 lineto +17.30766 13.49869 lineto +20.01305 21.82236 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 6.3942 23.46878 moveto +2.93388 14.45808 lineto +17.30766 13.49869 lineto +20.01305 21.82236 lineto + closepath stroke + 0.29605 0.29605 0 setrgbcolor +newpath 45.84808 56.62422 moveto +44.3367 52.52724 lineto +46.58394 54.80461 lineto +47.59216 58.41103 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 45.84808 56.62422 moveto +44.3367 52.52724 lineto +46.58394 54.80461 lineto +47.59216 58.41103 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -3.14102 49.31717 moveto +-10.58197 41.49399 lineto +-1.59225 36.04736 lineto +4.86641 43.61649 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -3.14102 49.31717 moveto +-10.58197 41.49399 lineto +-1.59225 36.04736 lineto +4.86641 43.61649 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 31.58035 42.47284 moveto +27.44598 36.36246 lineto +35.96802 36.75308 lineto +39.1182 42.67197 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 31.58035 42.47284 moveto +27.44598 36.36246 lineto +35.96802 36.75308 lineto +39.1182 42.67197 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -7.1373 27.24266 moveto +-11.3987 17.36374 lineto +2.93388 14.45808 lineto +6.3942 23.46878 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -7.1373 27.24266 moveto +-11.3987 17.36374 lineto +2.93388 14.45808 lineto +6.3942 23.46878 lineto + closepath stroke + 0.17654 0.17654 0 setrgbcolor +newpath 46.16089 64.10255 moveto +47.50633 61.49406 lineto +46.88301 63.68256 lineto +45.85762 65.22255 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 46.16089 64.10255 moveto +47.50633 61.49406 lineto +46.88301 63.68256 lineto +45.85762 65.22255 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 19.66438 67.40723 moveto +11.3285 64.78424 lineto +13.10806 60.1986 lineto +21.02356 63.44185 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 19.66438 67.40723 moveto +11.3285 64.78424 lineto +13.10806 60.1986 lineto +21.02356 63.44185 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 10.87646 31.64787 moveto +6.3942 23.46878 lineto +20.01305 21.82236 lineto +23.48557 29.47426 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 10.87646 31.64787 moveto +6.3942 23.46878 lineto +20.01305 21.82236 lineto +23.48557 29.47426 lineto + closepath stroke + 0.47253 0.47253 0 setrgbcolor +newpath 46.31462 60.26535 moveto +45.84808 56.62422 lineto +47.59216 58.41103 lineto +47.50633 61.49406 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 46.31462 60.26535 moveto +45.84808 56.62422 lineto +47.59216 58.41103 lineto +47.50633 61.49406 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 35.56519 47.84203 moveto +31.58035 42.47284 lineto +39.1182 42.67197 lineto +42.00554 47.90497 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 35.56519 47.84203 moveto +31.58035 42.47284 lineto +39.1182 42.67197 lineto +42.00554 47.90497 lineto + closepath stroke + 0.52103 0.52103 0 setrgbcolor +newpath 43.46123 66.23001 moveto +45.85762 65.22255 lineto +44.72656 66.53862 lineto +43.46237 66.2281 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46123 66.23001 moveto +45.85762 65.22255 lineto +44.72656 66.53862 lineto +43.46237 66.2281 lineto + closepath stroke + 0.6713 0.6713 0 setrgbcolor +newpath 39.98566 68.42194 moveto +35.14404 69.89136 lineto +33.95195 68.66264 lineto +39.38065 67.7967 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.98566 68.42194 moveto +35.14404 69.89136 lineto +33.95195 68.66264 lineto +39.38065 67.7967 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath -1.59225 36.04736 moveto +-7.1373 27.24266 lineto +6.3942 23.46878 lineto +10.87646 31.64787 lineto + closepath fill + 0 0 0 setrgbcolor +newpath -1.59225 36.04736 moveto +-7.1373 27.24266 lineto +6.3942 23.46878 lineto +10.87646 31.64787 lineto + closepath stroke + 0.63434 0.63434 0 setrgbcolor +newpath 43.46542 66.22696 moveto +41.33644 68.38493 lineto +39.98528 68.42194 lineto +43.46695 66.22696 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46542 66.22696 moveto +41.33644 68.38493 lineto +39.98528 68.42194 lineto +43.46695 66.22696 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 4.90952 55.53703 moveto +-3.14102 49.31717 lineto +4.86641 43.61649 lineto +11.83014 49.90044 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 4.90952 55.53703 moveto +-3.14102 49.31717 lineto +4.86641 43.61649 lineto +11.83014 49.90044 lineto + closepath stroke + 0.64597 0.64597 0 setrgbcolor +newpath 43.46085 66.23077 moveto +46.16089 64.10255 lineto +45.85762 65.22255 lineto +43.46123 66.23001 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46085 66.23077 moveto +46.16089 64.10255 lineto +45.85762 65.22255 lineto +43.46123 66.23001 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 27.30637 68.61458 moveto +19.66438 67.40723 lineto +21.02356 63.44185 lineto +28.28026 65.46097 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.30637 68.61458 moveto +19.66438 67.40723 lineto +21.02356 63.44185 lineto +28.28026 65.46097 lineto + closepath stroke + 0.71204 0.71204 0 setrgbcolor +newpath 45.55626 63.47694 moveto +46.31462 60.26535 lineto +47.50633 61.49406 lineto +46.16089 64.10255 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 45.55626 63.47694 moveto +46.31462 60.26535 lineto +47.50633 61.49406 lineto +46.16089 64.10255 lineto + closepath stroke + 0.78793 0.78793 0 setrgbcolor +newpath 43.46695 66.22696 moveto +39.98566 68.42194 lineto +39.38065 67.7967 lineto +43.46771 66.22772 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46695 66.22696 moveto +39.98566 68.42194 lineto +39.38065 67.7967 lineto +43.46771 66.22772 lineto + closepath stroke + 0.84009 0.84009 0 setrgbcolor +newpath 43.46161 66.23154 moveto +45.55626 63.47694 lineto +46.16089 64.10255 lineto +43.46085 66.23077 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46161 66.23154 moveto +45.55626 63.47694 lineto +46.16089 64.10255 lineto +43.46085 66.23077 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 39.085 52.54898 moveto +35.56519 47.84203 lineto +42.00554 47.90497 lineto +44.3367 52.52724 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.085 52.54898 moveto +35.56519 47.84203 lineto +42.00554 47.90497 lineto +44.3367 52.52724 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 16.06178 38.87444 moveto +10.87646 31.64787 lineto +23.48557 29.47426 lineto +27.44598 36.36246 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 16.06178 38.87444 moveto +10.87646 31.64787 lineto +23.48557 29.47426 lineto +27.44598 36.36246 lineto + closepath stroke + 0.95343 0.95343 0 setrgbcolor +newpath 43.46771 66.22772 moveto +39.38065 67.7967 lineto +39.68391 66.67633 lineto +43.46695 66.2281 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46771 66.22772 moveto +39.38065 67.7967 lineto +39.68391 66.67633 lineto +43.46695 66.2281 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 33.95195 68.66264 moveto +27.30637 68.61458 lineto +28.28026 65.46097 lineto +34.57565 66.47415 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 33.95195 68.66264 moveto +27.30637 68.61458 lineto +28.28026 65.46097 lineto +34.57565 66.47415 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.46313 66.23154 moveto +44.20471 63.51433 lineto +45.55626 63.47694 lineto +43.46161 66.23154 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46313 66.23154 moveto +44.20471 63.51433 lineto +45.55626 63.47694 lineto +43.46161 66.23154 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 39.38065 67.7967 moveto +33.95195 68.66264 lineto +34.57565 66.47415 lineto +39.68391 66.67633 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.38065 67.7967 moveto +33.95195 68.66264 lineto +34.57565 66.47415 lineto +39.68391 66.67633 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 4.86641 43.61649 moveto +-1.59225 36.04736 lineto +10.87646 31.64787 lineto +16.06178 38.87444 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 4.86641 43.61649 moveto +-1.59225 36.04736 lineto +10.87646 31.64787 lineto +16.06178 38.87444 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.46695 66.2281 moveto +39.68391 66.67633 lineto +40.81459 65.3614 lineto +43.46619 66.22963 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46695 66.2281 moveto +39.68391 66.67633 lineto +40.81459 65.3614 lineto +43.46619 66.22963 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 13.10806 60.1986 moveto +4.90952 55.53703 lineto +11.83014 49.90044 lineto +18.8816 54.94041 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 13.10806 60.1986 moveto +4.90952 55.53703 lineto +11.83014 49.90044 lineto +18.8816 54.94041 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.46428 66.23077 moveto +42.4694 64.20403 lineto +44.20471 63.51433 lineto +43.46313 66.23154 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46428 66.23077 moveto +42.4694 64.20403 lineto +44.20471 63.51433 lineto +43.46313 66.23154 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 41.85333 56.68411 moveto +39.085 52.54898 lineto +44.3367 52.52724 lineto +45.84808 56.62422 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 41.85333 56.68411 moveto +39.085 52.54898 lineto +44.3367 52.52724 lineto +45.84808 56.62422 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.46619 66.22963 moveto +40.81459 65.3614 lineto +42.4694 64.20403 lineto +43.46428 66.23077 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.46619 66.22963 moveto +40.81459 65.3614 lineto +42.4694 64.20403 lineto +43.46428 66.23077 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 44.20471 63.51433 moveto +43.62564 60.32639 lineto +46.31462 60.26535 lineto +45.55626 63.47694 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 44.20471 63.51433 moveto +43.62564 60.32639 lineto +46.31462 60.26535 lineto +45.55626 63.47694 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 43.62564 60.32639 moveto +41.85333 56.68411 lineto +45.84808 56.62422 lineto +46.31462 60.26535 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 43.62564 60.32639 moveto +41.85333 56.68411 lineto +45.84808 56.62422 lineto +46.31462 60.26535 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 21.59271 45.11833 moveto +16.06178 38.87444 lineto +27.44598 36.36246 lineto +31.58035 42.47284 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.59271 45.11833 moveto +16.06178 38.87444 lineto +27.44598 36.36246 lineto +31.58035 42.47284 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 21.02356 63.44185 moveto +13.10806 60.1986 lineto +18.8816 54.94041 lineto +25.62523 58.85048 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 21.02356 63.44185 moveto +13.10806 60.1986 lineto +18.8816 54.94041 lineto +25.62523 58.85048 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 39.68391 66.67633 moveto +34.57565 66.47415 lineto +36.84883 63.91068 lineto +40.81459 65.3614 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 39.68391 66.67633 moveto +34.57565 66.47415 lineto +36.84883 63.91068 lineto +40.81459 65.3614 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 11.83014 49.90044 moveto +4.86641 43.61649 lineto +16.06178 38.87444 lineto +21.59271 45.11833 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 11.83014 49.90044 moveto +4.86641 43.61649 lineto +16.06178 38.87444 lineto +21.59271 45.11833 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 42.4694 64.20403 moveto +40.16151 61.66077 lineto +43.62564 60.32639 lineto +44.20471 63.51433 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 42.4694 64.20403 moveto +40.16151 61.66077 lineto +43.62564 60.32639 lineto +44.20471 63.51433 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 27.1019 50.41656 moveto +21.59271 45.11833 lineto +31.58035 42.47284 lineto +35.56519 47.84203 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 27.1019 50.41656 moveto +21.59271 45.11833 lineto +31.58035 42.47284 lineto +35.56519 47.84203 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 28.28026 65.46097 moveto +21.02356 63.44185 lineto +25.62523 58.85048 lineto +31.71082 61.78627 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 28.28026 65.46097 moveto +21.02356 63.44185 lineto +25.62523 58.85048 lineto +31.71082 61.78627 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 40.81459 65.3614 moveto +36.84883 63.91068 lineto +40.16151 61.66077 lineto +42.4694 64.20403 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.81459 65.3614 moveto +36.84883 63.91068 lineto +40.16151 61.66077 lineto +42.4694 64.20403 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 34.57565 66.47415 moveto +28.28026 65.46097 lineto +31.71082 61.78627 lineto +36.84883 63.91068 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 34.57565 66.47415 moveto +28.28026 65.46097 lineto +31.71082 61.78627 lineto +36.84883 63.91068 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 40.16151 61.66077 moveto +36.6787 58.57315 lineto +41.85333 56.68411 lineto +43.62564 60.32639 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 40.16151 61.66077 moveto +36.6787 58.57315 lineto +41.85333 56.68411 lineto +43.62564 60.32639 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 32.23648 54.86298 moveto +27.1019 50.41656 lineto +35.56519 47.84203 lineto +39.085 52.54898 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 32.23648 54.86298 moveto +27.1019 50.41656 lineto +35.56519 47.84203 lineto +39.085 52.54898 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 18.8816 54.94041 moveto +11.83014 49.90044 lineto +21.59271 45.11833 lineto +27.1019 50.41656 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 18.8816 54.94041 moveto +11.83014 49.90044 lineto +21.59271 45.11833 lineto +27.1019 50.41656 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 36.6787 58.57315 moveto +32.23648 54.86298 lineto +39.085 52.54898 lineto +41.85333 56.68411 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 36.6787 58.57315 moveto +32.23648 54.86298 lineto +39.085 52.54898 lineto +41.85333 56.68411 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 36.84883 63.91068 moveto +31.71082 61.78627 lineto +36.6787 58.57315 lineto +40.16151 61.66077 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 36.84883 63.91068 moveto +31.71082 61.78627 lineto +36.6787 58.57315 lineto +40.16151 61.66077 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 25.62523 58.85048 moveto +18.8816 54.94041 lineto +27.1019 50.41656 lineto +32.23648 54.86298 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 25.62523 58.85048 moveto +18.8816 54.94041 lineto +27.1019 50.41656 lineto +32.23648 54.86298 lineto + closepath stroke + 1 1 0 setrgbcolor +newpath 31.71082 61.78627 moveto +25.62523 58.85048 lineto +32.23648 54.86298 lineto +36.6787 58.57315 lineto + closepath fill + 0 0 0 setrgbcolor +newpath 31.71082 61.78627 moveto +25.62523 58.85048 lineto +32.23648 54.86298 lineto +36.6787 58.57315 lineto + closepath stroke +grestore +grestore +showpage +%%EOF diff --git a/doc/figures/Banane.mp b/doc/figures/Banane.mp new file mode 100644 index 0000000..25c182b --- /dev/null +++ b/doc/figures/Banane.mp @@ -0,0 +1,47 @@ +input mp-solid + + vardef Transform(expr PT)= + save $ ; color $ ; + Xpart($)=0.6*Xpart(PT); + Ypart($)=0.6*Ypart(PT); + Zpart($)=1.75*Zpart(PT); + $ +enddef ; + +figureespace(-4u,-4u,4u,4u); +fill feuillet; +Initialisation(1500,-60,10,25); +nb:=24; +subh:=12; +outcolor:=jaune; +Objetsphere1("R=2"); +AffichageObjet1; +finespace; + +%2 + +figureespace(-4u,-4u,4u,4u); +%traits:=false; +fill feuillet; +Initialisation(1500,-60,10,25); +nb:=24; +subh:=12; +outcolor:=jaune; +Objetsphere1("R=2"); + +transformation:=true; +ObjetDeplacement2(1); + +vardef Transform(expr PT)= + save $ ; color $ ; + angy:=10*(Zpart(PT)); + $=RotXYZ(PT); + $ +enddef ; + +outcolor:=jaune; +ObjetDeplacement3(2); +AffichageObjet3; +finespace; + +end diff --git a/doc/figures/Banane1.pdf b/doc/figures/Banane1.pdf new file mode 100644 index 0000000..4eda86d Binary files /dev/null and b/doc/figures/Banane1.pdf differ diff --git a/doc/figures/Banane2.pdf b/doc/figures/Banane2.pdf new file mode 100644 index 0000000..16eb474 Binary files /dev/null and b/doc/figures/Banane2.pdf differ diff --git a/doc/figures/Facteurechelle.mp b/doc/figures/Facteurechelle.mp new file mode 100644 index 0000000..0243f49 --- /dev/null +++ b/doc/figures/Facteurechelle.mp @@ -0,0 +1,43 @@ +input mp-solid + +vardef Transform(expr PT)=%pour la torsion. + save $; + color $; + Xpart($)=1.25*Xpart(PT); + Ypart($)=0.75*Ypart(PT); + Zpart($)=0.5*Zpart(PT); + $ +enddef; + +outcolor:=jaune; +incolor:=0.5[vert,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,50,20,15); +outcolor:=blanc; +subh:=8;TR:=(0,0,-2); +Objetgrille1("am=-7","an=7","bm=-7","bn=7"); +nb:=24; subh:=36; +outcolor:=0.5[rouge,blanc]; +TR:=(0,0,0); +Objettore2("R=4","r=2"); +nbobj:=2; +DessineFusion; +TraceAxes; +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,50,20,15); +outcolor:=blanc; +subh:=8;TR:=(0,0,-1); +Objetgrille1("am=-5","an=5","bm=-5","bn=5"); +nb:=24; subh:=36; +TR:=(0,0,0); +transformation:=true; +outcolor:=0.5[rouge,blanc]; +Objettore2("R=4","r=2"); +nbobj:=2; +DessineFusion; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/Facteurechelle1.pdf b/doc/figures/Facteurechelle1.pdf new file mode 100644 index 0000000..f1a9582 Binary files /dev/null and b/doc/figures/Facteurechelle1.pdf differ diff --git a/doc/figures/Facteurechelle2.pdf b/doc/figures/Facteurechelle2.pdf new file mode 100644 index 0000000..c6e719e Binary files /dev/null and b/doc/figures/Facteurechelle2.pdf differ diff --git a/doc/figures/Flexion.mp b/doc/figures/Flexion.mp new file mode 100644 index 0000000..71c04ed --- /dev/null +++ b/doc/figures/Flexion.mp @@ -0,0 +1,40 @@ +input mp-solid + +vardef Transform(expr PT)=%pour la flexion. + save $; + color $; + angy:=2*(Zpart(PT)); + $=RotXYZ(PT); + $ +enddef; + +incolor:=0.5[vert,blanc]; +unit:=0.75; + +figureespace(-3u,-3u,3u,10u); +Initialisation(500,50,20,35); +outcolor:=blanc; +subh:=8; +Objetgrille1("am=-2","an=2","bm=-2","bn=2"); +nb:=2; subh:=20; +outcolor:=0.5[rouge,blanc]; +ObjetPrisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); +nbobj:=2; +DessineFusion; +finespace; + +figureespace(-3u,-3u,3u,10u); +Initialisation(500,50,20,35); +outcolor:=blanc; +subh:=8; +Objetgrille1("am=-2","an=2","bm=-2","bn=2"); +nb:=2; subh:=20; +transformation:=true; +outcolor:=0.5[rouge,blanc]; +ObjetPrisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); +nbobj:=2; +DessineFusion; +color A; +drawarrow Projette((0,0,Zpart(Image((-0.5,0.5,10)))))--Projette(Image((-0.5,0.5,10))); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Flexion1.pdf b/doc/figures/Flexion1.pdf new file mode 100644 index 0000000..cddc5f1 Binary files /dev/null and b/doc/figures/Flexion1.pdf differ diff --git a/doc/figures/Flexion2.pdf b/doc/figures/Flexion2.pdf new file mode 100644 index 0000000..8517c3e Binary files /dev/null and b/doc/figures/Flexion2.pdf differ diff --git a/doc/figures/J67.mp b/doc/figures/J67.mp new file mode 100644 index 0000000..1f02237 --- /dev/null +++ b/doc/figures/J67.mp @@ -0,0 +1,14 @@ +input mp-solid +echelle:=1; +debut:=0; + +fillcolor:=0.5[orange,white]; +Transparence:=true; +incolor:=0.5[orange,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,55,20,150); +ObjetOFF1("J67.off"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/J67.off b/doc/figures/J67.off new file mode 100644 index 0000000..9ca4178 --- /dev/null +++ b/doc/figures/J67.off @@ -0,0 +1,64 @@ +32 30 60 + +-0.5915332925724 -0.2450211123788 0.5915332925726 +-0.2450211123787 -0.5915332925726 0.5915332925725 +-0.5915332925724 0.2450211123787 0.5915332925726 +-0.9380454727663 -0.0000000000001 0.3465121801939 + 0.2450211123789 -0.5915332925725 0.5915332925725 +-0.2450211123787 0.5915332925725 0.5915332925726 +-0.5915332925725 -0.5915332925726 0.2450211123788 + 0.5915332925726 -0.2450211123788 0.5915332925724 + 0.2450211123788 0.5915332925725 0.5915332925726 +-0.9380454727663 -0.3465121801939 0.0000000000001 + 0.5915332925726 0.2450211123787 0.5915332925725 +-0.5915332925726 0.5915332925725 0.2450211123789 +-0.9380454727663 0.3465121801937 0.0000000000002 + 0.5915332925726 -0.5915332925725 0.2450211123787 +-0.5915332925725 -0.5915332925726 -0.2450211123788 + 0.9380454727663 0.0000000000000 0.3465121801937 +-0.9380454727663 0.0000000000000 -0.3465121801937 + 0.5915332925725 0.5915332925726 0.2450211123788 +-0.5915332925726 0.5915332925725 -0.2450211123787 + 0.9380454727663 -0.3465121801937 -0.0000000000002 + 0.5915332925726 -0.5915332925725 -0.2450211123789 +-0.5915332925726 -0.2450211123787 -0.5915332925725 + 0.9380454727663 0.3465121801939 -0.0000000000001 +-0.2450211123788 -0.5915332925725 -0.5915332925726 +-0.5915332925726 0.2450211123788 -0.5915332925724 + 0.5915332925725 0.5915332925726 -0.2450211123788 + 0.2450211123787 -0.5915332925725 -0.5915332925726 +-0.2450211123789 0.5915332925725 -0.5915332925725 + 0.9380454727663 0.0000000000001 -0.3465121801939 + 0.5915332925724 -0.2450211123787 -0.5915332925726 + 0.2450211123787 0.5915332925726 -0.5915332925725 + 0.5915332925724 0.2450211123788 -0.5915332925726 +4 19 15 22 28 +4 25 31 28 22 +3 17 25 22 +4 10 17 22 15 +3 7 10 15 +4 13 7 15 19 +3 20 13 19 +4 29 20 19 28 +3 31 29 28 +4 12 3 9 16 +4 14 21 16 9 +3 6 14 9 +4 0 6 9 3 +3 2 0 3 +4 11 2 3 12 +3 18 11 12 +4 24 18 12 16 +3 21 24 16 +8 20 26 23 14 6 1 4 13 +8 31 30 27 24 21 23 26 29 +8 17 8 5 11 18 27 30 25 +8 7 4 1 0 2 5 8 10 +3 13 4 7 +3 1 6 0 +3 10 8 17 +3 5 2 11 +3 25 30 31 +3 27 18 24 +3 29 26 20 +3 23 21 14 \ No newline at end of file diff --git a/doc/figures/J671.pdf b/doc/figures/J671.pdf new file mode 100644 index 0000000..ef8b8a6 Binary files /dev/null and b/doc/figures/J671.pdf differ diff --git a/doc/figures/OBJ.mp b/doc/figures/OBJ.mp new file mode 100644 index 0000000..c96b6cc --- /dev/null +++ b/doc/figures/OBJ.mp @@ -0,0 +1,12 @@ +input mp-solid + +echelle:=50; + +figureespace(-10u,-10u,10u,20u); +Initialisation(2500,80,-70,50); +outcolor:=0.7[rose,white]; +%Creux:=true; +incolor:=jaune; +LectureOBJ("../../data/Midpoly_04.obj"); +finespace; +end \ No newline at end of file diff --git a/doc/figures/OBJ1.mp b/doc/figures/OBJ1.mp new file mode 100644 index 0000000..1519df1 --- /dev/null +++ b/doc/figures/OBJ1.mp @@ -0,0 +1,11 @@ +input mp-solid + +echelle:=0.25; + +figureespace(-10u,-10u,10u,20u); +Initialisation(2500,-80,80,50); +outcolor:=0.7[rose,white]; +incolor:=jaune; +LectureOBJ("../../data/Y3483.obj"); +finespace; +end \ No newline at end of file diff --git a/doc/figures/OBJ1.pdf b/doc/figures/OBJ1.pdf new file mode 100644 index 0000000..7f75428 Binary files /dev/null and b/doc/figures/OBJ1.pdf differ diff --git a/doc/figures/OBJ11.pdf b/doc/figures/OBJ11.pdf new file mode 100644 index 0000000..1686ee4 Binary files /dev/null and b/doc/figures/OBJ11.pdf differ diff --git a/doc/figures/OFF.mp b/doc/figures/OFF.mp new file mode 100644 index 0000000..b288456 --- /dev/null +++ b/doc/figures/OFF.mp @@ -0,0 +1,17 @@ +%fichier off:http://www.irit.fr/~Loic.Barthe/Enseignements/TPs_OpenGL/L3_IUP_SI/TP7/Maillages/triceratops.off + +input mp-solid + +echelle:=2; +debut:=0; + +invnormale:=-1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-25,10,50); +outcolor:=0.8*white; +incolor:=gris; +LectureOFF("../../data/triceratops.off"); +finespace; + +end \ No newline at end of file diff --git a/doc/figures/OFF1.mp b/doc/figures/OFF1.mp new file mode 100644 index 0000000..7415776 --- /dev/null +++ b/doc/figures/OFF1.mp @@ -0,0 +1,15 @@ +%www-c.inria.fr/gamma/download/download.php + +input mp-solid + +echelle:=2; +debut:=1; +Creux:=true; +outcolor:=0.5[jaune,white]; +incolor:=0.5[bleu,white]; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-25,10,50); +LectureOFF("../../data/10-61.off"); +finespace; + +end \ No newline at end of file diff --git a/doc/figures/OFF1.pdf b/doc/figures/OFF1.pdf new file mode 100644 index 0000000..e120421 Binary files /dev/null and b/doc/figures/OFF1.pdf differ diff --git a/doc/figures/OFF11.pdf b/doc/figures/OFF11.pdf new file mode 100644 index 0000000..1979198 Binary files /dev/null and b/doc/figures/OFF11.pdf differ diff --git a/doc/figures/OFF2.mp b/doc/figures/OFF2.mp new file mode 100644 index 0000000..9146ea9 --- /dev/null +++ b/doc/figures/OFF2.mp @@ -0,0 +1,11 @@ +input mp-solid + +echelle:=5; +debut:=1; +arcenciel:=true; +invnormale:=-1; +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,30,20,50); +LectureOFF("../../data/5_1.pc.off"); +finespace; +end \ No newline at end of file diff --git a/doc/figures/OFF21.pdf b/doc/figures/OFF21.pdf new file mode 100644 index 0000000..f611931 Binary files /dev/null and b/doc/figures/OFF21.pdf differ diff --git a/doc/figures/Sectionanneau.mp b/doc/figures/Sectionanneau.mp new file mode 100644 index 0000000..1677bda --- /dev/null +++ b/doc/figures/Sectionanneau.mp @@ -0,0 +1,22 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,30,10); +outcolor:=ciel; +subh:=4; +angx:=10; +Objetanneau1("R=8","r=6","h=3"); +AffichageObjet1; +finespace; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,30,25); +arcenciel:=true; +incolor:=jaune; +R:=4; +subh:=24; +path pp; +pp=for k=0 step 10 until 90:(R+1+cosd(k),1+sind(k))-- endfor for k=90 step 10 until 180:(R+cosd(k)-1,1+sind(k))-- endfor for k=180 step 10 until 270:(R+cosd(k)-1,sind(k)-1)-- endfor for k=270 step 10 until 350:(R+cosd(k)+1,sind(k)-1)-- endfor (R+2,1)--cycle; +ObjetAnneau1("nbp=42",pp); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/Sectionanneau1.pdf b/doc/figures/Sectionanneau1.pdf new file mode 100644 index 0000000..bbe6c75 Binary files /dev/null and b/doc/figures/Sectionanneau1.pdf differ diff --git a/doc/figures/Sectionanneau2.pdf b/doc/figures/Sectionanneau2.pdf new file mode 100644 index 0000000..655ef2f Binary files /dev/null and b/doc/figures/Sectionanneau2.pdf differ diff --git a/doc/figures/Sparam1.mp b/doc/figures/Sparam1.mp new file mode 100644 index 0000000..2f6c8e4 --- /dev/null +++ b/doc/figures/Sparam1.mp @@ -0,0 +1,9 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-30,15,75); +outcolor:=0.5[red,white]; +incolor:=0.5[jaune,white]; +draw Sparam("((1+0.5*cos(u))*cos(v),(1+0.5*cos(u))*sin(v),0.5*sin(u))",-pi,pi/12,pi/15,2*pi/3,2*pi,pi/20); +finespace; +end diff --git a/doc/figures/Sparam11.pdf b/doc/figures/Sparam11.pdf new file mode 100644 index 0000000..1b7458c Binary files /dev/null and b/doc/figures/Sparam11.pdf differ diff --git a/doc/figures/Sparam3.mp b/doc/figures/Sparam3.mp new file mode 100644 index 0000000..178a92b --- /dev/null +++ b/doc/figures/Sparam3.mp @@ -0,0 +1,9 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(50,-110,10,100); +outcolor:=0.5[orange,white]; +incolor:=0.25[gris,white]; +draw Sparam("(u,v,u*u-v*v)",-1,1,0.05,-1,1,0.05); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Sparam31.pdf b/doc/figures/Sparam31.pdf new file mode 100644 index 0000000..03fff0d Binary files /dev/null and b/doc/figures/Sparam31.pdf differ diff --git a/doc/figures/Sparam5.mp b/doc/figures/Sparam5.mp new file mode 100644 index 0000000..b83c458 --- /dev/null +++ b/doc/figures/Sparam5.mp @@ -0,0 +1,9 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,10,20,100); +incolor:=0.75[jaune,white]; +outcolor:=0.5[green,white]; +draw Sparam("(u*cos(v)*sin(pi/6),u*sin(v)*sin(pi/6),u*cos(pi/6))",-2,-0.1,0.2,-2.6,2.6,0.2); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Sparam51.pdf b/doc/figures/Sparam51.pdf new file mode 100644 index 0000000..e0d17f5 Binary files /dev/null and b/doc/figures/Sparam51.pdf differ diff --git a/doc/figures/Sparam8.mp b/doc/figures/Sparam8.mp new file mode 100644 index 0000000..d4cc8e1 --- /dev/null +++ b/doc/figures/Sparam8.mp @@ -0,0 +1,9 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(50,0,-20,100); +incolor:=0.75[orange,white]; +outcolor:=0.5[blue,white]; +draw Sparam("(cos(v)*sqrt(1+u*u),sin(v)*sqrt(1+u*u),0.6*u)",-1,1.5,0.1,-5*pi/6,5*pi/6,pi/36); +finespace; +end diff --git a/doc/figures/Sparam81.pdf b/doc/figures/Sparam81.pdf new file mode 100644 index 0000000..668ceaa Binary files /dev/null and b/doc/figures/Sparam81.pdf differ diff --git a/doc/figures/Sparam9.mp b/doc/figures/Sparam9.mp new file mode 100644 index 0000000..229aaea --- /dev/null +++ b/doc/figures/Sparam9.mp @@ -0,0 +1,16 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(100,5,10,25); +incolor:=0.5[jaune,white]; +outcolor:=0.75[violet,blanc]; +drawarrow Projette((0,0,0))--Projette((0,3,3)) withpen pencircle scaled2bp; +for l=-1 upto 5: + draw Projette((l,-1,0))--Projette((l,5,0)) withcolor gris; + draw Projette((-1,l,0))--Projette((5,l,0)) withcolor gris; +endfor; +TraceAxes; +drawarrow Projette((0,0,0))--Projette((0,3,3)) withpen pencircle scaled2bp; +draw Sparam("(6*(cos(u)**3)*sin(u),4*cos(u)*cos(u)+v,v)",0,2*pi,pi/30,0,2*sqrt(2),0.1); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Sparam91.pdf b/doc/figures/Sparam91.pdf new file mode 100644 index 0000000..fde87ac Binary files /dev/null and b/doc/figures/Sparam91.pdf differ diff --git a/doc/figures/Surfz1.mp b/doc/figures/Surfz1.mp new file mode 100644 index 0000000..6ec1b44 --- /dev/null +++ b/doc/figures/Surfz1.mp @@ -0,0 +1,25 @@ +prologues:=2; + +verbatimtex +%&latex +\documentclass[12pt]{article} +\usepackage{fourier} +\begin{document} +etex + +input mp-solid + +invnormalelum:=-1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,15,35.264,10); +incolor:=0.5[green,white]; +outcolor:=0.25[orange,white]; +draw SurfZ("4*cos(X++Y)*mexp(-(X++Y)*50)",-15,15,-10,10,60,150);%60,120 +label(btex $f(z)=4\cos\left(\sqrt{x^2+y^2}\right)\textrm{e}^{-50\sqrt{x^2+y^2}}\mbox{ avec }\left\{\begin{array}{l} + x\in[-15,15]\\ + y\in[-10,10]\\ + \end{array} + \right.$ etex,u*(0,-5)); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Surfz11.pdf b/doc/figures/Surfz11.pdf new file mode 100644 index 0000000..4c2dd92 Binary files /dev/null and b/doc/figures/Surfz11.pdf differ diff --git a/doc/figures/Surfz2.mp b/doc/figures/Surfz2.mp new file mode 100644 index 0000000..19b1a9a --- /dev/null +++ b/doc/figures/Surfz2.mp @@ -0,0 +1,24 @@ +verbatimtex +%&latex +\documentclass[12pt]{article} +\usepackage{fourier} +\usepackage{amsmath} +\begin{document} +etex + +input mp-solid + +invnormalelum:=-1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,70,30,10); +incolor:=0.5[jaune,white]; +arcenciel:=true; +draw SurfZ("if (X=0) and (Y=0):10 else:10*sin((X++Y))/(X++Y) fi",-8,8,-8,8,60,150);%60,120 +label(btex $f(z)=10\times\dfrac{\sin\left(\sqrt{x^2+y^2}\right)}{\sqrt{x^2+y^2}}\mbox{ avec }\left\{\begin{array}{l} + x\in[-8,8]\\ + y\in[-8,8]\\ + \end{array} + \right.$ etex,u*(0,-4)); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Surfz21.pdf b/doc/figures/Surfz21.pdf new file mode 100644 index 0000000..795bfbd Binary files /dev/null and b/doc/figures/Surfz21.pdf differ diff --git a/doc/figures/Surfz3.mp b/doc/figures/Surfz3.mp new file mode 100644 index 0000000..83edc59 --- /dev/null +++ b/doc/figures/Surfz3.mp @@ -0,0 +1,24 @@ +verbatimtex +%&latex +\documentclass[12pt]{article} +\usepackage{fourier} +\usepackage{amsmath} +\begin{document} +etex + +input mp-solid + +invnormalelum:=-1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,45,35,10); +incolor:=0.5[jaune,white]; +outcolor:=0.8[violet,white]; +draw SurfZ("if X=0:if Y=0:10 else:10*sin(Y)/Y fi else:if Y=0:10*sin(X)/X else: 10*sin(X)/X*sin(Y)/Y fi fi",-10,10,-12,12,60,150); +label(btex $f(z)=10\times\dfrac{\sin x}x\dfrac{\sin y}y\mbox{ avec }\left\{\begin{array}{l} + x\in[-10,10]\\ + y\in[-12,12]\\ + \end{array} + \right.$ etex,u*(0,-4)); +finespace; +end \ No newline at end of file diff --git a/doc/figures/Surfz31.pdf b/doc/figures/Surfz31.pdf new file mode 100644 index 0000000..63a4669 Binary files /dev/null and b/doc/figures/Surfz31.pdf differ diff --git a/doc/figures/Terrefusee.mp b/doc/figures/Terrefusee.mp new file mode 100644 index 0000000..b60c47f --- /dev/null +++ b/doc/figures/Terrefusee.mp @@ -0,0 +1,125 @@ +input mp-geo +input mp-solid; + +vardef mappemonde(expr longobs,latobs)= + projection:="non"; + Initialisation(5,longobs,latobs,400); + numeric phim,phip,phii;%phi moins -- phi plus - phi intermédiaire + phim=Phi+arcsind(rayon/Rho)-90; + phip=Phi+90-arcsind(rayon/Rho); + color pte[]; + pte1=rayon*(cosd(phim)*cosd(Theta),cosd(phim)*sind(Theta),sind(phim)); + pte2=rayon*(cosd(phip)*cosd(Theta),cosd(phip)*sind(Theta),sind(phip)); + pte3=1/2[pte1,pte2]; + pte4-pte3=Normal((0,0,0),pte1,pte2); + if (Phi>90): + phip:=180-phip; + phii:=180-phim; + phim:=phip; + phip:=phii; + fi; + if (Phi<-90): + phip:=-180-phip; + phii:=-180-phim; + phim:=phip; + phip:=phii; + fi; + fill cercles(pte3,pte1,pte3,pte1,pte4) withcolor ciel; + Lecture("Cameriquesud.dat"); + Lecture("Ccaraibes.dat"); + Lecture("Cameriquecentrale.dat"); + Lecture("Cameriquenord.dat"); + Lecture("Casie.dat"); + Lecture("Ceurope.dat"); + Lecture("Cafrique.dat"); + if volcans=true: + Lecturevolcans; + fi; + if lacs=true: + Lecturelacs; + Lecturelacssup; + fi; + Lectureiles; + if capitales=true: + Lecturecapitales; + fi; + if fleuves=true: + Lecturerivieres; + %Lecturerivieressup; + fi; + if maillage=true: + drawoptions(withcolor gris); + MaillageSphere; + drawoptions(); + fi; + if maille=true: + Maille; + fi; + draw cercles(pte3,pte1,pte3,pte1,pte4); +enddef; + +vardef Transform(expr PT)=RotY(RotX(RotZ(PT))) +enddef; + +transformation:=true; +%2' +figureespace(-7u,-7u,8u,7u); +picture terre; +fleuves:=false; +lacs:=false; +capitales:=false; +terre=image( + mappemonde(80,20); + ); +fill feuillet; +for k=1 upto 100: + fill fullcircle scaled (2*uniformdeviate(1)*mm) shifted((uniformdeviate(1))[coinbg,coinbd]+uniformdeviate(1)*(coinhg-coinbg)) withcolor jaune; +endfor; +draw terre; + +Initialisation(500,160,20,50); +unit:=0.2; +traits:=false; +angy:=-60; +outcolor:=rouge; +path rocket[]; +rocket1=(0,4.6)--(-0.8,4.6)--(-0.85,5.6)--(-0.95,6.6)--(-1.05,7.6)--(-1.1,8.6)--(-1.2,9.6); +rocket2=(-1.2,9.6)--(-1.25,10.6)--(-1.3,11.6)--(-1.35,12.6)--(-1.4,13.6)--(-1.4,14.6)--(-1.375,15.6)--(-1.27,16.6)--(-1.2,17.6)--(-1.05,18.6); +rocket3=(-1.05,18.6)--(-0.85,19.6)--(-0.65,20.6)--(-0.35,21.6)--(-0.1,22.2)--(-0.1,23.75)--(0,23.75); +subh:=24; +perso1:=true; +Ferme1:=false; +string couleurperso; +couleurperso="if ((tapj mod 48)=0) or ((tapj mod 48)=1) or ((tapj mod 48)=2) or ((tapj mod 48)=6) or ((tapj mod 48)=7) or ((tapj mod 48)=8) or ((tapj mod 48)=12) or ((tapj mod 48)=13) or ((tapj mod 48)=14) or ((tapj mod 48)=18) or ((tapj mod 48)=19) or ((tapj mod 48)=20) or ((tapj mod 48)=27) or ((tapj mod 48)=28) or ((tapj mod 48)=29) or ((tapj mod 48)=33) or ((tapj mod 48)=34) or ((tapj mod 48)=35) or ((tapj mod 48)=39) or ((tapj mod 48)=40) or ((tapj mod 48)=41) or ((tapj mod 48)=45) or ((tapj mod 48)=46) or ((tapj mod 48)=47):red else: white fi;"; +TR:=(0,-15,0); +ObjetAnneau1("nbp=10",rocket2); +outcolor:=rouge; +for k=2 upto 6: + Ferme[k]:=true; +endfor; +ObjetAnneau2("nbp=7",rocket1); +ObjetAnneau3("nbp=7",rocket3); +path amortisseur; +amortisseur=for k=-90 step 10 until 0:(cosd(k),sind(k)+1)--endfor for k=0 step 2 until 22:(cosd(k)*11.78-10.78,11.78*sind(k)+1)-- endfor (0,5.75); +TR:=(0,-15,0)+(0,-5,0); +ObjetAnneau4("nbp=22",amortisseur); +angz:=150; +TR:=(0,0,0); +TR:=(0,-15,0)+Image((0,-5,0)); +ObjetAnneau5("nbp=22",amortisseur); +angz:=-90; +TR:=(0,0,0); +TR:=(0,-15,0)+Image((0,-5,0)); +ObjetAnneau6("nbp=22",amortisseur); +TR:=(0,-15,0)+(0,0,0); +angz:=0; +subh:=1; +ObjetBiface7((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +angz:=150; +ObjetBiface8((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +angz:=-90; +ObjetBiface9((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +nbobj:=9; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/Terrefusee1.pdf b/doc/figures/Terrefusee1.pdf new file mode 100644 index 0000000..7c9b887 Binary files /dev/null and b/doc/figures/Terrefusee1.pdf differ diff --git a/doc/figures/Torsion.mp b/doc/figures/Torsion.mp new file mode 100644 index 0000000..1e5737e --- /dev/null +++ b/doc/figures/Torsion.mp @@ -0,0 +1,40 @@ +input mp-solid + +vardef Transform(expr PT)=%pour la torsion. + save $; + color $; + angz:=subh*(Zpart(PT)); + $=RotXYZ(PT); + $ +enddef; + +incolor:=0.5[vert,blanc]; +unit:=0.75; + +figureespace(-3u,-3u,3u,10u); +Initialisation(500,50,20,35); +outcolor:=blanc; +subh:=8; +Objetgrille1("am=-2","an=2","bm=-2","bn=2"); +nb:=2; +subh:=20; +outcolor:=0.5[rouge,blanc]; +ObjetPrisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); +nbobj:=2; +DessineFusion; +finespace; + +figureespace(-3u,-3u,3u,10u); +Initialisation(500,50,20,35); +outcolor:=blanc; +subh:=8; +Objetgrille1("am=-2","an=2","bm=-2","bn=2"); +nb:=2; +subh:=20; +transformation:=true; +outcolor:=0.5[rouge,blanc]; +ObjetPrisme2("axe=(0,0,1)","h=10")((0.5,-0.5,0),(0.5,0.5,0),(-0.5,0.5,0),(-0.5,-0.5,0)); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/Torsion1.pdf b/doc/figures/Torsion1.pdf new file mode 100644 index 0000000..0e25b2c Binary files /dev/null and b/doc/figures/Torsion1.pdf differ diff --git a/doc/figures/Torsion2.pdf b/doc/figures/Torsion2.pdf new file mode 100644 index 0000000..f8a424e Binary files /dev/null and b/doc/figures/Torsion2.pdf differ diff --git a/doc/figures/Transforigine.mp b/doc/figures/Transforigine.mp new file mode 100644 index 0000000..908fda9 --- /dev/null +++ b/doc/figures/Transforigine.mp @@ -0,0 +1,22 @@ +input mp-solid + +vardef Transform(expr PT)= + save $; + color $; + Xpart($)=Xpart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + Ypart($)=Ypart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + Zpart($)=Zpart(PT)*(0.5*Norm(PT)+1-0.5*sqrt(3)); + $ +enddef; + +arcenciel:=true; + +figureespace(-6u,-6u,6u,6u); +fill feuillet; +Initialisation(500,60,20,50); +subh:=9; +transformation:=true; +Objetcube1("a=3"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/Transforigine1.pdf b/doc/figures/Transforigine1.pdf new file mode 100644 index 0000000..884bf8c Binary files /dev/null and b/doc/figures/Transforigine1.pdf differ diff --git a/doc/figures/choixvue.1 b/doc/figures/choixvue.1 new file mode 100644 index 0000000..e0eb2e2 --- /dev/null +++ b/doc/figures/choixvue.1 @@ -0,0 +1,353 @@ +%!PS-Adobe-3.0 EPSF-3.0 +%%BoundingBox: -121 -86 209 233 +%%Creator: MetaPost +%%CreationDate: 2009.03.20:2128 +%%Pages: 1 +%%DocumentFonts: CMR10 + /cmr10 /CMR10 def +/fshow {exch findfont exch scalefont setfont show}bind def +%%EndProlog +%%Page: 1 1 +gsave newpath -283.46451 -283.46451 moveto +-283.46451 283.46451 lineto +283.46451 283.46451 lineto +283.46451 -283.46451 lineto + closepath clip + 0.8 setgray 0 0.5 dtransform truncate idtransform setlinewidth pop + [] 0 setdash 1 setlinecap 1 setlinejoin 10 setmiterlimit +newpath 0 231.82251 moveto +0 0 lineto +207.84668 -31.05835 lineto stroke +newpath -120 -53.79639 moveto +0 0 lineto +0 231.82251 lineto stroke +newpath -120 -53.79639 moveto +0 0 lineto +207.84668 -31.05835 lineto stroke +newpath -15 225.09796 moveto +-15 -6.72455 lineto +192.84668 -37.7829 lineto stroke +newpath -94.01917 -57.67868 moveto +25.98083 -3.8823 lineto +25.98083 227.94022 lineto stroke +newpath -120 -24.81857 moveto +0 28.97781 lineto +207.84668 -2.08054 lineto stroke +newpath -30 218.37341 moveto +-30 -13.4491 lineto +177.84668 -44.50745 lineto stroke +newpath -68.03833 -61.56097 moveto +51.96167 -7.76459 lineto +51.96167 224.05792 lineto stroke +newpath -120 4.15924 moveto +0 57.95563 lineto +207.84668 26.89728 lineto stroke +newpath -45 211.64886 moveto +-45 -20.17365 lineto +162.84668 -51.232 lineto stroke +newpath -42.0575 -65.44327 moveto +77.9425 -11.64688 lineto +77.9425 220.17563 lineto stroke +newpath -120 33.13705 moveto +0 86.93344 lineto +207.84668 55.87509 lineto stroke +newpath -60 204.92432 moveto +-60 -26.8982 lineto +147.84668 -57.95654 lineto stroke +newpath -16.07666 -69.32556 moveto +103.92334 -15.52917 lineto +103.92334 216.29333 lineto stroke +newpath -120 62.11487 moveto +0 115.91125 lineto +207.84668 84.8529 lineto stroke +newpath -75 198.19977 moveto +-75 -33.62274 lineto +132.84668 -64.68109 lineto stroke +newpath 9.90417 -73.20786 moveto +129.90417 -19.41147 lineto +129.90417 212.41104 lineto stroke +newpath -120 91.09268 moveto +0 144.88907 lineto +207.84668 113.83072 lineto stroke +newpath -90 191.47522 moveto +-90 -40.34729 lineto +117.84668 -71.40564 lineto stroke +newpath 35.88501 -77.09015 moveto +155.88501 -23.29376 lineto +155.88501 208.52875 lineto stroke +newpath -120 120.0705 moveto +0 173.86688 lineto +207.84668 142.80853 lineto stroke +newpath -105 184.75067 moveto +-105 -47.07184 lineto +102.84668 -78.13019 lineto stroke +newpath 61.86584 -80.97244 moveto +181.86584 -27.17606 lineto +181.86584 204.64645 lineto stroke +newpath -120 149.04831 moveto +0 202.8447 lineto +207.84668 171.78635 lineto stroke +newpath -120 178.02612 moveto +-120 -53.79639 lineto +87.84668 -84.85474 lineto stroke +newpath 87.84668 -84.85474 moveto +207.84668 -31.05835 lineto +207.84668 200.76416 lineto stroke +newpath -120 178.02612 moveto +0 231.82251 lineto +207.84668 200.76416 lineto stroke + 0 0 1 setrgbcolor [12 6 3 6 ] 0 setdash +newpath 0 0 moveto +-75 -33.62274 lineto stroke + [] 0 setdash +newpath -72.25441 -30.71455 moveto +-75 -33.62274 lineto +-71.00218 -33.50783 lineto + closepath +gsave fill grestore stroke + 0 1 0 setrgbcolor [12 6 3 6 ] 0 setdash +newpath 0 0 moveto +129.90417 -19.41147 lineto stroke + [] 0 setdash +newpath 126.02267 -20.37938 moveto +129.90417 -19.41147 lineto +126.47516 -17.35118 lineto + closepath +gsave fill grestore stroke + 0 setgray 0.5 0 dtransform exch truncate exch idtransform pop setlinewidth + [12 6 3 6 ] 0 setdash +newpath 0 0 moveto +0 144.88907 lineto stroke + 0 0.5 dtransform truncate idtransform setlinewidth pop [] 0 setdash +newpath 1.53053 141.19414 moveto +0 144.88907 lineto +-1.53053 141.19414 lineto + closepath +gsave fill grestore stroke + 0.86667 0.53334 0.86667 setrgbcolor +newpath 0 28.97781 moveto +25.98083 25.09552 lineto +10.98083 18.37097 lineto +-15 22.25327 lineto + closepath fill + 0 setgray +newpath 0 28.97781 moveto +25.98083 25.09552 lineto +10.98083 18.37097 lineto +-15 22.25327 lineto + closepath stroke + 0.93333 0.26666 0.93333 setrgbcolor +newpath 10.98083 -10.60684 moveto +10.98083 18.37097 lineto +25.98083 25.09552 lineto +25.98083 -3.8823 lineto + closepath fill + 0 setgray +newpath 10.98083 -10.60684 moveto +10.98083 18.37097 lineto +25.98083 25.09552 lineto +25.98083 -3.8823 lineto + closepath stroke + 1 0 1 setrgbcolor +newpath -15 -6.72455 moveto +-15 22.25327 lineto +10.98083 18.37097 lineto +10.98083 -10.60684 lineto + closepath fill + 0 setgray +newpath -15 -6.72455 moveto +-15 22.25327 lineto +10.98083 18.37097 lineto +10.98083 -10.60684 lineto + closepath stroke +123.96584 121.89262 moveto +(V) cmr10 9.96265 fshow + 0 3 dtransform truncate idtransform setlinewidth pop +newpath 121.86584 119.79263 moveto 0 0 rlineto stroke + 1 0 0 setrgbcolor 0.5 + 0 dtransform exch truncate exch idtransform pop setlinewidth + [3 3 ] 0 setdash +newpath 121.86584 119.79263 moveto +121.86584 -54.07425 lineto stroke + 0 0.5 dtransform truncate idtransform setlinewidth pop +newpath 121.86584 119.79263 moveto +0 173.86688 lineto stroke +newpath -60 -26.8982 moveto +121.86584 -54.07425 lineto stroke +newpath 181.86584 -27.17606 moveto +121.86584 -54.07425 lineto stroke +gsave newpath 59.35272 99.4519 moveto +121.70609 8.9978 lineto +38.13766 -3.61908 lineto +-24.21524 86.83502 lineto + closepath clip + 1 1 0.9 setrgbcolor +newpath 59.35272 99.4519 moveto +121.70609 8.9978 lineto +38.13766 -3.61908 lineto +-24.21524 86.83502 lineto + closepath fill + 0.90001 0.90001 0.85 setrgbcolor [] 0 setdash +newpath 0 231.82251 moveto +0 0 lineto +207.84668 -31.05835 lineto stroke +newpath -120 -53.79639 moveto +0 0 lineto +0 231.82251 lineto stroke +newpath -120 -53.79639 moveto +0 0 lineto +207.84668 -31.05835 lineto stroke +newpath -15 225.09796 moveto +-15 -6.72455 lineto +192.84668 -37.7829 lineto stroke +newpath -94.01917 -57.67868 moveto +25.98083 -3.8823 lineto +25.98083 227.94022 lineto stroke +newpath -120 -24.81857 moveto +0 28.97781 lineto +207.84668 -2.08054 lineto stroke +newpath -30 218.37341 moveto +-30 -13.4491 lineto +177.84668 -44.50745 lineto stroke +newpath -68.03833 -61.56097 moveto +51.96167 -7.76459 lineto +51.96167 224.05792 lineto stroke +newpath -120 4.15924 moveto +0 57.95563 lineto +207.84668 26.89728 lineto stroke +newpath -45 211.64886 moveto +-45 -20.17365 lineto +162.84668 -51.232 lineto stroke +newpath -42.0575 -65.44327 moveto +77.9425 -11.64688 lineto +77.9425 220.17563 lineto stroke +newpath -120 33.13705 moveto +0 86.93344 lineto +207.84668 55.87509 lineto stroke +newpath -60 204.92432 moveto +-60 -26.8982 lineto +147.84668 -57.95654 lineto stroke +newpath -16.07666 -69.32556 moveto +103.92334 -15.52917 lineto +103.92334 216.29333 lineto stroke +newpath -120 62.11487 moveto +0 115.91125 lineto +207.84668 84.8529 lineto stroke +newpath -75 198.19977 moveto +-75 -33.62274 lineto +132.84668 -64.68109 lineto stroke +newpath 9.90417 -73.20786 moveto +129.90417 -19.41147 lineto +129.90417 212.41104 lineto stroke +newpath -120 91.09268 moveto +0 144.88907 lineto +207.84668 113.83072 lineto stroke +newpath -90 191.47522 moveto +-90 -40.34729 lineto +117.84668 -71.40564 lineto stroke +newpath 35.88501 -77.09015 moveto +155.88501 -23.29376 lineto +155.88501 208.52875 lineto stroke +newpath -105 184.75067 moveto +-105 -47.07184 lineto +102.84668 -78.13019 lineto stroke +newpath 61.86584 -80.97244 moveto +181.86584 -27.17606 lineto +181.86584 204.64645 lineto stroke +newpath -120 178.02612 moveto +-120 -53.79639 lineto +87.84668 -84.85474 lineto stroke +newpath 87.84668 -84.85474 moveto +207.84668 -31.05835 lineto +207.84668 200.76416 lineto stroke + 0.5 0.5 0.95 setrgbcolor [12 6 3 6 ] 0 setdash +newpath 0 0 moveto +-75 -33.62274 lineto stroke + 0.5 1 0.45 setrgbcolor +newpath 0 0 moveto +129.90417 -19.41147 lineto stroke + 0.5 0.5 0.45 setrgbcolor 0.5 + 0 dtransform exch truncate exch idtransform pop setlinewidth +newpath 0 0 moveto +0 144.88907 lineto stroke + 0.93333 0.76668 0.88333 setrgbcolor +newpath 0 28.97781 moveto +25.98083 25.09552 lineto +10.98083 18.37097 lineto +-15 22.25327 lineto + closepath fill + 0.5 0.5 0.45 setrgbcolor 0 0.5 + dtransform truncate idtransform setlinewidth pop [] 0 setdash +newpath 0 28.97781 moveto +25.98083 25.09552 lineto +10.98083 18.37097 lineto +-15 22.25327 lineto + closepath stroke + 0.96667 0.63333 0.91666 setrgbcolor +newpath 10.98083 -10.60684 moveto +10.98083 18.37097 lineto +25.98083 25.09552 lineto +25.98083 -3.8823 lineto + closepath fill + 0.5 0.5 0.45 setrgbcolor +newpath 10.98083 -10.60684 moveto +10.98083 18.37097 lineto +25.98083 25.09552 lineto +25.98083 -3.8823 lineto + closepath stroke + 1 0.5 0.95 setrgbcolor +newpath -15 -6.72455 moveto +-15 22.25327 lineto +10.98083 18.37097 lineto +10.98083 -10.60684 lineto + closepath fill + 0.5 0.5 0.45 setrgbcolor +newpath -15 -6.72455 moveto +-15 22.25327 lineto +10.98083 18.37097 lineto +10.98083 -10.60684 lineto + closepath stroke + 1 0.5 0.45 setrgbcolor 0.5 + 0 dtransform exch truncate exch idtransform pop setlinewidth + [3 3 ] 0 setdash +newpath 121.86584 119.79263 moveto +121.86584 -54.07425 lineto stroke +grestore + 1 1 0 setrgbcolor 0 0.5 dtransform truncate idtransform setlinewidth pop + [] 0 setdash 1 setlinejoin 10 setmiterlimit +newpath 59.35272 99.4519 moveto +121.70609 8.9978 lineto +38.13766 -3.61908 lineto +-24.21524 86.83502 lineto + closepath stroke + 0 1 0 setrgbcolor 1 setlinecap +newpath -15 -6.72455 moveto +121.86584 119.79263 lineto stroke +newpath 10.98083 -10.60684 moveto +121.86584 119.79263 lineto stroke +newpath 25.98083 -3.8823 moveto +121.86584 119.79263 lineto stroke +newpath 0 28.97781 moveto +121.86584 119.79263 lineto stroke +newpath -15 22.25327 moveto +121.86584 119.79263 lineto stroke +newpath 10.98083 18.37097 moveto +121.86584 119.79263 lineto stroke +newpath 25.98083 25.09552 moveto +121.86584 119.79263 lineto stroke + 0 setgray +newpath 36.36017 40.75195 moveto +47.20276 31.98944 lineto +41.86935 46.62369 lineto +30.72144 54.83734 lineto + closepath stroke +newpath 47.20276 31.98944 moveto +60.05035 40.06119 lineto +55.83527 54.58008 lineto +41.86935 46.62369 lineto stroke +newpath 55.83527 54.58008 moveto +44.12842 61.86264 lineto +30.72144 54.83734 lineto stroke +grestore +showpage +%%EOF diff --git a/doc/figures/choixvue.mp b/doc/figures/choixvue.mp new file mode 100644 index 0000000..fd3ea74 --- /dev/null +++ b/doc/figures/choixvue.mp @@ -0,0 +1,54 @@ +input ../../newjpv02 + +typerepre:="persp"; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,15,30); +color A,B,C,D,E,F,G,H; +drawoptions(withcolor gris); +TraceGrille(8); +drawoptions(); +TraceAxes; +ObjetCube(1); +DessineObjetNew(gris,violet); +color V; +V=(4,7,6); +dotlabel.urt("V",Projette(V)); +draw Projette(V)--Projette((Xpart(V),Ypart(V),0)) dashed evenly withcolor red; +draw Projette(V)--Projette((0,0,Zpart(V))) dashed evenly withcolor red; +draw Projette((Xpart(V),0,0))--Projette((Xpart(V),Ypart(V),0)) dashed evenly withcolor red; +draw Projette((0,Ypart(V),0))--Projette((Xpart(V),Ypart(V),0)) dashed evenly withcolor red; +color Pl[],I,U,W; +I=2/5[(0,0,0),V]; +U=0.2(-Ypart(V),Xpart(V),0); +W=0.2(0,-Zpart(V),Ypart(V)); +Pl[1]=I+U+W; +Pl[2]=I+U-W; +Pl[3]=I-U-W; +Pl[4]=I-U+W; +fillcolor:=0.9[jaune,white]; +transparence Projette(Pl1)--Projette(Pl2)--Projette(Pl3)--Projette(Pl4)--cycle; +draw Projette(Pl1)--Projette(Pl2)--Projette(Pl3)--Projette(Pl4)--cycle withcolor jaune; +drawoptions(withcolor vert); +draw Projette(Sommet1)--Projette(V); +draw Projette(Sommet2)--Projette(V); +draw Projette(Sommet3)--Projette(V); +draw Projette(Sommet5)--Projette(V); +draw Projette(Sommet6)--Projette(V); +draw Projette(Sommet7)--Projette(V); +draw Projette(Sommet8)--Projette(V); +drawoptions(); +color II[]; +II1=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet1,V); +II2=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet2,V); +II3=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet3,V); +II5=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet5,V); +II6=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet6,V); +II7=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet7,V); +II8=IntersectionPlanDroite(Pl1,Pl2,Pl3,Sommet8,V); +draw Projette(II1)--Projette(II2)--Projette(II7)--Projette(II6)--cycle; +draw Projette(II2)--Projette(II3)--Projette(II8)--Projette(II7); +draw Projette(II8)--Projette(II5)--Projette(II6); +finespace; + +end \ No newline at end of file diff --git a/doc/figures/choixvue1.pdf b/doc/figures/choixvue1.pdf new file mode 100644 index 0000000..0a98533 Binary files /dev/null and b/doc/figures/choixvue1.pdf differ diff --git a/doc/figures/coneepi.mp b/doc/figures/coneepi.mp new file mode 100644 index 0000000..13daf2d --- /dev/null +++ b/doc/figures/coneepi.mp @@ -0,0 +1,21 @@ +input mp-solid + +nb:=48; +subh:=8; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-10,15,30); +Lumiere:=Oeil; +outcolor:=0.5[vert,blanc]; +incolor:=orange;%0.5[orange,blanc]; +r:=1; +q:=4; +draw +Fonction("(r*((q+1)*cos(t)-cos((q+1)*t)),r*((q+1)*sin(t)-sin((q+1)*t)),-2)",-pi,pi,0.0628) +withpen pencircle scaled1.5bp withcolor bleu; +Ferme1:=false; +ObjetCone1("(r*((q+1)*cos(u)-cos((q+1)*u)),r*((q+1)*sin(u)-sin((q+1)*u)),-2)",0,pi,-2,"orig=(0,1,3)"); +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/coneepi1.pdf b/doc/figures/coneepi1.pdf new file mode 100644 index 0000000..7b2c2f5 Binary files /dev/null and b/doc/figures/coneepi1.pdf differ diff --git a/doc/figures/couleurs.mp b/doc/figures/couleurs.mp new file mode 100644 index 0000000..fbc991f --- /dev/null +++ b/doc/figures/couleurs.mp @@ -0,0 +1,17 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,60,60); +outcolor:=0.5[red,white]; +incolor:=1.1*gris; +draw Sparam("(u,v,(u**2+v**2)**2)",-1.25,1.25,0.1,-1.25,1.25,0.1); +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,70,-10,75); +arcenciel:=true; +incolor:=1.1*gris; +draw Sparam("(v,u,u*(u**2-3*(v**2)))",-1,1,0.05,-1,1,0.05); +finespace; + +end \ No newline at end of file diff --git a/doc/figures/couleurs1.pdf b/doc/figures/couleurs1.pdf new file mode 100644 index 0000000..b354f2b Binary files /dev/null and b/doc/figures/couleurs1.pdf differ diff --git a/doc/figures/couleurs2.pdf b/doc/figures/couleurs2.pdf new file mode 100644 index 0000000..d9bf900 Binary files /dev/null and b/doc/figures/couleurs2.pdf differ diff --git a/doc/figures/courbe1.mp b/doc/figures/courbe1.mp new file mode 100644 index 0000000..7621a77 --- /dev/null +++ b/doc/figures/courbe1.mp @@ -0,0 +1,13 @@ +input mp-solid; + +figureespace(-10u,-10u,10u,10u); +Initialisation(5,30,50,20); +draw Fonction("(sin(t),t/3,cos(t))",-2,25,0.01); +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(5,30,50,50); +outcolor:=0.5[red,white]; +draw Tube("(sin(t),t/3,cos(t))","(cos(t),1/3,-sin(t))","(-sin(t),0,-cos(t))",0.1,-2,200,0.1); +finespace; +end \ No newline at end of file diff --git a/doc/figures/courbe11.pdf b/doc/figures/courbe11.pdf new file mode 100644 index 0000000..68c33ec Binary files /dev/null and b/doc/figures/courbe11.pdf differ diff --git a/doc/figures/courbe12.pdf b/doc/figures/courbe12.pdf new file mode 100644 index 0000000..b121507 Binary files /dev/null and b/doc/figures/courbe12.pdf differ diff --git a/doc/figures/courbe2.mp b/doc/figures/courbe2.mp new file mode 100644 index 0000000..6bc0717 --- /dev/null +++ b/doc/figures/courbe2.mp @@ -0,0 +1,13 @@ +input mp-solid; + +figureespace(-10u,-10u,10u,10u); +Initialisation(5,30,20,20); +draw Fonction("(cos(t)*(1+abs(t)/5),1.5*sin(t),0.2*t)",-15,15,0.1); +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(5,30,20,50); +outcolor:=0.5[blue,white]; +draw Tube("(cos(t)*(1+abs(t)/5),1.5*sin(t),0.2*t)","if t>=0:(-sin(t)*(1+t/5)+cos(t)/5,1.5*cos(t),0.2) else: (-sin(t)*(1-t/5)-cos(t)/5,1.5*cos(t),0.2) fi", "if t>=0:(-cos(t)*(1+t/5)-2*sin(t)/5,-1.5*sin(t),0) else: (-cos(t)*(1-t/5)+2*sin(t)/5,-1.5*sin(t),0) fi",0.075,-10,200,0.1); +finespace; +end \ No newline at end of file diff --git a/doc/figures/courbe21.pdf b/doc/figures/courbe21.pdf new file mode 100644 index 0000000..ab6db5f Binary files /dev/null and b/doc/figures/courbe21.pdf differ diff --git a/doc/figures/courbe22.pdf b/doc/figures/courbe22.pdf new file mode 100644 index 0000000..78d290c Binary files /dev/null and b/doc/figures/courbe22.pdf differ diff --git a/doc/figures/cubecreuse.mp b/doc/figures/cubecreuse.mp new file mode 100644 index 0000000..48c49a9 --- /dev/null +++ b/doc/figures/cubecreuse.mp @@ -0,0 +1,14 @@ +input mp-solid + +outcolor:=0.5[rose,white]; +incolor:=0.5[orange,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,30,30,50); +subh:=5; +creux:=true;%<- +Objetcube1("a=3"); +ObjetEnleve1(7,12,17,31,33,37,41,43,131,133,141,143); +AffichageObjet1; +finespace; + end \ No newline at end of file diff --git a/doc/figures/cubecreuse1.pdf b/doc/figures/cubecreuse1.pdf new file mode 100644 index 0000000..4a4397c Binary files /dev/null and b/doc/figures/cubecreuse1.pdf differ diff --git a/doc/figures/cubenumerote.mp b/doc/figures/cubenumerote.mp new file mode 100644 index 0000000..a27861a --- /dev/null +++ b/doc/figures/cubenumerote.mp @@ -0,0 +1,12 @@ +input mp-solid + +outcolor:=0.5[rose,white]; +defaultfont:="cmr7"; +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,30,30,50); +numeroteface:=true;%<- +subh:=5; +Objetcube1("a=3"); +AffichageObjet1; +finespace; + end \ No newline at end of file diff --git a/doc/figures/cubenumerote1.pdf b/doc/figures/cubenumerote1.pdf new file mode 100644 index 0000000..1136d9a Binary files /dev/null and b/doc/figures/cubenumerote1.pdf differ diff --git a/doc/figures/cylindreastroide.mp b/doc/figures/cylindreastroide.mp new file mode 100644 index 0000000..5b31cab --- /dev/null +++ b/doc/figures/cylindreastroide.mp @@ -0,0 +1,32 @@ +input mp-solid + +nb:=48;subh:=12; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,30); +arcenciel:=true; +incolor:=orange; +Ferme1:=false; +ObjetCylindre1("(3*(cos(u)**3),3*(sin(u)**3),-2+v)",pi,-pi,0,4); +AffichageObjet1; +finespace; +unit:=0.6; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +drawoptions(withcolor gris); +for k=-4 upto 4: + draw Projette((-4,k,0))--Projette((4,k,0)); + draw Projette((k,-4,0))--Projette((k,4,0)); +endfor; +drawoptions(); +Lumiere:=Oeil; +arcenciel:=true; +incolor:=orange; +Ferme1:=false; +ObjetCylindre1("(3*(cos(u)**3),3*(sin(u)**3)+v,2*v)",pi,-pi,0,2); +AffichageObjet1; +drawarrow Projette((0,3,0))--Projette((0,5,4)) withpen pencircle scaled2bp withcolor violet; +label.rt(btex $\overrightarrow v=(0;2;4)$ etex rotated angle(Projette((0,5,4)) -Projette((0,3,0))),1/2[Projette((0,3,0)),Projette((0,5,4))]); +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/cylindreastroide1.pdf b/doc/figures/cylindreastroide1.pdf new file mode 100644 index 0000000..b2fa1f2 Binary files /dev/null and b/doc/figures/cylindreastroide1.pdf differ diff --git a/doc/figures/cylindreastroide2.pdf b/doc/figures/cylindreastroide2.pdf new file mode 100644 index 0000000..1a4bc56 Binary files /dev/null and b/doc/figures/cylindreastroide2.pdf differ diff --git a/doc/figures/demiprisme.mp b/doc/figures/demiprisme.mp new file mode 100644 index 0000000..b2b301b --- /dev/null +++ b/doc/figures/demiprisme.mp @@ -0,0 +1,36 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,30,25); +outcolor:=blanc; +creux:=false; +subh:=10; +Objetgrille1("am=-5","an=5","bm=-5","bn=5"); +AffichageObjet1; +outcolor:=jaune; +incolor:=rouge; +nb:=1; subh:=5; +angx:=90; TR:=(0,4,0); +ObjetPrisme2("axe=(0,0,1)","h=8",for k=0 step 10 until 180:(3*cosd(k),3*sind(k),0), endfor for k=180 step -10 until 0:(cosd(k),sind(k),0), endfor(3,0,0)); +AffichageObjet2; +TraceAxes; +finespace; + +angx:=0; TR:=(0,0,0); + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,30,25); +outcolor:=blanc; +subh:=10; +Objetgrille1("am=-5","an=5","bm=-5","bn=5"); +AffichageObjet1; +outcolor:=jaune; +incolor:=rouge; +nb:=1; subh:=5; +angx:=90; TR:=(0,4,0); +creux:=true; +ObjetPrisme2("axe=(0,0,1)","h=8",for k=0 step 10 until 180:(3*cosd(k),3*sind(k),0), endfor for k=180 step -10 until 0:(cosd(k),sind(k),0), endfor(3,0,0)); +AffichageObjet2; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/demiprisme1.pdf b/doc/figures/demiprisme1.pdf new file mode 100644 index 0000000..9adf88c Binary files /dev/null and b/doc/figures/demiprisme1.pdf differ diff --git a/doc/figures/demiprisme2.pdf b/doc/figures/demiprisme2.pdf new file mode 100644 index 0000000..612fb70 Binary files /dev/null and b/doc/figures/demiprisme2.pdf differ diff --git a/doc/figures/donymodule.mpx b/doc/figures/donymodule.mpx new file mode 100644 index 0000000..552afed --- /dev/null +++ b/doc/figures/donymodule.mpx @@ -0,0 +1,60 @@ +% Written by DVItoMP, Version 0.64/color (Web2C 7.5.4) +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmsy10"; +_s(char0,_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-0.8302)--(7.7487,-0.8302)-- + (7.7487,5.8115)--(0,5.8115)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n1="cmr10"; +_s("1",_n1,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(4.9813,0.0000)-- + (4.9813,6.4204)--(0,6.4204)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n2="cmmi10"; +_s("times",_n2,1.00000,0.0000,0.0000,); +_n1="cmr10"; +_s("10",_n1,1.00000,25.0861,0.0000,); +setbounds _p to (0,0.0000)--(35.0487,0.0000)-- + (35.0487,6.5706)--(0,6.5706)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n1="cmr10"; +_s(char34&char34,_n1,1.00000,0.0000,0.0000,); +_n2="cmmi10"; +_s("sup",_n2,1.00000,9.9627,0.0000,); +_n0="cmsy10"; +_s(char0,_n0,1.00000,25.3483,0.0000,); +setbounds _p to (0,-1.9372)--(33.0970,-1.9372)-- + (33.0970,6.9185)--(0,6.9185)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n1="cmr10"; +_s(char34&char34,_n1,1.00000,0.0000,0.0000,); +_n2="cmmi10"; +_s("sup",_n2,1.00000,9.9627,0.0000,); +_s("2",_n1,1.00000,25.3483,0.0000,); +setbounds _p to (0,-1.9372)--(30.3296,-1.9372)-- + (30.3296,6.9185)--(0,6.9185)--cycle; +_p endgroup +mpxbreak diff --git a/doc/figures/doublesectioncone.mp b/doc/figures/doublesectioncone.mp new file mode 100644 index 0000000..caab0c6 --- /dev/null +++ b/doc/figures/doublesectioncone.mp @@ -0,0 +1,20 @@ +input mp-solid + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,-60,30,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=11; +angx:=90; +TR:=(0,5,0); +Objetcone15("r=2","h=10"); +angx:=0; +TR:=(0,0,0); +Objetplan21("An=(1,-1,0)","Bn=(2,-2,1)","Cn=(-2,2,1)"); +ObjetSepare15(1,2); +Objetplan22("An=(1,1,0)","Bn=(2,2,1)","Cn=(-2,-2,1)"); +ObjetSepare1(3,4); +AffichageObjet3; +finespace; +end \ No newline at end of file diff --git a/doc/figures/doublesectioncone1.pdf b/doc/figures/doublesectioncone1.pdf new file mode 100644 index 0000000..8527ada Binary files /dev/null and b/doc/figures/doublesectioncone1.pdf differ diff --git a/doc/figures/exfusion.mp b/doc/figures/exfusion.mp new file mode 100644 index 0000000..9d8ef97 --- /dev/null +++ b/doc/figures/exfusion.mp @@ -0,0 +1,20 @@ +input ../../newjpv +input objets + +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,40,20,100); +Lumiere:=Oeil; +nb:=10; +Ferme1:=true; +ObjetTube1("(cos(t),sin(t),0.25)","(-sin(t),cos(t),0)",0.15,0,50,0.12566); +angx:=90; +TR:=(-1,-0.1,0.5); +Ferme2:=true; +ObjetTube2("(cos(t),sin(t),0.25)","(-sin(t),cos(t),0)",0.15,0,50,0.12566); +nbobj=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/exfusion1.mp b/doc/figures/exfusion1.mp new file mode 100644 index 0000000..100aa42 --- /dev/null +++ b/doc/figures/exfusion1.mp @@ -0,0 +1,25 @@ +input mp-solid + +outcolor:=0.5[ciel,blanc]; +incolor:=0.5[jaune,blanc]; + +nb:=24; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,10,50); +Lumiere:=Oeil; +angy:=80; +subh:=24; +Objetcalotte1("R=2","phib=-pi/2","phih=pi/6"); +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; +TR:=(1,0,0); +Objetcalotte2("R=1.5","phib=-pi/2","phih=pi/6"); +outcolor:=0.5[orange,blanc]; +incolor:=0.5[gris,blanc]; +TR:=(2,0,0); +Objetcalotte3("R=1","phib=-pi/2","phih=pi/6"); +nbobj:=3; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/exfusion1.pdf b/doc/figures/exfusion1.pdf new file mode 100644 index 0000000..125cd95 Binary files /dev/null and b/doc/figures/exfusion1.pdf differ diff --git a/doc/figures/exfusion11.pdf b/doc/figures/exfusion11.pdf new file mode 100644 index 0000000..58786ae Binary files /dev/null and b/doc/figures/exfusion11.pdf differ diff --git a/doc/figures/fuseetintin.mp b/doc/figures/fuseetintin.mp new file mode 100644 index 0000000..f819619 --- /dev/null +++ b/doc/figures/fuseetintin.mp @@ -0,0 +1,69 @@ +input mp-solid; + +vardef Transform(expr PT)=RotX(RotY(RotZ(PT))) +enddef; + +transformation:=true; + +%30" +figureespace(-10u,-10u,10u,10u); +fill feuillet; +for k=1 upto 100: + fill fullcircle scaled (2*uniformdeviate(1)*mm) shifted((uniformdeviate(1))[coinbg,coinbd]+uniformdeviate(1)*(coinhg-coinbg)) withcolor jaune; +endfor; + +Initialisation(500,-50,20,50); +unit:=0.2; +traits:=false; +angx:=-80; +angy:=20; +outcolor:=rouge; +path rocket[]; +rocket1=(0,4.6)--(-0.8,4.6)--(-0.85,5.6)--(-0.95,6.6)--(-1.05,7.6)--(-1.1,8.6)--(-1.2,9.6); +rocket2=(-1.2,9.6)--(-1.25,10.6)--(-1.3,11.6)--(-1.35,12.6)--(-1.4,13.6)--(-1.4,14.6)--(-1.375,15.6)--(-1.27,16.6)--(-1.2,17.6)--(-1.05,18.6); +rocket3=(-1.05,18.6)--(-0.85,19.6)--(-0.65,20.6)--(-0.35,21.6)--(-0.1,22.2)--(-0.1,23.75)--(0,23.75); +subh:=24; +path propulsion; +propulsion=(0,4.6)--(-0.8,4.6)--(0,0); +perso1:=true; +Ferme1:=false; +string couleurperso; +couleurperso="if ((tapj mod 48)=0) or ((tapj mod 48)=1) or ((tapj mod 48)=2) or ((tapj mod 48)=6) or ((tapj mod 48)=7) or ((tapj mod 48)=8) or ((tapj mod 48)=12) or ((tapj mod 48)=13) or ((tapj mod 48)=14) or ((tapj mod 48)=18) or ((tapj mod 48)=19) or ((tapj mod 48)=20) or ((tapj mod 48)=27) or ((tapj mod 48)=28) or ((tapj mod 48)=29) or ((tapj mod 48)=33) or ((tapj mod 48)=34) or ((tapj mod 48)=35) or ((tapj mod 48)=39) or ((tapj mod 48)=40) or ((tapj mod 48)=41) or ((tapj mod 48)=45) or ((tapj mod 48)=46) or ((tapj mod 48)=47):red else: white fi;"; +ObjetAnneau1("nbp=10",rocket2); +outcolor:=rouge; +for k=3 upto 6: + Ferme[k]:=true; +endfor; +incolor:=0.5[jaune,orange]; +Ferme2:=false; +ObjetAnneau2("nbp=7",rocket1); +ObjetAnneau3("nbp=7",rocket3); +Ferme10:=true; +outcolor:=0.5[jaune,orange]; +ObjetAnneau10("nbp=3",propulsion); +outcolor:=rouge; +path amortisseur; +amortisseur=for k=-90 step 10 until 0:(cosd(k),sind(k)+1)--endfor for k=0 step 2 until 22:(cosd(k)*11.78-10.78,11.78*sind(k)+1)-- endfor (0,5.75); +TR:=Image((0,-5,0)); +ObjetAnneau4("nbp=22",amortisseur); +angz:=120; +TR:=(0,0,0); +TR:=Image((0,-5,0)); +ObjetAnneau5("nbp=22",amortisseur); +angz:=-120; +TR:=(0,0,0); +TR:=Image((0,-5,0)); +ObjetAnneau6("nbp=22",amortisseur); +TR:=(0,0,0); +angz:=0; +subh:=1; +ObjetBiface7((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +angz:=120; +ObjetBiface8((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +angz:=-120; +ObjetBiface9((0,-0.8,4.6),(0,-0.85,5.6),(0,-0.95,6.6),(0,-1.05,7.6),(0,-1.1,8.6),(0,-1.2,9.6),(0,-2,9.2),(0,-3,8.3),(0,-4,7.2),(0,-5,5.75),(0,-4.5765,4.6402),(0,-4.35,3.8498),(0,-4.1789,3.0456),(0,-4.0645,2.2313),(0,-4.0072,1.4111),(0,-4,1),(0,-3.2,2.2),(0,-2.5,3),(0,-1.6,4)); +nbobj:=10; +DessineFusion; +clip currentpicture to (fullcircle scaled 16cm); +finespace; +end \ No newline at end of file diff --git a/doc/figures/fuseetintin1.pdf b/doc/figures/fuseetintin1.pdf new file mode 100644 index 0000000..45baa00 Binary files /dev/null and b/doc/figures/fuseetintin1.pdf differ diff --git a/doc/figures/fusion.mp b/doc/figures/fusion.mp new file mode 100644 index 0000000..8cacb16 --- /dev/null +++ b/doc/figures/fusion.mp @@ -0,0 +1,14 @@ +input mp-solid + +figureespace(-10u,-10u,20u,10u); +Initialisation(500,30,20,50); +Ferme1:=true; +outcolor:=0.5[rouge,white]; +ObjetTube1("(sin(t),t/3,cos(t))","(cos(t),1/3,-sin(t))",0.1,-2,90,0.1); +Ferme2:=true; +outcolor:=0.5[jaune,white]; +ObjetTube2("(cos(t)+1,t+2,t)","(-sin(t),1,1)",0.1,-1,30,0.1); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/fusion1.pdf b/doc/figures/fusion1.pdf new file mode 100644 index 0000000..784e709 Binary files /dev/null and b/doc/figures/fusion1.pdf differ diff --git a/doc/figures/fusionhorop.mp b/doc/figures/fusionhorop.mp new file mode 100644 index 0000000..51594b1 --- /dev/null +++ b/doc/figures/fusionhorop.mp @@ -0,0 +1,22 @@ +input mp-solid + +%27'' +figureespace(-20u,-20u,20u,20u); +Initialisation(500,60,20,30); +creux:=true; +nb:=16;%16 +subh:=18;%18 +outcolor:=blanc; +incolor:=0.5[vert,white]; +angx:=90; +TR:=(2,9,0); +Objetcylindre1("r=1","h=18"); +outcolor:=0.5[jaune,blanc]; +incolor:=0.5[violet,blanc]; +angx:=0; +TR:=(0,0,0); +ObjetTube2("(2*(1+cos(t)),2*tan(t/2),2*sin(t))","(-2*sin(t),2/((cos(t/2))**2),2*cos(t))",1,-2.7468,71,0.0763); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/fusionhorop1.pdf b/doc/figures/fusionhorop1.pdf new file mode 100644 index 0000000..4e0b589 Binary files /dev/null and b/doc/figures/fusionhorop1.pdf differ diff --git a/doc/figures/fusionphan.mp b/doc/figures/fusionphan.mp new file mode 100644 index 0000000..d2dee0d --- /dev/null +++ b/doc/figures/fusionphan.mp @@ -0,0 +1,19 @@ +input mp-solid + +outcolor:=blanc; +incolor:=0.5[vert,blanc]; + +%30'' +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,40,50); +nb:=18; subh:=24; +angy:=90; TR:=(-1,0,0); +Objetcylindre1("r=0.5","h=7"); +TR:=(0,0,0); +nb:=12; +Ferme2:=false; +ObjetTube2("(sin(t),cos(t),t/5)","(cos(t),-sin(t),1/5)",0.25,-5,165,0.2); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/fusionphan1.pdf b/doc/figures/fusionphan1.pdf new file mode 100644 index 0000000..a11d50f Binary files /dev/null and b/doc/figures/fusionphan1.pdf differ diff --git a/doc/figures/fusionphan1.png b/doc/figures/fusionphan1.png new file mode 100644 index 0000000..16fb3d4 Binary files /dev/null and b/doc/figures/fusionphan1.png differ diff --git a/doc/figures/fusionsolidescreux.mp b/doc/figures/fusionsolidescreux.mp new file mode 100644 index 0000000..3b3db07 --- /dev/null +++ b/doc/figures/fusionsolidescreux.mp @@ -0,0 +1,22 @@ +input mp-solid + +outcolor:=0.5[jaune,white]; +incolor:=0.5[vert,white]; + +nb:=12; subh:=36; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,20,20,50); +creux:=true; +Objetanneau1("R=4","r=3","h=1.5"); +ObjetEnleve1(135,136,137,138,139,140,150,151,152,153,154,155); +angx:=90; +TR:=(0,0,2); +outcolor:=0.5[bleu,white]; +incolor:=0.5[rouge,white]; +Objetsphere2("R=2"); +ObjetEnleve2(232,233,234,235,236,237,238,239); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/fusionsolidescreux1.pdf b/doc/figures/fusionsolidescreux1.pdf new file mode 100644 index 0000000..07fbe7a Binary files /dev/null and b/doc/figures/fusionsolidescreux1.pdf differ diff --git a/doc/figures/fusionsyr.mp b/doc/figures/fusionsyr.mp new file mode 100644 index 0000000..843a94b --- /dev/null +++ b/doc/figures/fusionsyr.mp @@ -0,0 +1,15 @@ +input mp-solid + +%23'' +figureespace(-10u,-10u,10u,10u); +Initialisation(500,10,20,50); +outcolor:=rouge; +nb:=18; subh:=24; +Objetcone1("r=2.5","h=5"); +outcolor:=bleu; +angy:=20; TR:=(0,0,2); +Objettore2("R=2","r=0.5"); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/fusionsyr1.pdf b/doc/figures/fusionsyr1.pdf new file mode 100644 index 0000000..86def77 Binary files /dev/null and b/doc/figures/fusionsyr1.pdf differ diff --git a/doc/figures/grillehsv.mp b/doc/figures/grillehsv.mp new file mode 100644 index 0000000..8f33b39 --- /dev/null +++ b/doc/figures/grillehsv.mp @@ -0,0 +1,13 @@ +input mp-solid + +satu:=1; +luminosite:=1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,10,30,30); +arcenciel:=true; +nb:=8;subh:=6; +Objetgrille1("am=-3","an=5","bm=-3","bn=3"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/grillehsv1.mp b/doc/figures/grillehsv1.mp new file mode 100644 index 0000000..16aa8d2 --- /dev/null +++ b/doc/figures/grillehsv1.mp @@ -0,0 +1,10 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,10,30,30); +arcenciel:=true; +nb:=8;subh:=6; +Objetgrille1("am=-3","an=5","bm=-3","bn=3"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/grillehsv1.pdf b/doc/figures/grillehsv1.pdf new file mode 100644 index 0000000..b98cf24 Binary files /dev/null and b/doc/figures/grillehsv1.pdf differ diff --git a/doc/figures/grillehsv11.pdf b/doc/figures/grillehsv11.pdf new file mode 100644 index 0000000..2531da6 Binary files /dev/null and b/doc/figures/grillehsv11.pdf differ diff --git a/doc/figures/grillergb.mp b/doc/figures/grillergb.mp new file mode 100644 index 0000000..9e12286 --- /dev/null +++ b/doc/figures/grillergb.mp @@ -0,0 +1,11 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(300,10,30,30); +perso1:=true; +couleurperso:="(tapj/48)[rouge,vert];"; +nb:=8;subh:=6; +Objetgrille1("am=-3","an=5","bm=-3","bn=3"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/grillergb1.pdf b/doc/figures/grillergb1.pdf new file mode 100644 index 0000000..3b6fd2e Binary files /dev/null and b/doc/figures/grillergb1.pdf differ diff --git a/doc/figures/hommage1.mp b/doc/figures/hommage1.mp new file mode 100644 index 0000000..701245e --- /dev/null +++ b/doc/figures/hommage1.mp @@ -0,0 +1,10 @@ +input mp-solid + +%1'9" +figureespace(-10u,-10u,10u,10u); +Initialisation(200,20,20,15); +arcenciel:=true; +incolor:=gris; +draw Tuben("(0.5*t*sin(0.707)*cos(t),0.5*sin(0.707)*t*sin(t),-0.5*t*cos(0.707))","(0.5*sin(0.707)*(cos(t)-t*sin(t)),0.5*sin(0.707)*(sin(t)+t*cos(t)),-0.5*cos(0.707))",0.4,-25.4,508,0.1); +finespace; +end \ No newline at end of file diff --git a/doc/figures/hommage11.pdf b/doc/figures/hommage11.pdf new file mode 100644 index 0000000..4126901 Binary files /dev/null and b/doc/figures/hommage11.pdf differ diff --git a/doc/figures/hommage2.mp b/doc/figures/hommage2.mp new file mode 100644 index 0000000..f9ded06 --- /dev/null +++ b/doc/figures/hommage2.mp @@ -0,0 +1,13 @@ +input mp-solid + +satu:=1; + +%1'9" +figureespace(-10u,-10u,10u,10u); +Initialisation(5000,30,30,40); +arcenciel:=true; +incolor:=0.9[gris,blanc]; +draw SurfZ("sin((X**2+Y**2)/3)",-5,5,-5,5,90,120); +TraceAxesD(4,3,3); +finespace; +end \ No newline at end of file diff --git a/doc/figures/hommage21.pdf b/doc/figures/hommage21.pdf new file mode 100644 index 0000000..75263cc Binary files /dev/null and b/doc/figures/hommage21.pdf differ diff --git a/doc/figures/hommage3.mp b/doc/figures/hommage3.mp new file mode 100644 index 0000000..761658f --- /dev/null +++ b/doc/figures/hommage3.mp @@ -0,0 +1,11 @@ +input mp-solid + +%1" +figureespace(-10u,-10u,10u,10u); +Initialisation(500,50,60,40); +arcenciel:=true; +incolor:=0.9[gris,blanc]; +draw SurfZ("X*Y*(X**2-Y**2)*0.1",-3,3,-3,3,30,60); +TraceAxesD(3,3,5); +finespace; +end \ No newline at end of file diff --git a/doc/figures/hommage31.pdf b/doc/figures/hommage31.pdf new file mode 100644 index 0000000..4a37acb Binary files /dev/null and b/doc/figures/hommage31.pdf differ diff --git a/doc/figures/hommage4.mp b/doc/figures/hommage4.mp new file mode 100644 index 0000000..84bbc29 --- /dev/null +++ b/doc/figures/hommage4.mp @@ -0,0 +1,11 @@ +input mp-solid + +%2" +figureespace(-10u,-10u,10u,10u); +Initialisation(2000,20,-10,25); +arcenciel:=true; +incolor:=0.5[gris,white]; +draw Sparam("(1.21**v*(sin(u)*cos(u)),1.21**v*(sin(u)**2*sin(v)),1.21**v*(sin(u)**2*cos(v)))",pi/24,11*pi/12,pi/24,0,10*pi/4,pi/24); +TraceAxesD(8,5,5); +finespace; +end \ No newline at end of file diff --git a/doc/figures/hommage41.pdf b/doc/figures/hommage41.pdf new file mode 100644 index 0000000..e1db5b5 Binary files /dev/null and b/doc/figures/hommage41.pdf differ diff --git a/doc/figures/hommage5.mp b/doc/figures/hommage5.mp new file mode 100644 index 0000000..187ba05 --- /dev/null +++ b/doc/figures/hommage5.mp @@ -0,0 +1,37 @@ +input mp-solid + +%5" +figureespace(-10u,-10u,10u,10u); +Initialisation(500,20,10,10); + +vardef Pp(expr R,h)=(0,0)-- +for k=-33 step 10 until 43: + (cosd(k)*0.5*h-0.2*h,0.3*h+0.5*h*sind(k))-- +endfor +for l=0 step 15 until 90: + (0.8*R*cosd(l)+0.2*R,0.8*R*sind(l)+0.6*h)-- +endfor +(0,h) +enddef; + +outcolor:=blanc; +nb:=30;subh:=15; +h=10;R=5; +Ferme1:=true; +ObjetAnneau1("nbp=18",Pp(R,h)); +angx:=-20; +outcolor:=0.5[rouge,blanc]; +TR:=(-4,2.5,0); +h:=5;R:=2.5; +Ferme2:=true; +ObjetAnneau2("nbp=18",Pp(R,h)); +angx:=30; +TR:=(-4,-4,0); +h:=4;R:=2; +outcolor:=0.5[jaune,white]; +Ferme3:=true; +ObjetAnneau3("nbp=18",Pp(R,h)); +nbobj:=3; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/hommage51.pdf b/doc/figures/hommage51.pdf new file mode 100644 index 0000000..0440665 Binary files /dev/null and b/doc/figures/hommage51.pdf differ diff --git a/doc/figures/hsv.mp b/doc/figures/hsv.mp new file mode 100644 index 0000000..f0c5dbd --- /dev/null +++ b/doc/figures/hsv.mp @@ -0,0 +1,203 @@ +input mp-solid + +vardef grillexy(expr aa,bb,cc,dd)= + save _grillexy; + picture _grillexy; + color Fc[][];color G[][]; + for l=aa upto bb: + for k=cc upto dd: + G[l][k]=(k,l,0); + endfor; + endfor; + apj:=0; + for l=aa upto (bb-1): + for k=cc upto (dd-1): + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+1][k+1]; + Fc[apj][4]:=G[l+1][k]; + Fc[apj][5]:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _grillexy=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: Hsvtorgb(((k/apj)[0*360,1*360],0.5,0.5)) + else: couleur fi; + draw for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + endfor; + ); + _grillexy +enddef; + +vardef grillexz(expr aa,bb,cc,dd)= + save _grillexz; + picture _grillexz; + color Fc[][];color G[][]; + for l=aa upto bb: + for k=cc upto dd: + G[l][k]=(k/10,0,l/10); + endfor; + endfor; + apj:=0; + for l=aa upto (bb-1): + for k=cc upto (dd-1): + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+1][k+1]; + Fc[apj][4]:=G[l+1][k]; + Fc[apj][5]:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _grillexz=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: Hsvtorgb((180,(cpt[k]/apj)[0,1],(cpt[k]/apj)[0,1])) + else: couleur fi; + endfor; + ); + _grillexz +enddef; + +vardef grilleyz(expr aa,bb,cc,dd)= + save _grilleyz; + picture _grilleyz; + color Fc[][];color G[][]; + for l=aa upto bb: + for k=cc upto dd: + G[l][k]=(0,k/10,l/10); + endfor; + endfor; + apj:=0; + for l=aa upto (bb-1): + for k=cc upto (dd-1): + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+1][k+1]; + Fc[apj][4]:=G[l+1][k]; + Fc[apj][5]:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _grilleyz=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: Hsvtorgb((120,(cpt[k]/apj)[0,1],(cpt[k]/apj)[0,1])) + else: couleur fi; + endfor; + ); + _grilleyz +enddef; + +vardef grillecirc(expr aa,bb)= + save _grillecirc; + picture _grillecirc; + color Fc[][];color G[][]; + for l=aa step 5 until bb:%upto bb: + for k=0 upto 10: + G[l][k]=((k/10)*3*cosd(l),(k/10)*3*sind(-l),2); + endfor; + endfor; + apj:=0; + for l=aa step 5 until (bb-5): + for k=0 upto 9: + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+5][k+1]; + Fc[apj][4]:=G[l+5][k]; + Fc[apj][5]:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _grillecirc=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: Hsvtorgb((aa+180,(cpt[k]/apj)[0,1],1)) + else: couleur fi; + endfor; + ); + _grillecirc +enddef; + +vardef tranche(expr aa,bb)= + save _tranche; + picture _tranche; + color Fc[][];color G[][]; + for l=aa step 5 until bb: + for k=0 upto 10: + G[l][k]=(3*cosd(l),3*sind(-l),2*k/10); + endfor; + endfor; + apj:=0; + for l=aa step 5 until (bb-5): + for k=0 upto 9: + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+5][k+1]; + Fc[apj][4]:=G[l+5][k]; + Fc[apj][5]:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _tranche=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: Hsvtorgb((aa+180,1,(cpt[k]/apj)[0,1])) + else: couleur fi; + endfor; + ); + _tranche +enddef; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,45,20,50); +arcenciel:=true; +for k=90 step 5 until 265: + draw tranche(k,k+5); +endfor; +for k=0 step 5 until 40: + draw tranche(k,k+5); +endfor; +draw grillexz(0,20,0,30); +draw grilleyz(0,20,0,30); +for k=0 step 5 until 265: + draw grillecirc(k,k+5); +endfor; +drawarrow Projette((0,0,1))--Projette((0,3,1)) withpen pencircle scaled 2bp; +label.top(btex Saturation etex rotated(angle(Projette((0,3,1))-Projette((0,0,1)))),Projette((0,1.5,1))); +drawarrow Projette((3.2*cosd(240),3.2*sind(-240),0))--Projette((3.2*cosd(240),3.2*sind(-240),2)) withpen pencircle scaled 2bp; +label.rt(btex Valeur etex rotated(angle(Projette((3.2*cosd(240),3.2*sind(-240),0))-Projette((3.2*cosd(240),3.2*sind(-240),2)))),Projette((3.2*cosd(240),3.2*sind(-240),1))); +drawarrow Projette((3.2*cosd(-30),3.2*sind(30),1.8))..Projette(((3.2*cosd(10),3.2*sind(-10),1.8)))..Projette(((3.2*cosd(20),3.2*sind(-20),1.8)))..Projette(((3.2*cosd(30),3.2*sind(-30),1.8))) withpen pencircle scaled 2bp; +label.bot(btex Teinte etex rotated angle(Projette(((3.2*cosd(-30),3.2*sind(30),1.8)))-Projette((3.2*cosd(30),3.2*sind(-30),1.8))),Projette(((3.2*cosd(0),3.2*sind(0),1.8)))); +finespace; +end \ No newline at end of file diff --git a/doc/figures/hsv1.pdf b/doc/figures/hsv1.pdf new file mode 100644 index 0000000..8f657ae Binary files /dev/null and b/doc/figures/hsv1.pdf differ diff --git a/doc/figures/hyperboloiderayonconstant.mp b/doc/figures/hyperboloiderayonconstant.mp new file mode 100644 index 0000000..9705d8e --- /dev/null +++ b/doc/figures/hyperboloiderayonconstant.mp @@ -0,0 +1,27 @@ +input mp-solid + +outcolor:=0.5[jaune,white]; +incolor:=0.5[vert,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,25); +a=20;b=36;h=8; +zz=-h/2; +ObjetNew1((sqrt(1+((zz+h)**2)/4),0,zz+h) + for m=a downto 0: + for n=if m=a:b-1 else:b fi downto 1:%if k=a:b-1 else:b fi downto 0: + ,(sqrt(1+((zz+h*m/a)**2)/4)*cosd(n*(360 div b)),sqrt(1+((zz+h*m/a)**2)/4)*sind(n*(360 div b)),zz+h*m/a) + endfor + endfor + )(4,a*b,b+a*b,b-1+a*b,a*b-1 + for m=a downto 1: + for n=if m=a:m*b-1 else: m*b fi downto (m-1)*b+2: + ,4,n,b+n,(b-1)+n,n-1 + endfor + ,4,m*b+1,(m+1)*b,m*b,(m-1)*b+1 + endfor + ); +Ferme1:=false; +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/hyperboloiderayonconstant1.pdf b/doc/figures/hyperboloiderayonconstant1.pdf new file mode 100644 index 0000000..4f7f0c5 Binary files /dev/null and b/doc/figures/hyperboloiderayonconstant1.pdf differ diff --git a/doc/figures/hypotube.mp b/doc/figures/hypotube.mp new file mode 100644 index 0000000..ad3b5a4 --- /dev/null +++ b/doc/figures/hypotube.mp @@ -0,0 +1,17 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); + +nb:=16; +unit:=0.8; +Initialisation(1000,20,45,37.5); +for k=-5 upto 5: + draw Projette((k,-5,0))--Projette((k,5,0)); + draw Projette((-5,k,0))--Projette((5,k,0)); +endfor; +eclairage:=false; +outcolor:=blanc; +draw Tuben("(4*cos(t)+cos(4*t)/2,4*sin(t)-sin(4*t)/2,1)","(-4*sin(t)-2*sin(4*t),4*cos(t)-2*cos(4*t),0)",1,0,102,0.06283); + +finespace; +end \ No newline at end of file diff --git a/doc/figures/hypotube1.pdf b/doc/figures/hypotube1.pdf new file mode 100644 index 0000000..3258258 Binary files /dev/null and b/doc/figures/hypotube1.pdf differ diff --git a/doc/figures/mp-solid.mpx b/doc/figures/mp-solid.mpx new file mode 100644 index 0000000..734ed59 --- /dev/null +++ b/doc/figures/mp-solid.mpx @@ -0,0 +1,61 @@ +% Written by metapost version 1.208 +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("z",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.0713,0.0000)-- + (5.0713,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("z",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.0713,0.0000)-- + (5.0713,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak diff --git a/doc/figures/noeud4.mp b/doc/figures/noeud4.mp new file mode 100644 index 0000000..5193e04 --- /dev/null +++ b/doc/figures/noeud4.mp @@ -0,0 +1,35 @@ +input mp-solid + +echelle:=10; +debut:=1; +outcolor:=0.5[bleu,white]; +incolor:=1.1gris; +Creux:=true; + +%1 sans eclairage, sans arcenciel +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,150); +eclairage:=false; +LectureOFF("../../data/10-61.off"); +finespace; +%2 avec eclairage, sans arcenciel +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,150); +eclairage:=true; +LectureOFF("../../data/10-61.off"); +finespace; +%3 sans eclairage, avec arcenciel +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,150); +eclairage:=false; +arcenciel:=true; +LectureOFF("../../data/10-61.off"); +finespace; +%4 avec eclairage, avec arcenciel +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,150); +eclairage:=true; +arcenciel:=true; +LectureOFF("../../data/10-61.off"); +finespace; +end \ No newline at end of file diff --git a/doc/figures/noeud41.pdf b/doc/figures/noeud41.pdf new file mode 100644 index 0000000..25b599b Binary files /dev/null and b/doc/figures/noeud41.pdf differ diff --git a/doc/figures/noeud42.pdf b/doc/figures/noeud42.pdf new file mode 100644 index 0000000..07f38f3 Binary files /dev/null and b/doc/figures/noeud42.pdf differ diff --git a/doc/figures/noeud43.pdf b/doc/figures/noeud43.pdf new file mode 100644 index 0000000..fb55dc8 Binary files /dev/null and b/doc/figures/noeud43.pdf differ diff --git a/doc/figures/noeud44.pdf b/doc/figures/noeud44.pdf new file mode 100644 index 0000000..73338dd Binary files /dev/null and b/doc/figures/noeud44.pdf differ diff --git a/doc/figures/npresentation.mp b/doc/figures/npresentation.mp new file mode 100644 index 0000000..5b14b71 --- /dev/null +++ b/doc/figures/npresentation.mp @@ -0,0 +1,14 @@ +input mp-solid; + +figureespace(-10u,-20u,10u,10u); +Initialisation(1000,15,70,50); +outcolor:=0.5[green,white]; +draw Tube("(2*cosd(t)+cosd(3*t),2*sind(t)-sind(3*t),2*sqrt(2)*sind(2*t))","(-2*sind(t)-3*sind(3*t),2*cosd(t)-3*cosd(3*t),4*sqrt(2)*cosd(2*t))","(-2*cosd(t)-9*cosd(3*t),-2*sind(t)+9*sind(3*t),-8*sqrt(2)*sind(2*t))",0.1,90,180,1.5); +finespace; + +figureespace(-10u,-20u,10u,10u); +Initialisation(1000,15,20,50); +outcolor:=0.5[jaune,white]; +draw Tube("(cos(t),1.5*sin(t),0.2*t)","(-sin(t),1.5*cos(t),0.2)","(-cos(t),-1.5*sin(t),0)",0.1,0,180,0.1); +finespace; +end \ No newline at end of file diff --git a/doc/figures/npresentation1.pdf b/doc/figures/npresentation1.pdf new file mode 100644 index 0000000..72d63bf Binary files /dev/null and b/doc/figures/npresentation1.pdf differ diff --git a/doc/figures/npresentation2.pdf b/doc/figures/npresentation2.pdf new file mode 100644 index 0000000..ee6df14 Binary files /dev/null and b/doc/figures/npresentation2.pdf differ diff --git a/doc/figures/objetanneau.mp b/doc/figures/objetanneau.mp new file mode 100644 index 0000000..e7fd0a3 --- /dev/null +++ b/doc/figures/objetanneau.mp @@ -0,0 +1,12 @@ +input mp-solid + +outcolor:=0.5[orange,blanc]; +incolor:=0.5[jaune,blanc]; +angy:=90; subh:=24; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,-20,20); +Objetanneau1("R=4","r=3","h=1.5"); +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetanneau1.pdf b/doc/figures/objetanneau1.pdf new file mode 100644 index 0000000..11982f6 Binary files /dev/null and b/doc/figures/objetanneau1.pdf differ diff --git a/doc/figures/objetbiface.mp b/doc/figures/objetbiface.mp new file mode 100644 index 0000000..3b2f8e4 --- /dev/null +++ b/doc/figures/objetbiface.mp @@ -0,0 +1,25 @@ +input mp-solid; + +%-1" +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-20,40,20); +eclairage:=false; +outcolor:=blanc; +Objetgrille0("am=-6","an=6","bm=-6","bn=6"); +AffichageObjet0; +outcolor:=jaune; +ObjetBiface1((5,0,0) for t=0.06544 step 0.06544 until pi:,(5*(cos(t)**2),(3*sin(t)*((cos(t))**3)),0) endfor); +angz:=90; +outcolor:=violet; +ObjetBiface2((5,0,0) for t=pi+0.06544 step 0.06544 until 2*pi:,(5*(cos(t)**2),(3*sin(t)*((cos(t))**3)),0) endfor); +angz:=180; +outcolor:=bleu; +ObjetBiface3((5,0,0) for t=0.06544 step 0.06544 until pi:,(5*(cos(t)**2),(3*sin(t)*((cos(t))**3)),0) endfor); +angz:=-90; +outcolor:=rouge; +ObjetBiface4((5,0,0) for t=0.06544 step 0.06544 until pi:,(5*(cos(t)**2),(3*sin(t)*((cos(t))**3)),0) endfor); +nbobj:=4; +DessineFusion; +TraceAxesD(6,6,6); +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetbiface1.pdf b/doc/figures/objetbiface1.pdf new file mode 100644 index 0000000..7cb2a66 Binary files /dev/null and b/doc/figures/objetbiface1.pdf differ diff --git a/doc/figures/objetcalotte.mp b/doc/figures/objetcalotte.mp new file mode 100644 index 0000000..9afaf2a --- /dev/null +++ b/doc/figures/objetcalotte.mp @@ -0,0 +1,21 @@ +input mp-solid + +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; +angy:=40; nb:=24; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-20,25,50); +subh:=24; +Objetcalotte1("R=4","phib=-pi/3","phih=pi/4");%ok +AffichageObjet1; +TraceAxes; +finespace; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,20,25,50); +subh:=24; +creux:=true; +Objetcalotte1("R=4","phib=-pi/3","phih=pi/4");%ok +AffichageObjet1; +TraceAxesD(5,5,5); +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetcalotte1.pdf b/doc/figures/objetcalotte1.pdf new file mode 100644 index 0000000..622f1de Binary files /dev/null and b/doc/figures/objetcalotte1.pdf differ diff --git a/doc/figures/objetcalotte2.pdf b/doc/figures/objetcalotte2.pdf new file mode 100644 index 0000000..a7dfedd Binary files /dev/null and b/doc/figures/objetcalotte2.pdf differ diff --git a/doc/figures/objetcone.mp b/doc/figures/objetcone.mp new file mode 100644 index 0000000..ce71323 --- /dev/null +++ b/doc/figures/objetcone.mp @@ -0,0 +1,23 @@ +input mp-solid + +outcolor:=0.5[ciel,blanc]; +incolor:=0.5[jaune,blanc]; + +nb:=24;subh:=9; +arcenciel:=true; +creux:=true; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,-20,20); +Objetcone1("r=2","h=5");%ok +AffichageObjet1; +TraceAxes; +finespace; +creux:=false; +arcenciel:=false; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-10,-40,20); +Objetcone1("r=2","h=5");%ok +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetcone1.pdf b/doc/figures/objetcone1.pdf new file mode 100644 index 0000000..622d781 Binary files /dev/null and b/doc/figures/objetcone1.pdf differ diff --git a/doc/figures/objetcone2.pdf b/doc/figures/objetcone2.pdf new file mode 100644 index 0000000..af82308 Binary files /dev/null and b/doc/figures/objetcone2.pdf differ diff --git a/doc/figures/objetcube.mp b/doc/figures/objetcube.mp new file mode 100644 index 0000000..db5de65 --- /dev/null +++ b/doc/figures/objetcube.mp @@ -0,0 +1,13 @@ +input mp-solid + +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[jaune,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,10,50); +subh:=9; +Objetcube1("a=4"); +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetcube1.pdf b/doc/figures/objetcube1.pdf new file mode 100644 index 0000000..cdfaa17 Binary files /dev/null and b/doc/figures/objetcube1.pdf differ diff --git a/doc/figures/objetcylindre.mp b/doc/figures/objetcylindre.mp new file mode 100644 index 0000000..2257b46 --- /dev/null +++ b/doc/figures/objetcylindre.mp @@ -0,0 +1,25 @@ +input mp-solid + +outcolor:=0.5[ciel,blanc]; +incolor:=0.5[jaune,blanc]; + +nb:=24;subh:=9; +creux:=true; +arcenciel:=true; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,40,20); +Objetcylindre1("r=2","h=4");%ok +AffichageObjet1; +TraceAxes; +finespace; + +creux:=false; +arcenciel:=false; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,40,20); +Objetcylindre1("r=2","h=4");%ok +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetcylindre1.pdf b/doc/figures/objetcylindre1.pdf new file mode 100644 index 0000000..189622f Binary files /dev/null and b/doc/figures/objetcylindre1.pdf differ diff --git a/doc/figures/objetcylindre2.pdf b/doc/figures/objetcylindre2.pdf new file mode 100644 index 0000000..7f815cf Binary files /dev/null and b/doc/figures/objetcylindre2.pdf differ diff --git a/doc/figures/objetdodecaedre.mp b/doc/figures/objetdodecaedre.mp new file mode 100644 index 0000000..fb1981a --- /dev/null +++ b/doc/figures/objetdodecaedre.mp @@ -0,0 +1,10 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,70,20,150); +outcolor:=jaune; +incolor:=0.5[vert,blanc]; +Objetdodecaedre1("a=1"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetdodecaedre1.pdf b/doc/figures/objetdodecaedre1.pdf new file mode 100644 index 0000000..75c2cc0 --- /dev/null +++ b/doc/figures/objetdodecaedre1.pdf @@ -0,0 +1,63 @@ +%PDF-1.3 +%Ç쏢 +5 0 obj +<> +stream +xœµRKNÄ0 Ýç>ñ/vrÖG@šÔ.€×Çi¦eGՅÓøùÙïÅo@È@ã»Æ§¹Ü=\> +!™PӀ_'x¿†—ÔQ*ˆqÇn0V%¬yÓÝGœ +Sæ˜A"3ÚóF¨¢ +i`´QŒ®ÀÍ*fœÊ¹|fƒ×BpT“çò˜âL™«ÀÏaHÍ*³»bꝋ¸5”€žÕƃOšödæÄff˜@áеeÒ8¶ÂE°öUØQÔ«Wi<ä|–—jjh ¤ +6âá IB:„ †ûâ—cV@K³×)*{æÔJ2,¬¢¹ 7òEÏqÜC_%¨2Öü m˜ºæ‘{žlåf—GQ/n̘7ív +7«º5ð|óSß<ó´·¶Û¶íÎýOÜcòSù‚'ðŽendstream +endobj +6 0 obj +313 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +8 0 obj +<> +endobj +2 0 obj +<>endobj +xref +0 9 +0000000000 65535 f +0000000607 00000 n +0000000725 00000 n +0000000548 00000 n +0000000417 00000 n +0000000015 00000 n +0000000398 00000 n +0000000655 00000 n +0000000696 00000 n +trailer +<< /Size 9 /Root 1 0 R /Info 2 0 R +/ID [(¶Ò±Û ¥É‹®T=-)(¶Ò±Û ¥É‹®T=-)] +>> +startxref +836 +%%EOF diff --git a/doc/figures/objetgrille.mp b/doc/figures/objetgrille.mp new file mode 100644 index 0000000..1266990 --- /dev/null +++ b/doc/figures/objetgrille.mp @@ -0,0 +1,12 @@ +input mp-solid + +figureespace(-15u,-15u,15u,15u); +Initialisation(500,30,25,20); +eclairage:=false; +nb:=10; subh:=6; +outcolor:=blanc; +Objetgrille1("am=-2.5","an=2.5","bm=-1.5","bn=1.5"); +AffichageObjet1; +TraceAxesD(3,2,2); +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetgrille1.pdf b/doc/figures/objetgrille1.pdf new file mode 100644 index 0000000..56c6048 Binary files /dev/null and b/doc/figures/objetgrille1.pdf differ diff --git a/doc/figures/objeticosaedre.mp b/doc/figures/objeticosaedre.mp new file mode 100644 index 0000000..e3dd0db --- /dev/null +++ b/doc/figures/objeticosaedre.mp @@ -0,0 +1,10 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,70,20,150); +outcolor:=jaune; +incolor:=0.5[vert,blanc]; +Objeticosaedre1("a=1"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objeticosaedre1.pdf b/doc/figures/objeticosaedre1.pdf new file mode 100644 index 0000000..0f87099 --- /dev/null +++ b/doc/figures/objeticosaedre1.pdf @@ -0,0 +1,59 @@ +%PDF-1.3 +%Ç쏢 +5 0 obj +<> +stream +xœ’An! E÷œÂ'p±1`NÐuÚ#TJÚ*³h»èõk˜™F TJÑ,°¾ÿó‡ðHàë·­/‹{xÊpúrC( ö>OŽàÍQJ ™ƒ&ÌGE…€S*(pvb'ÙQAUÛ9:†o“¿;s-^ݳ!IŽàw­P’2²Ï@¡i¬[/V ròd%7¢9݊=•X9ö¢¥s=ÄÒÍyv¬)" ØsHcJ¶bdæëíEŸe^\ሔ“MŠY#·x¯g¯sº¤x"p)¶< +Ú-i,­‹7µ‰‹õ÷åï8þ­Ú TY .Å¢Ÿ©7è!îQUÚåõSZÑõ÷|œÔ5ëÛܺ”F~3ª‘[OÙGֻݣ¹õL£=£ªn÷x=†endstream +endobj +6 0 obj +300 +endobj +4 0 obj +<> +/Contents 5 0 R +>> +endobj +3 0 obj +<< /Type /Pages /Kids [ +4 0 R +] /Count 1 +>> +endobj +1 0 obj +<> +endobj +7 0 obj +<>endobj +8 0 obj +<> +endobj +2 0 obj +<>endobj +xref +0 9 +0000000000 65535 f +0000000594 00000 n +0000000712 00000 n +0000000535 00000 n +0000000404 00000 n +0000000015 00000 n +0000000385 00000 n +0000000642 00000 n +0000000683 00000 n +trailer +<< /Size 9 /Root 1 0 R /Info 2 0 R +/ID [(ÿ‹©m ckO'â%ïC&E)(ÿ‹©m ckO'â%ïC&E)] +>> +startxref +823 +%%EOF diff --git a/doc/figures/objetnew.mp b/doc/figures/objetnew.mp new file mode 100644 index 0000000..0916d1f --- /dev/null +++ b/doc/figures/objetnew.mp @@ -0,0 +1,53 @@ +%Hexaedre tetrakis +%http://www.lassine.be/polyedres/catalan/hexaedre_tetrakis.html +input mp-solid + +outcolor:=1/2[rouge,white]; +incolor:=1/2[bleu,white]; + +intensite:=1.5; +figureespace(-10u,-10u,10u,10u); +Initialisation(2500,30,40,50); +ObjetNew1((0,0,-3*sqrt(6)/4),% +(-sqrt(3)/2,-3/2,-sqrt(6)/4),% +(sqrt(3),0,-sqrt(6)/4),% +(-sqrt(3)/2,3/2,-sqrt(6)/4),% +(sqrt(3)/2,-3/2,sqrt(6)/4),% +(-sqrt(3),0,sqrt(6)/4),% +(sqrt(3)/2,3/2,sqrt(6)/4),% +(0,0,3*sqrt(6)/4),% +(-3*sqrt(3)/4,0,-3*sqrt(6)/8),% +(3*sqrt(3)/8,-9/8,-3*sqrt(6)/8),% +(3*sqrt(3)/8,9/8,-3*sqrt(6)/8),% +(-3*sqrt(3)/8,-9/8,3*sqrt(6)/8),% +(-3*sqrt(3)/8,9/8,3*sqrt(6)/8),% +(3*sqrt(3)/4,0,3*sqrt(6)/8)% +)(3,0,1,8,% +3,0,8,3,% +3,3,8,5,% +3,1,5,8,% +3,0,9,1,% +3,0,2,9,% +3,2,4,9,% +3,1,9,4,% +3,0,3,10,% +3,0,10,2,% +3,2,10,6,% +3,3,6,10,% +3,2,13,4,% +3,2,6,13,% +3,6,7,13,% +3,4,13,7,% +3,3,5,12,% +3,3,12,6,% +3,6,12,7,% +3,5,7,12,% +3,1,11,5,% +3,1,4,11,% +3,4,7,11,% +3,5,11,7% +); +Ferme1:=true; +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetnew1.pdf b/doc/figures/objetnew1.pdf new file mode 100644 index 0000000..a327e76 Binary files /dev/null and b/doc/figures/objetnew1.pdf differ diff --git a/doc/figures/objetobj.mp b/doc/figures/objetobj.mp new file mode 100644 index 0000000..e8e73b6 --- /dev/null +++ b/doc/figures/objetobj.mp @@ -0,0 +1,15 @@ +input mp-solid + +outcolor:=0.5[jaune,white]; +incolor:=O.5[vert,white]; + +echelle:=200; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,80,30,25); +angx:=90; +ObjetOBJ1("Midpoly_03-1.obj"); +Ferme1:=true; +AffichageObjet1; +finespace; +end diff --git a/doc/figures/objetobj1.pdf b/doc/figures/objetobj1.pdf new file mode 100644 index 0000000..4369a3f Binary files /dev/null and b/doc/figures/objetobj1.pdf differ diff --git a/doc/figures/objetoctaedre.mp b/doc/figures/objetoctaedre.mp new file mode 100644 index 0000000..3452022 --- /dev/null +++ b/doc/figures/objetoctaedre.mp @@ -0,0 +1,17 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,70,20,150); +outcolor:=jaune; +incolor:=0.5[vert,blanc]; +Objetoctaedre1("a=1"); +nb:=24;subh:=36; +creux:=true; +Objetsphere2("R=1"); +string toto; +toto=""&for k=0 upto apj2-2:if ((k div 18) mod 2)=1:decimal(k)&","& fi endfor decimal(863)&""; +ObjetEnleve2(scantokens toto); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetoctaedre1.pdf b/doc/figures/objetoctaedre1.pdf new file mode 100644 index 0000000..912b2ff Binary files /dev/null and b/doc/figures/objetoctaedre1.pdf differ diff --git a/doc/figures/objetoff.mp b/doc/figures/objetoff.mp new file mode 100644 index 0000000..314e9da --- /dev/null +++ b/doc/figures/objetoff.mp @@ -0,0 +1,16 @@ +input mp-solid + +outcolor:=0.5[jaune,white]; +incolor:=0.5[vert,white]; + +debut:=0; +echelle:=15000; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,170,30,10); +angx:=90; +ObjetOFF1("Kangaroo.off"); +Ferme1:=true; +AffichageObjet1; +finespace; +end diff --git a/doc/figures/objetoff1.pdf b/doc/figures/objetoff1.pdf new file mode 100644 index 0000000..660ffcd Binary files /dev/null and b/doc/figures/objetoff1.pdf differ diff --git a/doc/figures/objetpave.mp b/doc/figures/objetpave.mp new file mode 100644 index 0000000..b648e90 --- /dev/null +++ b/doc/figures/objetpave.mp @@ -0,0 +1,13 @@ +input mp-solid + +arcenciel:=true; +incolor:=0.5[jaune,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,10,50); +subh:=9; +Objetpave1("L=2","H=6","P=4"); +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetpave1.pdf b/doc/figures/objetpave1.pdf new file mode 100644 index 0000000..dea37c8 Binary files /dev/null and b/doc/figures/objetpave1.pdf differ diff --git a/doc/figures/objetprisme.mp b/doc/figures/objetprisme.mp new file mode 100644 index 0000000..250bcf8 --- /dev/null +++ b/doc/figures/objetprisme.mp @@ -0,0 +1,23 @@ +input mp-solid + +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[jaune,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,10,20,50); +subh:=9; +ObjetPrisme1("axe=(0,0.5,1)","h=3")((1,0,0),(2,3,0),(-1,4,0));%ok +AffichageObjet1; +TraceAxes; +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,10,20,50); +subh:=9; +creux:=true; +ObjetPrisme1("axe=(0,0.5,1)","h=3")((1,0,0),(2,3,0),(-1,4,0));%ok +AffichageObjet1; +TraceAxes; +finespace; + +end \ No newline at end of file diff --git a/doc/figures/objetprisme1.pdf b/doc/figures/objetprisme1.pdf new file mode 100644 index 0000000..bd9232e Binary files /dev/null and b/doc/figures/objetprisme1.pdf differ diff --git a/doc/figures/objetprisme2.pdf b/doc/figures/objetprisme2.pdf new file mode 100644 index 0000000..3bf390b Binary files /dev/null and b/doc/figures/objetprisme2.pdf differ diff --git a/doc/figures/objetruban.mp b/doc/figures/objetruban.mp new file mode 100644 index 0000000..5f5d994 --- /dev/null +++ b/doc/figures/objetruban.mp @@ -0,0 +1,18 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,-30,20,30); +nb:=14; subh:=12; +eclairage:=false; +outcolor:=blanc; +Objetgrille1("am=-1","an=6","bm=-1","bn=5"); +AffichageObjet1; +eclairage:=true; +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; +subh:=3; +ObjetRuban2("h=2")((0,0,0),(2,2,0),(4,0,0),(6,2,0)); +AffichageObjet2; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetruban1.pdf b/doc/figures/objetruban1.pdf new file mode 100644 index 0000000..d71133d Binary files /dev/null and b/doc/figures/objetruban1.pdf differ diff --git a/doc/figures/objets.mpx b/doc/figures/objets.mpx new file mode 100644 index 0000000..75bfbe0 --- /dev/null +++ b/doc/figures/objets.mpx @@ -0,0 +1,101 @@ +% Written by metapost version 1.208 +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("z",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.0713,0.0000)-- + (5.0713,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("z",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.0713,0.0000)-- + (5.0713,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("y",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-1.9372)--(5.2419,-1.9372)-- + (5.2419,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmmi10"; +_s("x",_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(5.6939,0.0000)-- + (5.6939,4.2895)--(0,4.2895)--cycle; +_p endgroup +mpxbreak diff --git a/doc/figures/objetsphere.mp b/doc/figures/objetsphere.mp new file mode 100644 index 0000000..1c2afc1 --- /dev/null +++ b/doc/figures/objetsphere.mp @@ -0,0 +1,13 @@ +input mp-solid + +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[jaune,blanc]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,10,50); +nb:=24; subh:=18; +Objetsphere1("R=4");%ok +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objetsphere1.pdf b/doc/figures/objetsphere1.pdf new file mode 100644 index 0000000..2d0528e Binary files /dev/null and b/doc/figures/objetsphere1.pdf differ diff --git a/doc/figures/objettetraedre.mp b/doc/figures/objettetraedre.mp new file mode 100644 index 0000000..f4c9cbc --- /dev/null +++ b/doc/figures/objettetraedre.mp @@ -0,0 +1,18 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,70,20,150); +outcolor:=jaune; +incolor:=0.5[vert,blanc]; +Objettetraedre1("a=1"); +nb:=24;subh:=36; +numeroteface:=true; +creux:=true; +Objetsphere2("R=1"); +string toto; +toto=""&for k=0 upto apj2-2:if ((k div 18) mod 2)=1:decimal(k)&","& fi endfor decimal(863)&""; +ObjetEnleve2(scantokens toto); +nbobj:=2; +DessineFusion; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objettetraedre1.pdf b/doc/figures/objettetraedre1.pdf new file mode 100644 index 0000000..180f507 Binary files /dev/null and b/doc/figures/objettetraedre1.pdf differ diff --git a/doc/figures/objettore.mp b/doc/figures/objettore.mp new file mode 100644 index 0000000..c153d78 --- /dev/null +++ b/doc/figures/objettore.mp @@ -0,0 +1,13 @@ +input mp-solid + +outcolor:=0.5[ciel,blanc]; +incolor:=0.5[jaune,blanc]; + +nb:=24;subh:=36; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,40,20); +Objettore1("R=2.5","r=1.5");%ok +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objettore1.pdf b/doc/figures/objettore1.pdf new file mode 100644 index 0000000..e985888 Binary files /dev/null and b/doc/figures/objettore1.pdf differ diff --git a/doc/figures/objettronccone.mp b/doc/figures/objettronccone.mp new file mode 100644 index 0000000..7486833 --- /dev/null +++ b/doc/figures/objettronccone.mp @@ -0,0 +1,24 @@ +input mp-solid + +outcolor:=0.5[ciel,blanc]; +incolor:=0.5[jaune,blanc]; + +nb:=24;subh:=5; +arcenciel:=true; +creux:=true; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,10,20); +Objettronccone1("r=3.5","h=4","H=5");%ok +AffichageObjet1; +TraceAxes; +finespace; +creux:=false; +arcenciel:=false; +angx:=90; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,50,40,20); +Objettronccone1("r=2","h=5","H=7");%ok +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objettronccone1.pdf b/doc/figures/objettronccone1.pdf new file mode 100644 index 0000000..4cb7645 Binary files /dev/null and b/doc/figures/objettronccone1.pdf differ diff --git a/doc/figures/objettronccone2.pdf b/doc/figures/objettronccone2.pdf new file mode 100644 index 0000000..db7b06c Binary files /dev/null and b/doc/figures/objettronccone2.pdf differ diff --git a/doc/figures/objettube.mp b/doc/figures/objettube.mp new file mode 100644 index 0000000..342c0c9 --- /dev/null +++ b/doc/figures/objettube.mp @@ -0,0 +1,24 @@ +input mp-solid + +%27'' +figureespace(-20u,-20u,20u,20u); +Initialisation(1500,60,20,30); +nb:=16;%16 +subh:=18;%18 +outcolor:=0.5[jaune,blanc]; +incolor:=0.5[violet,blanc]; +ObjetTube1("(2*(1+cos(t)),2*tan(t/2),2*sin(t))","(-2*sin(t),2/((cos(t/2))**2),2*cos(t))",1,-2.7468,71,0.0763); +AffichageObjet1; +finespace; + +figureespace(-20u,-20u,20u,20u); +Initialisation(1500,60,20,30); +nb:=16;%16 +subh:=18;%18 +outcolor:=0.5[jaune,blanc]; +incolor:=0.5[violet,blanc]; +creux:=true; +ObjetTube1("(2*(1+cos(t)),2*tan(t/2),2*sin(t))","(-2*sin(t),2/((cos(t/2))**2),2*cos(t))",1,-2.7468,71,0.0763); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/objettube1.pdf b/doc/figures/objettube1.pdf new file mode 100644 index 0000000..889be39 Binary files /dev/null and b/doc/figures/objettube1.pdf differ diff --git a/doc/figures/objettube2.pdf b/doc/figures/objettube2.pdf new file mode 100644 index 0000000..cd3f12e Binary files /dev/null and b/doc/figures/objettube2.pdf differ diff --git a/doc/figures/prismearrondi.mp b/doc/figures/prismearrondi.mp new file mode 100644 index 0000000..7a1b82a --- /dev/null +++ b/doc/figures/prismearrondi.mp @@ -0,0 +1,17 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,-25,30,30); +outcolor:=blanc; +eclairage:=false; +nb:=6;subh:=6; +Objetgrille0("am=-3","an=3","bm=-3","bn=3"); +AffichageObjet0; +eclairage:=true; +nb:=1; +outcolor:=0.5[orange,blanc]; +ObjetPrisme1("axe=(0,0,1)","h=6")(for k=0 step 10 until 90:(1+cosd(k),1+sind(k),0),endfor for k=90 step 10 until 180:(cosd(k)-1,1+sind(k),0), endfor for k=180 step 10 until 270:(cosd(k)-1,sind(k)-1,0), endfor for k=270 step 10 until 350:(cosd(k)+1,sind(k)-1,0), endfor (2,1,0)); +AffichageObjet1; +TraceAxesD(4,4,8); +finespace; +end \ No newline at end of file diff --git a/doc/figures/prismearrondi1.pdf b/doc/figures/prismearrondi1.pdf new file mode 100644 index 0000000..f613e53 Binary files /dev/null and b/doc/figures/prismearrondi1.pdf differ diff --git a/doc/figures/prismebifolium.mp b/doc/figures/prismebifolium.mp new file mode 100644 index 0000000..6a95622 --- /dev/null +++ b/doc/figures/prismebifolium.mp @@ -0,0 +1,20 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,30,25); +Lumiere:=Oeil; +outcolor:=blanc; +creux:=false; +subh:=10; +Objetgrille1("am=-5","an=5","bm=-5","bn=5"); +AffichageObjet1; +outcolor:=vert; +incolor:=orange; +nb:=1; +subh:=5; +creux:=true; +ObjetPrisme2("axe=(0,0,1)","h=6",for k=0 step 5 until 175:(12*sind(k)*(cosd(k)**3),12*(sind(k)**2)*(cosd(k)**2),0),endfor (0,0,0)); +AffichageObjet2; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/prismebifolium1.pdf b/doc/figures/prismebifolium1.pdf new file mode 100644 index 0000000..564b178 Binary files /dev/null and b/doc/figures/prismebifolium1.pdf differ diff --git a/doc/figures/ressortgaston.mp b/doc/figures/ressortgaston.mp new file mode 100644 index 0000000..c3063ce --- /dev/null +++ b/doc/figures/ressortgaston.mp @@ -0,0 +1,12 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +%ok ressort-siège +nb:=6; +%ok nb=6 10'' +invnormale:=-1; +Initialisation(1000,20,20,25); +arcenciel:=true; +draw Tuben("((t**2+3)*sin(15*t),(t**2+3)*cos(15*t),2*t)","(2*t*sin(15*t)+15*((t**2)+3)*cos(15*t),2*t*cos(15*t)-15*((t**2)+3)*sin(15*t),2)",0.2,-2,360,1/90); +finespace; +end \ No newline at end of file diff --git a/doc/figures/ressortgaston1.pdf b/doc/figures/ressortgaston1.pdf new file mode 100644 index 0000000..661c6d1 Binary files /dev/null and b/doc/figures/ressortgaston1.pdf differ diff --git a/doc/figures/revolution1.mp b/doc/figures/revolution1.mp new file mode 100644 index 0000000..07b5a9a --- /dev/null +++ b/doc/figures/revolution1.mp @@ -0,0 +1,16 @@ +input mp-solid + +r=2; R=8; h=3; + +path pp; +pp=(R,-h/2)--((R+r)/2,h/2)--(r,-h/2)--cycle; + +incolor:=0.5[jaune,white]; +outcolor:=0.8[bleu,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,40,25); +draw Revolution("pp",0,length pp,0.1,0,2*pi,pi/12); +finespace; + +end \ No newline at end of file diff --git a/doc/figures/revolution11.pdf b/doc/figures/revolution11.pdf new file mode 100644 index 0000000..6a2b930 Binary files /dev/null and b/doc/figures/revolution11.pdf differ diff --git a/doc/figures/revolution2.mp b/doc/figures/revolution2.mp new file mode 100644 index 0000000..5f98174 --- /dev/null +++ b/doc/figures/revolution2.mp @@ -0,0 +1,15 @@ +input mp-solid + +r=3;R=8;h=6; + +path pp; +pp=(r,h/2)--(r,-h/2)--(R,-h/2)--(R,-h/2+1)--(R-1.5,-h/2+1)--(R-1.5,h/2-1)--(R,h/2-1)--(R,h/2)--cycle; + +incolor:=0.5[jaune,white]; +outcolor:=0.8[bleu,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,25); +draw Revolution("pp",0,length pp,0.25,0,2*pi,pi/12); +finespace; +end \ No newline at end of file diff --git a/doc/figures/revolution21.pdf b/doc/figures/revolution21.pdf new file mode 100644 index 0000000..cfd553d Binary files /dev/null and b/doc/figures/revolution21.pdf differ diff --git a/doc/figures/revolution3.mp b/doc/figures/revolution3.mp new file mode 100644 index 0000000..0052a85 --- /dev/null +++ b/doc/figures/revolution3.mp @@ -0,0 +1,13 @@ +input mp-solid + +path pp; +pp=(3,-7)..(1,-6)..(5,0.5)..(5,3)..(1,3)..(1,4)..(2,5); + +incolor:=0.5[jaune,white]; +outcolor:=0.8[bleu,white]; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,25); +draw Revolution("pp",0,length pp,0.2,0,2*pi,pi/12); +finespace; +end \ No newline at end of file diff --git a/doc/figures/revolution31.pdf b/doc/figures/revolution31.pdf new file mode 100644 index 0000000..7ea4541 Binary files /dev/null and b/doc/figures/revolution31.pdf differ diff --git a/doc/figures/rotation.mp b/doc/figures/rotation.mp new file mode 100644 index 0000000..a19eb07 --- /dev/null +++ b/doc/figures/rotation.mp @@ -0,0 +1,42 @@ +input mp-solid + +subh:=1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +Lumiere:=Oeil; +arcenciel:=true; +Objetpave1("L=3","H=2","P=1"); +AffichageObjet1; +TraceAxes; +finespace; +angx:=90; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +Lumiere:=Oeil; +arcenciel:=true; +Objetpave1("L=3","H=2","P=1"); +AffichageObjet1; +TraceAxes; +finespace; +angx:=0; +angy:=-45; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +Lumiere:=Oeil; +arcenciel:=true; +Objetpave1("L=3","H=2","P=1"); +AffichageObjet1; +TraceAxes; +finespace; +angy:=0; +angz:=57; +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +Lumiere:=Oeil; +arcenciel:=true; +Objetpave1("L=3","H=2","P=1"); +AffichageObjet1; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/rotation1.pdf b/doc/figures/rotation1.pdf new file mode 100644 index 0000000..dbcbffc Binary files /dev/null and b/doc/figures/rotation1.pdf differ diff --git a/doc/figures/rotation2.pdf b/doc/figures/rotation2.pdf new file mode 100644 index 0000000..3bad899 Binary files /dev/null and b/doc/figures/rotation2.pdf differ diff --git a/doc/figures/rotation3.pdf b/doc/figures/rotation3.pdf new file mode 100644 index 0000000..231a922 Binary files /dev/null and b/doc/figures/rotation3.pdf differ diff --git a/doc/figures/rotation4.pdf b/doc/figures/rotation4.pdf new file mode 100644 index 0000000..59508ec Binary files /dev/null and b/doc/figures/rotation4.pdf differ diff --git a/doc/figures/rubancardioide.mp b/doc/figures/rubancardioide.mp new file mode 100644 index 0000000..6a91c0b --- /dev/null +++ b/doc/figures/rubancardioide.mp @@ -0,0 +1,20 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,20,25); +nb:=17; subh:=20; +eclairage:=false; +drawoptions(withcolor gris); +outcolor:=blanc; +Objetgrille1("am=-5.5","an=3","bm=-5","bn=5"); +AffichageObjet1; +drawoptions(); +eclairage:=true; +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; +subh:=3; +ObjetRuban2("h=2")(for t=-pi step pi/36 until 35*pi/36:1.5*(2*cos(t)-cos(2*t),2*sin(t)-sin(2*t),0), endfor(-4.5,0,0)); +AffichageObjet2; +TraceAxesD(3.5,5.5,4); +finespace; +end \ No newline at end of file diff --git a/doc/figures/rubancardioide1.pdf b/doc/figures/rubancardioide1.pdf new file mode 100644 index 0000000..e3719e1 Binary files /dev/null and b/doc/figures/rubancardioide1.pdf differ diff --git a/doc/figures/rubansinus.mp b/doc/figures/rubansinus.mp new file mode 100644 index 0000000..4078ffa --- /dev/null +++ b/doc/figures/rubansinus.mp @@ -0,0 +1,18 @@ +input mp-solid + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,60,20,25); +nb:=10; subh:=26; +eclairage:=false; +outcolor:=blanc; +Objetgrille1("am=-5","an=5","bm=-13","bn=13"); +AffichageObjet1; +eclairage:=true; +outcolor:=0.5[rouge,blanc]; +incolor:=0.5[vert,blanc]; +subh:=3; +ObjetRuban2("h=2")(for t=-4*pi step (pi/12) until 47*pi/12:(2*sin(t),t,0), endfor(0,4*pi,0)); +AffichageObjet2; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/rubansinus1.pdf b/doc/figures/rubansinus1.pdf new file mode 100644 index 0000000..d4401bb Binary files /dev/null and b/doc/figures/rubansinus1.pdf differ diff --git a/doc/figures/sectionanneau.mp b/doc/figures/sectionanneau.mp new file mode 100644 index 0000000..688c429 --- /dev/null +++ b/doc/figures/sectionanneau.mp @@ -0,0 +1,45 @@ +prologues:=2; + +input geometriesyr16 + +R=3; r=2; h=1; + +figure(0,0,10u,10u); +pair O,A[]; +O=u*(3,3); +A1-O=u*(R,-h/2); +A2-O=u*(R,h/2); +A3-O=u*(r,h/2); +A4-O=u*(r,-h/2); +trace hachurage(polygone(A1,A2,A3,A4),120,0.2,0); +trace polygone(A1,A2,A3,A4); +trace hachurage(symetrie(polygone(A1,A2,A3,A4),O),120,0.2,0); +trace symetrie(polygone(A1,A2,A3,A4),O); +drawarrow (O+u*(0,-1))--(O+u*(0,2)) dashed dashpattern(on12bp off6bp on3bp off6bp); +drawarrow (O+u*(-3,0))--(O+u*(3,0)) dashed dashpattern(on12bp off6bp on 3bp off6bp); +trace cotation(A1,A2,-4mm,-2mm,btex $h$ etex); +trace cotation(O+u*(0,h/2),A3,2mm,2mm,btex $r$ etex); +trace cotation(O+u*(0,h/2),A2,10mm,2mm,btex $R$ etex); +label.llft(btex O etex,O); +label.top(btex $z$ etex,O+u*(0,2)); +label.rt(btex $y$ etex,O+u*(3,0)); +fin; + +figure(0,0,10u,10u); +path section; +section=for k=0 step 10 until 90:0.5*u*(1+cosd(k),1+sind(k))-- endfor for k=90 step 10 until 180:0.5*u*(cosd(k)-1,1+sind(k))-- endfor for k=180 step 10 until 270:0.5*u*(cosd(k)-1,sind(k)-1)-- endfor for k=270 step 10 until 350:0.5*u*(cosd(k)+1,sind(k)-1)-- endfor 0.5*u*(2,1)--cycle; +pair O,A[]; +R:=3; +O=u*(5,3); +trace hachurage(section shifted(O+u*R*(1,0)),120,0.2,0); +trace section shifted(O+u*R*(1,0)); +trace hachurage(symetrie(section shifted(O+u*R*(1,0)),O),120,0.2,0); +trace symetrie(section shifted(O+u*R*(1,0)),O); +drawarrow (O+u*(0,-1))--(O+u*(0,2)) dashed dashpattern(on12bp off6bp on3bp off6bp); +drawarrow (O+u*(-4,0))--(O+u*(4,0)) dashed dashpattern(on12bp off6bp on 3bp off6bp); +trace cotation(O+u*(0,0),O+u*(R,0),15mm,2mm,btex $R$ etex); +label.llft(btex O etex,O); +label.top(btex $z$ etex,O+u*(0,2)); +label.rt(btex $y$ etex,O+u*(4,0)); +fin; +end \ No newline at end of file diff --git a/doc/figures/sectionanneau1.pdf b/doc/figures/sectionanneau1.pdf new file mode 100644 index 0000000..6705fec Binary files /dev/null and b/doc/figures/sectionanneau1.pdf differ diff --git a/doc/figures/sectionanneau2.pdf b/doc/figures/sectionanneau2.pdf new file mode 100644 index 0000000..23be880 Binary files /dev/null and b/doc/figures/sectionanneau2.pdf differ diff --git a/doc/figures/sectioncube.mp b/doc/figures/sectioncube.mp new file mode 100644 index 0000000..1a07ff1 --- /dev/null +++ b/doc/figures/sectioncube.mp @@ -0,0 +1,41 @@ +input mp-solid + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,60,30,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=5; +Objetcube15("a=2"); +Objetplan21("An=(1,0,0.25)","Bn=(0,1,0)","Cn=(4,0,1)"); +ObjetSepare15(3,4); +AffichageObjet4; +TraceAxesDD(0,0,0)(2,2,2); +finespace; + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,90,0,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=5; +Objetcube15("a=2"); +Objetplan21("An=(1,0,0.25)","Bn=(0,1,0)","Cn=(4,0,1)"); +ObjetSepare15(3,4); +AffichageObjet4; +TraceAxesDD(0,0,0)(2,2,2); +finespace; + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,60,90,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=5; +Objetcube15("a=2"); +Objetplan21("An=(1,0,0.25)","Bn=(0,1,0)","Cn=(4,0,1)"); +ObjetSepare15(3,4); +AffichageObjet4; +TraceAxesDD(0,0,0)(2,2,2); +finespace; +end \ No newline at end of file diff --git a/doc/figures/sectioncube1.pdf b/doc/figures/sectioncube1.pdf new file mode 100644 index 0000000..491199f Binary files /dev/null and b/doc/figures/sectioncube1.pdf differ diff --git a/doc/figures/sectioncube2.pdf b/doc/figures/sectioncube2.pdf new file mode 100644 index 0000000..b05266c Binary files /dev/null and b/doc/figures/sectioncube2.pdf differ diff --git a/doc/figures/sectioncube3.pdf b/doc/figures/sectioncube3.pdf new file mode 100644 index 0000000..ac7452b Binary files /dev/null and b/doc/figures/sectioncube3.pdf differ diff --git a/doc/figures/sectionsphere.mp b/doc/figures/sectionsphere.mp new file mode 100644 index 0000000..c340d55 --- /dev/null +++ b/doc/figures/sectionsphere.mp @@ -0,0 +1,15 @@ +input mp-solid + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,60,30,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=19; +Objetsphere15("R=1"); +Objetplan21("An=(1,0,0)","Bn=(0,1,0)","Cn=(0,0,1)"); +ObjetSepare15(3,4); +AffichageObjet3; +TraceAxesDD(0,0,0)(1.5,1.5,1.5); +finespace; +end \ No newline at end of file diff --git a/doc/figures/sectionsphere1.pdf b/doc/figures/sectionsphere1.pdf new file mode 100644 index 0000000..e0f6c86 Binary files /dev/null and b/doc/figures/sectionsphere1.pdf differ diff --git a/doc/figures/sectiontore.mp b/doc/figures/sectiontore.mp new file mode 100644 index 0000000..6703e55 --- /dev/null +++ b/doc/figures/sectiontore.mp @@ -0,0 +1,14 @@ +input mp-solid + +figureespace(-100u,-100u,100u,100u); +Initialisation(2500,60,30,75); +creux:=true; +outcolor:=jaune; +incolor:=0.5[vert,white]; +nb:=30;subh:=21; +Objettore15("R=2","r=0.75"); +Objetplan21("An=(1,0,0.25)","Bn=(2,1,0.5)","Cn=(-1,0,-0.25)"); +ObjetSepare15(3,4); +AffichageObjet3; +finespace; +end \ No newline at end of file diff --git a/doc/figures/sectiontore1.pdf b/doc/figures/sectiontore1.pdf new file mode 100644 index 0000000..2aa7b94 Binary files /dev/null and b/doc/figures/sectiontore1.pdf differ diff --git a/doc/figures/source.mp b/doc/figures/source.mp new file mode 100644 index 0000000..d4faebc --- /dev/null +++ b/doc/figures/source.mp @@ -0,0 +1,42 @@ +input mp-solid + +nb:=8; +unit:=0.8; +xm:=6; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1000,20,45,37.5); +for k=-xm upto xm: + draw Projette((k,-xm,0))--Projette((k,xm,0)); + draw Projette((-xm,k,0))--Projette((xm,k,0)); +endfor; +r:=1; q:=4; +arcenciel:=true; +draw Tuben("(r*((q+1)*cos(t)-cos((q+1)*t)),r*((q+1)*sin(t)-sin((q+1)*t)),0.5)","(r*(-(q+1)*sin(t)+(q+1)*sin((q+1)*t)),r*((q+1)*cos(t)-(q+1)*cos((q+1)*t)),0)",0.5,0,102,0.06283); +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1000,20,45,37.5); +for k=-xm upto xm: + draw Projette((k,-xm,0))--Projette((k,xm,0)); + draw Projette((-xm,k,0))--Projette((xm,k,0)); +endfor; +r:=1; q:=4; +Lumiere:=(0,0,3); +arcenciel:=true; +draw Tuben("(r*((q+1)*cos(t)-cos((q+1)*t)),r*((q+1)*sin(t)-sin((q+1)*t)),0.5)","(r*(-(q+1)*sin(t)+(q+1)*sin((q+1)*t)),r*((q+1)*cos(t)-(q+1)*cos((q+1)*t)),0)",0.5,0,102,0.06283); +finespace; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1000,20,45,37.5); +for k=-xm upto xm: + draw Projette((k,-xm,0))--Projette((k,xm,0)); + draw Projette((-xm,k,0))--Projette((xm,k,0)); +endfor; +r:=1; q:=4; +Lumiere:=(0,0,10); +arcenciel:=true; +draw Tuben("(r*((q+1)*cos(t)-cos((q+1)*t)),r*((q+1)*sin(t)-sin((q+1)*t)),0.5)","(r*(-(q+1)*sin(t)+(q+1)*sin((q+1)*t)),r*((q+1)*cos(t)-(q+1)*cos((q+1)*t)),0)",0.5,0,102,0.06283); +finespace; + +end diff --git a/doc/figures/source1.pdf b/doc/figures/source1.pdf new file mode 100644 index 0000000..5b002cc Binary files /dev/null and b/doc/figures/source1.pdf differ diff --git a/doc/figures/source2.pdf b/doc/figures/source2.pdf new file mode 100644 index 0000000..27deee9 Binary files /dev/null and b/doc/figures/source2.pdf differ diff --git a/doc/figures/source3.pdf b/doc/figures/source3.pdf new file mode 100644 index 0000000..2c96584 Binary files /dev/null and b/doc/figures/source3.pdf differ diff --git a/doc/figures/texnum.mpx b/doc/figures/texnum.mpx new file mode 100644 index 0000000..7496122 --- /dev/null +++ b/doc/figures/texnum.mpx @@ -0,0 +1,63 @@ +% Written by DVItoMP, Version 0.64/color (Web2C 7.5.4) +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmsy10"; +_s(char0,_n0,1.00000,0.0000,0.0000,); +setbounds _p to (0,-0.8302)--(7.7487,-0.8302)-- + (7.7487,5.8115)--(0,5.8115)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n1="cmr10"; +_s("1",_n1,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(4.9813,0.0000)-- + (4.9813,6.4204)--(0,6.4204)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n0="cmsy10"; +_s(char2,_n0,1.00000,0.0000,0.0000,); +_n1="cmr10"; +_s("10",_n1,1.00000,7.7487,0.0000,); +setbounds _p to (0,-0.8302)--(17.7114,-0.8302)-- + (17.7114,6.4204)--(0,6.4204)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n2="cmsy7"; +_s(char0,_n2,1.00000,0.0000,3.6154,); +setbounds _p to (0,0.0000)--(6.7248,0.0000)-- + (6.7248,7.9325)--(0,7.9325)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n3="cmr7"; +_s("2",_n3,1.00000,0.0000,3.6154,); +setbounds _p to (0,0.0000)--(4.4694,0.0000)-- + (4.4694,8.1096)--(0,8.1096)--cycle; +_p endgroup +mpxbreak +begingroup save _p,_r,_s,_n; picture _p; _p=nullpicture; +string _n[]; +vardef _s(expr _t,_f,_m,_x,_y)(text _c)= + addto _p also _t infont _f scaled _m shifted (_x,_y) _c; enddef; +_n1="cmr10"; +_s("10",_n1,1.00000,0.0000,0.0000,); +setbounds _p to (0,0.0000)--(9.9627,0.0000)-- + (9.9627,6.4204)--(0,6.4204)--cycle; +_p endgroup +mpxbreak diff --git a/doc/figures/torecolore.mp b/doc/figures/torecolore.mp new file mode 100644 index 0000000..b953b5a --- /dev/null +++ b/doc/figures/torecolore.mp @@ -0,0 +1,15 @@ +input mp-solid + +perso1:=true; +couleurperso:="if ((tapj div subh) mod 3)=0:if (tapj mod 3)=0: rouge elseif (tapj mod 3)=1: noir else: bleu fi elseif ((tapj div subh) mod 3)=1:if (tapj mod 3)=1: rouge elseif (tapj mod 3)=2: noir else: bleu fi elseif ((tapj div subh) mod 3)=2:if (tapj mod 3)=2: rouge elseif (tapj mod 3)=0: noir else: bleu fi fi;"; + +nb:=12; +subh:=18; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1500,30,20,50); +angy:=25;angz:=-20; +Objettore1("R=3","r=1"); +AffichageObjet1; +finespace; +end \ No newline at end of file diff --git a/doc/figures/torecolore1.pdf b/doc/figures/torecolore1.pdf new file mode 100644 index 0000000..069d0f6 Binary files /dev/null and b/doc/figures/torecolore1.pdf differ diff --git a/doc/figures/torecreuse.mp b/doc/figures/torecreuse.mp new file mode 100644 index 0000000..f694e58 --- /dev/null +++ b/doc/figures/torecreuse.mp @@ -0,0 +1,30 @@ +input mp-solid + +nb:=16; subh:=18; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1000,30,20,30); +numeroteface:=true; +arcenciel:=true; +%outcolor:=0.5[vert,white]; +incolor:=0.5[gris,white]; +Objettore1("R=2","r=1"); +AffichageObjet1; +finespace; + +numeroteface:=false; + +figureespace(-10u,-10u,10u,10u); +Initialisation(1000,30,20,30); +creux:=true; +arcenciel:=true; +%outcolor:=0.5[vert,white]; +incolor:=0.5[gris,white]; +Objettore1("R=2","r=1"); +string Face; +Face=""&for k=133 step 2 until 193:decimal(k)&","&""& endfor decimal(195)&""; +ObjetEnleve1(scantokens Face); +AffichageObjet1; +finespace; + +end \ No newline at end of file diff --git a/doc/figures/torecreuse1.pdf b/doc/figures/torecreuse1.pdf new file mode 100644 index 0000000..dbeee01 Binary files /dev/null and b/doc/figures/torecreuse1.pdf differ diff --git a/doc/figures/torecreuse2.pdf b/doc/figures/torecreuse2.pdf new file mode 100644 index 0000000..b81c1fc Binary files /dev/null and b/doc/figures/torecreuse2.pdf differ diff --git a/doc/figures/translation.mp b/doc/figures/translation.mp new file mode 100644 index 0000000..53454b8 --- /dev/null +++ b/doc/figures/translation.mp @@ -0,0 +1,19 @@ +input mp-solid + +subh:=1; + +figureespace(-10u,-10u,10u,10u); +Initialisation(500,30,20,50); +arcenciel:=true; +Objetcube1("a=0.5"); +TR:=(2,0,0); +Objetcube2("a=0.5"); +TR:=(0,-2,0); +Objetcube3("a=0.5"); +TR:=(1,2,4); +Objetcube4("a=0.5"); +nbobj:=4; +DessineFusion; +TraceAxes; +finespace; +end \ No newline at end of file diff --git a/doc/figures/translation1.pdf b/doc/figures/translation1.pdf new file mode 100644 index 0000000..6a8d192 Binary files /dev/null and b/doc/figures/translation1.pdf differ diff --git a/mp-solid.mp b/mp-solid.mp new file mode 100644 index 0000000..49d35fa --- /dev/null +++ b/mp-solid.mp @@ -0,0 +1,912 @@ +%% ============================================================================= +%% Fichier : mp-solid.mp +%% ============================================================================= +%% Le fichier spatial d'Anthony Phan m'a permis de mettre certaines choses au +%% clair. ;-) +%% 14/08/2008 + +prologues:=2; + +%% Constantes ------------------------------------------------------------------ +u := 1cm; +pi := 3.141592654; +c := 57.29578; % conversion d'un radian en degrés + +color rouge, vert, bleu, jaune, noir, blanc, orange, rose, violet, ciel, + cielfonce, orangevif, gris, marron; +rouge = (1,0,0); +bleu = (0,0,1); +noir = (0,0,0); +blanc = (1,1,1); +orange = (1,0.5,0); +violet = blanc-vert; +rose = (1,0.7,0.7); +cielfonce = 0.9*(0.25,1,1); +ciel = bleu+vert; +orangevif = (1,0.25,0.1); +vert = (0,1,0); +jaune = blanc-bleu; +gris = 0.8*white; + +input format; +input marith; +input sarith; +%input donymodule; + +input objets; + +color Sommet[]; + +%% Anthony Phan +vardef Norm primary z = + abs (abs(Xpart z, Ypart z), Zpart z) +enddef; + +let Xpart = redpart; +let Ypart = greenpart; +let Zpart = bluepart; +% + +string typerepre,pointilles; +typerepre := "persp"; + +vardef Initialisation(expr r,t,p,d)= + Rho:=r; + Theta:=t; + Phi:=p; + DE:=d; + Aux1:=sind(Theta); + Aux2:=sind(Phi); + Aux3:=cosd(Theta); + Aux4:=cosd(Phi); + Aux5:=Aux3*Aux2; + Aux6:=Aux1*Aux2; + Aux7:=Aux3*Aux4; + Aux8:=Aux1*Aux4; + pointilles:="oui"; + Lumiere:=Oeil; +enddef; + +vardef Oeil=(Rho*Aux7,Rho*Aux8,Rho*Aux2) +enddef; + +vardef sin(expr t) = sind(c*t) enddef; + +vardef cos(expr t) = cosd(c*t) enddef; + +vardef tan(expr t) = sin(t)/cos(t) enddef; + +vardef exp(expr x) = mexp(256)**x enddef; + +vardef Exp primary x = mexp(256)**x enddef; + +vardef ln(expr t) = mlog(t)/256 enddef; + +vardef log(expr t) = ln(t)/ln(10) enddef; + +vardef ch(expr x)=(exp(x)+exp (-x))/2 enddef; + +vardef sh(expr x)=(exp(x)-exp(-x))/2 enddef; + +vardef th(expr x)=sh(x)/ch(x) enddef; + +vardef arcsin(expr x)=%Définition mathématique en radian + pi*angle((sqrt(1-x**2),x))/180 +enddef; + +vardef arccos(expr x)=%Définition mathématique en radian + pi*angle((x,sqrt(1-x**2)))/180 +enddef; + +vardef arctan(expr x)=arcsin(x/(1++x)) +enddef; + +numeric satu,lum; +satu:=0.45; +lum:=1; + +%Coordonnées dans le repère Oeil +vardef GCoord(expr N)= + (-Xpart(N)*Aux1+Ypart(N)*Aux3,-Xpart(N)*Aux5-Ypart(N)*Aux6+Zpart(N)*Aux4,-Xpart(N)*Aux7-Ypart(N)*Aux8-Zpart(N)*Aux2+Rho) +enddef; + +unit:=1;%pour les mises à l'échelle :) Merci pst-solides3d + +vardef Projette(expr M)= + %if typerepre="proj": + % unit*(DE*(Xpart(GCoord(M)/Zpart(GCoord(M))),(Ypart(GCoord(M))/Zpart(GCoord(M))))) + %elseif typerepre="persp": + unit*(DE*(Xpart(GCoord(M)),Ypart(GCoord(M)))) + %fi +enddef; + +vardef TraceAxes= + color Origine,Unitex,Unitey,Unitez; + Origine=(0,0,0); + Unitex=(5,0,0); + Unitey=(0,5,0); + Unitez=(0,0,5); + drawoptions(dashed dashpattern(on 12bp off 6bp on 3bp off 6bp)); + drawarrow Projette(Origine)--Projette(Unitex) withcolor blue; + drawarrow Projette(Origine)--Projette(Unitey) withcolor vert; + drawarrow Projette(Origine)--Projette(Unitez); + drawoptions(); +enddef; + +vardef TraceAxesD(expr xd,yd,zd)= + drawoptions(dashed dashpattern(on12bp off6bp on3bp off6bp));; + drawarrow Projette((0,0,0))--Projette((xd,0,0)); + drawarrow Projette((0,0,0))--Projette((0,yd,0)); + drawarrow Projette((0,0,0))--Projette((0,0,zd)); + drawoptions(); + label(btex $x$ etex,Projette((xd+0.3,0,0))); + label(btex $y$ etex,Projette((0,yd+0.3,0))); + label(btex $z$ etex,Projette((0,0,zd+0.3))); +enddef; + +vardef TraceAxesDD(expr xd,yd,zd,xf,yf,zf)= + drawoptions(dashed evenly); + draw Projette((0,0,0))--Projette((xd,0,0)); + draw Projette((0,0,0))--Projette((0,yd,0)); + draw Projette((0,0,0))--Projette((0,0,zd)); + drawoptions(); + drawarrow Projette((xd,0,0))--Projette((xf,0,0)); + drawarrow Projette((0,yd,0))--Projette((0,yf,0)); + drawarrow Projette((0,0,zd))--Projette((0,0,zf)); + label(btex $x$ etex,Projette((xf+0.3,0,0))); + label(btex $y$ etex,Projette((0,yf+0.3,0))); + label(btex $z$ etex,Projette((0,0,zf+0.3))); +enddef; + +primarydef u Vectprod v = + (Ypart u * Zpart v - Zpart u * Ypart v, + Zpart u * Xpart v - Xpart u * Zpart v, + Xpart u * Ypart v - Ypart u * Xpart v) +enddef; + +vardef Normal(expr vecun,vecde,vectr)= + save aa; + color aa; + P1:=redpart(vecde-vecun); + P2:=greenpart(vecde-vecun); + P3:=bluepart(vecde-vecun); + Q1:=redpart(vectr-vecun); + Q2:=greenpart(vectr-vecun); + Q3:=bluepart(vectr-vecun); + aa=(P2*Q3-Q2*P3,P3*Q1-Q3*P1,P1*Q2-Q1*P2); + aa +enddef; + +vardef ProduitScalaire(expr wec,mor)= + %Mexp(Mlog redpart(wec) Mmul Mlog redpart(mor))+Mexp(Mlog greenpart(wec) Mmul Mlog greenpart(mor))+Mexp(Mlog bluepart(wec) Mmul Mlog bluepart(mor)) + Xpart(wec)*Xpart(mor)+Ypart(wec)*Ypart(mor)+Zpart(wec)*Zpart(mor) +enddef; +%pour les rotations et translations + +vardef RotX(expr ptx)= + (Xpart(ptx),Ypart(ptx)*cosd(angx)-Zpart(ptx)*sind(angx),Ypart(ptx)*sind(angx)+Zpart(ptx)*cosd(angx)) +enddef; + +vardef RotY(expr ptx)= + (Xpart(ptx)*cosd(angy)+Zpart(ptx)*sind(angy),Ypart(ptx),-Xpart(ptx)*sind(angy)+Zpart(ptx)*cosd(angy)) +enddef; + +vardef RotZ(expr ptx)= + (Xpart(ptx)*cosd(angz)-Ypart(ptx)*sind(angz),Xpart(ptx)*sind(angz)+Ypart(ptx)*cosd(angz),Zpart(ptx)) +enddef; + +vardef RotXYZ(expr ptx)= + RotZ(RotY(RotX(ptx))) +enddef; + +angx:=0; +angy:=0; +angz:=0; +color TR; +TR:=(0,0,0); +%pour les tubes +vardef VT(expr t)=Fp(t)/Norm(Fp(t)) +enddef; + +vardef VN(expr t)=Fd(t)/Norm(Fd(t)) +enddef; + +vardef VBN(expr t)=VT(t) Vectprod VN(t) +enddef; + +path feuillet; +numeric _tfig,_nfig; +pair coinbg,coinbd,coinhd,coinhg; +_nfig:=0; + +def feuille(expr xa,ya,xb,yb) = + feuillet := (xa,ya)--(xa,yb)--(xb,yb)--(xb,ya)--cycle; + coinbg := (xa,ya); + coinbd := (xb,ya); + coinhd := (xb,yb); + coinhg := (xa,yb); + %modifié le 29.09.04 + z.so=(xpart(coinbg/1cm),ypart(coinbg/1cm)); + z.ne=(xpart(coinhd/1cm),ypart(coinhd/1cm)); + %fin modification + extra_endfig := "clip currentpicture to feuillet;" & extra_endfig; +enddef; + +def figureespace(expr xa,ya,xb,yb) = + _nfig:=_nfig+1; + beginfig(_nfig); + feuille(xa,ya,xb,yb); + _tfig:= if (xb-xa)>(yb-ya): xb-xa else: yb-ya fi; + _tfig:=2*_tfig; +enddef; + +def finespace= +endfig; +enddef; + +def QS(expr ndeb,nfin)= + begingroup + save v,m,x; + if ndebEOF: + ss1 := loptok s_; + t_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr t_] := loptok s_; + exitif ss[t_]=""; + endfor + else: false + fi; + NbS:=round(Mexp Mlog_str ss1); + NF:=round(Mexp Mlog_str ss2); + message("Il y a "&decimal(NbS)&" sommets."); + message("Il y a "&decimal(NF)&" faces au total."); + %Détermination des coordonnées des sommets + message("Création des sommets."); + s_:=readfrom nomsolide; + if debut=0: + for k=0 upto NbS-1: + s_:=readfrom nomsolide; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + Sommet[k]:=(Mexp ((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + %Sommet[k]:=(Mexp (Mlog_str ss1),Mexp (Mlog_str ss3),Mexp (Mlog_str ss2))/echelle; + %Sommet[k]:=(Mexp (Mlog_str ss1)/echelle,Mexp (Mlog_str ss3)/echelle,Mexp (Mlog_str ss2)/echelle); + endfor; + else: + for k=1 upto NbS: + s_:=readfrom nomsolide; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + Sommet[k]:=(Mexp ((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + %Sommet[k]:=(Mexp (Mlog_str ss1),Mexp (Mlog_str ss3),Mexp (Mlog_str ss2))/echelle; + %Sommet[k]:=(Mexp (Mlog_str ss1)/echelle,Mexp (Mlog_str ss3)/echelle,Mexp (Mlog_str ss2)/echelle); + endfor; + fi; + message("Création des faces."); + %Détermination des faces + apj:=0;color cc,dd; + nbfvues:=0; + for nf=-4000 upto (-4000+NF)-1: + s_:=readfrom nomsolide; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + apj:=apj+1; + ns[apj][0]:=Mexp Mlog_str ss1;%pour savoir le nb de sommets par face + for nl=1 upto ns[apj][0]: + Fc[apj][nl]:=Sommet[round(Mexp Mlog_str ss[nl+1])]; + endfor; + dd:=Oeil-Fc[apj][1]; + cc:=invnormale*Normal(Fc[apj][1],Fc[apj][2],Fc[apj][3]); + if (ProduitScalaire(dd,cc)>=0): + Vue[apj]:=true; + nbfvues:=nbfvues+1; + else: + if Creux=true: + Vue[apj]:=false; + else: + apj:=apj-1; + fi; + fi; + endfor; + message("Faces vues déterminees : il y en a "&decimal(nbfvues)&"."); + closefrom nomsolide; + DessineObjetNew; +enddef; + +vardef LectureOBJ(expr nomfichier)= + OBJ:=true; + string s_; + string ss[]; + nbss:=1; + apj:=0; + forever: + s_:=readfrom nomfichier; + if s_<>EOF: + ss0 := loptok s_; + if ss0="v": + n_:=0; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + Sommet[nbss]:=(Mexp((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + nbss:=incr nbss; + elseif ss0="f": + n_:=0; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor; + ns[apj][0]:=n_-1; + for k=1 upto ns[apj][0]: + if invnormale=1: + Fc[apj][ns[apj][0]-k+1] := Sommet[round(Mexp(Mlog_str ss[k]))] + %if unknown OTFc.@[apj][OTFc.@[apj].nb-k+1]: + % show OTFc.@[apj][OTFc.@[apj].nb-k+1]; + %fi; + else: + Fc[apj][k] := Sommet[round(Mexp(Mlog_str ss[k]))] + %if unknown OTFc.@[apj][k]: + % show OTFc.@[apj][k]; + %fi; + fi; + endfor; + if ProduitScalaire(Oeil-Fc[apj][1],Normal(Fc[apj][1],Fc[apj][2],Fc[apj][3]))>=0: + Vue[apj]:=true; + apj:=apj+1; + else: + if Creux=true: + Vue[apj]:=false; + apj:=apj+1; + fi; + fi; + fi; + fi; + exitif s_=EOF; + endfor; + apj:=apj-1; + closefrom nomfichier; + DessineObjetNew +enddef; + +nb:=8; + +%tube +vardef Tube(expr Fn,dp,ds,rayon,tmin,nbp,pas)=%f,f',f'',rayon du tube,paramètre départ,nb points, pas + save _tube; + picture _tube; + scantokens("vardef F(expr t)="&Fn&" enddef;"); + scantokens("vardef Fp(expr t)="&dp&" enddef;"); + scantokens("vardef Fd(expr t)="&ds&" enddef;"); + color G[][]; +%nb point sur le cercle + NB:=nbp;%nb de pas + for l=0 upto NB: + for k=0 upto nb: + G[l][k]=F(tmin+l*pas)+rayon*(cosd(k*(360/nb))*VN(tmin+l*pas)+sind(k*(360/nb))*VBN(tmin+l*pas)); + endfor; + endfor; + apj:=0; + for l=0 upto (NB-1): + for k=0 upto nb-1: + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+1][k+1]; + Fc[apj][4]:=G[l+1][k]; + Fc[apj].iso:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj][1])); + endfor; + endfor; + QS(1,apj); + _tube=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: lumin(cpt[k])*Hsvtorgb((floor((cpt[k]/apj)*360),satu,lum)) + else: lumin(cpt[k])*outcolor fi; + draw for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + endfor; + ); + _tube +enddef; + +%Tube new :) +%pour les tubes new :) +vardef T(expr t)=Fp(t) +enddef; + +vardef VTn(expr t)=if Norm(T(t))=0: + T(t) + else: + T(t)/Norm(T(t)) + fi +enddef; + +vardef VNn(expr t)= + save _VNBis,__VN; + color _VNBis,__VN; + __VN=T(t) Vectprod ((T(t+nn)-T(t-nn))/2); + if __VN=(0,0,0): + _VNBis=(0,0,1); + else: + __VN:=__VN/Norm(__VN); + if ProduitScalaire(VNbisprec[t-nn],__VN)>0: + _VNBis=__VN/Norm(__VN) + else: + _VNBis=-(__VN/Norm(__VN)) + fi; + fi; + VNbisprec[t]=_VNBis; + _VNBis +enddef; + +vardef VBNn(expr t)=VTn(t) Vectprod VNn(t) +enddef; + +vardef Tuben(expr Fn,dp,rayon,tmin,nbp,pas)=%f,f',f'',rayon du tube,paramètre départ,nb points, pas + save _tuben; + picture _tuben; + scantokens("vardef F(expr t)="&Fn&" enddef;"); + scantokens("vardef Fp(expr t)="&dp&" enddef;"); + color G[][]; +%nb point sur le cercle + NB:=nbp;%nb de pas + nn:=pas; + %pour gérer le "flip" aux points d'inflexion + color VNbisprec[]; + VNbisprec[tmin-nn]=T(tmin-nn) Vectprod ((T(tmin)-T(tmin-2*nn))/2); + % + ang:=360/nb; + for l=0 upto NB: + for k=0 upto nb: + G[l][k]=F(tmin+l*pas)+rayon*(cosd(k*ang)*VNn(tmin+l*pas)+sind(k*ang)*VBNn(tmin+l*pas)); + endfor; + endfor; + apj:=0; + for l=0 upto (NB-1): + for k=0 upto nb-1: + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=G[l][k]; + Fc[apj][2]:=G[l][k+1]; + Fc[apj][3]:=G[l+1][k+1]; + Fc[apj][4]:=G[l+1][k]; + Fc[apj].iso:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj].iso)); + endfor; + endfor; + QS(1,apj); + _tuben=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if arcenciel: lumin(cpt[k])*Hsvtorgb((floor((cpt[k]/apj)*360),satu,lum)) + else: lumin(cpt[k])*outcolor fi; + draw for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + endfor; + ); + _tuben +enddef; + + +vardef Fonction(expr fn,tmin,tmax,pas)=%fonction + scantokens("vardef F(expr t)="&fn&" enddef;"); + save _f; + path _f; + _f=Projette(F(tmin)) + for k=tmin+pas step pas until tmax: + --Projette(F(k)) + endfor; + _f +enddef; + +color outcolor,incolor,outcolorbis; + +boolean Spar; +Spar:=false; + +vardef Sparam(expr fn,umin,umax,upas,vmin,vmax,vpas)=%fonction + Spar:=true; + save _Sparam; + scantokens("vardef Famille(expr u,v)="&fn&" enddef;"); + apj:=0; + picture _Sparam; + %On crée les facettes et on calcule la profondeur en Z. + for k=umin step upas until umax: + for l=vmin step vpas until vmax: + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=Image(Famille(k+upas,l)); + Fc[apj][2]:=Image(Famille(k,l)); + Fc[apj][3]:=Image(Famille(k,l+vpas)); + Fc[apj][4]:=Image(Famille(k+upas,l+vpas)); + Fc[apj].iso:=(Fc[apj][1]+Fc[apj][3])/2;%(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj].iso)); + if ProduitScalaire(Oeil-Fc[apj].iso,invnormale*Normal(Fc[apj].iso,Fc[apj][1],Fc[apj][2]))>=0: + Vue[apj]:=true + else: + Vue[apj]:=false + fi; + endfor; + endfor; + %On range les faces par un QS en fonction de leur profondeur + QS(1,apj); + %On affiche toutes les faces par ordre décroissant de profondeur. + _Sparam=image( + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb((floor((cpt[k]/apj)*360),satu,lum)) + else: lumin(cpt[k])*outcolor fi + else:lumin(cpt[k])*incolor fi; + draw for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle; + endfor; + ); + Spar:=false; + _Sparam +enddef; + +vardef Revolution(expr fn,umin,umax,upas,vmin,vmax,vpas)= + Sparam("(xpart(point(u) of "&fn&")*cos(v),xpart(point(u) of "&fn&")*sin(v),ypart(point(u) of "&fn&"))",umin,umax,upas,vmin,vmax,vpas) +enddef; + +boolean traits;%sur une idée d'Herbert Voss à propos de pst-solides :) +%sert à désactiver le tracer des traits +%15/07/08:pour l'instant implanter uniquement pour les surfaces en z +traits=true; + +boolean arcenciel;%pour essayer d'obtenir des dégradés tels que pst-solides :) +arcenciel=false; + +boolean surfz; +surfz:=false; + +vardef SurfZ(expr fn,xmin,xmax,ymin,ymax,nblignes,nbpoints)= + surfz:=true; + save _SurfZ; + picture _SurfZ; + %boolean Vue[]; + color alt[]; + scantokens("vardef Fz(expr X,Y)="&fn&" enddef;"); + apj:=0;sign:=0; + IncX:=(xmax-xmin)/nbpoints; + IncY:=(ymax-ymin)/nblignes; + color Yc[][],Xc[][],Fc[][]; + for ligne=0 upto nblignes: + y:=ymax-ligne*IncY; + x:=xmin; + Yc[ligne][0]=(x,y,Fz(x,y)); + for k=1 upto nbpoints: + Yc[ligne][k]=((xmin+k*IncX,y,Fz(xmin+k*IncX,y))); + endfor; + endfor; + %for ligne=0 step 3 until nbpoints: + % x:=xmax-ligne*IncX; + % for k=0 step 3 until nblignes: + % Xc[ligne div 3][k div 3]=(x,ymin+k*IncY,Fz(x,ymin+k*IncY)); + % endfor; + %endfor; + for k=0 upto (nblignes-1): + for l=0 step 3 until (nbpoints-3): + apj:=apj+1; + cpt[apj]:=apj; + Fc[apj][1]:=Yc[k][l]; + Fc[apj][2]:=Yc[k][l+3]; + Fc[apj][3]:=Yc[k+1][l+3]; + Fc[apj][4]:=Yc[k+1][l]; + Fc[apj].iso:=(Fc[apj][1]+Fc[apj][2]+Fc[apj][3]+Fc[apj][4])/4; + ALT[apj]:=-Zpart(GCoord(Fc[apj].iso)); + if ProduitScalaire(Oeil-Fc[apj].iso,Normal(Fc[apj].iso,Fc[apj][2],Fc[apj][1]))>=0: + Vue[apj]:=true; + else: + Vue[apj]:=false + fi; + endfor; + endfor; + %On range les faces par un QS en fonction de leur profondeur + QS(1,apj); + %On affiche toutes les faces par ordre décroissant de profondeur. + _SurfZ=image( + pickup pencircle scaled 0.25bp; + for k=1 upto apj: + fill for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb((floor((cpt[k]/apj)*360),satu,lum)) + else:lumin(cpt[k])*outcolor fi + else: lumin(cpt[k])*incolor fi; + if traits=true: + draw for l=1 upto 4: + Projette(Fc[cpt[k]][l])-- + endfor + cycle; + fi; + endfor; + ); + surfz:=false; + _SurfZ +enddef; + +%Objet prédéfinis +vardef ObjetCube(expr ar)= + NbS:=8; + Sommet1:=(ar,0,0); + Sommet2:=(ar,ar,0); + Sommet3:=(0,ar,0); + Sommet4:=(0,0,0); + Sommet5:=(0,0,ar); + Sommet6:=(ar,0,ar); + Sommet7:=(ar,ar,ar); + Sommet8:=(0,ar,ar); +%%Faces + NF:=6; + ns[1][0]:=4;Fc[1][1]:=Sommet1;Fc[1][2]:=Sommet2;Fc[1][3]:=Sommet3;Fc[1][4]:=Sommet4; + ns[2][0]:=4;Fc[2][1]:=Sommet4;Fc[2][2]:=Sommet3;Fc[2][3]:=Sommet8;Fc[2][4]:=Sommet5; + ns[3][0]:=4;Fc[3][1]:=Sommet1;Fc[3][2]:=Sommet4;Fc[3][3]:=Sommet5;Fc[3][4]:=Sommet6; + ns[4][0]:=4;Fc[4][1]:=Sommet5;Fc[4][2]:=Sommet8;Fc[4][3]:=Sommet7;Fc[4][4]:=Sommet6; + ns[5][0]:=4;Fc[5][1]:=Sommet2;Fc[5][2]:=Sommet7;Fc[5][3]:=Sommet8;Fc[5][4]:=Sommet3; + ns[6][0]:=4;Fc[6][1]:=Sommet1;Fc[6][2]:=Sommet6;Fc[6][3]:=Sommet7;Fc[6][4]:=Sommet2; + % + %Détermination des faces + apj:=0;color cc,dd; + for nf=1 upto NF: + apj:=apj+1; + dd:=Oeil-Fc[nf][1]; + cc:=invnormale*Normal(Fc[nf][1],Fc[nf][2],Fc[nf][3]); + if (ProduitScalaire(dd,cc)>=0): + Vue[apj]=true + else: + Vue[apj]=false; + fi; + endfor; +enddef; + +%coloriage et lumière +vardef Hsvtorgb(expr CC)=%CC couleur donnée en hsv d'après http://en.wikipedia.org/wiki/HSL_color_space + save $; + color $; + SSw:=floor(Xpart(CC)/60); + SSh:=SSw mod 6; + SSf:=(Xpart(CC)/60)-floor(SSw); + SSs:=Ypart((CC)); + SSv:=Zpart((CC)); + SSp:=SSv*(1-SSs); + SSq:=SSv*(1-SSf*SSs); + SSt:=SSv*(1-(1-SSf)*SSs); + if SSh=0: $=(SSv,SSt,SSp) elseif SSh=1:$=(SSq,SSv,SSp) elseif SSh=2:$=(SSp,SSv,SSt) elseif SSh=3:$=(SSp,SSq,SSv) elseif SSh=4:$=(SSt,SSp,SSv) elseif SSh=5:$=(SSv,SSp,SSq) fi; + $ +enddef; + +marron=Hsvtorgb((60,1,0.3)); + +intensite:=2; +boolean eclairage; +eclairage:=true; + +color Lumiere; + +invnormalelum:=1; + +vardef lumin(expr nbt)= + save $; + numeric $; + if eclairage=false: + $=1; + else: + color uu,vv; + uu=Lumiere-Fc[nbt].iso; + uu:=uu/Norm(uu); + vv=invnormalelum*Normal(Fc[nbt].iso,Fc[nbt][1],Fc[nbt][2]); + if Norm(vv)<>0: + vv:=vv/Norm(vv) + fi; + if (surfz) or (Spar) or (OFF) or (OBJ): + $=intensite*abs(ProduitScalaire(vv,uu)) + else: + $=intensite*(ProduitScalaire(vv,uu)); + fi; + if $>1: + $:=1; + fi; + fi; + $ +enddef; + + +%%sucre + +%%Transparence fait par Anthony Phan +picture alphapict_; alphapict_=nullpicture; +color fillcolor; fillcolor=gris; +fgalpha := 0.5; % usual alpha parameter +bgalpha:= 1; % alpha parameter with respect to the background + +vardef transparence expr c = + alphapict_ := nullpicture; + alphafill_(currentpicture, c); + addto currentpicture also alphapict_; +enddef; + +def alphafill_(expr p, c) = + begingroup + save p_, xmax_, xmin_, ymax_, ymin_; picture p_; + p_ = nullpicture; + (xmin_, ymin_) = llcorner c; (xmax_, ymax_) = urcorner c; + addto p_ contour c withcolor bgalpha[background, fillcolor]; + for p__ within p: + numeric xmin__, xmax__, ymin__, ymax__; + (xmin__, ymin__) = llcorner p__; (xmax__, ymax__) = urcorner p__; + if (xmax__<= xmin_) or (xmin__ >= xmax_): + else: + if (ymax__<= ymin_) or (ymin__ >= ymax_): + else: + if (not clipped p__) and (not bounded p__): + addto p_ also p__ withcolor + fgalpha[(redpart p__, greenpart p__, bluepart p__), + fillcolor]; + else: + begingroup save alphapict_; + picture alphapict_; alphapict_ = nullpicture; + alphafill_(p__, pathpart p__); + addto p_ also alphapict_; + endgroup; + fi + fi + fi + endfor + clip p_ to c; + addto alphapict_ also p_; + endgroup; +enddef; + +endinput; \ No newline at end of file diff --git a/objets.mp b/objets.mp new file mode 100644 index 0000000..4942bcb --- /dev/null +++ b/objets.mp @@ -0,0 +1,2020 @@ +%24/01/2011 +%Gestion des couleurs dans l'objet Deplacement. + +%27/11/2010 +%Manque plusieurs : dans la définition de ObjetNew + +%07/02/2009 +color OTFc[][][];%pour mémoriser les différents sommets de chaque objet; +color OTFc[][].iso; +color coul[][];%pour memoriser la couleur de chacune des faces de l'objet; +color Outcolor[],Incolor[];%Permet de gérer la gestion des couleurs d'un objet lors d'un déplacement de cet objet +boolean Vue[][]; + +boolean creux; creux=false;%pour gérer les solides creux +boolean transformation; transformation=false;%pour gérer les transformations +boolean Ferme[];%pour gérer les faces : si le solide est fermé, toutes les faces non vues ne sont pas intégrées aux calculs +boolean perso[];%pour gérer les gestions personnelles des couleurs +for k=0 upto 100: + perso[k]=false; +endfor; +boolean numeroteface; +numeroteface:=false; + +string couleurperso; + +defaultfont:="cmr5"; + +vardef Image(expr dep)= + if transformation: + Transform(dep) + else: + RotXYZ(dep) + fi + +TR +enddef; + +boolean Transparence; +Transparence:=false; + +vardef AffichageObjet[]= + save _affi; + picture _affi; + color Fc[][];color cou[]; + tapj:=0; + for k=0 upto apj.@: + cpt[tapj]:=tapj; + Fc[tapj].nb:=OTFc.@[k].nb; + for l=1 upto Fc[tapj].nb: + Fc[tapj][l]:=OTFc.@[k][l]; + endfor; + Fc[tapj].iso:=OTFc.@[k].iso; + cou[tapj]:=if perso.@:scantokens(couleurperso) else: coul.@[k] fi; + ALT[tapj]:=ALT.@[k]; + Vue[tapj]:=Vue.@[k]; + tapj:=tapj+1; + endfor; + tapj:=tapj-1; + QS(0,tapj); + if Transparence : + for k=0 upto tapj: + if Vue[cpt[k]]=false: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor abs(lumin(cpt[k]))*cou[cpt[k]]; + if traits=true: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle dashed evenly withpen pencircle scaled0.25bp; + fi; + fi; + endfor; + for k=0 upto tapj: + if Vue[cpt[k]]: + transparence for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle; + if traits=true: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + fi; + fi; + endfor; + else: + if Ferme.@: + for k=0 upto tapj: + if Vue[cpt[k]]=true: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor + if arcenciel=true: + lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else: + lumin(cpt[k])*cou[cpt[k]] + fi; + if traits: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + %add by cp 01/08/11 + else: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor + if arcenciel=true: + lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else: + lumin(cpt[k])*cou[cpt[k]] + fi; + %fin add + fi; + fi; + endfor; + else: + for k=0 upto tapj:%apj downto 1: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else:lumin(cpt[k])*cou[cpt[k]] fi + else: abs(lumin(cpt[k]))*cou[cpt[k]] fi; + if traits: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + %add by cp 01/08/2011 + else: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else:lumin(cpt[k])*cou[cpt[k]] fi + else: abs(lumin(cpt[k]))*cou[cpt[k]] fi; + %fin add + fi; + endfor; + fi; + fi; + if numeroteface=true: + for k=0 upto tapj: + if Vue[k]: + label(""&decimal(k)&"",Projette(Fc[k].iso)); + fi; + endfor; + fi; +enddef; + + +vardef AffichageObjetold[]= + save _affi; + picture _affi; + color Fc[][];color cou[]; + tapj:=0; + for k=0 upto apj.@: + cpt[tapj]:=tapj; + Fc[tapj].nb:=OTFc.@[k].nb; + for l=1 upto Fc[tapj].nb: + Fc[tapj][l]:=OTFc.@[k][l]; + endfor; + Fc[tapj].iso:=OTFc.@[k].iso; + cou[tapj]:=if perso.@:scantokens(couleurperso) else: coul.@[k] fi; + ALT[tapj]:=ALT.@[k]; + Vue[tapj]:=Vue.@[k]; + tapj:=tapj+1; + endfor; + tapj:=tapj-1; + QS(0,tapj); + if Ferme.@: + for k=0 upto tapj: + if Vue[cpt[k]]=true: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor + if arcenciel=true: + lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else: + lumin(cpt[k])*cou[cpt[k]] + fi; + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + fi; + endfor; + else: + for k=0 upto tapj:%apj downto 1: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else:lumin(cpt[k])*cou[cpt[k]] fi + else: abs(lumin(cpt[k]))*cou[cpt[k]] fi; + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + endfor; + fi; + if numeroteface=true: + for k=0 upto tapj: + if Vue[k]: + label(""&decimal(k)&"",Projette(Fc[k].iso)); + fi; + endfor; + fi; +enddef; + +vardef DessineFusion= + save _fusion; + picture _fusion; + tapj:=0; + color Fc[][];color cou[]; + for l=1 upto nbobj: + for k=0 upto apj[l]: + cpt[tapj]:=tapj; + cou[tapj]:=if perso[l]:scantokens(couleurperso) else: coul[l][k] fi; + Fc[tapj].nb:=OTFc[l][k].nb; + for p=1 upto Fc[tapj].nb: + Fc[tapj][p]:=OTFc[l][k][p]; + endfor; + Fc[tapj].iso:=OTFc[l][k].iso; + ALT[tapj]:=ALT[l][k]; + Vue[tapj]:=Vue[l][k]; + if Ferme[l]: + if Vue[tapj]=false: + tapj:=tapj-1; + fi; + fi; + tapj:=tapj+1; + endfor; + endfor; + tapj:=tapj-1; + QS(0,tapj); + for k=0 upto tapj: + fill for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withcolor if Vue[cpt[k]]: + if arcenciel: lumin(cpt[k])*Hsvtorgb(((cpt[k]/tapj)*360,satu,lum)) + else:lumin(cpt[k])*cou[cpt[k]] fi + else: abs(lumin(cpt[k]))*cou[cpt[k]] fi; + if traits: + draw for l=1 upto Fc[cpt[k]].nb: + Projette(Fc[cpt[k]][l])-- + endfor + cycle withpen pencircle scaled0.25bp; + fi; + endfor; +enddef; + +vardef Objettore[](expr Rn,rn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux: + Ferme.@:=false + else: + Ferme.@:=true; + fi; + scantokens("numeric "&substring(0,1) of rn&"; "&rn&";"); + scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";"); + vardef Famille(expr u,v)=((R+r*cos(u))*cos(v),(R+r*cos(u))*sin(v),r*sin(u)) enddef; + umin:=-pi; umax:=pi; upas:=2*pi/nb; + vmin:=-pi; vpas:=2*pi/subh; vmax:=pi; + apj:=0; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetTube[](expr Fn,dp,rayon,tmin,nbp,pas)=%f,f',f'',rayon du tube,paramètre départ,nb points, pas + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("vardef F(expr t)="&Fn&" enddef;"); + scantokens("vardef Fp(expr t)="&dp&" enddef;"); + color G[][]; + NB:=nbp;%nb de pas + nn:=pas; + %pour gérer le "flip" aux points d'inflexion + color VNbisprec[]; + VNbisprec[tmin-nn]=T(tmin-nn) Vectprod ((T(tmin)-T(tmin-2*nn))/2); + % + ang:=360/nb; + for l=0 upto NB: + for k=0 upto nb: + G[l][k]=F(tmin+l*pas)+rayon*(cosd(k*ang)*VNn(tmin+l*pas)+sind(k*ang)*VBNn(tmin+l*pas)); + endfor; + endfor; + apj:=0; + if creux=false: + Ferme.@:=true; + nbsp:=nb; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsp; + for k=1 upto nbsp: + OTFc.@[apj][k]:=Image(G[0][nbsp+1-k]); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsp; + for k=nbsp downto 1: + OTFc.@[apj][k]:=Image(G[NB][k]); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + for l=0 upto (NB-1): + for k=0 upto nb-1: + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(G[l][k]); + OTFc.@[apj][2]:=Image(G[l][k+1]); + OTFc.@[apj][3]:=Image(G[l+1][k+1]); + OTFc.@[apj][4]:=Image(G[l+1][k]); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef ObjetCylindre[](expr fn,umin,umax,vmin,vmax)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("vardef Famille(expr u,v)="&fn&" enddef;"); + apj:=0; + upas:=(umax-umin)/nb;vpas:=(vmax-vmin)/subh; + %On crée les facettes et on calcule la profondeur en Z. + %for k=umin step upas until umax: + % for l=vmin step vpas until vmax: + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef Objetcylindre[](expr rn,hn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of rn&"; "&rn&";"); + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + vardef Famille(expr u,v)=(r*cos(u),r*sin(u),v) enddef; + umin:=pi; umax:=-pi; upas:=-2*pi/nb; + vmin:=0; vmax:=h; vpas:=h/subh; + nbsp:=nb; + apj:=0; + if creux=false: + Ferme.@:=true; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsp; + for k=1 upto nb: + OTFc.@[apj][k]:=Image(Famille(umin+k*upas,vmin)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsp; + for k=1 upto nbsp: + OTFc.@[apj][k]:=Image(Famille(umin+(nbsp-k)*upas,vmax)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image((Famille(umin+k*upas,vmin+l*vpas))); + OTFc.@[apj][3]:=Image((Famille(umin+k*upas,vmin+(l+1)*vpas))); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef ObjetCone[](expr fn,umin,umax,zbas,orign)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("vardef Famille(expr u)="&fn&" enddef;"); + scantokens("color "&substring(0,4) of orign&"; "&orign&";"); + apj:=0; + upas:=(umax-umin)/nb;vpas:=2*abs(zbas)/subh; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (2*subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas)+(l/subh)[Famille(umin+(k+1)*upas),orig]-Famille(umin+(k+1)*upas)); + OTFc.@[apj][4]:=Image(Famille(umin+k*upas)+(l/subh)[Famille(umin+k*upas),orig]-Famille(umin+k*upas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas)+((l+1)/subh)[Famille(umin+k*upas),orig]-Famille(umin+k*upas)); + OTFc.@[apj][2]:=Image(Famille(umin+(k+1)*upas)+((l+1)/subh)[Famille(umin+(k+1)*upas),orig]-Famille(umin+(k+1)*upas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +subh:=12; + +vardef Objetcone[](expr rn,hn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of rn&"; "&rn&";"); + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + vardef Famille(expr u,v)=(r*(1-(v/h))*cos(u),r*(1-(v/h))*sin(u),v) enddef; + umin:=pi; umax:=-pi; upas:=-2*pi/nb; + vmin:=0; vpas:=h/subh; vmax:=h-vpas; + apj:=0; + if creux=false: + Ferme.@:=true; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nb; + for k=0 upto nb: + OTFc.@[apj][k]:=Image(Famille(umin+k*upas,vmin)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nb:+OTFc.@[apj][k] endfor)/nb; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objettronccone[](expr rn,hn,Hn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of rn&"; "&rn&";"); + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + scantokens("numeric "&substring(0,1) of Hn&"; "&Hn&";"); + vardef Famille(expr u,v)=(r*(1-v/H)*cos(u),r*(1-v/H)*sin(u),v) enddef; + umin:=pi; umax:=-pi; upas:=-2*pi/nb; + vmin:=0; vpas:=h/subh; vmax:=h; + apj:=0; + if creux=false: + Ferme.@:=true; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nb; + for k=0 upto nb: + OTFc.@[apj][k]:=Image(Famille(umin+k*upas,vmin)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nb:+OTFc.@[apj][k] endfor)/nb; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nb; + for k=0 upto nb: + OTFc.@[apj][nb-k]:=Image(Famille(umin+k*upas,vmax)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nb:+OTFc.@[apj][k] endfor)/nb; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1):%umin step upas until umax-upas: + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objetsphere[](expr Rn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";"); + vardef Famille(expr u,v)=(R*(cos(u)*cos(v),cos(u)*sin(v),sin(u))) enddef; + umin:=-pi/2; umax:=pi/2; upas:=pi/nb; + vmin:=-pi; vpas:=2*pi/subh; vmax:=pi; + apj:=0; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef Objetcalotte[](expr Rn,Phib,Phih)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";"); + scantokens("numeric "&substring(0,4) of Phib&"; "&Phib&";"); + scantokens("numeric "&substring(0,4) of Phih&"; "&Phih&";"); + vardef Famille(expr u,v)=(R*(cos(u)*cos(v),cos(u)*sin(v),sin(u))) enddef; + umin:=phib; umax:=phih; upas:=(phih-phib)/nb; + vmin:=-pi; vpas:=2*pi/subh; vmax:=pi; + apj:=0; + nbsp:=subh; + if creux=false: + Ferme.@:=true; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsp; + for l=1 upto nbsp: + OTFc.@[apj][l]:=Image(Famille(umin,vmax-l*vpas)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=subh; + for l=1 upto nbsp: + OTFc.@[apj][l]:=Image(Famille(umax,vmin+l*vpas)); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsp:+OTFc.@[apj][k] endfor)/nbsp; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + %On crée les facettes et on calcule la profondeur en Z. + %for k=umin step upas until umax-upas: + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objetanneau[](expr Rn,rn,hn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux:Ferme.@:=false else:Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of Rn&"; "&Rn&";"); + scantokens("numeric "&substring(0,1) of rn&"; "&rn&";"); + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + path sectionanneau; + sectionanneau=(R,0)--(R,h)--(r,h)--(r,0)--cycle; + vardef Famille(expr u,v)=((xpart(point(u) of sectionanneau)*cos(v),xpart(point(u) of sectionanneau)*sin(v),ypart(point(u) of sectionanneau))) enddef; + umin:=0; umax:=4; upas:=4/nb; + vmin:=-pi; vpas:=2*pi/subh; vmax:=2*pi; + apj:=0; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetAnneau[](expr nbpn,sectionanneau)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,3) of nbpn&"; "&nbpn&";"); + vardef Famille(expr u,v)=((xpart(point(u) of sectionanneau)*cos(v),xpart(point(u) of sectionanneau)*sin(v),ypart(point(u) of sectionanneau))) enddef; + umin:=0; umax:=nbp; upas:=1; + vmin:=-pi; vpas:=2*pi/subh; vmax:=pi; + apj:=0; + %On crée les facettes et on calcule la profondeur en Z. + for k=0 upto (nbp-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Famille(umin+(k+1)*upas,vmin+l*vpas)); + OTFc.@[apj][2]:=Image(Famille(umin+k*upas,vmin+l*vpas)); + OTFc.@[apj][3]:=Image(Famille(umin+k*upas,vmin+(l+1)*vpas)); + OTFc.@[apj][4]:=Image(Famille(umin+(k+1)*upas,vmin+(l+1)*vpas)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetPrisme[](expr axen,hn)(text tn)=%pb avec certaines positions de l'observateur.->maillage vertical + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + scantokens("color "&substring(0,3) of axen&"; "&axen&";"); + nbsn:=0;%nb sommets total pour la base + for _p=tn: + Sommet[nbsn]:=_p; + nbsn:=nbsn+1; + endfor; + apj:=0; + if creux=false: + Ferme.@:=true; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsn; + for k=1 upto nbsn: + OTFc.@[apj][k]:=Image(Sommet[nbsn-k]); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsn:+OTFc.@[apj][k] endfor)/nbsn; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsn; + for k=1 upto nbsn: + OTFc.@[apj][k]:=Image(Sommet[k-1]+h*axe); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsn:+OTFc.@[apj][k] endfor)/nbsn; + apj:=apj+1; + else: + Ferme.@:=false; + fi; + for k=1 upto nbsn: + for l=0 upto (subh-1): + for p=0 upto (nb-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image((p/nb)[Sommet[(k-1) mod nbsn],Sommet[k mod nbsn]]+(l/subh)*(h*axe)); + OTFc.@[apj][2]:=Image(((p+1)/nb)[Sommet[(k-1) mod nbsn],Sommet[k mod nbsn]]+(l/subh)*(h*axe)); + OTFc.@[apj][3]:=Image(((p+1)/nb)[Sommet[(k-1) mod nbsn],Sommet[k mod nbsn]]+((l+1)/subh)*(h*axe)); + OTFc.@[apj][4]:=Image((p/nb)[Sommet[(k-1) mod nbsn],Sommet[k mod nbsn]]+((l+1)/subh)*(h*axe)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objetcube[](expr ar)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of ar&"; "&ar&";"); + Sommet1:=(a/2,-a/2,-a/2); + Sommet2:=(a/2,a/2,-a/2); + Sommet3:=(-a/2,a/2,-a/2); + Sommet4:=(-a/2,-a/2,-a/2); + Sommet5:=(-a/2,-a/2,a/2); + Sommet6:=(a/2,-a/2,a/2); + Sommet7:=(a/2,a/2,a/2); + Sommet8:=(-a/2,a/2,a/2); +%%Faces + apj:=0; + for p=1 upto 4: + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet[p],Sommet[(p mod 4)+1]]+(k/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet[p],Sommet[(p mod 4)+1]]+(k/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet[p],Sommet[(p mod 4)+1]]+((k+1)/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][4]:=Image((l/subh)[Sommet[p],Sommet[(p mod 4)+1]]+((k+1)/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + endfor; + %face du dessous + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet1,Sommet4]+(k/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet1,Sommet4]+(k/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet1,Sommet4]+((k+1)/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][4]:=Image((l/subh)[Sommet1,Sommet4]+((k+1)/subh)*(Sommet2-Sommet1)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + %face du dessus + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet6,Sommet7]+(k/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet6,Sommet7]+(k/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet6,Sommet7]+((k+1)/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][4]:=Image((l/subh)[Sommet6,Sommet7]+((k+1)/subh)*(Sommet5-Sommet6)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + OTFc.@[k].nb:=4; + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objetpave[](expr Lln,Hhn,Ppn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true: Ferme.@:=true else: Ferme.@:=false fi; + scantokens("numeric "&substring(0,1) of Lln&"; "&Lln&";"); + scantokens("numeric "&substring(0,1) of Hhn&"; "&Hhn&";"); + scantokens("numeric "&substring(0,1) of Ppn&"; "&Ppn&";"); + NbS:=8; + Sommet1:=(P/2,-L/2,-H/2); + Sommet2:=(P/2,L/2,-H/2); + Sommet3:=(-P/2,L/2,-H/2); + Sommet4:=(-P/2,-L/2,-H/2); + Sommet5:=(-P/2,-L/2,H/2); + Sommet6:=(P/2,-L/2,H/2); + Sommet7:=(P/2,L/2,H/2); + Sommet8:=(-P/2,L/2,H/2); +%%Faces + apj:=0; + for p=1 upto 4: + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet[p],Sommet[(p mod 4)+1]]+(k/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet[p],Sommet[(p mod 4)+1]]+(k/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet[p],Sommet[(p mod 4)+1]]+((k+1)/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj][4]:=Image((l/subh)[Sommet[p],Sommet[(p mod 4)+1]]+((k+1)/subh)*(Sommet[(p mod 4)+5]-Sommet[p])); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + endfor; + %face du dessous + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet1,Sommet4]+(k/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet1,Sommet4]+(k/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet1,Sommet4]+((k+1)/subh)*(Sommet2-Sommet1)); + OTFc.@[apj][4]:=Image((l/subh)[Sommet1,Sommet4]+((k+1)/subh)*(Sommet2-Sommet1)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + %face du dessus + for l=0 upto (subh-1): + for k=0 upto (subh-1): + OTFc.@[apj][1]:=Image((l/subh)[Sommet6,Sommet7]+(k/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][2]:=Image(((l+1)/subh)[Sommet6,Sommet7]+(k/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][3]:=Image(((l+1)/subh)[Sommet6,Sommet7]+((k+1)/subh)*(Sommet5-Sommet6)); + OTFc.@[apj][4]:=Image((l/subh)[Sommet6,Sommet7]+((k+1)/subh)*(Sommet5-Sommet6)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + OTFc.@[k].nb:=4; + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef Objetgrille[](expr amn,ann,bmn,bnn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + Ferme.@:=false; + scantokens("numeric "&substring(0,2) of amn&"; "&amn&";"); + scantokens("numeric "&substring(0,2) of ann&"; "&ann&";"); + scantokens("numeric "&substring(0,2) of bmn&"; "&bmn&";"); + scantokens("numeric "&substring(0,2) of bnn&"; "&bnn&";"); + apj:=0; + upas:=(an-am)/nb; + vpas:=(bn-bm)/subh; + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image((am+k*upas,bm+l*vpas,0)); + OTFc.@[apj][2]:=Image((am+(k+1)*upas,bm+l*vpas,0)); + OTFc.@[apj][3]:=Image((am+(k+1)*upas,bm+(l+1)*vpas,0)); + OTFc.@[apj][4]:=Image((am+k*upas,bm+(l+1)*vpas,0)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetRuban[](expr hn)(text tn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("numeric "&substring(0,1) of hn&"; "&hn&";"); + nbsn:=0;%nb sommets total pour la base + for _p=tn: + Sommet[nbsn]:=_p; + nbsn:=nbsn+1; + endfor; + Ferme.@:=false; + apj:=0; + for k=1 upto (nbsn-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image(Sommet[k-1]+(l/subh)*(h*(0,0,1))); + OTFc.@[apj][2]:=Image(Sommet[k]+(l/subh)*(h*(0,0,1))); + OTFc.@[apj][3]:=Image(Sommet[k]+((l+1)/subh)*(h*(0,0,1))); + OTFc.@[apj][4]:=Image(Sommet[k-1]+((l+1)/subh)*(h*(0,0,1))); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + apj:=apj+1; + endfor; + endfor; + apj:=apj-1; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +vardef ObjetBiface[](text tn)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + nbsn:=0;%nb sommets total pour la base + for _p=tn: + nbsn:=nbsn+1; + Sommet[nbsn]:=_p; + endfor; + Ferme.@:=true; + apj:=0; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsn; + for k=1 upto nbsn: + OTFc.@[apj][k]:=Image(Sommet[nbsn+1-k]); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsn:+OTFc.@[apj][k] endfor)/nbsn; + apj:=apj+1; + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=nbsn; + for k=1 upto nbsn: + OTFc.@[apj][k]:=Image(Sommet[k]); + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for k=2 upto nbsn:+OTFc.@[apj][k] endfor)/nbsn; + for k=0 upto apj: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +lambda:=3; +mu:=2; + +vardef Objetplan[](expr Ann,Bnn,Cnn)=%à modifier mais pour l'instant ça marche pour les intersections; + Outcolor.@:=outcolor; + Incolor.@:=incolor; + Ferme.@:=false; + color PPP[]; + scantokens("color "&substring(0,2) of Ann&"; "&Ann&";"); + scantokens("color "&substring(0,2) of Bnn&"; "&Bnn&";"); + scantokens("color "&substring(0,2) of Cnn&"; "&Cnn&";"); + apj:=0; + PPP[0]=Image(An-lambda*(Bn-An)-mu*(Cn-An)); + PPP[1]=Image(An+lambda*(Bn-An)-mu*(Cn-An)); + PPP[2]=Image(An+lambda*(Bn-An)+mu*(Cn-An)); + PPP[3]=Image(An-lambda*(Bn-An)+mu*(Cn-An)); + for k=0 upto (nb-1): + for l=0 upto (subh-1): + tcpt.@[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Image((k/subh)[PPP0,PPP1]+(l/subh)*(PPP3-PPP0)); + OTFc.@[apj][2]:=Image(((k+1)/subh)[PPP0,PPP1]+(l/subh)*(PPP3-PPP0)); + OTFc.@[apj][3]:=Image(((k+1)/subh)[PPP0,PPP1]+((l+1)/subh)*(PPP3-PPP0)); + OTFc.@[apj][4]:=Image((k/subh)[PPP0,PPP1]+((l+1)/subh)*(PPP3-PPP0)); + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef Objettetraedre[](expr ar)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of ar&"; "&ar&";"); + Sommet0:=a*(-0.81650,-0.47140,-1/3); + Sommet1:=a*(0.81650,-0.471402,-1/3); + Sommet2:=a*(0,0.94281,-1/3); + Sommet3:=a*(0,0,1); + tcpt.@[0]:=0; + OTFc.@[0].nb:=3; + OTFc.@[0][1]:=Image(Sommet0); + OTFc.@[0][2]:=Image(Sommet2); + OTFc.@[0][3]:=Image(Sommet1); + OTFc.@[0].iso:=(OTFc.@[0][1]+OTFc.@[0][2]+OTFc.@[0][3])/3; + tcpt.@[1]:=1; + OTFc.@[1].nb:=3; + OTFc.@[1][1]:=Image(Sommet0); + OTFc.@[1][2]:=Image(Sommet1); + OTFc.@[1][3]:=Image(Sommet3); + OTFc.@[1].iso:=(OTFc.@[1][1]+OTFc.@[1][2]+OTFc.@[1][3])/3; + tcpt.@[2]:=2; + OTFc.@[2].nb:=3; + OTFc.@[2][1]:=Image(Sommet1); + OTFc.@[2][2]:=Image(Sommet2); + OTFc.@[2][3]:=Image(Sommet3); + OTFc.@[2].iso:=(OTFc.@[2][1]+OTFc.@[2][2]+OTFc.@[2][3])/3; + tcpt.@[3]:=3; + OTFc.@[3].nb:=3; + OTFc.@[3][1]:=Image(Sommet2); + OTFc.@[3][2]:=Image(Sommet0); + OTFc.@[3][3]:=Image(Sommet3); + OTFc.@[3].iso:=(OTFc.@[3][1]+OTFc.@[3][2]+OTFc.@[3][3])/3; + for k=0 upto 3: + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=3; +enddef; + +vardef Objetoctaedre[](expr ar)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of ar&"; "&ar&";"); + AA=a*sqrt(2)/2; + ObjetNew.@((0,0,-a),(-AA,-AA,0),(AA,-AA,0),(AA,AA,0),(-AA,AA,0),(0,0,a))(% + 3,0,2,1,% + 3,0,3,2,% + 3,0,4,3,% + 3,0,1,4,% + 3,5,1,2,% + 3,5,2,3,% + 3,5,3,4,% + 3,5,4,1% + ); +enddef; + +vardef Objeticosaedre[](expr ar)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of ar&"; "&ar&";"); + aplus=sqrt((5+sqrt(5))/10); + amoins=sqrt((5-sqrt(5))/10); + bplus=(5+sqrt(5))/10; + bmoins=(5-sqrt(5))/10; + Cmp=sqrt(5)/5; + ObjetNew.@(a*(0,1,0),a*(amoins,Cmp,-bplus),a*(-amoins,Cmp,-bplus),a*(-aplus,Cmp,bmoins),a*(0,Cmp,2*Cmp),a*(aplus,Cmp,bmoins),a*(amoins,-Cmp,bplus),a*(-amoins,-Cmp,bplus),a*(-aplus,-Cmp,-bmoins),a*(0,-Cmp,-2*Cmp),a*(aplus,-Cmp,-bmoins),a*(0,-1,0))(% + 3,1,5,6,% + 3,1,4,5,% + 3,1,3,4,% + 3,1,2,3,% + 3,1,6,2,% + 3,7,6,5,% + 3,8,5,4,% + 3,9,4,3,% + 3,10,3,2,% + 3,11,2,6,% + 3,6,7,11,% + 3,5,8,7,% + 3,4,9,8,% + 3,3,10,9,% + 3,2,11,10,% + 3,12,10,11,% + 3,12,9,10,% + 3,12,8,9,% + 3,12,7,8,% + 3,12,11,7); +enddef; + +vardef Objetdodecaedre[](expr ar)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + if creux=true:Ferme.@:=false else: Ferme.@:=true fi; + scantokens("numeric "&substring(0,1) of ar&"; "&ar&";"); + Ap=a*sqrt((5+2*sqrt(5))/15); + Bp=a*sqrt((10+2*sqrt(5))/15); + Cp=a*sqrt((5+sqrt(5))/30); + Dp=a*(sqrt(15)+sqrt(3))/6; + Am=a*sqrt((5-2*sqrt(5))/15); + Bm=a*sqrt((10-2*sqrt(5))/15); + Cm=a*sqrt((5-sqrt(5))/30); + Dm=a*(sqrt(15)-sqrt(3))/6; + Ee:=a*sqrt(3)/3; + ObjetNew.@((0,Ap,-Bm),(-Ee,Ap,-Am),(-Dm,Ap,Cp),(Dm,Ap,Cp),(Ee,Ap,-Am),(0,Am,-Bp),(-Dp,Am,-Cm),(-Ee,Am,Ap),(Ee,Am,Ap),(Dp,Am,-Cm),(0,-Am,Bp),(Dp,-Am,Cm),(Ee,-Am,-Ap),(-Ee,-Am,-Ap),(-Dp,-Am,Cm),(0,-Ap,Bm),(Ee,-Ap,Am),(Dm,-Ap,-Cp),(-Dm,-Ap,-Cp),(-Ee,-Ap,Am))(% + 5,5,1,2,3,4,% + 5,1,5,10,13,6,% + 5,2,1,6,14,7,% + 5,3,2,7,15,8,% + 5,4,3,8,11,9,% + 5,5,4,9,12,10,% + 5,6,13,18,19,14,% + 5,7,14,19,20,15,% + 5,8,15,20,16,11,% + 5,9,11,16,17,12,% + 5,10,12,17,18,13,% + 5,16,20,19,18,17% + ); +enddef; + +vardef ObjetNew[](text listesommets)(text listefaces)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + color Sommet[]; + nbs:=0; + mini:=min(listefaces); + if mini=0: + for _p=listesommets: + Sommet[nbs]:=_p; + nbs:=nbs+1; + endfor; + elseif mini=1: + for _p=listesommets: + nbs:=nbs+1; + Sommet[nbs]:=_p; + endfor; + fi; + apj:=0; + j:=0;%pour compter le nombre de sommets à conserver + for p_=listefaces: + if j=0: + OTFc.@[apj].nb:=p_; + j:=1; + k:=0; + else: + k:=k+1; + if k<>OTFc.@[apj].nb: + OTFc.@[apj][k]:=Image(Sommet[p_]); + else: + OTFc.@[apj][k]:=Image(Sommet[p_]); + j:=0; + apj:=apj+1; + fi; + fi; + endfor; + apj:=apj-1; + for k=0 upto apj: + OTFc.@[k].iso:=(OTFc.@[k][1] for l=2 upto OTFc.@[k].nb:+OTFc.@[k][l] endfor)/OTFc.@[k].nb; + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; +enddef; + +%Objet lecture externe + +vardef ObjetOFF[](expr nomfichier)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + OFF:=true; + string s_; + s_=readfrom nomfichier; + string ss[]; + if s_<>EOF: + ss1 := loptok s_; + t_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr t_] := loptok s_; + exitif ss[t_]=""; + endfor + else: false + fi; + NbS:=round(Mexp Mlog_str ss1); + NF:=round(Mexp Mlog_str ss2); + s_:=readfrom nomfichier; + if debut=0: + for k=0 upto NbS-1: + s_:=readfrom nomfichier; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + Sommet[k]:=(Mexp ((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + endfor; + else: + for k=1 upto NbS: + s_:=readfrom nomfichier; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + Sommet[k]:=(Mexp ((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + endfor; + fi; + apj:=0; + for nf=-4000 upto (-4000+NF)-1: + s_:=readfrom nomfichier; + if s_<>EOF: + ss1 := loptok s_; + n_ := if ss1="%": 0 else: 1 fi; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + else: false + fi; + OTFc.@[apj].nb:=Mexp Mlog_str ss1;%pour savoir le nb de sommets par face + for nl=1 upto OTFc.@[apj].nb: + if invnormale=1: + OTFc.@[apj][nl]:=Image(Sommet[round(Mexp Mlog_str ss[nl+1])]); + else: + OTFc.@[apj][OTFc.@[apj].nb+1-nl]:=Image(Sommet[round(Mexp Mlog_str ss[nl+1])]); + fi; + endfor; + OTFc.@[apj].iso:=(OTFc.@[apj][1] for l=2 upto OTFc.@[apj].nb:+OTFc.@[apj][l] endfor)/OTFc.@[apj].nb; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + apj.@:=apj-1; + closefrom nomfichier; +enddef; + +vardef ObjetOBJ[](expr nomfichier)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + string s_; + string ss[]; + nbss:=1; + apj:=0; + forever: + s_:=readfrom nomfichier; + if s_<>EOF: + ss0 := loptok s_; + if ss0="v": + n_:=0; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor + Sommet[nbss]:=(Mexp((Mlog_str ss1) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss3) Mdiv (Mlog echelle)),Mexp ((Mlog_str ss2) Mdiv (Mlog echelle))); + nbss:=incr nbss; + elseif ss0="f": + n_:=0; + forever: + ss[incr n_] := loptok s_; + exitif ss[n_]=""; + endfor; + OTFc.@[apj].nb:=n_-1; + for k=1 upto OTFc.@[apj].nb: + if invnormale=1: + OTFc.@[apj][OTFc.@[apj].nb-k+1] := Image(Sommet[round(Mexp(Mlog_str ss[k]))]) + %if unknown OTFc.@[apj][OTFc.@[apj].nb-k+1]: + % show OTFc.@[apj][OTFc.@[apj].nb-k+1]; + %fi; + else: + OTFc.@[apj][k] := Image(Sommet[round(Mexp(Mlog_str ss[k]))]) + %if unknown OTFc.@[apj][k]: + % show OTFc.@[apj][k]; + %fi; + fi; + + endfor; + apj:=apj+1; + fi; + fi; + exitif s_=EOF; + endfor; + apj:=apj-1; + for k=0 upto apj: + OTFc.@[k].iso:=(OTFc.@[k][1] for l=2 upto OTFc.@[k].nb:+OTFc.@[k][l] endfor)/OTFc.@[k].nb; + ALT.@[k]:=-Zpart(GCoord(OTFc.@[k].iso)); + if ProduitScalaire(Oeil-OTFc.@[k].iso,Normal(OTFc.@[k].iso,OTFc.@[k][1],OTFc.@[k][2]))>=0: + Vue.@[k]:=true;coul.@[k]:=outcolor; + else: + Vue.@[k]:=false;coul.@[k]:=incolor; + fi; + endfor; + apj.@:=apj; + closefrom nomfichier; +enddef; + + +%%%%%%%Objets travaillés + +vardef ObjetEnleve[](text t)=%les numéros des faces sont données par ordre croissant. + numeric numface[]; + nface:=0; + numface[0]:=0; + %récupérer les numéros des faces. + forsuffixes _p=t: + nface:=nface+1; + numface[nface]=_p-(nface-1);%marchait :) + endfor; + numface[nface+1]:=apj.@-nface+1; + %Mettre dans l'ordre ces numéros.<-déjà fait par l'utilisateur + %enlever les numéros des faces + apj:=0; + for k=0 upto nface: + for l=numface[k] upto (numface[k+1]-1): + tcpt.@[apj]:=tcpt.@[apj+k]; + OTFc.@[apj].nb:=OTFc.@[apj+k].nb; + for p=1 upto OTFc.@[apj].nb: + OTFc.@[apj][p]:=OTFc.@[apj+k][p]; + endfor; + OTFc.@[apj].iso:=OTFc.@[apj+k].iso; + ALT.@[apj]:=ALT.@[apj+k]; + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetDeplacement[](text t)= + %permet de déplacer un objet en donnant au préalable les angles de rotations et la translation. On peut également appliquer une transformation. + Outcolor.@:=outcolor; + Incolor.@:=incolor; + apj:=0; + forsuffixes p_=t: + Ferme.@:=Ferme[p_]; + for k=0 upto apj[p_]: + cpt.@[apj]:=cpt[p_][k]; + OTFc.@[apj].nb:=OTFc[p_][k].nb; + for l=1 upto OTFc.@[apj].nb: + OTFc.@[apj][l]:=Image(OTFc[p_][k][l]); + endfor; + OTFc.@[apj].iso:=Image(OTFc[p_][k].iso); + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=Outcolor[p_]; + else: + if Ferme.@=false: + Vue.@[apj]:=false;coul.@[apj]:=Incolor[p_]; + else: + apj:=apj-1; + fi; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef ObjetFusion[](text t)= + Outcolor.@:=outcolor; + Incolor.@:=incolor; + tapj:=0; + Nbobj:=0; + forsuffixes p_=t: + for k=0 upto apj[p_]: + cpt.@[tapj]:=tapj; + OTFc.@[tapj].nb:=OTFc[p_][k].nb; + for p=1 upto OTFc.@[tapj].nb: + OTFc.@[tapj][p]:=OTFc[p_][k][p]; + endfor; + OTFc.@[tapj].iso:=OTFc[p_][k].iso; + ALT.@[tapj]:=-Zpart(GCoord(OTFc.@[tapj].iso)); + Vue.@[tapj]:=Vue[p_][k]; + coul.@[tapj]:=coul[p_][k]; + tapj:=tapj+1; + endfor; + endfor; + apj.@:=tapj-1; +enddef; + +%les intersections d'objets + +vardef ProjectionsurPlan(expr aa,bb,cc,dd)=%Projection du point aa sur le plan (bbccdd) + save di,vc; + color va,vb,vc,vd; + vd=Normal(bb,cc,dd); + va=vd/Norm(vd); + vb=aa-bb; + di=-ProduitScalaire(vb,va); + va:=di*va; + vb:=vb+va; + vc=bb+vb; + vc +enddef; + +%%denis Roegel---------- +vardef IntersectionPlandroite(expr aa,bb,cc,dd,ee)=%pour les aretes :) + save Int; + boolean Int; + color gg,caaa[],Caaa[]; + caaa3=Normal(aa,bb,cc)/Norm(Normal(aa,bb,cc)); + caaa1=aa-dd;if Norm(caaa1)<>0:Caaa1=caaa1/Norm(caaa1) else:Caaa1=caaa1 fi; + caaa2=ee-dd;if Norm(caaa2)<>0:Caaa2=caaa2/Norm(caaa2) else:Caaa2=caaa2 fi; + ww:=ProduitScalaire(caaa2,caaa3); + if ww<>0: + %if (ProduitScalaire(caaa1,caaa3)*ww>0) and (ProduitScalaire(caaa1,caaa3)/ww<1): + caaa4=caaa2*(ProduitScalaire(caaa1,caaa3)/ww); + Int:=true; + %else: + % Int:=false; + %fi; + else: % the line is parallel to the plane + Int:=false; + fi; + Int +enddef; + +vardef Intersectionplandroite(expr aa,bb,cc,dd,ee)=%pour les aretes :) + save Int; + boolean Int; + color gg,caaa[],Caaa[]; + caaa3=Normal(aa,bb,cc)/Norm(Normal(aa,bb,cc)); + caaa1=aa-dd;if Norm(caaa1)<>0:Caaa1=caaa1/Norm(caaa1) else:Caaa1=caaa1 fi; + caaa2=ee-dd;if Norm(caaa2)<>0:Caaa2=caaa2/Norm(caaa2) else:Caaa2=caaa2 fi; + ww:=ProduitScalaire(caaa2,caaa3); + if ww<>0: + if (ProduitScalaire(caaa1,caaa3)*ww>0) and (ProduitScalaire(caaa1,caaa3)/ww<1): + %message("ww"&decimal(ww)&" PS"&decimal(ProduitScalaire(caaa1,caaa3))&""); + caaa4=caaa2*(ProduitScalaire(caaa1,caaa3)/ww); + Int:=true; + else: + Int:=false; + fi; + else: % the line is parallel to the plane + Int:=false; + fi; + Int +enddef; + +vardef IntersectionPlanDroite(expr aa,bb,cc,dd,ee)=%plan (aa,bb,cc) droite(dd,ee) + if Intersectionplandroite(aa,bb,cc,dd,ee): + gg=dd+caaa4; + fi; + gg +enddef; + +vardef IPP(expr aa,bb,cc,dd,ee,ff)= + %a vérifier + %save da,db,dc; + boolean int; + da:=Norm(aa-ProjectionsurPlan(aa,dd,ee,ff)); + db:=Norm(bb-ProjectionsurPlan(bb,dd,ee,ff)); + dc:=Norm(cc-ProjectionsurPlan(cc,dd,ee,ff)); + if (da=db) and (db=dc): % the two planes are parallel + int:=false; + else: + int:=true; + nbi:=nbi+1; + fi; +enddef; +%%--------------------- + +vardef ObjetIntersection[](text t)=%plan n°1 solide n°2 + color INTER[][][];%pour avoir les points d'intersection + nbsol:=1; + forsuffixes p_=t: + pp_[nbsol]:=p_; + nbsol:=nbsol+1; + endfor; + nbi:=0; + for k=0 upto apj[pp_[2]]: + IPP(OTFc[pp_[2]][k][1],OTFc[pp_[2]][k][2],OTFc[pp_[2]][k][3],PPP0,PPP1,PPP2); + if int=true: + nbint:=0; + OTFc[pp_[2]][k][OTFc[pp_[2]][k].nb+1]=OTFc[pp_[2]][k][1]; + for l=1 upto (OTFc[pp_[2]][k].nb): + if Intersectionplandroite(PPP0,PPP1,PPP2,OTFc[pp_[2]][k][l],OTFc[pp_[2]][k][l+1]): + nbint:=nbint+1; + INTER[pp_2][k][nbint]=IntersectionPlanDroite(PPP0,PPP1,PPP2,OTFc[pp_[2]][k][l],OTFc[pp_[2]][k][l+1]); + fi; + endfor; + %%%Pas satisfaisant -> à travailler + %show nbint; + if nbint=2: + draw Projette(INTER[pp_2][k][1])--Projette(INTER[pp_2][k][2]) withpen pencircle scaled2bp withcolor violet; + fi; + fi; + endfor; +enddef; + +vardef ObjetSepare[](expr nbd,nbD)=%nbd pour l'objet du dessous, nbD pour l'objet du dessus. + Ferme[nbd]:=Ferme.@; + Ferme[nbD]:=Ferme.@; + Outcolor[nbd]:=outcolor; + Incolor[nbd]:=incolor; + Outcolor[nbD]:=outcolor; + Incolor[nbD]:=incolor; + color INTER[][][]; + color Nn;color PPP.iso; + Nn=Normal(PPP0,PPP1,PPP3); + PPP.iso=(PPP0+PPP1+PPP2)/3; + apj:=0;bpj:=0;%bpj pour le 2eme solide + for k=0 upto apj.@: + if ProduitScalaire(Nn,OTFc.@[k].iso-PPP.iso)<=0: + nbint:=0; + OTFc.@[k][OTFc.@[k].nb+1]:=OTFc.@[k][1]; + for l=1 upto OTFc.@[k].nb: + if Intersectionplandroite(PPP0,PPP1,PPP3,OTFc.@[k][l],OTFc.@[k][l+1]): + nbint:=nbint+1; + INTER.@[k][nbint]=IntersectionPlanDroite(PPP0,PPP1,PPP3,OTFc.@[k][l],OTFc.@[k][l+1]); + prec.@[k][nbint]:=l; + suiv.@[k][nbint]:=l+1; + fi; + endfor; + if nbint=0: + tcpt[nbd][apj]:=apj; OTFc[nbd][apj].nb:=OTFc.@[k].nb; + for l=1 upto OTFc[nbd][apj].nb: + OTFc[nbd][apj][l]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + fi; + if nbint=2: + tcpt[nbd][apj]:=apj; + if ProduitScalaire(Nn,OTFc.@[k][prec.@[k][1]]-PPP.iso)<=0: + compt:=0; + for l=1 upto prec.@[k][1]: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj][compt+1]:=Image(INTER.@[k][1]); + OTFc[nbd][apj][compt+2]:=Image(INTER.@[k][2]); + compt:=compt+2; + for l=suiv.@[k][2] upto OTFc.@[k].nb: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj].nb:=compt; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + %2eme solide + compt:=1; + OTFc[nbD][bpj][1]:=Image(INTER.@[k][1]); + for l=suiv.@[k][1] upto prec.@[k][2]: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(INTER.@[k][2]); + OTFc[nbD][bpj].nb:=compt; + OTFc[nbD][bpj].iso:=(OTFc[nbD][bpj][1]+for l=2 upto OTFc[nbD][bpj].nb:+OTFc[nbD][bpj][l] endfor)/OTFc[nbD][bpj].nb; + ALT[nbD][bpj]:=-Zpart(GCoord(OTFc[nbD][bpj].iso)); + if ProduitScalaire(Oeil-OTFc[nbD][bpj].iso,Normal(OTFc[nbD][bpj].iso,OTFc[nbD][bpj][1],OTFc[nbD][bpj][2]))>=0: + Vue[nbD][bpj]:=true;coul[nbD][bpj]:=outcolor; + else: + Vue[nbD][bpj]:=false;coul[nbD][bpj]:=incolor; + fi; + bpj:=bpj+1; + %fin 2eme solide + else: + compt:=1; + OTFc[nbd][apj][1]:=Image(INTER.@[k][1]); + for l=suiv.@[k][1] upto prec.@[k][2]: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(INTER.@[k][2]); + OTFc[nbd][apj].nb:=compt; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + %2eme solide + compt:=0; + for l=1 upto prec.@[k][1]: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbD][bpj][compt+1]:=Image(INTER.@[k][1]); + OTFc[nbD][bpj][compt+2]:=Image(INTER.@[k][2]); + compt:=compt+2; + for l=suiv.@[k][2] upto OTFc.@[k].nb: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbD][bpj].nb:=compt; + OTFc[nbD][bpj].iso:=(OTFc[nbD][bpj][1]+for l=2 upto OTFc[nbD][bpj].nb:+OTFc[nbD][bpj][l] endfor)/OTFc[nbD][bpj].nb; + ALT[nbD][bpj]:=-Zpart(GCoord(OTFc[nbD][bpj].iso)); + if ProduitScalaire(Oeil-OTFc[nbD][bpj].iso,Normal(OTFc[nbD][bpj].iso,OTFc[nbD][bpj][1],OTFc[nbD][bpj][2]))>=0: + Vue[nbD][bpj]:=true;coul[nbD][bpj]:=outcolor; + else: + Vue[nbD][bpj]:=false;coul[nbD][bpj]:=incolor; + fi; + bpj:=bpj+1; + %fin 2eme solide + fi; + fi; + if nbint=1: + compt:=0;%compteur pour le nb de sommets + comp:=0;%pour savoir où se situe le point à enlever + for l=1 upto OTFc.@[k].nb: + if ProduitScalaire(Nn,OTFc.@[k][l]-PPP.iso)>0: + comp:=comp+1; + fi; + endfor; + if comp=1: + tcpt[nbd][apj]:=apj; + for l=1 upto prec.@[k][1]-1: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(INTER.@[k][1]); + for l=suiv.@[k][1] upto OTFc.@[k].nb: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj].nb:=compt; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + else: + tcpt[nbd][apj]:=apj; OTFc[nbd][apj].nb:=OTFc.@[k].nb; + for l=1 upto OTFc[nbd][apj].nb: + OTFc[nbd][apj][l]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + fi; + fi; + fi; + if ProduitScalaire(Nn,OTFc.@[k].iso-PPP.iso)>0: + nbint:=0; + OTFc.@[k][OTFc.@[k].nb+1]:=OTFc.@[k][1]; + for l=1 upto OTFc.@[k].nb: + if Intersectionplandroite(PPP0,PPP1,PPP3,OTFc.@[k][l],OTFc.@[k][l+1]): + nbint:=nbint+1; + INTER.@[k][nbint]=IntersectionPlanDroite(PPP0,PPP1,PPP3,OTFc.@[k][l],OTFc.@[k][l+1]); + prec.@[k][nbint]:=l; + suiv.@[k][nbint]:=l+1; + fi; + endfor; + %2eme solide sans intersection + if nbint=0: + tcpt[nbD][bpj]:=bpj; OTFc[nbD][bpj].nb:=OTFc.@[k].nb; + for l=1 upto OTFc[nbD][bpj].nb: + OTFc[nbD][bpj][l]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbD][bpj].iso:=(OTFc[nbD][bpj][1]+for l=2 upto OTFc[nbD][bpj].nb:+OTFc[nbD][bpj][l] endfor)/OTFc[nbD][bpj].nb; + ALT[nbD][bpj]:=-Zpart(GCoord(OTFc[nbD][bpj].iso)); + if ProduitScalaire(Oeil-OTFc[nbD][bpj].iso,Normal(OTFc[nbD][bpj].iso,OTFc[nbD][bpj][1],OTFc[nbD][bpj][2]))>=0: + Vue[nbD][bpj]:=true;coul[nbD][bpj]:=outcolor; + else: + Vue[nbD][bpj]:=false;coul[nbD][bpj]:=incolor; + fi; + bpj:=bpj+1; + fi; + %fin 2eme solide + if nbint=2: + tcpt[nbd][apj]:=apj; + if ProduitScalaire(Nn,OTFc.@[k][prec.@[k][1]]-PPP.iso)<=0: + compt:=0; + for l=1 upto prec.@[k][1]: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj][compt+1]:=Image(INTER.@[k][1]); + OTFc[nbd][apj][compt+2]:=Image(INTER.@[k][2]); + compt:=compt+2; + for l=suiv.@[k][2] upto OTFc.@[k].nb: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbd][apj].nb:=compt; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + %2eme solide + compt:=1; + OTFc[nbD][bpj][1]:=Image(INTER.@[k][1]); + for l=suiv.@[k][1] upto prec.@[k][2]: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(INTER.@[k][2]); + OTFc[nbD][bpj].nb:=compt; + OTFc[nbD][bpj].iso:=(OTFc[nbD][bpj][1]+for l=2 upto OTFc[nbD][bpj].nb:+OTFc[nbD][bpj][l] endfor)/OTFc[nbD][bpj].nb; + ALT[nbD][bpj]:=-Zpart(GCoord(OTFc[nbD][bpj].iso)); + if ProduitScalaire(Oeil-OTFc[nbD][bpj].iso,Normal(OTFc[nbD][bpj].iso,OTFc[nbD][bpj][1],OTFc[nbD][bpj][2]))>=0: + Vue[nbD][bpj]:=true;coul[nbD][bpj]:=outcolor; + else: + Vue[nbD][bpj]:=false;coul[nbD][bpj]:=incolor; + fi; + bpj:=bpj+1; + %fin 2eme solide + else: + compt:=1; + OTFc[nbd][apj][1]:=Image(INTER.@[k][1]); + for l=suiv.@[k][1] upto prec.@[k][2]: + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(OTFc.@[k][l]); + endfor; + compt:=compt+1; + OTFc[nbd][apj][compt]:=Image(INTER.@[k][2]); + OTFc[nbd][apj].nb:=compt; + OTFc[nbd][apj].iso:=(OTFc[nbd][apj][1]+for l=2 upto OTFc[nbd][apj].nb:+OTFc[nbd][apj][l] endfor)/OTFc[nbd][apj].nb; + ALT[nbd][apj]:=-Zpart(GCoord(OTFc[nbd][apj].iso)); + if ProduitScalaire(Oeil-OTFc[nbd][apj].iso,Normal(OTFc[nbd][apj].iso,OTFc[nbd][apj][1],OTFc[nbd][apj][2]))>=0: + Vue[nbd][apj]:=true;coul[nbd][apj]:=outcolor; + else: + Vue[nbd][apj]:=false;coul[nbd][apj]:=incolor; + fi; + apj:=apj+1; + %2eme solide + compt:=0; + for l=1 upto prec.@[k][1]: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbD][bpj][compt+1]:=Image(INTER.@[k][1]); + OTFc[nbD][bpj][compt+2]:=Image(INTER.@[k][2]); + compt:=compt+2; + for l=suiv.@[k][2] upto OTFc.@[k].nb: + compt:=compt+1; + OTFc[nbD][bpj][compt]:=Image(OTFc.@[k][l]); + endfor; + OTFc[nbD][bpj].nb:=compt; + OTFc[nbD][bpj].iso:=(OTFc[nbD][bpj][1]+for l=2 upto OTFc[nbD][bpj].nb:+OTFc[nbD][bpj][l] endfor)/OTFc[nbD][bpj].nb; + ALT[nbD][bpj]:=-Zpart(GCoord(OTFc[nbD][bpj].iso)); + if ProduitScalaire(Oeil-OTFc[nbD][bpj].iso,Normal(OTFc[nbD][bpj].iso,OTFc[nbD][bpj][1],OTFc[nbD][bpj][2]))>=0: + Vue[nbD][bpj]:=true;coul[nbD][bpj]:=outcolor; + else: + Vue[nbD][bpj]:=false;coul[nbD][bpj]:=incolor; + fi; + bpj:=bpj+1; + %fin 2eme solide + fi; + fi; + fi; + endfor; + apj[nbd]:=apj-1; + apj[nbD]:=bpj-1; +enddef; + +%pour les lignes de niveaux. +vardef ObjetSurfaceZ[](expr fn,xmin,xmax,ymin,ymax,nblignes,nbpoints)= + surfz:=true; + Outcolor.@:=outcolor; + Incolor.@:=incolor; + scantokens("vardef Fz(expr X,Y)="&fn&" enddef;"); + apj:=0; + IncX:=(xmax-xmin)/nbpoints; + IncY:=(ymax-ymin)/nblignes; + color Yc[][],Xc[][],Fc[][]; + for ligne=0 upto nblignes: + y:=ymax-ligne*IncY; + x:=xmin; + Yc[ligne][0]=(x,y,Fz(x,y)); + for k=1 upto nbpoints: + Yc[ligne][k]=((xmin+k*IncX,y,Fz(xmin+k*IncX,y))); + endfor; + endfor; + for k=(nblignes-1) downto 0: + for l=(nbpoints-3) step -3 until 0: + cpt[apj]:=apj; + OTFc.@[apj].nb:=4; + OTFc.@[apj][1]:=Yc[k][l]; + OTFc.@[apj][2]:=Yc[k+1][l]; + OTFc.@[apj][3]:=Yc[k+1][l+3]; + OTFc.@[apj][4]:=Yc[k][l+3]; + OTFc.@[apj].iso:=(OTFc.@[apj][1]+OTFc.@[apj][2]+OTFc.@[apj][3]+OTFc.@[apj][4])/4; + ALT.@[apj]:=-Zpart(GCoord(OTFc.@[apj].iso)); + if ProduitScalaire(Oeil-OTFc.@[apj].iso,Normal(OTFc.@[apj].iso,OTFc.@[apj][1],OTFc.@[apj][2]))>=0: + Vue.@[apj]:=true;coul.@[apj]:=outcolor; + else: + Vue.@[apj]:=false;coul.@[apj]:=incolor; + fi; + apj:=apj+1; + endfor; + endfor; + apj.@:=apj-1; +enddef; + +vardef GrilleSurfZ(expr xmin,xmax,xpas,ymin,ymax,ypas,zmin,zmax,zpas,zechelle)= + drawoptions(withcolor gris); + for k=zmin upto zmax: + draw Projette((-xmin,ymin,k))--Projette((-xmax,ymin,k))--Projette((-xmax,ymax,k)); + endfor; + for k=ymin upto ymax: + draw Projette((-xmin,k,zmin))--Projette((-xmax,k,zmin))--Projette((-xmax,k,zmax)); + endfor; + for k=xmin upto xmax: + draw Projette((-k,ymax,zmin))--Projette((-k,ymin,zmin))--Projette((-k,ymin,zmax)); + endfor; + drawoptions(); + if Phi<>90: + for k=zmin step zpas until zmax: + label.lft(""&decimal(zechelle*k)&"",Projette((-xmin,ymin,k))); + endfor; + for k=ymin step ypas until ymax: + label.bot(""&decimal(k)&"",Projette((-xmin,k,zmin))); + endfor; + for k=xmin step xpas until xmax: + label.rt(""&decimal(k)&"",Projette((-k,ymax,zmin))); + endfor; + labeloffset:=8*labeloffset; + label.bot(btex $y$ etex,Projette((-xmin,(ymin+ymax)/2,zmin))); + label.lft(btex $z$ etex,Projette((-xmin,ymin,(zmin+zmax)/2))); + label.rt(btex $x$ etex,Projette((-(xmin+xmax)/2,ymax,zmin))); + labeloffset:=labeloffset/8; + else: + for k=ymin step ypas until ymax: + label.bot(""&decimal(k)&"",Projette((-xmin,k,zmin))); + endfor; + for k=xmin step xpas until xmax: + label.rt(""&decimal(k)&"",Projette((-k,ymax,zmin))); + endfor; + labeloffset:=8*labeloffset; + label.bot(btex $y$ etex,Projette((-xmin,(ymin+ymax)/2,zmin))); + label.rt(btex $x$ etex,Projette((-(xmin+xmax)/2,ymax,zmin))); + labeloffset:=labeloffset/8; + fi; +enddef; + +vardef GrilleSurfZZ(expr xmin,xmax,xpas,ymin,ymax,ypas,zmin,zmax,zpas,zechelle)= + drawoptions(withcolor gris); + for k=zmin upto zmax: + draw Projette((xmin,ymin,k))--Projette((xmin,ymax,k))--Projette((xmax,ymax,k)); + endfor; + for k=ymin upto ymax: + draw Projette((xmax,k,zmin))--Projette((xmin,k,zmin))--Projette((xmin,k,zmax)); + endfor; + for k=xmin upto xmax: + draw Projette((k,ymin,zmin))--Projette((k,ymax,zmin))--Projette((k,ymax,zmax)); + endfor; + drawoptions(); + if Phi<>90: + for k=zmin step zpas until zmax: + label.lft(""&decimal(zechelle*k)&"",Projette((xmin,ymin,k))); + endfor; + for k=ymin step ypas until ymax: + label.rt(""&decimal(k)&"",Projette((xmax,k,zmin))); + endfor; + for k=xmin step xpas until xmax: + label.bot(""&decimal(k)&"",Projette((k,ymin,zmin))); + endfor; + labeloffset:=8*labeloffset; + label.rt(btex $y$ etex,Projette((xmax,(ymin+ymax)/2,zmin))); + label.lft(btex $z$ etex,Projette((xmin,ymin,(zmin+zmax)/2))); + label.bot(btex $x$ etex,Projette(((xmin+xmax)/2,ymin,zmin))); + labeloffset:=labeloffset/8; + else: + for k=ymin step ypas until ymax: + label.bot(""&decimal(k)&"",Projette((xmin,k,zmin))); + endfor; + for k=xmin step xpas until xmax: + label.rt(""&decimal(k)&"",Projette((k,ymax,zmin))); + endfor; + labeloffset:=8*labeloffset; + label.bot(btex $y$ etex,Projette((xmin,(ymin+ymax)/2,zmin))); + label.rt(btex $x$ etex,Projette(((xmin+xmax)/2,ymax,zmin))); + labeloffset:=labeloffset/8; + fi; +enddef; + +vardef Legende(expr xmax,ymax,nbplan,zechelle)= + path legende[]; + for k=1 upto nbplan+1: + legende[k]=Projette((-xmax,ymax+1,k-0.5))--Projette((-xmax,ymax+1,k))--Projette((-xmax,ymax+2,k))--Projette((-xmax,ymax+2,k-0.5))--cycle; + endfor; + for k=1 upto nbplan+1: + fill legende[k] withcolor Outcolor[k]; + draw legende[k]; + label.rt(""&decimal(zechelle*(k-1))&" - "&decimal(zechelle*k)&"",Projette((-xmax,ymax+2,k-0.25))); + endfor; +enddef; + +vardef MaillageZ(expr fn,xmin,xmax,ymin,ymax,nblignes,nbpoints)= + traits:=true; + scantokens("vardef Fz(expr X,Y)="&fn&" enddef;"); + IncX:=(xmax-xmin)/nbpoints; + IncY:=(ymax-ymin)/nblignes; + color Yc[][],Xc[][]; + for ligne=0 upto nblignes: + y:=ymax-ligne*IncY; + x:=xmin; + Yc[ligne][0]=(x,y,Fz(x,y)); + for k=1 upto nbpoints: + Yc[ligne][k]=((xmin+k*IncX,y,Fz(xmin+k*IncX,y))); + endfor; + endfor; + for l=0 upto nbpoints: + x:=xmax-l*IncX; + y:=ymin; + Xc[l][0]:=(x,y,Fz(x,y)); + for k=1 upto nblignes: + Xc[l][k]=(x,ymin+k*IncY,Fz(x,ymin+k*IncY)); + endfor; + endfor; + for k=nblignes downto 0: + draw Projette(Yc[k][nbpoints]) + for l=(nbpoints-1) downto 0: + ..Projette(Yc[k][l]) + endfor; + endfor; + for l=nbpoints downto 0: + draw Projette(Xc[l][nblignes]) + for k=nblignes-1 downto 0: + ..Projette(Xc[l][k]) + endfor; + endfor; +enddef; + +endinput; \ No newline at end of file