The author of this article aims to review the theory of relativity and its implications for physics education by using visual aids and a programming approach. The article will cover the concept of the speed of light in space-time in the context of relativity, and provide illustrations that explain the relationships in the context of general relativity. The focus of the article will be to introduce students to complex concepts and encourage their interest in the topic. The author reports success in teaching the basic concept of the speed of light in space-time to both elementary STEM students and high school students. While the theory of relativity has been taught at the secondary school level in some education systems, there is a lack of research on the effectiveness of using visual aids and a programming approach to enhance students' understanding of the concept. This article aims to fill the gap by evaluating the impact of this approach on students' understanding of the theory of relativity