[pstricks] psbezier end C ends

mathias legrand legrand.mathias at gmail.com
Tue Jun 15 14:07:45 CEST 2010


>     1. psbezier end C ends (mathias legrand)
>
>    
>> is there a way to control the length of the extension of extended square
>> ends of psbezier curves ?
>> \psbezier{C-C}(......)
>>      
> the "arrow" C is defined as
>
> \def\psas at C{2 \psas@@c}
> \def\psas@@c{%
>    setlinecap
>    0 0 moveto
>    0 0.1 L % changed value from 0.5 to 0.1
>    stroke
>    0 0 moveto }
>
> you can simply redefine it.
>
> Herbert
>    

Nice ! Thanks. Here is my final figure. Do you think there isa better 
strategy to get something similar ?

\documentclass[fleqn]{article}
\usepackage{lmodern}
\usepackage{pstricks-add}

\makeatletter
\def\psas@@c{%
   setlinecap
   0 0 moveto
   0 -2 L % changed value from 0.5 to 0.1
   stroke
   0 0 moveto }
\makeatother

\begin{document}

\begin{figure}[htb]
\centering
\psset{xunit=1.1,yunit=1.1,arrowinset=0,arrowlength=2,arrowsize=1.5pt 3}
\begin{pspicture}(0,-4.98)(11.56,4.96)
%\psgrid
\psframe[linewidth=0.04,dimen=outer,fillstyle=vlines](11,4.5)(0.4,-4.8)
\psbezier[linewidth=0.04,fillstyle=solid,fillcolor=white,linewidth=0pt,linecolor=white](5.66,4.18)(6.69,4.2)(6.89,3)(7.78,2.82)(8.66,2.57)(9.95,3.15)(10.54,2.34)(11.12,1.52)(9.454041,1.07)(9.32,0.08)(9.18,-0.91)(10.53,-2.6)(9.9,-3.38)(9.26,-4.15)(7.85,-3)(7.42,-2.98)(6.98,-2.95)(5.64,-4.96)(3.94,-4.3)(2.24,-3.64)(3.44,-1.42)(3.24,-1.1)(3.04,-0.78)(1.01,-0.49)(1.08,0.52)(1.14,1.53)(3.38,1.57)(4.14,2.24)(4.89,2.9)(4.62,4.15)(5.66,4.18)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](5.56,3.68)(6.05,3.75)(5.7,3.14)(6.08,3.04)(6.46,2.94)(6.61,3.31)(6.82,2.92)(7.02,2.52)(6.38,2.62)(6.42,2.34)(6.46,2.06)(6.75,1.8)(6.38,1.56)(6,1.31)(6.06,1.84)(5.78,1.94)(5.49,2.03)(5.1,1.62)(4.86,2.12)(4.62,2.62)(5.12,2.36)(5.3,2.68)(5.48,3.0)(5.06,3.6)(5.56,3.68)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](8.36,-2.18)(8.6,-1.94)(8.52,-1.74)(8.78,-1.82)(9.04,-1.9)(8.96,-2.48)(9.16,-2.74)(9.36,-3.0)(9.18,-3.08)(8.6,-3.02)(8.02,-2.96)(7.96,-2.82)(8.02,-2.5)(8.08,-2.18)(8.12,-2.42)(8.36,-2.18)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](9.08,2.12)(9.43,2.15)(9.76,2.54)(9.9,2.0)(10.04,1.46)(9.61,1.64)(9.12,1.62)(8.62,1.59)(8.45,1.34)(8.48,1.88)(8.5,2.41)(8.72,2.08)(9.08,2.12)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](4.78,-0.94)(5.16,-0.95)(4.98,-1.77)(5.16,-1.86)(5.33,-1.94)(5.86,-1.18)(6.08,-1.42)(6.3,-1.66)(5.62,-1.99)(5.66,-2.18)(5.69,-2.36)(6.64,-2.06)(6.64,-2.46)(6.64,-2.86)(5.59,-2.57)(5.48,-2.7)(5.36,-2.82)(6.26,-3.36)(5.98,-3.66)(5.69,-3.95)(5.3,-3.06)(5.08,-3.12)(4.86,-3.18)(4.84,-3.9)(4.44,-3.74)(4.04,-3.58)(4.82,-2.82)(4.66,-2.68)(4.5,-2.54)(3.72,-3.42)(3.54,-3.0)(3.36,-2.58)(4.24,-2.4)(4.26,-2.22)(4.28,-2.04)(3.48,-1.78)(3.7,-1.5)(3.92,-1.22)(4.32,-1.82)(4.5,-1.7)(4.68,-1.58)(4.39,-0.92)(4.78,-0.94)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](3.8,1.5)(4.32,1.51)(4.27,1.06)(4.68,1.0)(5.08,0.93)(5.98,0.87)(5.9,0.32)(5.81,-0.23)(1.7,-0.24)(1.52,0.36)(1.34,0.96)(2.6,0.6)(2.98,0.94)(3.36,1.28)(3.27,1.48)(3.8,1.5)
\psbezier[linewidth=0.04,fillstyle=vlines,linewidth=0pt,linecolor=white](8.04,1.06)(8.24,0.94)(8,0.63)(8.22,0.54)(8.44,0.44)(8.57,0.52)(8.6,0.3)(8.62,0.07)(8.4,0.19)(8.24,-0.08)(8.07,-0.35)(8.56,-0.54)(8.42,-0.7)(8.28,-0.86)(8.1,-0.72)(7.82,-0.68)(7.54,-0.64)(7.38,-1.14)(7.18,-0.94)(6.98,-0.74)(7.4,-0.58)(7.24,-0.32)(7.08,-0.06)(6.64,-0.42)(6.56,-0.12)(6.48,0.18)(6.94,0.06)(7.02,0.36)(7.1,0.66)(6.7,0.84)(6.88,0.98)(7.06,1.12)(7.21,0.77)(7.42,0.78)(7.62,0.78)(7.84,1.18)(8.04,1.06)
\psbezier[linewidth=0.04]{c->}(9.64,1.16)(10.24,1.56)(10.44,1.96)(10.24,2.36)(10.04,2.76)(8.04,2.56)(7.44,2.16)
\psbezier[linewidth=0.04]{c->}(7.44,2.16)(6.84,1.76)(6.44,-0.04)(5.64,-0.24)(4.84,-0.44)(3.24,-1.24)(3.24,-2.44)
\psbezier[linewidth=0.04]{c->}(3.24,-2.44)(3.24,-3.24)(4.12,-4.84)(5.64,-4.04)(7.15,-3.23)(7.2,-1.67)(6.44,-1.04)
\psbezier[linewidth=0.04]{c->}(6.44,-1.04)(5.64,-0.44)(1.31,-0.83)(1.24,0.36)(1.16,1.55)(4.04,1.76)(4.84,1.56)
\psbezier[linewidth=0.04]{c->}(4.84,1.56)(5.64,1.36)(6.04,0.76)(6.44,-0.44)(6.84,-1.64)(9.44,-1.44)(9.64,-2.24)
\psbezier[linewidth=0.04]{c->}(9.64,-2.24)(9.84,-3.04)(9.64,-3.24)(8.84,-3.24)(8.04,-3.24)(7.24,-2.64)(7.84,-1.84)(8.44,-1.04)(9.04,0.76)(9.64,1.16)
%\psbezier[linewidth=0.04,ArrowInside=->,ArrowInsidePos=6,showpoints=true](10.24,2.36)(9.84,2.76)(8.15,2.48)(7.24,1.88)(6.32,1.27)(6.45,0.52)(5.72,-0.2)(4.98,-0.92)(3.78,-0.76)(3.42,-1.68)(3.05,-2.59)(3.17,-3.71)(4.08,-4.1)(4.98,-4.48)(6.51,-3.815)(6.78,-2.84)(7.04,-1.86)(6.4,-0.86)(5.42,-0.46)(4.44,-0.06)(1.481,-0.66)(1.3,0.22)(1.11,1.1)(2.32,0.98)(3.16,1.48)(4.0,1.98)(4.4,1.85)(5.28,1.44)(6.15,1.02)(6.32,-0.8)(7.22,-1.26)(8.11,-1.71)(8.42,-1.32)(9.0,-1.48)(9.58,-1.64)(9.86,-2.42)(9.8,-2.88)(9.74,-3.34)(7.88,-3.36)(7.72,-2.78)(7.55,-2.19)(8.53,-1.16)(8.82,-0.56)(9.1,0)(9.04,0.54)(9.54,1.0)(10.04,1.46)(10.64,1.96)(10.24,2.36)
\end{pspicture}
\end{figure}

\end{document}


More information about the PSTricks mailing list