Changeset 67
- Timestamp:
- 06/26/08 13:18:48 (7 months ago)
- Files:
-
- trunk/pst-solides3d.tex (modified) (7 diffs)
- trunk/solides.pro (modified) (12 diffs)
- trunk/tests/index.txt (modified) (1 diff)
- trunk/tests/test_17.tex (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/pst-solides3d.tex
r66 r67 20 20 \ifx\MultidoLoaded\endinput\else\input multido.tex \fi 21 21 % JPV & ML & AS 22 \def\fileversion{3. 29}23 \def\filedate{2008/06/2 2}22 \def\fileversion{3.31} 23 \def\filedate{2008/06/25} 24 24 \message{`PSTSOLIDESIIID' v\fileversion, \filedate} 25 25 % … … 450 450 % 451 451 /range [ \pst@solides@range ] def 452 /action {\pst@solides@action}def452 /action (\pst@solides@action) def 453 453 /texte (\pst@solides@text) def 454 454 /pos (\pst@solides@pos) def … … 873 873 \ifPst@algebraic\toks@={}% 874 874 \def\@tempb{#4}\ifx\@tempb\@empty \else\store@toks@after\@tempb\fi 875 \def\@tempb{#5}\ifx\@tempb\@empty \else\store@toks@after\@tempb\fi 876 \def\@tempb{#6}\ifx\@tempb\@empty 877 \else\store@toks@after\@tempb\fi 878 \pstVerb{/#2 { \@tempa \the\toks@ } def }% 879 \else 880 \pstVerb{/#2 { \the\toks@ #4 #5 #6} def }% 875 \def\@tempb{#5}\ifx\@tempb\@empty \else\store@toks@after\@tempb\fi 876 \def\@tempb{#6}\ifx\@tempb\@empty 877 \else\store@toks@after\@tempb\fi 878 \pstVerb{ 879 /#2 { 3 dict begin \@tempa \the\toks@ 880 gere_pst-deffunction end } def }% 20080625 881 \else 882 \pstVerb{ 883 /#2 { 3 dict begin \the\toks@ #4 #5 #6 884 gere_pst-deffunction end } def }% 20080625 881 885 \fi 882 886 \egroup} … … 885 889 \toks@={}% 886 890 \def\arg@ii{#1}\ifx\arg@ii\@empty \else\store@toks@before\arg@ii\fi 887 \def\arg@ii{#2}\ifx\arg@ii\@empty \else\store@toks@before\arg@ii\fi 888 \def\arg@ii{#3}\ifx\arg@ii\@empty 889 \else\store@toks@before\arg@ii\fi} 891 \def\arg@ii{#2}\ifx\arg@ii\@empty \else\store@toks@before\arg@ii\fi 892 \def\arg@ii{#3}\ifx\arg@ii\@empty \else\store@toks@before\arg@ii\fi 893 \edef\@tmpPSDefns{\the\toks@ mark }% 20080625 894 \global\toks@=\expandafter{\@tmpPSDefns}}% 20080625 890 895 \def\store@toks@before#1{% 891 896 \edef\@tmpPSDefns{/#1 exch def \the\toks@}% … … 896 901 \global\toks@=\expandafter{\@tmpPSDefns}% 897 902 } 898 899 903 900 904 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% … … 925 929 \define@key[psset]{pst-solides3d}{text}{\def\pst@solides@text{#1}} 926 930 \psset[pst-solides3d]{text=}% pas de texte par defaut 931 % plan de projection 932 \define@key[psset]{pst-solides3d}{plan}{\def\pst@solides@plan{#1}} 933 \psset[pst-solides3d]{plan=}% pas de plan par defaut 927 934 % position du texte a projeter 928 935 \define@key[psset]{pst-solides3d}{pos}{\def\pst@solides@pos{#1}} … … 947 954 /texte (\pst@solides@text) def 948 955 /pos (\pst@solides@pos) def 956 \ifx\pst@solides@plan\@empty 957 \else 958 /planprojpst \pst@solides@plan \space def 959 \fi 949 960 \ifx\pst@solides@solidname\@empty 950 961 \else trunk/solides.pro
r66 r67 1 1 %! 2 2 % PostScript prologue for pst-solides3d.tex. 3 % Version 3.3 6, 2008/06/233 % Version 3.37, 2008/06/25 4 4 % 5 5 %% COPYRIGHT 2008 by Jean-Paul Vignault … … 214 214 /dashed {pointilles} def 215 215 216 %%% les 3 procedures utilisees pour transformer les depots de AlgToPs en nombres217 /pstrickactionR3 {218 3 dict begin219 /len@3 exch def220 /len@2 exch def221 /len@1 exch def222 len@1 exec223 len@2 exec224 len@3 exec225 end226 } def227 228 /pstrickactionR2 {229 exec exch exec exch230 } def231 232 /pstrickactionR {233 exec234 } def235 236 216 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 237 217 %%%% geometrie basique %%%% … … 291 271 stroke 292 272 grestore 273 } def 274 275 /point_ { 276 1 setlinecap 277 5 setlinewidth 278 smoveto 279 0 0 rlineto 293 280 } def 294 281 … … 567 554 /eqc { 568 555 eqp 556 } def 557 558 %%%%% ### eqstring ### 559 /eqstring { 560 3 dict begin 561 /str2 exch def 562 /str1 exch def 563 str1 length str2 length eq { 564 /i 0 def 565 true 566 str1 length { 567 str1 i get str2 i get eq and 568 /i i 1 add store 569 } repeat 570 } { 571 false 572 } ifelse 573 end 569 574 } def 570 575 … … 1399 1404 /courbeR3 { 1400 1405 tmin tmax 3 -1 roll CourbeR3 1406 } def 1407 1408 %%%%% ### cercle ### 1409 %% syntaxe : x0 y0 r cercle 1410 /cercle { 1411 3 dict begin 1412 /r@y@n exch def 1413 /y@ exch def 1414 /x@ exch def 1415 0 360 {cos r@y@n mul x@ add} {sin r@y@n mul y@ add} Courbeparam 1416 end 1417 } def 1418 1419 %% syntaxe : x0 y0 r cercle_ 1420 /cercle_ { 1421 3 dict begin 1422 /r@y@n exch def 1423 /y@ exch def 1424 /x@ exch def 1425 x@ r@y@n add y@ smoveto 1426 0 360 {cos r@y@n mul x@ add} {sin r@y@n mul y@ add} Courbeparam_ 1427 end 1428 } def 1429 1430 %% syntaxe : x0 y0 r cercle-_ 1431 /cercle-_ { 1432 3 dict begin 1433 /r@y@n exch def 1434 /y@ exch def 1435 /x@ exch def 1436 x@ r@y@n add y@ smoveto 1437 360 0 {cos r@y@n mul x@ add} {sin r@y@n mul y@ add} Courbeparam_ 1438 end 1439 } def 1440 1441 %% syntaxe : x0 y0 r cercle* 1442 /cercle* { 1443 1 dict begin 1444 /startest true def 1445 cercle 1446 end 1447 } def 1448 1449 %% syntaxe : alpha beta x0 y0 r Cercle 1450 /Cercle { 1451 4 dict begin 1452 dup isstring 1453 {/option exch def} 1454 if 1455 /r@y@n exch def 1456 /y@ exch def 1457 /x@ exch def 1458 {cos r@y@n mul x@ add} {sin r@y@n mul y@ add} 1459 currentdict /option known 1460 {option} 1461 if 1462 Courbeparam 1463 end 1464 } def 1465 1466 %% syntaxe : alpha beta x0 y0 r Cercle_ 1467 /Cercle_ { 1468 3 dict begin 1469 /r@y@n exch def 1470 /y@ exch def 1471 /x@ exch def 1472 {cos r@y@n mul x@ add} {sin r@y@n mul y@ add} Courbeparam_ 1473 end 1474 } def 1475 1476 %% syntaxe : alpha beta x0 y0 r Cercle 1477 /Cercle* { 1478 1 dict begin 1479 /startest {true} def 1480 Cercle 1481 end 1401 1482 } def 1402 1483 … … 8836 8917 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8837 8918 8919 %%% les 3 procedures utilisees pour transformer les depots de AlgToPs en nombres 8920 /pstrickactionR3 { 8921 3 dict begin 8922 /len@3 exch def 8923 /len@2 exch def 8924 /len@1 exch def 8925 len@1 exec 8926 len@2 exec 8927 len@3 exec 8928 end 8929 } def 8930 8931 /pstrickactionR2 { 8932 exec exch exec exch 8933 } def 8934 8935 /pstrickactionR { 8936 exec 8937 } def 8938 8939 /gere_pst-deffunction { 8940 counttomark 8941 dup 1 eq { 8942 pop 8943 pstrickactionR 8944 ] aload pop 8945 } { 8946 2 eq { 8947 pstrickactionR2 8948 ] aload pop 8949 } { 8950 pstrickactionR3 8951 ] aload pop 8952 } ifelse 8953 } ifelse 8954 } def 8955 8838 8956 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 8839 8957 %%%% procedures pour \psSolid %%%% … … 9001 9119 /vecteur_en_c@urs false def 9002 9120 } ifelse 9003 dup action 9121 dup action cvx exec 9004 9122 noir 9005 9123 solidnumf length 0 ne { … … 9533 9651 setTimes 9534 9652 linecolor 9535 args definition cvx exec point3d 9653 action (none) eqstring not { 9654 args definition cvx exec point3d 9655 } if 9536 9656 texte args definition cvx exec pos (text3d) append cvx exec 9537 9657 tx@Dict /solidname known { … … 9540 9660 tx@Dict /solidname undef 9541 9661 } if 9542 9543 9662 grestore 9544 9663 } def … … 9559 9678 9560 9679 /gere_pstricks_proj_opt { 9561 /solidprojname where { 9562 /solidprojname get noface phi 9563 xorigine 0 eq 9564 yorigine 0 eq and 9565 zorigine 0 eq and 9566 xorigine isinteger not and 9567 yorigine isinteger not and 9568 yorigine isinteger not and { 9680 /planprojpst where { 9681 pop 9682 planprojpst projectionsifacevisible projpath 9683 /planprojpst where pop /planprojpst undef 9684 } { 9685 /solidprojname where { 9686 /solidprojname get noface phi 9687 xorigine 0 eq 9688 yorigine 0 eq and 9689 zorigine 0 eq and 9690 xorigine isinteger not and 9691 yorigine isinteger not and 9692 yorigine isinteger not and { 9693 } { 9694 [xorigine yorigine zorigine] ( ) astr2str 9695 } ifelse 9696 projectionsifacevisible solidprojpath 9569 9697 } { 9570 [xorigine yorigine zorigine] ( ) astr2str9698 xorigine yorigine zorigine [ normale ] projectionsifacevisible planprojpath 9571 9699 } ifelse 9572 projectionsifacevisible solidprojpath9573 } {9574 xorigine yorigine zorigine [ normale ] projectionsifacevisible planprojpath9575 9700 } ifelse 9576 9701 } def … … 9600 9725 } def 9601 9726 9727 /proj-pst-point { 9728 solidlinewidth setlinewidth 9729 % newpath 9730 linecolor 9731 xorigine yorigine point_ 9732 % gere_pstricks_proj_opt 9733 % linecolor 9734 planprojpst projectionsifacevisible projpath 9735 stroke 9736 } def 9737 9602 9738 /proj-pst-texte { 9603 9739 2 dict begin … … 9606 9742 newpath 9607 9743 linecolor 9608 texte 0 0 9744 texte 9745 /planprojpst where { 9746 pop 9747 xorigine yorigine 9748 } { 9749 0 0 9750 } ifelse 9609 9751 pos (text_) append cvx exec 9610 9752 gere_pstricks_proj_opt trunk/tests/index.txt
r61 r67 17 17 test_17 : point 18 18 test_18 : cylindre généralisé 19 19 test_19 : cône généralisé 20 test_20 : encapsulation des variables dans \defFunction 21 test_21 : def du plan de projection 22 test_22 : axesIIID trunk/tests/test_17.tex
r45 r67 33 33 pos=dr, 34 34 text=A, 35 action=none, 35 36 args=0 0 0]% 36 37 \end{pspicture*}
