Simple mathematical pendula simulation