p is the probability that a given site is occupied (black dot).
If two nearest neighbour sites are occupied, they get connected.
N_x is the number of sites in x direction.
N_y is the number of sites in y direction.

You can zoom and slide in the frame.
Click to reset zoom level.

Observe if you can find a continous line between two opposite borders.
This will happen (for infinite systems "Thermodynamik Limit") at an
precise value of p ("Critical Temperature").

For the triangular lattice the critical value is at approximately "p=0.5".
For the square lattice the critical value is at about "p=0.59".
(For the triangular lattice to see that approximation:
Replace 3 sites (forming a triangle),
with a single site, which is occupied if most of the original sites were occupied.
What is the probability p' that this new site is occupied in dependence of the old probability?
Solution: p' = p^3+3*p^2*(p-1)
What are the fixed points (p' = p) of this recursion?
Solution: p=0, p=1 and p=0.5 are the fixed points.)

Source and Information: https://github.com/The-Ludwig/perculation