## pgf-users

 [Pgf-users] to fill 3 connected arcs From: Walter Cazzola - 2007-10-25 21:08:20 Dear all, I'm puzzled by the following problem: I'm drawing the or logical gate as 3 connected arcs \begin{tikzpicture}[inner sep=3D0pt] \draw[fill=3Dred] (6.19125,9.04875) +(-53:0.79375) arc (-53:53:0.79375) (7.03793,9.78957) +(-105:1.42482) arc (-105:-31:1.42482) (7.03793,8.30793) +(105:1.42482) arc (105:31:1.42482) ; \end{tikzpicture} but I can't fill it by a color, is there a solution to my problem? Thanks in advance for any help you can give me. Walter --=20 Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano E-mail cazzola@... Ph.: +39 010 353 6637 Fax: +39 010 353 6699 =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7 ... recursive: adjective, see recursive ... =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7
 Re: [Pgf-users] to fill 3 connected arcs From: Alain Matthes - 2007-10-25 22:58:05 Le 25 oct. 07 =E0 23:08, Walter Cazzola a =E9crit : > Dear all, > I'm puzzled by the following problem: I'm drawing the or logical =20 > gate as > 3 connected arcs > > \begin{tikzpicture}[inner sep=3D0pt] > \draw[fill=3Dred] (6.19125,9.04875) +(-53:0.79375) arc = (-53:53:0.79375) > (7.03793,9.78957) +(-105:1.42482) arc =20 > (-105:-31:1.42482) > (7.03793,8.30793) +(105:1.42482) arc =20 > (105:31:1.42482) ; > \end{tikzpicture} > > but I can't fill it by a color, is there a solution to my problem? > > Thanks in advance for any help you can give me. > Do you want something like this : \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482) arc =20 (-105:-31:1.42482) arc (31:105:1.42482); \draw[fill=3Dwhite] (6.19125,9.04875) +(-53:0.79375) arc = (-53:53:0.79375); \end{tikzpicture} But you need to adapt some values. there is a little red line and the =20= up corner is not fine ? Regards Alain= 
 Re: [Pgf-users] to fill 3 connected arcs From: Kjell Magne Fauske - 2007-10-26 06:14:57 On 10/25/07, Walter Cazzola wrote: > Dear all, > I'm puzzled by the following problem: I'm drawing the or logical gate as > 3 connected arcs > > \begin{tikzpicture}[inner sep=0pt] > \draw[fill=red] (6.19125,9.04875) +(-53:0.79375) arc (-53:53:0.79375) > (7.03793,9.78957) +(-105:1.42482) arc (-105:-31:1.42482) > (7.03793,8.30793) +(105:1.42482) arc (105:31:1.42482) ; > \end{tikzpicture} > > but I can't fill it by a color, is there a solution to my problem? > > Thanks in advance for any help you can give me. > > Walter This is not directly related to your problem, but Juergen Werber and Cristoph Bartoschek have written a really nice library of node shapes for drawing logic circuits: http://www.fauskes.net/pgftikzexamples/logic-circuits-library/ - Kjell Magne Fauske 
 Re: [Pgf-users] to fill 3 connected arcs From: Walter Cazzola - 2007-10-26 07:52:34 On Fri, 26 Oct 2007, Kjell Magne Fauske wrote: > This is not directly related to your problem, but Juergen Werber and > Cristoph Bartoschek have written a really nice library of node shapes > for drawing logic circuits: > http://www.fauskes.net/pgftikzexamples/logic-circuits-library/ this is great I will use it in the future but since my circuits is already finished except the filling of the or gate I'd like to solve my problem rather than redraw everything from scratch. Cheers Walter --=20 Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano E-mail cazzola@... Ph.: +39 010 353 6637 Fax: +39 010 353 6699 =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7 ... recursive: adjective, see recursive ... =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7
 Re: [Pgf-users] to fill 3 connected arcs From: Walter Cazzola - 2007-10-26 07:56:19 On Fri, 26 Oct 2007, Alain Matthes wrote: >> Dear all, >> I'm puzzled by the following problem: I'm drawing the or logical gate as >> 3 connected arcs >> \begin{tikzpicture}[inner sep=3D0pt] >> \draw[fill=3Dred] (6.19125,9.04875) +(-53:0.79375) arc (-53:53:0.79375) >> (7.03793,9.78957) +(-105:1.42482) arc (-105:-31:1.42482) >> (7.03793,8.30793) +(105:1.42482) arc (105:31:1.42482) ; >> \end{tikzpicture} >> but I can't fill it by a color, is there a solution to my problem? > this a little better > \begin{tikzpicture}[inner sep=3D0pt] > \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482) arc (-105:-31:1.42= 482)=20 > arc (31:105:1.42482); > \draw[fill=3Dwhite] (6.19125,9.04875) +(-54:0.79375) arc (-54:54:0.79375)= ; > \end{tikzpicture} yes, I'm looking exactly for this but without the white filled arc to cover the red rectangle since my slide have a shaded background. > but there is a problem with the values that you gives or a problem > with arc option or with my method , but the figure is not symetric ! > look at (6.19125,9.04875) you are right but I have drawn it through xfig and converted in tikz by using the Hans Meine's converter. WYSIWYG has some benefits but precision is not among them ;-). Is not possible to draw a closed path with arcs and fill it? Thanks=20 Walter --=20 Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano E-mail cazzola@... Ph.: +39 010 353 6637 Fax: +39 010 353 6699 =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7 ... recursive: adjective, see recursive ... =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7
 Re: [Pgf-users] to fill 3 connected arcs From: Alain Matthes - 2007-10-26 08:15:56 Le 26 oct. 07 =E0 09:48, Walter Cazzola a =E9crit : > On Fri, 26 Oct 2007, Alain Matthes wrote: > >> this a little better > >> \begin{tikzpicture}[inner sep=3D0pt] >> \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482) arc =20 >> (-105:-31:1.42482) arc (31:105:1.42482); > >> \draw[fill=3Dwhite] (6.19125,9.04875) +(-54:0.79375) arc =20 >> (-54:54:0.79375); >> \end{tikzpicture} > > > Is not possible to draw a closed path with arcs and fill it? > hello :) I think yes biut it's "for me" difficult with arc. I think "arc" is a =20= difficult operation. I you look at the code suggested by Kjell, the new shapes are builded =20= with circle, "curve to" operations. Bezier curves are fine tools for what you need but with arc ... look at this code : \draw (7.03793,9.78957) +(-105:1.42482) arc (-105:-31:1.42482) =20 arc (31:105:1.42482)--cycle; this a cloth path. You problem is simple and complicated, instead od "--cycle" you need =20 to connect with a new "arc operation" ... and the solution is : \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482)% arc (-105:-31:1.42482)% arc (31:105:1.42482)% arc (54:-54:0.79375); Regards Alain 
 Re: [Pgf-users] to fill 3 connected arcs From: Kjell Magne Fauske - 2007-10-26 08:20:55 On 10/26/07, Walter Cazzola wrote: > > Is not possible to draw a closed path with arcs and fill it? > Of course it is. However you have to draw it in the correct order to make the filling work. You could for instance try: \begin{tikzpicture} \draw[fill=red] (7.03793,8.30793) +(105:1.42482) arc (105:31:1.42482) arc (-31:-105:1.42482) arc (-53:53:0.79375) --cycle; \end{tikzpicture} Your original code was not a continuous path, thats why it would not fill. - Kjell Magne Fauske 
 Re: [Pgf-users] to fill 3 connected arcs From: Walter Cazzola - 2007-10-26 08:26:12 On Fri, 26 Oct 2007, Kjell Magne Fauske wrote: >> Is not possible to draw a closed path with arcs and fill it? > Of course it is. However you have to draw it in the correct order to > make the filling work. You could for instance try: > \begin{tikzpicture} > \draw[fill=3Dred] (7.03793,8.30793) +(105:1.42482) arc (105:31:1.42482) > arc (-31:-105:1.42482) arc (-53:53:0.79375) --cycle; > \end{tikzpicture} > Your original code was not a continuous path, thats why it would not fil= l. sure you are right, sometimes I'm really dumb. Thanks a lot for the help. Walter --=20 Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano E-mail cazzola@... Ph.: +39 010 353 6637 Fax: +39 010 353 6699 =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7 ... recursive: adjective, see recursive ... =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7
 Re: [Pgf-users] to fill 3 connected arcs From: Walter Cazzola - 2007-10-26 08:30:05 On Fri, 26 Oct 2007, Alain Matthes wrote: >> On Fri, 26 Oct 2007, Alain Matthes wrote: >> Is not possible to draw a closed path with arcs and fill it? > I think yes biut it's "for me" difficult with arc. I think "arc" is a > difficult operation. > I you look at the code suggested by Kjell, the new shapes are builded wit= h > circle, "curve to" operations. > Bezier curves are fine tools for what you need but with arc ... Well arcs weren't my choice but their use come from the conversion, I've to admit that the whole set arcs/curves in TiKZ are too hard to cope with to me. Thanks a lot for the help Walter --=20 Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano E-mail cazzola@... Ph.: +39 010 353 6637 Fax: +39 010 353 6699 =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7 ... recursive: adjective, see recursive ... =B7 =B7 =B7 --------------------------- =B7 =B7 =B7 -----------------------= ---- =B7 =B7 =B7
 Re: [Pgf-users] to fill 3 connected arcs From: Alain Matthes - 2007-10-26 08:43:28 Le 26 oct. 07 =E0 10:30, Walter Cazzola a =E9crit : > > Well arcs weren't my choice but their use come from the conversion, =20= > I've > to admit that the whole set arcs/curves in TiKZ are too hard to cope > with to me. > > But i put the solution at the end of the message \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482)% arc (-105:-31:1.42482)% arc (31:105:1.42482)% arc (54:-54:0.79375); Regards Alain= 
 Re: [Pgf-users] to fill 3 connected arcs From: Alain Matthes - 2007-10-26 09:09:10 Le 26 oct. 07 =E0 10:49, Walter Cazzola a =E9crit : > On Fri, 26 Oct 2007, Alain Matthes wrote: > >>> Well arcs weren't my choice but their use come from the =20 >>> conversion, I've >>> to admit that the whole set arcs/curves in TiKZ are too hard to cope >>> with to me. > >> But i put the solution at the end of the message > >> \draw[fill=3Dred] (7.03793,9.78957) +(-105:1.42482)% >> arc (-105:-31:1.42482)% >> arc (31:105:1.42482)% >> arc (54:-54:0.79375); > > whops! I didn't note it, your message sounded as a sort of give up =20 > and I > stopped reading ;-) > > It works as expected, thanks a lot. > Sorry I speak (write) too much in my bad english language Regards Alain=