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

## Recommended Posts

Hi there, I am just popped in here to ask a question, you know in school when you're constructing angles and stuff, let us say I am gonna construct a 45 degrees angle, then I first have to construct a 90 degree angle and bisect that or something right? Well, I wrote an application just now that just draw angles, you type in which angle you want and it draws it. But, the thing is, is there any way to mathematically find out which angles you need to construct before you actually reach the goal of, lets say 45 Degree angle. Hope I made myself clear, if not then I can give it another shot.

##### Share on other sites
The methods you describe are geometrical ones which can be performed using a compass. The "mathematical" method you're asking about is called trigonometry.

Suppose that your starting point is some point (x0,y0) and that you have an angle theta. Now, you want to draw a line of length r from this point at theta degrees. The formula for this is:

x1 = r * cos(theta) + x0
y1 = r * sin(theta) + y0
DrawLine(x0,y0, x1,y1);

It's that easy! :-)

1. 1
Rutin
67
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633418
• Total Posts
3011786
• ### Who's Online (See full list)

There are no registered users currently online

×