Wait. Let’s say you are an artist who can paint by hand, and you paint a nude of someone using your imagination, is that actually illegal? Assuming a western jurisdiction, I assume there might be a lot of variation here.
The problem comes with dissemination and intent.
Paint a nude and share it on your art website, ok - post it on the school’s chat group and send it to the models friends and family after you breakup ? Not ok
I'm not familiar with that social precedent being set.
Plenty of nude paints/statues/etc were made posthumously, and tons of them are now permanent monuments in public museums.
Few gave permission, but we as a society seem to think that's okay given our widespread dissemination of the art.
also the motivation matters : these works weren't made for reasons of malice, generally speaking.