The functionality outlined below, and much more, is implemented in Hodge diamond cutter, which can be used in Sage. If you use it for your research, please cite it using DOI.

Over the past years I've been collecting some examples of Hodge diamonds. I have now combined all of these examples in a (at least for me) convenient framework, where I can easily manipulate them the way I want to. It's available on GitHub, at pbelmans/hodge-diamond-cutter. Whilst there is nothing complicated going on, it is convenient that I never have to think again about how to

  • print things in a convenient way,
  • generate non-trivial examples of Hodge diamonds,
  • manipulate Hodge diamonds by adding, multiplying or twisting them,
  • generate HTML or LaTeX output for them,
  • transform from a representation as a matrix to that as a polynomial (or vice versa),
  • ...

There are some examples in the README.

Please, feel free to make suggestions for more examples. I have implemented all of the examples discussed before on my blog (such as Hilbert schemes of points, Hilbert squares and cubes, moduli of vector bundles, complete intersections, generalised Kummer varieties, ...) and a few more (nested Hilbert schemes, Gushel–Mukai varieties, ...)

Everything which one is supposed to use is documented, and can be accessed in the usual way, by just writing e.g. complete_intersection? if one has yet again forgotten whether the degree or the dimension comes first.

Fun fact: in the first half of the previous century, the area of Belgium I grew up in was famous for its diamond cutting. That, and growing apples and (sour) cherries.