[pstricks] buildcycle in pstricks?
Jean Magnan de Bornier
jean at bornier.net
Wed Feb 23 11:43:55 CET 2005
Herbert Voss wrote:
> Jean Magnan de Bornier wrote:
>
>> Pstricks fills several triangles, defined by the intersections and the
>> ends of the lines. How can I restrict the filling to the one triangle
>> defined by the intersections?
>
>
> Write a new macro
>
> Herbert
>
>
> \listfiles
> \documentclass{article}
> \usepackage{pstricks}
> \usepackage{pst-3dplot}
> \makeatletter
> \def\pstriangleA{\pst at object{pstriangleA}}
> \def\pstriangleA at i(#1)(#2)(#3)(#4)(#5)(#6){{%
> \use at par
> \psline(#1)(#2)\psline(#3)(#4)\psline(#5)(#6)
> \ABinterCD(#1)(#2)(#3)(#4){A}
> \ABinterCD(#1)(#2)(#5)(#6){B}
> \ABinterCD(#5)(#6)(#3)(#4){C}
> \pspolygon(A)(B)(C)
> }}
> \makeatother
>
> \begin{document}
>
> \begin{pspicture}(7,7)
> \psaxes[Ox=0.8,Dx=5,Oy=0,Dy=5]{<->}(1,1)(6,6)
> \pstriangleA[fillstyle=solid,fillcolor=red]%
> (1.98,2.38)(1.98,5)(1.98,3.8)(-1,3.8)(1,4)(4,0.8)
> \end{pspicture}
>
> \end{document}
>
>
Well i tried that, I get a "undefined control sequence" error pointing
to line 77 of xkeyval.sty
--
Jean Magnan de Bornier
Cours Victor Hugo
13980 Alleins
T 08 70 39 34 03
P 06 09 17 35 87
e-mots: jean at bornier.net
More information about the PSTricks
mailing list