Hi, I can make this simple script for you, but its simple if the room is a square or a rectangle. There is no problem if the room will always have angles less than 180 degrees, otherwise we can think in something.
If you have a minute, take a look to my profile so you can see my last works.
Best regards, Fred.