Need Help With Sin, Cos, and Tan

BlitzMax Forums/BlitzMax Beginners Area/Need Help With Sin, Cos, and Tan

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

You can use a combination of Cos and Sin to turn an angle and a radius into pixel coordinates.

e.g.

Graphics 640,480,0
For Local Angle:Int=0 to 359 step 3
        Plot 320+(100*Cos(Angle)),240+(70*Sin(Angle))
Next

will draw an oval of dots, 3 degrees apart. The 100* and 70* scale the values up because normally you get something in the range of 0 to 1, so to turn it into screen coords you multiply it by the pixel width or height and hey presto.