Hodge Diamond Calculator
This applet computes the Hodge diamond of a few classes of interesting varieties over $\mathbb C$, such as smooth complete intersections in projective space and Grassmannians, as well as abelian varieties.
Preset Examples
Complete Intersection Calculator
The Hodge diamond will be displayed here.
How does it work?
The Hodge numbers of complete intersections in Grassmannians works using the Hirzebruch-Riemann-Roch theorem, adjunction formula, and Lefschetz hyperplane theorem, along with Hodge symmetry and Serre duality. Under the hood, a lot of this is computed in Macaulay2 using Schubert calculus.
Abelian varieties are a lot easier (over $\mathbb C$) since topologically they are tori so the Künneth theorem applies.
Smooth Hypersurfaces and Complete Intersections in $\mathbb P^n$
In 1957 Hirzebruch found a generating function for the Hodge numbers of a smooth complete intersection in $\mathbb P^n$ using Chern-Weil theory. He proved that when $X$ is a complete intersection of multidegree $(a_1,\ldots,a_r)$ in $\mathbb P^n$, $$\sum_{p,q}(-1)^q h_{\text{prim}}^{p,q}(X)x^py^q =\dfrac{1}{(1+x)(1+y)}\left(\prod_{i=1}^r\dfrac{(1+x)^{a_i}-(1+y)^{a_i}}{-(1+x)^{a_i}y+(1+y)^{a_i}x}-1\right). $$
You can find a nice implementation of this generating function approach on Pieter Belman's website (which also allows for some twists!). My website also uses this generating function for complete intersections in $\mathbb P^n$.
Smooth Hypersurfaces and Complete Intersections in $\text{Gr}(k,n)$
There is no known generating function such as the one from Hirzebruch in the case of $\text{Gr}(k,n)$. However, we can use the Hirzebruch-Riemann-Roch theorem to determine the euler characteristic of $\Omega^j(X)$, which in turn allows us to compute the Hodge numbers.
Recall that for a holomorphic vector bundle $ E$ on $X$ we define the euler characteristic by $$\chi(X,E) = \sum_{i} (-1)^i\dim H^i(X,E) $$ The Hirzebruch-Riemann-Roch theorem states that $$\chi(X,E) = \int_X \text{ch}(E)\wedge \text{td}(T_X) $$ where $\text{ch}(E)$ denotes the Chern character of $E$ and $\text{td}(T_X)$ denotes the Todd class of the tangent bundle of $X$. These are each computed symbolically in Macualay2 using the Schubert2 package. It turns out that computing $\chi(X,\Omega^j)$ provides enough information to deduce the Hodge numbers of $X$, by the Lefschetz hyperplane theorem: Let $X\subset Y$ be an inclusion of nice enough spaces. Then $$H^i(X)\cong H^i(Y)\text{ for all }i<\text{dim}\,X-1 $$ and $$H^i(X)\to H^i(Y)\text{ is an injection for }i=\text{dim}\,X-1. $$ This, combined with Serre duality and the adjunction formula, is sufficient to compute the Hodge numbers of a complete intersection in $\text{Gr}(k,n)$.