Public Group

# drawing angles

This topic is 4493 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hi all, This is probably kind of basic, but I'm trying to draw a circle w/ angle lines extending from the center point outwards and then show the degrees of each angle around the circle w/ tick marks. Anyone know a good place I can start that would have opengl example code to help me do this, and also help me in understanding drawing angles w/ degrees, theta, etc...? Any help much appreciated.

##### Share on other sites
The OpenGL red book has an example of drawing a circle w/ a GL_LINE_LOOP. (here is some code that will do the same). I am not familiar with any existing tools that will do this for you. It should be pretty easy to write your own classes/methods to perform the operations you want.

You know the radius of your circle. You know the center point of your circle. You can then easily draw a single line from the center point to a point on the actual circle (center point + radius = distance). Then you need the second line (to give you a particular sector of the circle). You can use basic circle formulas and trig to march around the circumference of the circle to a 2nd point. Then draw a line from the center to this 2nd point. This gives you a sector of a circle. Circle arc and segment formulas will probably be helpful.

Hope that helps.

1. 1
2. 2
Rutin
19
3. 3
4. 4
5. 5

• 9
• 9
• 9
• 14
• 12
• ### Forum Statistics

• Total Topics
633301
• Total Posts
3011268
• ### Who's Online (See full list)

There are no registered users currently online

×