My Math Forum calculate width and height

 Algebra Pre-Algebra and Basic Algebra Math Forum

 December 31st, 2011, 09:36 AM #1 Newbie   Joined: Oct 2011 Posts: 17 Thanks: 0 calculate width and height I need to know the width and height of the green line. For the width in this case it will be negative, but it depends on where the last char is drawn. The problem is that the start position can be rotated as you can see in the image by the thick red line, it's close to a 45 degrees rotation in this case. I know: the start position, sx, sy the center position, cx, cy the end position, ex, ey the radius of the circle, r the angle direction of the end, a The angle is always the same no matter what the start direction is, like in this case I wanted the text to span over 230 degrees so the end angle direction is 230. My math is really bad, Can someone help me?
 December 31st, 2011, 10:55 AM #2 Global Moderator     Joined: Oct 2008 From: London, Ontario, Canada - The Forest City Posts: 7,958 Thanks: 1146 Math Focus: Elementary mathematics and beyond Re: calculate width and height With the angle from sx, sy, rotating counter-clockwise to ex, ey being 230°, width = r * sin(50°), length = r + r * cos(50°).
 January 1st, 2012, 07:08 AM #3 Newbie   Joined: Oct 2011 Posts: 17 Thanks: 0 Re: calculate width and height Thanks. Is 50° only for this case or can I also use it when the end rotation is 90° for example? Cause I'm interested in something that works in more cases.
 January 1st, 2012, 08:39 AM #4 Global Moderator     Joined: Oct 2008 From: London, Ontario, Canada - The Forest City Posts: 7,958 Thanks: 1146 Math Focus: Elementary mathematics and beyond Re: calculate width and height Case 1: For an angle of rotation, R, between 90° and 270° (inclusive), use width = r * sin(A), length = r + r * cos(A). Case 2: For R less than 90° or greater than 270°, use width = r * sin(A), length = r - r * cos(A). To compute A for case 1: A = |180 - R|, where |...| indicates absolute value. To compute A for case 2: A = 360 - R, where R is greater than 270°, and A = R, where R is less than 90°. See this page for information on the various trigonometric functions, what they mean, how they are used etc.
 January 2nd, 2012, 05:47 AM #5 Newbie   Joined: Oct 2011 Posts: 17 Thanks: 0 Re: calculate width and height thanks, this is the closest i come so far. Only if it is greater then 180 and less then 360 then it's on the wrong side. I can check for it and make it negative in such a case. If it is possible with a small adjustment in the math above then please let me know. For the rest, thank you so much,i worked days on it without succes !!
January 2nd, 2012, 08:34 AM   #6
Global Moderator

Joined: Oct 2008
From: London, Ontario, Canada - The Forest City

Posts: 7,958
Thanks: 1146

Math Focus: Elementary mathematics and beyond
Re: calculate width and height

Quote:
 I can check for it and make it negative in such a case.
That's probably the best way to do it.

Quote:
 thanks
You're welcome.

 Tags calculate, height, width

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post inkexit Algebra 1 April 29th, 2012 09:04 AM tmac20 Algebra 3 November 1st, 2011 03:57 PM JohnSmith222 Applied Math 3 February 12th, 2008 07:22 PM hahaha Algebra 7 November 12th, 2007 09:38 AM atw Algebra 6 May 18th, 2007 06:20 AM

 Contact - Home - Forums - Cryptocurrency Forum - Top