Berteun Damman | 1 Nov 11:21
Picon

pgfmathparse can disrupt coordinate transformations?

Hello,

I was playing a bit with the Lindenmayer libary of PGF-CVS, and I
wanted to use it to create a Penrose P3 Tiling  [1] (ideally,
something like this: http://berteun.nl/tmp/penrose.pdf); for which
Wikipedia has an L-system. But, to make things fancier, I decided not
to wait until the whole path was constructed, but to stroke and fill
as soon as a ] was hit. In order to decide what to do, I used some
calculations, but \pgfmathparse appears to be able to disrupt the
coordinate transformations, because a single usage of it can make the
tiles appear quite misplaced.

The above hopefully explains why I would stroke the path in between.
The culprit appears to be         \pgfmathparse{and(0>0,0<1)}, if I
remove the line, the picture comes out alright. Also, if I replace 0>0
by something which is true, like 1>0, the picture comes out alright.
The problem only occurs if the left hand side of the and is false (the
right hand side does not matter). This was as far as I was able to pin
down the problem. I tried to create a smaller example without a
Lindenmayer system, but I didn't succeed.

I also tried the latest CVS build on Kjells site (31-10-2008), which
still has the problem. I can work around it (and did to produce the
picture in the PDF), but it appears to be a bug to me.

Berteun

[1] http://en.wikipedia.org/wiki/Penrose_tiling

%%%
(Continue reading)

Kjell Magne Fauske | 1 Nov 14:58
Picon

Re: pgfmathparse can disrupt coordinate transformations?

On Sat, Nov 1, 2008 at 11:21 AM, Berteun Damman <berteun <at> gmail.com> wrote:
> Hello,
>
> I was playing a bit with the Lindenmayer libary of PGF-CVS, and I
> wanted to use it to create a Penrose P3 Tiling  [1] (ideally,
> something like this: http://berteun.nl/tmp/penrose.pdf); for which
> Wikipedia has an L-system. But, to make things fancier, I decided not
> to wait until the whole path was constructed, but to stroke and fill
> as soon as a ] was hit. In order to decide what to do, I used some
> calculations, but \pgfmathparse appears to be able to disrupt the
> coordinate transformations, because a single usage of it can make the
> tiles appear quite misplaced.
>
> The above hopefully explains why I would stroke the path in between.
> The culprit appears to be         \pgfmathparse{and(0>0,0<1)}, if I
> remove the line, the picture comes out alright. Also, if I replace 0>0
> by something which is true, like 1>0, the picture comes out alright.
> The problem only occurs if the left hand side of the and is false (the
> right hand side does not matter). This was as far as I was able to pin
> down the problem. I tried to create a smaller example without a
> Lindenmayer system, but I didn't succeed.
>
> I also tried the latest CVS build on Kjells site (31-10-2008), which
> still has the problem. I can work around it (and did to produce the
> picture in the PDF), but it appears to be a bug to me.
>
> Berteun
>
> [1] http://en.wikipedia.org/wiki/Penrose_tiling
>
(Continue reading)

Nicolas Girard | 1 Nov 18:11

Several mindmaps in the same figure

Dear people,

is there a way of putting more than one mindmap in the same tikz figure ?

Thanks in advance,

cheers,
Nicolas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Nicolas Girard | 1 Nov 18:12

Source code for pgfmanual-mindmap-1 and pgfmanual-mindmap-2

Hi all,
pgfmanual-mindmap-1.pdf and pgfmanual-mindmap-2.pdf are far more
complex than the examples found in the pgf manual, and I'd be much
interested to learn from their source codes.
Would it be possible to get access to them ?
Thanks in advance,
Nicolas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Kjell Magne Fauske | 2 Nov 12:02
Picon

Re: Several mindmaps in the same figure

On Sat, Nov 1, 2008 at 6:11 PM, Nicolas Girard <nicolas.girard <at> nerim.net> wrote:
> Dear people,
>
> is there a way of putting more than one mindmap in the same tikz figure ?
>
> Thanks in advance,
>
> cheers,
> Nicolas
>

Sure. Just place the root node like you would place any other node or path:

