Commit Graph
7 Commits
Author SHA1 Message Date
loicvhandClaude Opus 5 f193596743 Keep the legend lower left and make it smaller
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 21:56:23 +02:00
loicvhandClaude Opus 5 bdcf0e0b02 Plot the mu-trajectory for any non-empty 2D quadric
The poles, branches and mu range now follow the eigenvalues (one or two
poles of either sign), so hyperbolas, parabolas, line pairs, single
lines and points are supported, not only ellipses.

- Find every root of f from sign changes, including across inactive
  poles where quadproj's f is 0/0; mu* is the root between the active
  poles surrounding 0 and the other roots get their own marker.
- Mark the apex of conical quadrics as a degenerate KKT point.
- Draw the quadric as the contour psi = 0 and frame the trajectory
  panel on x0, the KKT points and the vertices.
- Use the correct asymptote direction for repeated eigenvalues.
- Test every quadric type against brute-force sampling.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 21:45:51 +02:00
loicvhandClaude Opus 5 5b118416be Select the y-limits of the mu panels automatically
The fixed limits hid the markers of f'(mu*) and f'(mu**). The limits now
frame the finite features of each curve: its values at both ends of the
mu range, its local extrema, the markers and the reference lines, while
divergences at the poles still run off the axes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 21:18:36 +02:00
loicvhandClaude Opus 5 f1d5a73cc6 Use quadproj instead of the local quadric module
The quadric, x(mu), f, f', mu* and the degenerate points now come from
quadproj; the script keeps small helpers for what quadproj does not
provide: mu**, the asymptotes and the ellipse boundary. The tests check
these helpers against brute-force sampling and quadproj.project.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 21:08:35 +02:00
loicvhandClaude Opus 5 55cb27c8de Extend outer mu branches so the trajectory reaches the centre
x(mu) only approaches the centre as |mu| -> inf, so the sampling in
[mean(poles) - 3, mean(poles) + 3] left a gap around it. The outer
branches now continue geometrically up to |mu| ~ 1e4 / lambda_min; the
extra samples lie outside the mu axes and only show in the trajectory.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 21:00:33 +02:00
loicvhandClaude Opus 5 72c19852d8 Plot several parameter cases in one run
Replace the single A/B/C constants and --x0 option with a CASES table;
each case writes <name>.png and <name>.pdf. Add the A = diag(2, 0.75),
x0 = (0, -0.6) case.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 20:54:21 +02:00
loicvhandClaude Opus 5 b2b782394a Add mu-trajectory plot for the projection onto an ellipse
Cleaned-up extraction of test_mu_ellipse from proj_ellipsoid:
- quadric.py: minimal Ellipsoid class (standardization, KKT trajectory,
  extreme roots by exact bracketing, degenerate points, asymptotes).
- plot_mu_trajectories.py: the 4-panel figure, typeset with LaTeX.
- test_quadric.py: checks against brute-force sampling of the ellipse.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-15 20:50:05 +02:00