I wanted the same thing (to programmatically control a laser) so I took an existing library (oriented around drawing of frames) and hooked into it in a way that I could send an limitless stream of points to it.
Generally, the search term you want to search for is "ILDA". ILDA compatible lasers have a standard connector on the back to set the X/Y position of the laser as well as the intensity of the color components.
I wanted the same thing (to programmatically control a laser) so I took an existing library (oriented around drawing of frames) and hooked into it in a way that I could send an limitless stream of points to it.
Generally, the search term you want to search for is "ILDA". ILDA compatible lasers have a standard connector on the back to set the X/Y position of the laser as well as the intensity of the color components.