
Algebra PreAlgebra and Basic Algebra Math Forum 
 LinkBack  Thread Tools  Display Modes 
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,932 Thanks: 1127 Math Focus: Elementary mathematics and beyond  Re: calculate width and height
With the angle from sx, sy, rotating counterclockwise 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,932 Thanks: 1127 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,932 Thanks: 1127 Math Focus: Elementary mathematics and beyond  Re: calculate width and height Quote:
Quote:
 

Tags 
calculate, height, width 
Thread Tools  
Display Modes  

Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Finding minimal width of polygon  inkexit  Algebra  1  April 29th, 2012 09:04 AM 
Finding the width of a uniform border  tmac20  Algebra  3  November 1st, 2011 03:57 PM 
How much width and height of square that is 100m2?  JohnSmith222  Applied Math  3  February 12th, 2008 07:22 PM 
reduce area, calculate new height,width  hahaha  Algebra  7  November 12th, 2007 09:38 AM 
Calculating Width & Height of a rectange...?  atw  Algebra  6  May 18th, 2007 06:20 AM 