[pstricks] U tube
orodrig at ualg.pt
orodrig at ualg.pt
Fri Feb 19 18:04:39 CET 2016
Thanks Manfred! You not only spotted the typo as also found a solution
way better than mine (this why you are called wizards). The tube looks
perfect now.
Best regards
Orlando
Citando pstricks-request at tug.org:
> Send PSTricks mailing list submissions to
> pstricks at tug.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://tug.org/mailman/listinfo/pstricks
> or, via email, send a message with subject or body 'help' to
> pstricks-request at tug.org
>
> You can reach the person managing the list at
> pstricks-owner at tug.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of PSTricks digest..."
>
>
> Today's Topics:
>
> 1. U tube (orodrig at ualg.pt)
> 2. pstricks-add and the \psplotTangent* command (Jacques RUBIN)
> 3. Re: U tube (Manfred Braun)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Fri, 19 Feb 2016 14:08:03 +0100
> From: <orodrig at ualg.pt>
> To: <pstricks at tug.org>
> Subject: [pstricks] U tube
> Message-ID: <20160219140803.210534csxwo7hd4k at wmail.ualg.pt>
> Content-Type: text/plain; charset="ISO-8859-1"; delsp=Yes;
> format=flowed
>
> Dear wizards of PStricks, please enlighten me with your wisdom: I'm
> trying to create a U shaped tube with the following code:
>
> \begin{pspicture}(-6,-6)(6,6)
> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](-2.5,0)(-2,2)
> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](2,0)(2.4,4)
> \psline[linewidth=1mm,linecolor=black]{-}(-2.5,0)(-2.5,5)
> \psline[linewidth=1mm,linecolor=black]{-}(2.5,0)(2.5,5)
> \psline[linewidth=1mm,linecolor=black]{-}(-2,0)(-2,5)
> \psline[linewidth=1mm,linecolor=black]{-}(2,0)(2,5)
> \psline[linewidth=0.5mm,linecolor=black]{-}(-2.5,2)(-2,2)
> \psline[linewidth=0.5mm,linecolor=black]{-}(2,4)(2.5,4)
> \psline[linewidth=0.5mm,linecolor=black,linestyle=dashed,dash=5mm
> 2mm]{-}(-3.5,3)(3.5,3)
> \psline[linewidth=1mm,linecolor=black]{<->}(-3,2)(-3,3)
> \psline[linewidth=1mm,linecolor=black]{<->}(3,3)(3,4)
> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=hlines](0,0){2.5}{180}{0}
> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=solid,fillcolor=white](0,0){2}{180}{0}
> \rput{0}(-4,2.5){\scalebox{1.5}{$-\Delta z$}}
> \rput{0}(4,3.5){\scalebox{1.5}{$\Delta z$}}
> \end{pspicture}
>
> It does the job, but for some weird reason either gv and acrobat
> display some "artifacts", like lines with different widths or
> non-continuous filling of the tube and arc. How can I merge all line
> and arc segments and do the filling properly? Thanks in advance
> (whatever the answer is).
>
> Best regards
>
> Orlando Camargo Rodr?guez
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>
>
>
> ------------------------------
>
> Message: 2
> Date: Fri, 19 Feb 2016 16:09:54 +0100
> From: Jacques RUBIN <jac.rub at gmail.com>
> To: <pstricks at tug.org>
> Subject: [pstricks] pstricks-add and the \psplotTangent* command
> Message-ID: <56C73042.7060405 at gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi!
>
> I made the following code which works fine with PSTricks and the multido
> package.
> But..., in the "pstricks-add" documentation, it is written that the star
> version \psplotTangent* of the command \psplotTangent plots only the
> tangent line in the positive x-direction. But that is wrong. It plots
> only the tangent line in the positive y-direction instead, and it makes
> this command completely unusable. It is really a bug.
> Could it be rapidly corrected?
>
> Best regards
>
> Jacques
>
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> %
> \begin{pspicture}
> %
> \psset{unit=1}
> %
> \psparametricplot[algebraic,arrows=->,arrowsize=4pt 2,linecolor=blue]%
> {1.4}{10.6}{(t^2)/9 | sin(t)+1}%
> %
> \pscurvepoints{2}{11}{(t^2)/9 | sin(t)+1}{P}%
> \pspolylineticks[metricInitValue=1,ticksize=-2pt 2pt,%
> Os=1,Ds=.2,linecolor=red]{P}{ ds }{1}{66}
> %
>
>
> \pspolylineticks[metricInitValue=1,Os=1,Ds=2,linewidth=1pt,ticksize=-4pt
> 4pt,%
> linecolor=Green!40]{P}{ ds }{0}{7}%
> \multido{\iA=1+1,\iB=3+2}{6}{%
> \uput{6pt}[d](PTick\iA){\tiny \iB}%
> }
> %
> \def\P{sin(sqrt(9*x))+1}
> \def\Pd{cos(sqrt(9*x))*0.5*sqrt(9/x)}
> \multido{\n=1+2}{6}{\psplotTangent*[algebraic,%
>
> arrows=->,linecolor=orange,linewidth=.5pt,Derive=\Pd]{\n}{1}{\P}}
> %
> \uput{13pt}[r]{0}(PTick66){ $s$ }
> %
>
> \end{pspicture}
> %
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <http://tug.org/pipermail/pstricks/attachments/20160219/83ec94ba/attachment-0001.html>
>
> ------------------------------
>
> Message: 3
> Date: Fri, 19 Feb 2016 17:54:56 +0200
> From: Manfred Braun <manfred.braun at uni-due.de>
> To: Graphics with PSTricks <pstricks at tug.org>
> Subject: Re: [pstricks] U tube
> Message-ID: <6CF698E5-98E1-4AD8-902B-E320859AA98A at uni-due.de>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Dear Orlando,
> On my system your code works fine. The only thing is that your
> hatched frame ends at x = 2.4 instead of x = 2.5 (the second
> \psframe command). I suppose that this is just a typo.
> Nevertheless I would write it differently. There are several ways to
> do it, for instance
>
> \begin{pspicture}(-6,-6)(6,6)
> \pscustom[linestyle=none, fillstyle=hlines]{%
> \psline(-2,0)(-2,2)(-2.5,2)(-2.5,0)
> \psarc(0,0){2.5}{180}{0}
> \psline(2.5,0)(2.5,4)(2,4)(2,0)
> \psarcn(0,0){2}{0}{180}
> }
> \psset{linewidth=1mm}
> \psline(-2,0)(-2,5)
> \psline(-2.5,5)(-2.5,0)
> \psarc(0,0){2.5}{180}{0}
> \psline(2.5,0)(2.5,5)
> \psline(2,5)(2,0)
> \psarcn(0,0){2}{0}{180}
> \psset{linewidth=0.5mm}
> \psline[linestyle=dashed, dash=5mm 2mm](-3.5,3)(3.5,3)
> \psline(-3.5,2)(-2,2) \psline(2,4)(3.5,4)
> \psset{arrowsize=2pt 2, arrowlength=2, arrowinset=0.1}
> \psline{<->}(-3.25,2)(-3.25,3) \psline{<->}(3.25,3)(3.25,4)
> \Large
> \rput[r](-3.5,2.5){$-\Delta z$} \rput[l](3.5,3.5){$\Delta z$}
> \end{pspicture}
>
> The \pscustom command allows you to generate an arbitrary closed
> line composed of straight lines, arcs, or even curves. The enclosed
> area can be filled in whatever style.
> Manfred
>
>> On 19 Feb 2016, at 15:08, orodrig at ualg.pt wrote:
>>
>> Dear wizards of PStricks, please enlighten me with your wisdom: I'm
>> trying to create a U shaped tube with the following code:
>>
>> \begin{pspicture}(-6,-6)(6,6)
>> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](-2.5,0)(-2,2)
>> \psframe[linewidth=0mm,linecolor=white,fillstyle=hlines](2,0)(2.4,4)
>> \psline[linewidth=1mm,linecolor=black]{-}(-2.5,0)(-2.5,5)
>> \psline[linewidth=1mm,linecolor=black]{-}(2.5,0)(2.5,5)
>> \psline[linewidth=1mm,linecolor=black]{-}(-2,0)(-2,5)
>> \psline[linewidth=1mm,linecolor=black]{-}(2,0)(2,5)
>> \psline[linewidth=0.5mm,linecolor=black]{-}(-2.5,2)(-2,2)
>> \psline[linewidth=0.5mm,linecolor=black]{-}(2,4)(2.5,4)
>> \psline[linewidth=0.5mm,linecolor=black,linestyle=dashed,dash=5mm
>> 2mm]{-}(-3.5,3)(3.5,3)
>> \psline[linewidth=1mm,linecolor=black]{<->}(-3,2)(-3,3)
>> \psline[linewidth=1mm,linecolor=black]{<->}(3,3)(3,4)
>> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=hlines](0,0){2.5}{180}{0}
>> \psarc[linewidth=1mm,linecolor=black,arrows=-,fillstyle=solid,fillcolor=white](0,0){2}{180}{0}
>> \rput{0}(-4,2.5){\scalebox{1.5}{$-\Delta z$}}
>> \rput{0}(4,3.5){\scalebox{1.5}{$\Delta z$}}
>> \end{pspicture}
>>
>> It does the job, but for some weird reason either gv and acrobat
>> display some "artifacts", like lines with different widths or
>> non-continuous filling of the tube and arc. How can I merge all
>> line and arc segments and do the filling properly? Thanks in
>> advance (whatever the answer is).
>>
>> Best regards
>>
>> Orlando Camargo Rodr?guez
>>
>> ----------------------------------------------------------------
>> This message was sent using IMP, the Internet Messaging Program.
>>
>>
>> _______________________________________________
>> PSTricks mailing list
>> PSTricks at tug.org
>> http://tug.org/mailman/listinfo/pstricks
>> archive: http://www.tug.org/pipermail/pstricks/
>>
>
>
>
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
>
> ------------------------------
>
> End of PSTricks Digest, Vol 157, Issue 1
> ****************************************
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the PSTricks
mailing list