| | 784 | %% axisemph |
|---|
| | 785 | %% thanks to Herbert Voss |
|---|
| | 786 | \define@boolkey[psset]{pst-solides3d}[Pst@]{showOrigin}[true]{} |
|---|
| | 787 | \define@boolkey[psset]{pst-solides3d}[Pst@]{mathLabel}[true]{} |
|---|
| | 788 | \psset[pst-solides3d]{showOrigin,mathLabel}% |
|---|
| | 789 | |
|---|
| | 790 | \def\pst@solides@axisnames@i#1,#2,#3,#4\@nil{% |
|---|
| | 791 | \def\pst@solides@axesIIID@xname{#1} |
|---|
| | 792 | \def\pst@solides@axesIIID@yname{#2} |
|---|
| | 793 | \def\pst@solides@axesIIID@zname{#3}} |
|---|
| | 794 | |
|---|
| | 795 | \define@key[psset]{pst-solides3d}{axisnames}{% |
|---|
| | 796 | \expandafter\pst@solides@axisnames@i#1,,,\@nil}% |
|---|
| | 797 | \psset[pst-solides3d]{axisnames={x,y,z}} |
|---|
| | 798 | |
|---|
| | 799 | \define@key[psset]{pst-solides3d}{axisemph}{% |
|---|
| | 800 | \def\pst@solides@axesIIID@emph{#1}} |
|---|
| | 801 | \psset[pst-solides3d]{axisemph=} |
|---|
| | 802 | |
|---|
| 786 | | % #1 rayon |
|---|
| 787 | | % #2 longitude |
|---|
| 788 | | % #3 latitude |
|---|
| 789 | | \pst@killglue% |
|---|
| 790 | | \begingroup% |
|---|
| 791 | | \use@par% |
|---|
| 792 | | \psPoint(0,0,0){O} |
|---|
| 793 | | \psPoint(#1,0,0){X} |
|---|
| 794 | | \psPoint(0,#2,0){Y} |
|---|
| 795 | | \psPoint(0,0,#3){Z} |
|---|
| 796 | | \psPoint(#4,0,0){X'} |
|---|
| 797 | | \psPoint(0,#5,0){Y'} |
|---|
| 798 | | \psPoint(0,0,#6){Z'} |
|---|
| 799 | | \psline[linestyle=dashed](O)(X) |
|---|
| 800 | | \psline[linestyle=dashed](O)(Y) |
|---|
| 801 | | \psline[linestyle=dashed](O)(Z) |
|---|
| 802 | | \psline{->}(X)(X') |
|---|
| 803 | | \psline{->}(Y)(Y') |
|---|
| 804 | | \psline{->}(Z)(Z') |
|---|
| 805 | | % \psdots(X)(Y)(Z) |
|---|
| 806 | | % \uput[l](O){$O$} |
|---|
| 807 | | \uput[dl](X'){$x$}\uput[r](Y'){$y$} |
|---|
| 808 | | \uput[u](Z'){$z$} |
|---|
| | 805 | \pst@killglue% |
|---|
| | 806 | \begingroup% |
|---|
| | 807 | \addbefore@par{arrows=->}% |
|---|
| | 808 | \use@par% |
|---|
| | 809 | \psPoint(0,0,0){O} |
|---|
| | 810 | \psPoint(#1,0,0){X} |
|---|
| | 811 | \psPoint(0,#2,0){Y} |
|---|
| | 812 | \psPoint(0,0,#3){Z} |
|---|
| | 813 | \psPoint(#4,0,0){X'} |
|---|
| | 814 | \psPoint(0,#5,0){Y'} |
|---|
| | 815 | \psPoint(0,0,#6){Z'} |
|---|
| | 816 | \psPoint(#4 \pst@number\pslabelsep \pst@number\psunit div add,0, 0) |
|---|
| | 817 | {Xname} |
|---|
| | 818 | \psPoint(0, #5 \pst@number\pslabelsep \pst@number\psunit div add, 0) |
|---|
| | 819 | {Yname} |
|---|
| | 820 | \psPoint(0, 0, #6 \pst@number\pslabelsep \pst@number\psunit div add) |
|---|
| | 821 | {Zname} |
|---|
| | 822 | \ifPst@showOrigin |
|---|
| | 823 | \psline[linestyle=dashed,arrows=-](O)(X) |
|---|
| | 824 | \psline[linestyle=dashed,arrows=-](O)(Y) |
|---|
| | 825 | \psline[linestyle=dashed,arrows=-](O)(Z) |
|---|
| | 826 | \fi |
|---|
| | 827 | \psline(X)(X') |
|---|
| | 828 | \psline(Y)(Y') |
|---|
| | 829 | \psline(Z)(Z') |
|---|
| | 830 | \rput(Xname){\ifPst@mathLabel$\fi\pst@solides@axesIIID@emph |
|---|
| | 831 | \pst@solides@axesIIID@xname\ifPst@mathLabel$\fi} |
|---|
| | 832 | \rput(Yname){\ifPst@mathLabel$\fi\pst@solides@axesIIID@emph |
|---|
| | 833 | \pst@solides@axesIIID@yname\ifPst@mathLabel$\fi} |
|---|
| | 834 | \rput(Zname){\ifPst@mathLabel$\fi\pst@solides@axesIIID@emph |
|---|
| | 835 | \pst@solides@axesIIID@zname\ifPst@mathLabel$\fi} |
|---|