hopefully this will also make the CI story easier
this can’t be right:
fromPointAndNormal _ n = NonVerticalHyperPlane n
we should really use the in plane point p
want:
- normalVector points into the positive halfspace
- normalVector (fromPointAnNormal p n) == n
- onSideTest p
basically test that converting to a diff line type results in consistent results
See if we can generalize its type signatures
most of the tests are uncommented. Not sure why
intersecting halflines with boxes seems to go wrong somehow.
I wonder if we can clean up and/or speed up the fromVertexForm code by having a specific Set3 type that stores at least three elements. Since every vertex should have at least (and probably often also exactly) three definers, this could clean up some of the code. (We have a few “there should be at least three items here” cases).
Still not entirely sure that will help stufficiently though. Since we are sometimes relying on sorting etc, to be efficient.
e.g. if we have three definers, and we delete h from it (where h is guaranteed to appear: )
probably requires testing if two polygons are cyclic shifts
– I’m now guessing that the _Vector iso is causing the trouble, since that thing is potentially rebuilding a new vector (using generate) even if we are just accessing some field. If that is indeed happening, then that is very wasteful.
maybe make s.t. like prettychart; i.e have some webserver running that can show geometries as svg, and use ghci to start the server and send input to the server.
cabal v2-update ‘hackage.haskell.org,2022-12-29T17:16:17Z’
I compared the BAPC armybase tests. It’s a bit of an apples vs oranges comparison, since I only had an old 8.10.7 build of the bapc examples around, and I’ve built the new stuff using 9.6.1
anyway, the old bapc armybase testsuite took
13.65s user 0.03s system 99% cpu 13.687 total
whereas the new run took roughly
8.28s user 0.02s system 99% cpu 8.305 total
not sure what’s the mian gain. Maybe most of it is simply switching to a faster sorting algo; since we are now using vector-algorithms’s introsort rather than mergesort. > Still, it’s nice that we are faster :).