There are some story hints that imply spells are not discovered, but invented.
Quirrell at one point tries to make sure Harry cannot read any books about how spells are made (because he is scared he will attempt it and accidentally destroy the world).
He also brags about having created a dark ritual, with saying he had to spend a lot of time envisioning it mentally and implying that the act of creation was very dangerous.
"I kept that ritual burning in my mind for years, perfecting it in imagination, pondering its meaning and making fine adjustments, waiting for the intention to stabilise. At last I dared to invoke my ritual, an invented sacrificial ritual, based on a principle untested by all known magic. And I lived, and yet live."
Later: "Liked falsse desscription of previousss horcrux sspell sso much, sso dissappointed when realissed truth of it, thoughtss of improved verssion came out in that sshape."
My conclusion: Wizards invent spells through some process, tying a particular outcome with a particular action (waving a wand just so, saying the right words, performing a ritual). This process is, however, incredibly dangerous and most people who try to do this -- and in particular people who try to create powerful spells -- end up dead or worse. (This is how Luna's mother dies.)
Most likely it involves an act of mental concentration where you have to very precisely envision the outcome you desire -- and if you slip, the spell comes out wrong or you die. The act of creation rewrites the universe, adding the spell as a new "law of magic" that can be invoked consistently and safely -- by you or anyone else who knows the procedure. My guess is this envisioning works best if the spell "makes sense to you" -- i.e. most people who try to make a stunning spell using random words (lemondroptriangle) are less successful than those who use something that "sounds like a stunning spell" (stupefy).
So Wingardium Leviosa is weird because someone chose those faux Latin words for their levitation spell, not because of anything innate about the universe. The Atlanteans were not involved (besides possibly nerfing magic by setting up the spell creation process in the first place).
There are some story hints that imply spells are not discovered, but invented.
Quirrell at one point tries to make sure Harry cannot read any books about how spells are made (because he is scared he will attempt it and accidentally destroy the world).
He also brags about having created a dark ritual, with saying he had to spend a lot of time envisioning it mentally and implying that the act of creation was very dangerous.
"I kept that ritual burning in my mind for years, perfecting it in imagination, pondering its meaning and making fine adjustments, waiting for the intention to stabilise. At last I dared to invoke my ritual, an invented sacrificial ritual, based on a principle untested by all known magic. And I lived, and yet live."
Later: "Liked falsse desscription of previousss horcrux sspell sso much, sso dissappointed when realissed truth of it, thoughtss of improved verssion came out in that sshape."
My conclusion: Wizards invent spells through some process, tying a particular outcome with a particular action (waving a wand just so, saying the right words, performing a ritual). This process is, however, incredibly dangerous and most people who try to do this -- and in particular people who try to create powerful spells -- end up dead or worse. (This is how Luna's mother dies.)
Most likely it involves an act of mental concentration where you have to very precisely envision the outcome you desire -- and if you slip, the spell comes out wrong or you die. The act of creation rewrites the universe, adding the spell as a new "law of magic" that can be invoked consistently and safely -- by you or anyone else who knows the procedure. My guess is this envisioning works best if the spell "makes sense to you" -- i.e. most people who try to make a stunning spell using random words (lemondroptriangle) are less successful than those who use something that "sounds like a stunning spell" (stupefy).
So Wingardium Leviosa is weird because someone chose those faux Latin words for their levitation spell, not because of anything innate about the universe. The Atlanteans were not involved (besides possibly nerfing magic by setting up the spell creation process in the first place).