Changeset 44

Show
Ignore:
Timestamp:
06/13/08 08:46:50 (7 months ago)
Author:
jpv
Message:

Ajout rotate/translate sur type plan

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/solides.pro

    r43 r44  
    11%! 
    22% PostScript prologue for pst-solides3d.tex. 
    3 % Version 3.29, 2008/06/12 
     3% Version 3.30, 2008/06/13 
    44% 
    55%% COPYRIGHT 2008 by Jean-Paul Vignault, Manuel Luque 
     
    1062106210 dict begin 
    10631063gsave 
     1064   dup isbool { 
     1065      /mybool exch def 
     1066   } { 
     1067      /mybool true def 
     1068   } ifelse 
    10641069   /l@pl@n exch def 
    10651070   /savestroke {SolidesDict /stroke get exec} def 
    1066    /stroke {l@pl@n projpath savestroke} def 
     1071   /stroke {l@pl@n mybool projpath savestroke} def 
    10671072   /savefill {SolidesDict /fill get exec} def 
    1068    /fill {l@pl@n projpath savefill} def 
     1073   /fill {l@pl@n mybool projpath savefill} def 
    10691074} def 
    10701075/eprojscene { 
     
    29522957%   dup isarray 
    29532958%      {/vect_echelle exch def} 
    2954 %   if 
    2955 %   CamView vect_echelle {angle_de_rot} 
     2959%   if%   CamView vect_echelle {angle_de_rot} 
    29562960   3dto2d 
    29572961} def 
     
    55925596/planshowbase { 
    559355973 dict begin 
     5598   dup isbool { 
     5599      /mybool exch def 
     5600   } { 
     5601      /mybool true def 
     5602   } ifelse 
    55945603   dup isstring { 
    55955604      /couleur2 exch def 
     
    56035612      /couleur2 (vert) def 
    56045613   } ifelse 
    5605    bprojscene 
     5614   mybool bprojscene 
    56065615      couleur1 cvx exec 
    56075616      newpath 
     
    56305639/planshowbase3d { 
    563156407 dict begin 
     5641   dup isbool { 
     5642      /mybool exch def 
     5643   } { 
     5644      /mybool true def 
     5645   } ifelse 
    56325646   dup dup isarray exch isplan not and { 
    56335647      /table exch def 
     
    56545668   } ifelse 
    56555669   /plan exch def 
    5656    plan couleur1 couleur2 planshowbase 
     5670   plan couleur1 couleur2 mybool planshowbase 
    56575671   plan plangetorigine /I defpoint3d 
    56585672   plan plangetbase 
     
    56645678   solidgridOff 
    56655679   drawsolid** 
     5680end 
     5681} def 
     5682 
     5683%% syntaxe : plantype x y z plantranslate --> - 
     5684/plantranslate { 
     56854 dict begin 
     5686   /M defpoint3d 
     5687   /plan exch def 
     5688   plan isplan not { 
     5689      (Erreur : mauvais type d argument dans plantranslate) == 
     5690      quit 
     5691   } if 
     5692   plan plan plangetorigine M addv3d planputorigine 
     5693end 
     5694} def 
     5695 
     5696% syntaxe : alpha_x alpha_y alpha_z rotateOpplan --> - 
     5697/rotateOplan { 
     56984 dict begin 
     5699   /Rxyz defpoint3d 
     5700   /plan exch def 
     5701   plan isplan not { 
     5702      (Erreur : mauvais type d argument dans rotateOplan) == 
     5703      quit 
     5704   } if 
     5705   plan plan plangetorigine Rxyz rotateOpoint3d planputorigine 
     5706 
     5707   plan plangetbase 0 getp3d /U defpoint3d 
     5708   plan plangetbase 1 getp3d /V defpoint3d 
     5709   plan [ 
     5710      U Rxyz rotateOpoint3d 
     5711      V Rxyz rotateOpoint3d 
     5712   ] planputbase 
    56665713end 
    56675714} def 
     
    58285875/segment_inter_plan { 
    582958764 dict begin 
     5877   dup isplan {plan2eq} if 
    58305878   /plan exch def 
    58315879   plan aload pop 
     
    91739221      } if 
    91749222   } if 
     9223%   dup RotX RotY RotZ rotateOplan 
    91759224   /l@pl@n exch def 
    91769225   l@pl@n newplan 
    91779226   gere_pstricks_opt 
    91789227%   noir 
     9228   l@pl@n RotX RotY RotZ rotateOplan 
     9229   l@pl@n CX CY CZ plantranslate 
    91799230   setTimes 
    9180    solidplanmarks {l@pl@n planmarks} if 
    9181    solidplangrid {l@pl@n planquadrillage} if 
    9182    solidshowbase {l@pl@n planshowbase} if 
    9183    solidshowbase3d {l@pl@n planshowbase3d} if 
     9231   solidplanmarks {l@pl@n projectionsifacevisible planmarks} if 
     9232   solidplangrid {l@pl@n projectionsifacevisible planquadrillage} if 
     9233   solidshowbase {l@pl@n projectionsifacevisible planshowbase} if 
     9234   solidshowbase3d {l@pl@n projectionsifacevisible planshowbase3d} if 
    91849235} def 
    91859236 
  • trunk/tests/test_10.tex

    r43 r44  
    6161] 
    6262\psSolid[object=load, 
     63   deactivatecolor, 
    6364   load=test1](-3,-2,-1) 
    6465\psSolid[object=load, 
     66   deactivatecolor, 
    6567   plansepare={[0 0 1 -2]}, 
    6668   load=test0, 
     
    6870   action=none] 
    6971\psSolid[object=load, 
     72   deactivatecolor, 
    7073   load=double1, 
    7174   numfaces=all] 
    7275\psSolid[object=load, 
     76   deactivatecolor, 
    7377   load=double0](0,0,2) 
    7478\composeSolid 
  • trunk/tests/test_11.tex

    r34 r44  
    212212%% } 
    213213\end{pspicture*} 
     214\end{center} 
     215 
     216\newpage 
     217 
     218\section {Translation, rotations} 
     219 
     220\begin{center} 
     221% fabrique du bi-cone 
     222%\codejps{ 
     223%-5 3 0 [18 60] newcone 
     224% 5 3 0 [18 60] newcone 
     225% dup solidfacesreverse 
     226% solidfuz 
     227%(bicone) writesolidfile 
     228% } 
     229\begin{pspicture}(-5,-6)(8,7) 
     230\psset{SphericalCoor=true,viewpoint=50 -30 20,Decran=50}% 
     231\psframe[fillstyle=solid,fillcolor=gray!50](-5,-6)(8,7)% 
     232\psSolid[object=grille,base=-4 4 -4 8,linecolor={[rgb]{0.72 0.72 0.5}}](0,0,-5)% 
     233\psSolid[object=plan,action=draw, 
     234   definition=equation, 
     235   visibility=false, 
     236   RotZ=90, 
     237   plangrid, 
     238   args={[1 0 0 0] 90}, 
     239   base=-3 3 -6 5,planmarks,showBase]% 
     240%% \psSolid[object=plan,action=draw, 
     241%%    definition=equation,%RotZ=90, 
     242%%    args={[1 0 0 -0.25] 90}, 
     243%%    base=-3 3 -6 5,planmarks,showBase](0,5,1)% 
     244%\axesIIID[linecolor=blue](0,0,0)(4,3,6)% 
     245\end{pspicture} 
    214246\end{center} 
    215247 
  • trunk/tests/test_13.tex

    r28 r44  
    2626\psframe(-5,-4)(6,9) 
    2727\psSolid[object=cube, 
    28    action=draw
     28   action=draw*
    2929   intersectiontype=0, 
    3030   intersectionplan={[1 0 .5 2] [1 0 .5 -1]}, 
     
    3232   intersectioncolor=(bleu) (rouge), 
    3333%   hollow=true, 
    34 %   fillcolor=yellow, 
    35 %   incolor=red, 
     34   fillcolor=yellow, 
     35   incolor=red, 
    3636%   numfaces=all, 
    3737%   rm=4,