Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot recipe for lazy operations of unions #3475

Open
schillic opened this issue Mar 17, 2024 · 0 comments
Open

Plot recipe for lazy operations of unions #3475

schillic opened this issue Mar 17, 2024 · 0 comments
Labels
plots 🎨 Related to plotting

Comments

@schillic
Copy link
Member

The default plot recipe uses epsilon-close approximation, which only works for nonconvex sets. Currently we only support plotting unions of convex sets like UnionSetArray but not lazy operations of such sets, like a LinearMap{M,UnionSetArray}.

We could add a method for that case, but that would be a lot of work because there are many cases, and since operations can also be arbitrarily nested, this would not be a general solution.

The proposal is to add a function to bring a set to a normal form, which is triggered by the plot recipe when the set is not convex. In this case it should recognize that LinearMap{M,UnionSetArray{N,T}} can be rewritten to UnionSetArray{N,LinearMap{M,T}}, and for such unions there is a plot recipe. Of course in general this function would be called recursively, and maybe combined with flatten. This normalization function does not have to be exported (only supposed to be used internally for plotting). Maybe a name could be _normalize_plot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plots 🎨 Related to plotting
Projects
None yet
Development

No branches or pull requests

1 participant