vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
542 stars 90 forks source link

Fixing bugs in the inversion section of the `geometry` module #356

Closed yarusome closed 1 year ago

yarusome commented 1 year ago

This PR fixes bugs related to coordinate systems in the inversion section of the geometry module, and simplifies the internal use of inversion.

yarusome commented 1 year ago

Btw, the geometry module contains a lot of asyxml tags, which form a large part of the source code and seem to be used for documentation. However, it's the only module that has such tags, so I guess these tags are no longer needed. If so, I'd create another PR to clean them up.

ivankokan commented 1 year ago

Btw, the geometry module contains a lot of asyxml tags, which form a large part of the source code and seem to be used for documentation. However, it's the only module that has such tags, so I guess these tags are no longer needed. If so, I'd create another PR to clean them up.

Please do not. Check this, still on my TODO list...

yarusome commented 1 year ago

@ivankokan I'll leave them there, then. But beware that there're various incorrect signatures and format inconsistency in these tags.

johncbowman commented 1 year ago

These errors need to be fixed:

asy
import geometry;

  point Ap = inverse(k, A, s.A), Bp = inverse(k, A, s.B),
                    ^
base/geometry.asy: 7157.21: no matching function 'inverse(real, point, point)'
  point Ap = inverse(k, A, s.A), Bp = inverse(k, A, s.B),
                                             ^
base/geometry.asy: 7157.46: no matching function 'inverse(real, point, point)'
    M = inverse(k, A, midpoint(s));
               ^
base/geometry.asy: 7158.16: no matching function 'inverse(real, point, point)'
yarusome commented 1 year ago

@johncbowman Fixed, and no other incorrect use of inverse() remains now.

yarusome commented 1 year ago

@johncbowman Would this PR be merged soon? It has been sitting here for months. If there're any pending problems in this PR, I could fix them as soon as possible.