Walter Cazzola | 4 May 21:32
Picon
Favicon

puzzle(d) again

Dear TiKZ-experts,
I'm again in the process of drawing a puzzle piece and it seems that I
have solved most (not all) of my problems.

I'm trying to exploit the intrinsic symmetry of the piece. Thus, I have
drawn one side of the piece that I would like to copy and rotate/shift
to draw the remaining sides

This is what I have:

    \documentclass[10pt]{article}
    \usepackage[svgnames]{xcolor}

    \usepackage{tikz}

    \usepackage[active,tightpage,pdftex]{preview}
    \PreviewEnvironment{tikzpicture}

    \begin{document}

      \begin{tikzpicture}[]

         \draw (1.1875cm,.56cm) rectangle +(1.9cm,1.9cm);
         \draw (0cm,0cm) -- ++(0cm,.8cm) parabola bend +(.1cm,.05cm) ++(.22cm,-.1cm)
               arc(-130:143:.23cm and .48cm) parabola[bend pos=.6] bend +(0cm,-.1cm) ++(-.18cm,-.08cm)
               -- ++(-.18cm,.55cm)
           %{ [rotate around=(0cm,1.9cm)]
           %   (0cm,0cm) -- ++(0cm,.8cm) parabola bend +(.1cm,.05cm) ++(.22cm,-.1cm)
           %   arc(-130:143:.23cm and .48cm) parabola[bend pos=.6] bend +(0cm,-.1cm) ++(-.18cm,-.08cm)
           %   -- ++(-.18cm,.55cm)
(Continue reading)

Kjell Magne Fauske | 5 May 10:11
Picon

Re: puzzle(d) again

On Sun, May 4, 2008 at 9:32 PM, Walter Cazzola <cazzola <at> disi.unige.it> wrote:
> Dear TiKZ-experts,
>  I'm again in the process of drawing a puzzle piece and it seems that I
>  have solved most (not all) of my problems.
>
>  I'm trying to exploit the intrinsic symmetry of the piece. Thus, I have
>  drawn one side of the piece that I would like to copy and rotate/shift
>  to draw the remaining sides
>
>  This is what I have:
>
>    \documentclass[10pt]{article}
>    \usepackage[svgnames]{xcolor}
>
>    \usepackage{tikz}
>
>    \usepackage[active,tightpage,pdftex]{preview}
>    \PreviewEnvironment{tikzpicture}
>
>    \begin{document}
>
>      \begin{tikzpicture}[]
>
>         \draw (1.1875cm,.56cm) rectangle +(1.9cm,1.9cm);
>         \draw (0cm,0cm) -- ++(0cm,.8cm) parabola bend +(.1cm,.05cm)
> ++(.22cm,-.1cm)
>               arc(-130:143:.23cm and .48cm) parabola[bend pos=.6] bend
> +(0cm,-.1cm) ++(-.18cm,-.08cm)
>               -- ++(-.18cm,.55cm)
>           %{ [rotate around=(0cm,1.9cm)]
(Continue reading)

Walter Cazzola | 5 May 12:35
Picon
Favicon

Re: puzzle(d) again

Dear Kjell,

On Mon, 5 May 2008, Kjell Magne Fauske wrote:

> There is a syntax error in your code. The correct syntax for the
> rotate around option is:

> rotate around={<degree>:<coordinate>}

> Try replacing
> ...
> { [rotate around=(0cm,1.9cm)]
> ..
>
> with
> ...
> { [rotate around={90:(0cm,1.9cm)}]
> ..

Indeed you are right, I forgot the angle, my fault, thanks.

> You can actually parametrize the scope parameters. The trick is to
> defined the transformations as styles. If not, the parser ges
> confused:

this is a great trick, now my code is really compact.

     \documentclass[10pt]{article}
     \usepackage[svgnames]{xcolor}

(Continue reading)

Kjell Magne Fauske | 5 May 13:33
Picon

Re: puzzle(d) again

On Mon, May 5, 2008 at 12:35 PM, Walter Cazzola <cazzola <at> disi.unige.it> wrote:
>
>  this is a great trick, now my code is really compact.
>
>
>     \documentclass[10pt]{article}
>     \usepackage[svgnames]{xcolor}
>
>     \usepackage{tikz}
>     \usetikzlibrary{backgrounds,calc,shadows}
>
>
>     \usepackage[active,tightpage,pdftex]{preview}
>     \PreviewEnvironment{tikzpicture}
>
>     \begin{document}
>
>       \begin{tikzpicture}[]
>
>          \tikzstyle{west wall} = []
>          \tikzstyle{north wall} = [rotate
> around={90:(0cm,1.9cm)},yscale=-1,yshift=-1.9cm]
>          \tikzstyle{east wall} = [xshift=1.9cm]
>          \tikzstyle{south wall} = [yshift=-1.9cm,rotate
> around={90:(0cm,1.9cm)},yscale=-1,yshift=-1.9cm]
>
>          \draw[fill=green,xshift=1.1875cm,yshift=.56cm, drop shadow]
>              (0cm,0cm) \foreach \p in {west wall, north wall, east wall,
> south wall} {
>
(Continue reading)

Paul Thompson | 6 May 05:59
Picon
Picon
Favicon

matrix nodes with sloped option?


I was wondering why matrix nodes do not respond to the sloped option or 
rotations?

\begin{tikzpicture}
\draw (0,0) -- 
node[sloped,above,near start]{A}        %Normal node which slopes OK
node[sloped,above,matrix of nodes,ampersand replacement=\&]
{ 
      A \& B \\
      C \& D \\
}   %matrix node which doesnt slope
(5,5);

\path(4,2) node[draw,transform shape,rotate=45,matrix of nodes,ampersand 
replacement=\&]{ 
      A \& B \\
      C \& D \\
}; %matrix node which doesn't rotate

\path(6,2) node[draw,transform shape,rotate=45]
{ 
      A
};  %node which rotates OK

\end{tikzpicture} 

Thanks for the great package,  pgf and tikz !
Thanks for your help.
regards,
(Continue reading)

Mark Wibrow | 6 May 08:44

Re: matrix nodes with sloped option?

Hi,

It does say in the manual that it isn't possible (in section 16.2
"Matrices are Nodes"), and that the transformation matrix is reset at
the beginning of a matrix. The (internal) use of \halign precludes any
kind of fancy transformations. It would be pretty hard to do matrices
without using \halign.

Regards

Mark

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Till Tantau | 6 May 12:10
Picon
Favicon

Re: matrix nodes with sloped option?

Indeed.

However, you can do the following: Put the whole node inside a  
tikzpicture, which in turn you put in a node that has the sloped  
option. Something like

... (A) -- (B) node[midway,sloped] {\tikz \matrix ...;};

That is not quite as "nice" as the standard way, but, as the manual  
says, halign simply makes "direct sloping" impossible.

Hoping this helps,
Till

Am 06.05.2008 um 08:44 schrieb Mark Wibrow:
> Hi,
>
> It does say in the manual that it isn't possible (in section 16.2
> "Matrices are Nodes"), and that the transformation matrix is reset at
> the beginning of a matrix. The (internal) use of \halign precludes any
> kind of fancy transformations. It would be pretty hard to do matrices
> without using \halign.
>
> Regards
>
> Mark
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save  
(Continue reading)

Picon
Favicon
Gravatar

PGF v2.0 manual page 46 (petri net) seems to not work

Hi all,

I'm new to PGF/tikz so I started using the manual and
the tutorials yesterday. However, I ran into trouble
with the example of the petri net. I copied all the
input on page 46 into an input file, but compilation
results in:

! Package pgfkeys Error: I do not know the key
'/tikz/on grid' and I am going to ignore it. Perhaps
you misspelled it.

See the pgfkeys package documentation for explanation.
Type  H <return>  for immediate help.
 ...                                              

l.11    every label/.style=     {red}]

>From the log file:

(/usr/local/texlive/2007/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
(/usr/local/texlive/2007/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
Package: pgfsys 2008/02/07 v2.00 (rcs-revision 1.31)
(/usr/local/texlive/2007/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
\pgfkeys <at> pathtoks=\toks16
\pgfkeys <at> temptoks=\toks17

so I think I have the correct installation.

Any tips? I tried searching the email lists but no
(Continue reading)

Kjell Magne Fauske | 6 May 19:20
Picon

Re: PGF v2.0 manual page 46 (petri net) seems to not work

On Tue, May 6, 2008 at 4:18 PM, Wilfred van Rooijen
<wvanrooijen <at> yahoo.com> wrote:
> Hi all,
>
>  I'm new to PGF/tikz so I started using the manual and
>  the tutorials yesterday. However, I ran into trouble
>  with the example of the petri net. I copied all the
>  input on page 46 into an input file, but compilation
>  results in:
>
>  ! Package pgfkeys Error: I do not know the key
>  '/tikz/on grid' and I am going to ignore it. Perhaps
>  you misspelled it.
>

>
>  Any tips? I tried searching the email lists but no
>  solution.
>

You have probably not loaded the positioning library:

\usetikzlibrary{positioning}

Hope this helps!

- Kjell Magne Fauske

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
(Continue reading)

Picon
Favicon
Gravatar

Re: PGF v2.0 manual page 46 (petri net) seems to not work

Hi all,

OK, I found I have to use a couple of libraries:

\usetikzlibrary{positioning}
\usetikzlibrary{arrows}
\usetikzlibrary{petri}
\usetikzlibrary{decorations.pathmorphing}
\usetikzlibrary{fit}

and some definitions:

\pgfdeclarelayer{background}
\pgfdeclarelayer{foreground}
\pgfsetlayers{background,main,foreground}

I use PGF/Tikz with xelatex and it seems to work well.
I'm impresed with the possibilities, but the learning
curve is indeed steep.

Wilfred

--- Till Tantau <tantau <at> tcs.uni-luebeck.de> wrote:

> Try saying
> 
> \usetikzlibrary{positioning}
> 
> that might help.
> 
(Continue reading)


Gmane