by Peter Wilson (25 Submissions)
Category: Graphics
Compatability: Visual Basic 5.0
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (14 Votes)
This VB code graphically shows the relationship between Sine and Cosine when drawing a cirlce. In my humble opinion, I think drawing a circle is the first thing all graphics programmers need to learn. Although it may look like I'm just plotting a single dot in a cirlce, there is another way of looking at this. You could say I am rotating the dot around it's origin. This is exactly the sort of code you will need to rotate a space ship around it's origin, ala 'Asteroids' style. In all my years of programming, I've never once seen an application such as this one. Hopefully, it will clear up what SIN and COS actually look like when plotted.