diff --git a/pstricks/sphere-sphere/Makefile b/pstricks/sphere-sphere/Makefile new file mode 100644 index 0000000..abc5a97 --- /dev/null +++ b/pstricks/sphere-sphere/Makefile @@ -0,0 +1,37 @@ +SOURCE = sphere-sphere +DELAY = 80 +DENSITY = 300 +WIDTH = 512 + +make: + latex $(SOURCE).tex -output-format=pdf + dvips -D600 $(SOURCE).dvi -o $(SOURCE).ps + ps2pdf $(SOURCE).ps $(SOURCE).pdf + make clean + +clean: + rm -rf $(TARGET) *.class *.html *.log *.aux *.data *.gnuplot *.dvi *.ps + +gif: + pdfcrop $(SOURCE).pdf + convert -verbose -delay $(DELAY) -loop 0 -density $(DENSITY) $(SOURCE)-crop.pdf $(SOURCE).gif + make clean + +png: + make + make svg + inkscape $(SOURCE).svg -w $(WIDTH) --export-png=$(SOURCE).png + +transparentGif: + convert $(SOURCE).pdf -transparent white result.gif + make clean + +svg: + make + #inkscape $(SOURCE).pdf --export-plain-svg=$(SOURCE).svg + pdf2svg $(SOURCE).pdf $(SOURCE).svg + # Necessary, as pdf2svg does not always create valid svgs: + inkscape $(SOURCE).svg --export-plain-svg=$(SOURCE).svg + rsvg-convert -a -w $(WIDTH) -f svg $(SOURCE).svg -o $(SOURCE)2.svg + inkscape $(SOURCE)2.svg --export-plain-svg=$(SOURCE).svg + rm $(SOURCE)2.svg diff --git a/pstricks/sphere-sphere/Readme.md b/pstricks/sphere-sphere/Readme.md new file mode 100644 index 0000000..7b49e65 --- /dev/null +++ b/pstricks/sphere-sphere/Readme.md @@ -0,0 +1,9 @@ +This is an example from `pst-solides3d` documentation. + +Compiled example +---------------- +![Example](sphere-sphere.png) + +Credits +------- +Thanks to [Herbert](http://tex.stackexchange.com/users/2478/herbert) ([answer](http://tex.stackexchange.com/a/121906/5645)) diff --git a/pstricks/sphere-sphere/sphere-sphere.png b/pstricks/sphere-sphere/sphere-sphere.png new file mode 100644 index 0000000..032f9a9 Binary files /dev/null and b/pstricks/sphere-sphere/sphere-sphere.png differ diff --git a/pstricks/sphere-sphere/sphere-sphere.tex b/pstricks/sphere-sphere/sphere-sphere.tex new file mode 100644 index 0000000..88dd7ce --- /dev/null +++ b/pstricks/sphere-sphere/sphere-sphere.tex @@ -0,0 +1,15 @@ +\documentclass[pstricks,border=2pt]{standalone} +\usepackage{pst-solides3d} +\begin{document} + +\begin{pspicture}(-4.5,-4)(5.5,2) +\psset{solidmemory,unit=0.55, + lightsrc=viewpoint,viewpoint=20 20 20 rtp2xyz,Decran=40} +\psSolid[object=sphere,r=2,ngrid=36 36,fillcolor=lightgray, + incolor=lightgray,hollow,name=sph1,action=none](3,0,0) +\psSolid[object=sphere,r=2,ngrid=36 36,fillcolor=lightgray, + incolor=lightgray,hollow,name=sph2,action=none](1,3,0) +\psSolid[object=fusion,base=sph1 sph2,opacity=0.5,action=draw**](0,0,0) +\end{pspicture} + +\end{document}