bstone / Visualize-M2

A Macaulay2 (https://github.com/Macaulay2/M2) package to help visualize algebraic objects in the browser using javascript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ideal for 2d needs help

bstone opened this issue · comments

The 2d ideal could use some work. The convex hull does not work well and the menu does not exist.

I can get this presentable by Thursday but not great. Should I get rid of the "generate Tikz code" option?

No, just make it as an issue and we can try and get it done. I don't think it will be that hard. I think you can even find the code in our paper.

I propose that we should modify the name of this method (and the corresponding 3d one) to be called visualize(MonomialIdeal) since it really only makes sense for monomial ideals, and MonomialIdeal is a recognized data type in M2. This should only require a minor edit in Visualize.m2, but I don't want to do it in case you guys are modifying that part of the file. There could be another overloaded version visualize(Ideal) where the code is just visualize monomialIdeal I. This will visualize the monomial ideal generated by the leading terms of a Groebner basis for I. As of right now, nothing in the code for visualize(Ideal) is checking that the ideal is actually a monomial ideal.

That's a great idea. I just changed the visualize.m2 file in the Tom_lattice branch. You can now enter any ideal, in the two variable case, and it will visualize the monomial ideal of leading terms. I'm not sure we need a new method just for monomial ideals.

There are still a couple bugs with the visualization but I should hopefully get it done today. I know what's causing the issue, I just need to figure out how to fix it. This file will need a major overhaul in the future but it will have to do for now.

Sorry, ignore Tom_lattice, that won't be able to work without a server. I meant to say it's on the Tom_ideal branch

I think visualize 2d ideal is mostly done but there are issues with how things are displayed. Try the example I = ideal(x^9, x^6_y^2, x^5_y^4, x^2*y^7, y^8). The lattice point (2,6) not included in the convex hull when it should be, and there are those white lines at x=3 and x=6. These are certainly issues with rounding. I can try some quick and dirty fixes but eventually this file may need an overhaul.

I think this looks good for this version. Tom, can you create some issues saying what needs to be done in the ideals?