Possibly a GPU failure. However please try restarting in Safe Mode per the directions in Use Safe Mode to isolate issues with your Mac. If that does not help, it is likely a hardware failure and it is time to replace the computer as the GPU is part of the main logic board. The last thing to do though is to post an EtreCheck report and we can look for obvious items that have been installed on the computer.
Please navigate to www.Etrecheck.com and download the free version of EtreCheck. Once you have you downloaded the app and installed it, please run the report and save it. This report will help us get a good idea what has been installed on your system and help us be able to diagnose what may be wrong.
When you have your report, you can attach it when you reply to this message and we can then review it and help you determine what is needed to get your system running well again.
For instructions on how to download your EtreCheck report and attach it to your reply to this message please click https://discussions.apple.com/docs/DOC-250000211