matrices demo - keep triangle from leaving screen + comments

credit - Michael Ewe!