\path[mindmap,concept color=black,text=white] (1,1)
    node[concept] {A mindmap}
    ...

\path[mindmap,concept color=black,text=white]   (5,1)
    node[concept] {Another mindmap}
    ...

Here is a complete example:

\documentclass{article}

\usepackage{tikz}
\usetikzlibrary{mindmap,trees}
\begin{document}

\begin{tikzpicture}[mindmap,concept color=red!50]
(Continue reading)

Arne Röhrs | 2 Nov 14:57
Picon

distance between childs in a mindmap

Hello,

is there a way to control the distance between childs (with scale  
their is a way, but it is general)?

And another question. Why does the color of line between root and  
child turns not from black to green?

Here my (not minimal, sorry) example:

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage[applemac]{inputenc}
\usepackage{ngerman}
\usepackage{tikz}
\usetikzlibrary{trees}
\usetikzlibrary{mindmap}
\usepackage{pdflscape}

\begin{document}

\begin{landscape}
\begin{tikzpicture}
   \path[mindmap,concept color=blue!70!black,text=white,scale=1]
     node[concept] {Wechselwirkung (Ww) zwischen Teilchen und  
innerhalb von Teilchen}
     [grow=0,text=black,]
     child[concept color=green!50!black] {
       node[concept] {schwache Wechselwirkungen}
       [clockwise from=45,,concept color=green!60!black]
(Continue reading)

Berteun Damman | 2 Nov 17:45
Picon

Re: distance between childs in a mindmap

On Sun, Nov 2, 2008 at 2:57 PM, Arne Röhrs <webmaster <at> gnothisauton.de> wrote:
> is there a way to control the distance between childs
> (with scale their is a way, but it is general)?
Yes, you can also set the level distance for mindmaps. For example,
you could say:
child[level distance=4cm] { node[concept] {zwischen\-molekulare Kräfte
(Dipol-Dipol- Ww)}

To move this node a bit farther away. Also, in general, you could say
at the start of the picture: level 2 concept/.append style={level
distance=4cm}, but this would move every level 2 node farther away.

> And another question. Why does the color of line between root and
> child turns not from black to green?

This is explained in the manual at the 'concept color' key (35.3.2):

 "We saw already that this option is used to change the color of
  concepts. We now have a look at its effect when used on child
  nodes of a concept. Normally, this option simply changes the
  color of the children. However, when the option is given as
  an option to the child operation (and not to the node operation
  and also not as an option to all children via the level 1 style),
  TikZ will smoothly change the concept color from the parent's color
  to the color of the child concept."

So, you /have/ to provide it as an option the the child, as you do for
the orange node, and not as a non child-option as you currently do.
Alternatively, you could say:

(Continue reading)

Christophe Jorssen | 2 Nov 20:35
Picon
Favicon

A new pgfmath operator: sinc

Hello all,

Here is the code for the sinus cardinalis (sinc) function (see 
http://en.wikipedia.org/wiki/Sinc_function), adding it to the pgfmath 
parser. The argument is in radian.

But... It does not work and I don't understand why...

Thanks in advance for your help.

Christophe

\documentclass{minimal}

\usepackage{tikz,pgfplots}

\begin{document}

\makeatletter
\pgfmathdeclarefunction{sinc}{1}{%
   \begingroup%
     \expandafter\pgfmath <at> x#1pt\relax
     \ifdim\pgfmath <at> x=0pt\relax
       \def\pgfmathresult{1}%
     \else
% First convert to radians x-> x r
       \pgfmathrad@{#1}%
% Take the sine x r -> sin(x r)
       \pgfmathsin@{\pgfmathresult}%
% Divide by the argument sin(x r)/x
(Continue reading)

André Valentin | 3 Nov 09:43
Picon
Favicon

wrong function acos?

Hello all,

With the latest CVS built of PGF, if you say:

\pgfmathparse{acos(-.5)}\pgfmathresult

you get:

-60.0

which, in my opinion, is false.

A Valentin

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
Nicolas Girard | 3 Nov 10:14

Re: Several mindmaps in the same figure

Thank you both for such fast answers !

Nicolas

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

Gmane