VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

A 2D Rotation Demo using SIN() and COS()

Peter Wilson  (25 Submissions)   Graphics   Visual Basic 5.0   Beginner   Wed 3rd February 2021

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.

Rate A 2D Rotation Demo using SIN() and COS() (15(15 Vote))

Download A 2D Rotation Demo using SIN() and COS()

A 2D Rotation Demo using SIN() and COS() Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters