Package: tomboy-latex
Version: 0.5-1
Severity: normal

Hi!

With larger notes tomboy (with LaTeX-plugin enabled) becomes really slow.  I
can often type whole sentences without any feedback from tomboy (no cursor
movement, no charachters appearing, and tomboys windows don't redraw if I drag
another window over it).  When I'm finished typing and wait for about 30-60
seconds, the typed stuff will appear all at once.  My impression is that there
is some O(n^2) behaviour there, where n is either the total size of the note
or the number of equations in it.

A sample note is attached.

Thanks,
Jö.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing-proposed-updates
  APT policy: (500, 'testing-proposed-updates'), (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.28-1-686-bigmem (SMP w/2 CPU cores)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages tomboy-latex depends on:
ii  imagemagick            7:6.4.5.4.dfsg1-1 image manipulation programs
ii  libgtk2.0-cil          2.12.8-2          CLI binding for the GTK+ toolkit 2
ii  libmono-corlib2.0-cil  2.0.1-6           Mono core library (for CLI 2.0)
ii  libmono-system2.0-cil  2.0.1-6           Mono System libraries (for CLI 2.0
ii  texlive-base-bin       2007.dfsg.2-6     TeX Live: Essential binaries
ii  texlive-latex-base     2007.dfsg.2-4     TeX Live: Basic LaTeX packages
ii  tomboy                 0.14.2-1          desktop note taking program using 

tomboy-latex recommends no packages.

tomboy-latex suggests no packages.

-- no debconf information

-- 
In the beginning the Universe was created.  This has made a lot of
people very angry and been widely regarded as a bad move.
-- Douglas Adams
<?xml version="1.0" encoding="utf-8"?>
<note version="0.3" xmlns:link="http://beatniksoftware.com/tomboy/link"; 
xmlns:size="http://beatniksoftware.com/tomboy/size"; 
xmlns="http://beatniksoftware.com/tomboy";>
  <title>Edge Basis and Transformation</title>
  <text xml:space="preserve"><note-content version="0.1">Edge Basis and 
Transformation

<size:huge>The Basis</size:huge>

For the edge basis we have the following properties, which fully determine them:
<list><list-item dir="ltr">Each shape function \[\psi_i\] is linear.
</list-item><list-item dir="ltr">Each shape function maps from \[\mathbb R^n\] 
to \[\mathbb R^n\], where \[n\] is the dimension.
</list-item><list-item dir="ltr">For each shape function holds \[\psi_i(\mathbf 
x)\cdot\mathbf t^j=\delta_{ij}\quad\forall\mathbf x\in\Gamma^j\], where 
\[\Gamma^j\] denotes edge \[j\] and \[\mathbf t^j\] denotes a tangential unit 
vector to that edge.</list-item></list>
We use the following numbering of edges and vertices:
<monospace>| edge # | vertex 0 # | vertex 1 # |
|    0   |     0      |      1     |
|    1   |     0      |      2     |
|    2   |     1      |      2     |</monospace>
From that follow the following definitions for the tangential unit vectors 
\[\mathbf t^i\] and edge lengthes \[\ell^i\], where \[x^i\] are the coordinates 
of vertex \[i\]:
<list><list-item dir="ltr">\[\mathbf t^0=(\mathbf x^1-\mathbf x^0)/\ell^0\], 
\[\ell^0=||\mathbf x^1-\mathbf x^0||\]
</list-item><list-item dir="ltr">\[\mathbf t^1=(\mathbf x^2-\mathbf 
x^0)/\ell^1\], \[\ell^1=||\mathbf x^2-\mathbf x^0||\]
</list-item><list-item dir="ltr">\[\mathbf t^2=(\mathbf x^2-\mathbf 
x^1)/\ell^2\], \[\ell^2=||\mathbf x^2-\mathbf x^1||\]</list-item></list>
Since the shape functions are linear, we write them in the following way:
<list><list-item dir="ltr">\[\psi^i(\mathbf x)=\mathrm A^i\mathbf x+\mathbf 
a^i\]</list-item></list>
Evaluating the shape functions at the three vertices and taking the scalar 
product with the two adjacent tangential vectors \[\psi^i(\mathbf 
x^k)\cdot\mathbf t^j=\delta_{ij}\quad\forall k\in\{j_0,j_1\}\] leaves us with 
the following six conditions:
<list><list-item dir="ltr">\[\psi^i(\mathbf x^0)\cdot\mathbf 
t^0=\delta_{i0}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^0+\mathbf 
a^i)\cdot(\mathbf x^1-\mathbf x^0)=\delta_{i0}\ell^0\]
</list-item><list-item dir="ltr">\[\psi^i(\mathbf x^1)\cdot\mathbf 
t^0=\delta_{i0}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^1+\mathbf 
a^i)\cdot(\mathbf x^1-\mathbf x^0)=\delta_{i0}\ell^0\]
</list-item><list-item dir="ltr">\[\psi^i(\mathbf x^1)\cdot\mathbf 
t^2=\delta_{i2}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^1+\mathbf 
a^i)\cdot(\mathbf x^2-\mathbf x^1)=\delta_{i2}\ell^2\]
</list-item><list-item dir="ltr">\[\psi^i(\mathbf x^2)\cdot\mathbf 
t^2=\delta_{i2}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^2+\mathbf 
a^i)\cdot(\mathbf x^2-\mathbf x^1)=\delta_{i2}\ell^2\]
</list-item><list-item dir="ltr">\[\psi^i(\mathbf x^2)\cdot\mathbf 
t^1=\delta_{i1}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^2+\mathbf 
a^i)\cdot(\mathbf x^2-\mathbf x^0)=\delta_{i1}\ell^1\]
</list-item><list-item dir="ltr">\[\psi^i(\mathbf x^0)\cdot\mathbf 
t^1=\delta_{i1}\quad\Longrightarrow\quad(\mathrm A^i\mathbf x^0+\mathbf 
a^i)\cdot(\mathbf x^2-\mathbf x^0)=\delta_{i1}\ell1\]</list-item></list>
By pairwise combination we can transform these conditions into
<list><list-item dir="ltr">\[[\mathrm A^i(\mathbf x^1-\mathbf 
x^0)]\cdot(\mathbf x^1-\mathbf x^0)=0\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf t^0)\cdot\mathbf t^0=0\]
</list-item><list-item dir="ltr">\[[\mathrm A^i(\mathbf x^2-\mathbf 
x^0)]\cdot(\mathbf x^2-\mathbf x^0)=0\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf t^1)\cdot\mathbf t^1=0\]
</list-item><list-item dir="ltr">\[[\mathrm A^i(\mathbf x^2-\mathbf 
x^1)]\cdot(\mathbf x^2-\mathbf x^1)=0\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf t^2)\cdot\mathbf t^2=0\]</list-item></list>
and
<list><list-item dir="ltr">\[(\mathrm A^i\mathbf x^0+\mathbf a^i)\cdot(\mathbf 
x^2-\mathbf 
x^1)=\delta_{i1}\ell^1-\delta_{i0}\ell^0\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf x^0+\mathbf a^i)\cdot\mathbf 
t^2=(\delta_{i1}\ell^1-\delta_{i0}\ell^0)/\ell^2\]
</list-item><list-item dir="ltr">\[(\mathrm A^i\mathbf x^1+\mathbf 
a^i)\cdot(\mathbf x^2-\mathbf 
x^0)=\delta_{i2}\ell^2+\delta_{i0}\ell^0\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf x^1+\mathbf a^i)\cdot\mathbf 
t^1=(\delta_{i2}\ell^2+\delta_{i0}\ell^0)/\ell^1\]
</list-item><list-item dir="ltr">\[(\mathrm A^i\mathbf x^2+\mathbf 
a^i)\cdot(\mathbf x^1-\mathbf 
x^0)=\delta_{i1}\ell^1-\delta_{i2}\ell^2\quad\Longleftrightarrow\quad(\mathrm 
A^i\mathbf x^2+\mathbf a^i)\cdot\mathbf 
t^0=(\delta_{i1}\ell^1-\delta_{i2}\ell^2)/\ell^0\]</list-item></list>
Mayhaps these will be useful later.

