i need to develop a simple drawing tool in opengl which will let me draw points, lines, circles and ellipses. these options must be availble by clicking the right mouse button. i can include a line and points but can’t get circles to work.
try a for-next loop and rotate and then translate out the length of the radius.
I did something like this before, allowing you to choose the number of lines is usefull so you can have anything from a pentagon to a pixel perfect circle.
simulating the circle is easiest done with sin and cos, it is useful to know that sin and cos are modelled on a circle, sin and cos of an angle will produce two new values which can represent proportional vertices of a circle.