[pstricks] some questions on pst-solide3d
Zbigniew Nitecki
zbigniew.nitecki at tufts.edu
Thu Jan 8 21:57:09 CET 2009
I beginning to learn (very slowly) the working of pst-solides3d, using
an adaptation of the Moebius band example on the melusine.eu.org
website. Here is the part of the code I am working on (the first line
makes sure TeXShop uses ghostscript+latex, not pdflatex; the
commented package calls are ones I might like to make later):
**************************************************************
%!TEX TS-program = latex
\listfiles
\documentclass[11pt]{article}
%\usepackage{amsmath, amssymb}
\usepackage[dvipsnames, svgnames]{pstricks}
\usepackage{pst-plot, pst-math, pst-3dplot}
\usepackage{pst-grad, pst-func, pst-text}
\usepackage{pstricks-add}
\usepackage{pst-solides3d}
%\usepackage{graphicsmacros}
%\usepackage{basicmacros}
%\usepackage{calculusmacros}
\title{Brief Article}
\author{The Author}
\begin{document}
\maketitle
\begin{figure}[htbp]
\begin{center}
\begin{pspicture}(-6,-3)(6,3)
\psset{unit=1.5}
\defFunction{mobius}(u,v)
{2 u v Cos mul add 2 v mul Cos mul}
{2 u v Cos mul add 2 v mul Sin mul}
{u v Sin mul}
\psset[pst-solides3d]{viewpoint=20 10 5,Decran=40,lightsrc=0 10 10}
\psSolid[object=surfaceparametree,linewidth=0.75\pslinewidth,
base=0.2 0.25 0 pi,linewidth=0.1,
function=mobius,
ngrid=.025]
\psSolid[object=surfaceparametree,linewidth=0.75\pslinewidth,
base=-0.25 -0.2 0 pi,linewidth=0.1,
function=mobius,
ngrid=.025]
\psSolid[object=surfaceparametree, linewidth=0.5\pslinewidth,
base=-0.25 0.25 0 pi, fillcolor=lightgray!50, incolor=white!50,
function=mobius,
ngrid=.05]
\end{pspicture}
\caption{Moebius Band}
\label{fig:Moebius}
\end{center}
\end{figure}
\end{document}
*******************************************************************************************
This creates a reasonable facsimile of the picture on the website
(except that I have changed th e colors, and added a lightsource---a
primary reason to use this package).
However, several items puzzle me:
1. Where do the limits on the parameters u and v get set? If I want
the width of the band to
change, where do I modify the code?
2. what does the !50 after the colors do?
3. What is the role of base=...?
Zbigniew Nitecki
Department of Mathematics
Tufts University
Medford, MA 02155
telephones:
Office (617)627-3843
Dept. (617)627-3234
Dept. fax (617)627-3966
http://www.tufts.edu/~znitecki/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090108/822e2c21/attachment.html
More information about the PSTricks
mailing list