[pstricks] multido

Zbigniew Nitecki zbigniew.nitecki at tufts.edu
Tue Feb 17 17:39:48 CET 2009


Thanks, that worked.  (My truly silly mistake was starting \ry at -0.1  
instead of -1.0.)

I thought I recalled some discussion that such things could also be  
clipped.  Can I somehow define a straight \psplot  for the function of  
two variables 4x^2+y^2, say over -1<x<1 and -1<y<1, and then clip the  
parts where z>0?

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/

On Feb 17, 2009, at 11:20, Michael Sharpe wrote:

>
> On Feb 17, 2009, at 7:31 AM, Zbigniew Nitecki wrote:
>
>> I am trying to plot the surface z=4x^2 +y^2 but only for values
>> z<=1;  I am trying to do this by
>> plotting a "vertical slice" at y=\ry via a multido.  What's wrong
>> with this code?
>>
>> 	\begin{pspicture}(-5,-5)(5,2)
>> 		\multido{\ry=-0.1+0.1}{19}{
>> 			\parametricplotThreeD(!%
>> 				0.5 1 \ry\space dup mul sub 0.5 exp mul neg,
>> 				0.5 1 \ry\space dup mul sub 0.5 exp mul){%
>> 					t %
>> 					\ry %
>> 					t dup mul 4 mul \ry\space dup mul add%
>> 				}
>> 		}
>> 	\end{pspicture}
>>
>>
>
> Try
>
> 	\begin{pspicture}(-5,-5)(5,2)
> 		\multido{\ry=-0.1+0.1}{11}{%<<<<<< 19->11, so you don't take square
> root of a negative num
> 			\parametricplotThreeD(% <<<< DROP !
> 				0.5 1 \ry\space dup mul sub 0.5 exp mul neg,
> 				0.5 1 \ry\space dup mul sub 0.5 exp mul){%
> 					t %
> 					\ry\space %<<<<<<<< ADD \space
> 					t dup mul 4 mul \ry\space dup mul add%
> 				}
> 		}
> 	\end{pspicture}
>
>
> Michael
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tug.org/pipermail/pstricks/attachments/20090217/74f79e6d/attachment.html 


More information about the PSTricks mailing list