Getting started
Installation
Requires Julia 1.11 or later. Install with Julia’s package manager:
using Pkg
Pkg.add("AdaptiveVisualization")For polynomial-system examples, also install HomotopyContinuation:
Pkg.add("HomotopyContinuation")HomotopyContinuation is optional for ordinary functions. Interactive figures use GLMakie and require a working OpenGL display.
Ordinary functions
using AdaptiveVisualization
TC, fig = visualize((x, y) -> x^2 + y^2; total_resolution=1000)To sample without opening a figure, construct a cache and refine it directly:
TC = TriangulationCache((x, y) -> x^2 + y^2; resolution=100)
inserted = refine!(TC; budget=200, min_refinement_area=1e-4)The budget limits new samples. Refinement can stop earlier when no eligible points remain. See refine! for the stopping rules.
Polynomial systems
Loading both packages activates the integration:
using AdaptiveVisualization, HomotopyContinuation
@var x b c
F = System([x^2 + b*x + c]; variables=[x], parameters=[b, c])
TC, fig = visualize(F; func=:real, xlims=[-3, 3], ylims=[-2, 3])The func keyword selects numerical real counts (:real), strictly positive real counts (:positive), soft-certified real counts (:certify_real), or an imaginary-part diagnostic (:dietmaier). See visualize and the Polynomial systems reference for the available evaluators.