Dotted octagons and squares