I actually did this at one point in time.
The hardware you're looking for is a "laser galvo" setup. It typically takes a +/-12v range analog signal as input. I ended up building my own hardware to drive this. You can use a D to A converter and an op-amp to take a digital output from a raspberry pi or arduino and get the correct signal level. I ran mine on an arduino and it was plenty fast for simple things. Complex animations that require more compute on the device might be a bit much.
Enabling and disabling the laser is as simple as a transistor.