diff options
Diffstat (limited to 'Master/texmf-dist/tex/generic/pst-solides3d')
-rw-r--r-- | Master/texmf-dist/tex/generic/pst-solides3d/pst-solides3d.tex | 59 |
1 files changed, 47 insertions, 12 deletions
diff --git a/Master/texmf-dist/tex/generic/pst-solides3d/pst-solides3d.tex b/Master/texmf-dist/tex/generic/pst-solides3d/pst-solides3d.tex index d333af5bc4c..513d314b2e4 100644 --- a/Master/texmf-dist/tex/generic/pst-solides3d/pst-solides3d.tex +++ b/Master/texmf-dist/tex/generic/pst-solides3d/pst-solides3d.tex @@ -1,5 +1,5 @@ %% -%% COPYRIGHT 2008-2016 by Manuel Luque, Arnaud Schmittbuhl, +%% COPYRIGHT 2008-2017 by Manuel Luque, Arnaud Schmittbuhl, %% Jean-Paul Vignault, Herbert Voss. %% %% This work may be distributed and/or modified under the @@ -16,15 +16,6 @@ %% for Generic TeX. %% See the PSTricks User's Guide for description. % -% etex detection by looking for the \ifcsname macro -\expandafter\ifx\csname ifcsname\endcsname\relax - \newlinechar`\^^J - \message{^^J*****************************************} - \message{etex is needed to work with pst-solides3d} - \message{*****************************************} - \catcode`\ =11\relax - \Compile With etex Please -\fi \csname PSTSOLIDESIIIDLoaded\endcsname \let\PSTSOLIDESIIIDLoaded\endinput % Requires PSTricks, pst-xkey and pst-node packages @@ -33,11 +24,12 @@ \ifx\PSTXKeyLoaded\endinput\else \input pst-xkey \fi \ifx\MultidoLoaded\endinput\else \input multido.tex \fi % JPV & ML & AS & HV -\def\fileversion{4.30} -\def\filedate{2015/12/17} +\def\fileversion{4.31} +\def\filedate{2016/12/10} \message{`PSTSOLIDESIIID' v\fileversion, \filedate} % \pstheader{pst-solides3d.pro} +\pstheader{pst-implicitsurface.pro} \edef\PstAtCode{\the\catcode`\@} \catcode`\@=11\relax \pst@addfams{pst-solides3d} @@ -1116,6 +1108,49 @@ restore \ifPst@solidmemory\else\end@ClosedObj\fi}\ignorespaces% } % +\define@key[psset]{pst-solides3d}{XMinMax}{\def\pst@solides@XMinMax{#1}} +\define@key[psset]{pst-solides3d}{YMinMax}{\def\pst@solides@YMinMax{#1}} +\define@key[psset]{pst-solides3d}{ZMinMax}{\def\pst@solides@ZMinMax{#1}} +\define@key[psset]{pst-solides3d}{ImplFunction}{\def\pst@solides@ImplFunction{#1}} +\psset{XMinMax=-2 2 0.2,YMinMax=-2 2 0.2,ZMinMax=-2 2 0.2,ImplFunction=x dup mul y dup mul add} +% +\def\psImplicitSurface{\pst@object{psImplicitSurface}} +\def\psImplicitSurface@i{\@ifnextchar(\psImplicitSurface@ii{\psImplicitSurface@ii(0,0,0)}}% +\def\psImplicitSurface@ii(#1){% + \begin@SpecialObj + \addto@pscode{ + \ifPst@algebraic + /ImplFunction ( \pst@solides@ImplFunction ) tx@AlgToPs begin AlgToPs end cvx def + \else + /ImplFunction { \pst@solides@ImplFunction } def + \fi + SolidesDict begin + MarchingCubes + /plagesXYZ [% min max dx + [\pst@solides@XMinMax][\pst@solides@YMinMax][\pst@solides@ZMinMax] + ] def + /function { + 3 dict begin + /z exch def /y exch def /x exch def + ImplFunction + end + } def + calculs + /Sommets exch def + /Faces exch def + /lesPoints { + 0 1 Sommets length 1 sub {/iP exch def + Sommets iP get aload pop + } for + } def + end + }% + \psSolid[object=new,faces={Faces aload pop},sommets=lesPoints](#1)% + \end@SpecialObj + \ignorespaces +} + +% \def\psResetSolidKeys{% \psset[pst-solides3d]{% action=draw**,% |