Its not true that the sharingan derived from the rinnegan. If you would pay attention youd know that the rikkidou sennin's eyes he had the juubi eye. Which is the sharingan and the rinnegab mixed together. Thats why when madara obtained the rinnegan from pain, he gained another path to the moon...