I learned that Japan has a weird history of not having an official flag until 1999, the current flag has a history going back 1000+ years but my understanding is that the rising sun with rays was invented in 1870. I can't seem to find much info on its creation and was curious.
I've seen the ray designs used in art pre-Meiji restoration so I guess its a dual question of who designed the 16 ray flag as well as where does the general "ray" design come from.
The 16-rayed Army flag was designed by Yamada Akiyoshi, a fourth-rank officer of the Ministry of War, Soga Sukenori, a fifth-rank officer, and Harada Ichidō, the vice president of the Military Academy. According to Sukenori's autobiography, the same committee decided on military ranks, troop names and uniform designs. When they worked on military ranks, Ichidō, having studied at a military school in the Hague, investigated Western examples through Dutch books, Sukenori picked suitable names from historical positions in the Imerial court, and then Akiyoshi submitted the draft to the general meeting. According to Sukenori, they initially designed the flag with pointed rays, but someone at the general meeting remarked that it looked like an advertisement for konpeitō candies, so they modified it to the final form. It was finally prescribed as the Army flag by the Grand Council of State in Proclamation No. 355 on June 13, 1870.
Sukenori doesn't mention what inspired their design, but there are some family crests representing the sun surrounded with radial rays. They are traditionally known as hiashi mon (sun-leg crests), and were adopted by several different clans in Northern Kyushu. Though there is no reliable evidence, some documents mention the Kikuchi and the Takagi clans' use in the Heian period. According to the legend in Takagi Hachiman Shrine, when Takagi Sadanaga settled the village in 1140s or 1186, the god of Hachiman appeared in his dream, and ordered him to paint the image of the rising sun on his military flags. In the Sengoku period, the Ryūzōji clan used 12-legged hiashi. It is supposed to have been passed down from the Takagi clan, but one theory suggests that it was modeled after the Genji guruma of the Satō clan, which actually represents an oxcart wheel. Sukenori was from Yanagawa Domain, Northern Kyushu, so it is possible he was familiar with these crests.
The number of the rays in the Army flag might come from the 16-petaled chrysanthemum crest of the Imperial House. It is uncertain when that number of petals became the standard, but in the Meiji period, Proclamation No. 802 of 1869 prescribed it exclusively represent the Imperial family, and ordered the princes' families to use 14 or 15 petaled patterns. But still, there is no evidence that connects the Army flag with the Imperial crest, or with the hiashi mon.
Radial rays are widely used to represent the aureolas of divine beings in Buddhist sculpture and painting. A few examples are:
Bronze aureolas, Hōryū-ji, 7th century
Statue of Amoghapāśa, Tōdai-ji, ca. 748
Amida Shōju Raigō Zu, Tokyo National Museum, 14th century
Amida Sanson Raigō Zu, British Museum, 14th century