Mathematical simulation nail board experiment c# source code