|
From: Andre W. <wo...@us...> - 2005-09-14 14:28:46
|
Hi,
On 14.09.05, Joerg Lehmann wrote:
> > I'm aware that we need the epsilon in the constructor only, but still
> > I would do it very much like to keep it in the trafo as an instance
> > variable and inherit it to newly created trafos (like by rotated) ...
>
> What do you want to do in the case of __mul__, when there are two
> trafos.
Hmmm. I don't know. We do have the same problem in normpath. In some
sense I would suggest the lower value for epsilon (and None, if one of
the epsilons is None). I don't think its a problem at the normsubpath,
that we increase the precision by that. What do you think?
(Yes, I would like to do the same in normsubpath and for the trafos.)
> > PS: I think we should set the default for trafo._epsilon to 1e-10 (or
> > even lower!), since a determinate for a 2x2 matrix has the
> > dimension of its items to the power of two. We should be able to
> > scale by a factor of 0.001 without any problems.
>
> Definitely, let's go for (1e-5)**2.
Ok. Just to remember, that epsilon in normpath is measured in pts. To
scale down a one in our default unit cm, the factor is:
andre@pb:~/python/pyx$ python
Python 2.3.3 (#1, Aug 23 2004, 20:06:57)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1640)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyx import normpath, unit
>>> (normpath._epsilon/unit.topt(1))**2
1.2445216049382721e-13
>>>
I think 1e-10 is fine, but we should keep in mind, that this threshold
is still not yet generous. And I don't want to say, that the epsilon
in normpath and in trafo is directly related. But its fine as an
educated guess ... ;-)
André
--
by _ _ _ Dr. André Wobst
/ \ \ / ) wo...@us..., http://www.wobsta.de/
/ _ \ \/\/ / PyX - High quality PostScript and PDF figures
(_/ \_)_/\_/ with Python & TeX: visit http://pyx.sourceforge.net/
|