<size:huge>Coordinate Transformation
</size:huge>
For transformation we use a mapping \[\mathbf x=g(\mathbf{\hat x})\]. We say 
that we map from <italic>reference coordinates</italic> \[\mathbf{\hat x}\] 
into <italic>world coordinates</italic> \[\mathbf x\]. Entities with the hat 
(\[\hat{}\]) are in reference coordinates, entities without the hat are in 
world coordines. The mapping \[g\] is affine linear and can thus be written as
<list><list-item dir="ltr">\[g(\mathbf{\hat x})=\mathrm B\mathbf{\hat 
x}+\mathbf b\]</list-item></list>
The conversion of the vertex coordinates is simple:
<list><list-item dir="ltr">\[\mathbf x^i=\mathrm B\mathbf{\hat x}^i+\mathbf 
b\]</list-item></list>
The tangential vectors and edge lengthes are a bit more complicated:
<list><list-item dir="ltr">\[\mathbf t^0=\frac{\mathbf x^1-\mathbf 
x^0}{||\mathbf x^1-\mathbf x^0||}=\frac{\mathrm B(\mathbf{\hat 
x}^1-\mathbf{\hat x}^0)}{||\mathrm B(\mathbf{\hat x}^1-\mathbf{\hat 
x}^0)||}=\frac{\mathrm B\mathbf{\hat t}^0}{||\mathrm B\mathbf{\hat t}^0||}\], 
\[\ell^0=||\mathbf x^1-\mathbf x^0||=||B(\mathbf{\hat x}^1-\mathbf{\hat 
x}^0)||\]
</list-item><list-item dir="ltr">\[\mathbf t^1=\frac{\mathbf x^2-\mathbf 
x^0}{||\mathbf x^2-\mathbf x^0||}=\frac{\mathrm B(\mathbf{\hat 
x}^2-\mathbf{\hat x}^0)}{||\mathrm B(\mathbf{\hat x}^2-\mathbf{\hat 
x}^0)||}=\frac{\mathrm B\mathbf{\hat t}^1}{||\mathrm B\mathbf{\hat t}^1||}\], 
\[\ell^1=||\mathbf x^2-\mathbf x^0||=||B(\mathbf{\hat x}^2-\mathbf{\hat 
x}^0)||\]
</list-item><list-item dir="ltr">\[\mathbf t^2=\frac{\mathbf x^2-\mathbf 
x^1}{||\mathbf x^2-\mathbf x^1||}=\frac{\mathrm B(\mathbf{\hat 
x}^2-\mathbf{\hat x}^1)}{||\mathrm B(\mathbf{\hat x}^2-\mathbf{\hat 
x}^1)||}=\frac{\mathrm B\mathbf{\hat t}^2}{||\mathrm B\mathbf{\hat 
t}^2||}\],\[\ell^2=||\mathbf x^2-\mathbf x^1||=||B(\mathbf{\hat 
x}^2-\mathbf{\hat x}^1)||\]</list-item></list>
If we require that \[\hat\psi^i\] fullfills the same conditions in reference 
coordinates as \[\psi^i\] fullfills in world coordinates, how what is the 
transformation \[\psi^i(g(\mathbf{\hat x}))=L(\hat\psi^i(\mathbf{\hat x}))\]? 
Let us assume that \[L\] is linear and independent of \[\mathbf x\] and 
\[\mathbf{\hat x}\]:
<list><list-item dir="ltr">\[\mathbf y=L(\mathbf{\hat y})=\mathrm C\mathbf{\hat 
y}+\mathbf c\]</list-item></list>
How do \[\mathrm C\] and \[\mathbf c\] relate to \[\mathrm B\] and \[\mathbf 
b\]?  We have the three vertex coordinates times two directions in each 
coordinate to evaluate \[\psi^0\] and \[\hat\psi^0\], that should give us six 
conditions with which we should be able to fix the six coefficients of 
\[\mathrm C\] and \[\mathbf c\] (ideally, \[\mathbf c=0\]).  OK, evaluating 
just one basis function is probably not enough, since I already know what to 
expect there. Instead, I probably have to evaluate a function \[\mathbf 
y(\mathbf x)\] (\[\mathbf{\hat y}(\mathbf{\hat x})\]) to learn whats going on.
<list><list-item dir="ltr">Let \[\mathbf{\hat y}=\sum_iy^i\hat\psi^i\] and 
\[\mathbf y=\sum_iy^i\psi^i\] with the same coeffitients 
\[y^i\].</list-item></list>
Now we require \[\mathbf y(\mathbf x^i)=\mathrm C\mathbf{\hat y}(\mathbf{\hat 
x}^i)+\mathbf c\]. We will not test this with cartesian components
</note-content></text>
  <last-change-date>2009-06-13T13:45:31.8804240+02:00</last-change-date>
  
<last-metadata-change-date>2009-06-13T13:45:46.5230680+02:00</last-metadata-change-date>
  <create-date>2009-06-13T07:02:50.7525010+02:00</create-date>
  <cursor-position>31</cursor-position>
  <width>582</width>
  <height>489</height>
  <x>425</x>
  <y>89</y>
  <tags>
    <tag>system:notebook:Edge Basis and Transformation</tag>
  </tags>
  <open-on-startup>False</open-on-startup>
</note>

Attachment: signature.asc
Description: Digital signature

Reply via email to