Simple trigonometry / geometry question. Diagram included

Click For Summary

Discussion Overview

The discussion revolves around a mathematical problem related to calculating the translation movements of letters in a rotating text application. Participants explore trigonometric and geometric relationships to derive the necessary lengths for proper translation based on given angles and sides.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests finding the Cartesian location of each letter, converting to polar coordinates, rotating, and converting back to Cartesian coordinates.
  • Another participant mentions the cosine law as a relevant approach to the problem.
  • A different contribution calculates the length of a side opposite angle a using the formula 2Ksin(a/2) and discusses the formation of a Pythagorean triangle to find other lengths.
  • One participant proposes that the blue side can be expressed as K * sin(a) and the orange part as K * (1 - cos(a)), forming a right triangle with K as the hypotenuse.
  • Another participant introduces the concept of an isosceles triangle, noting that the angle with respect to translation lines affects the lengths of the translation lines, which could vary independently.

Areas of Agreement / Disagreement

Participants express differing views on the necessity of certain angles and the methods for calculating the lengths involved. There is no consensus on a single approach or solution, and multiple competing models are presented.

Contextual Notes

Some assumptions about the triangle's orientation and the relationships between angles and sides are not fully resolved, leading to uncertainty in the calculations proposed.

rekshaw
Messages
15
Reaction score
0
Hey all,

BACKGROUND: (please note that knowledge of this is not necessary):
I'm currently writing a javascript application using vectors (with jquery and raphaeljs) that enables me to rotate custom text (using font.js file, not normal fonts). However, due to a bug in the new version of raphael, when I rotate a text made up of multiple letters, all the letters rotate on their own relative center.

Don't worry, I'm not asking you to help me debug my scripting language, I'm asking you to help me get around this bug by manually calculating the translating movements (x and y) of each letter.

If I wasn't clear until now, don't worry, I'll show you exactly what I need (quick photoshop):

MATHEMATICAL PROBLEM:

[PLAIN]http://img534.imageshack.us/img534/1780/rotationtranslation.png

Variables I know:

- the angle a
- the angles b
- the 2 sides K

I need to find the blue and orange (y and x) lengths in order to translate my letters properly.
 
Last edited by a moderator:
Mathematics news on Phys.org
Quick reply: find the cartesian location of every letter, switch to polar, rotate them the desire angle, switch back to cartesian
 
gsal said:
Quick reply: find the cartesian location of every letter, switch to polar, rotate them the desire angle, switch back to cartesian
gsal's answer is probably what you really want but, to literally answer your question, what you're looking for is the cosine law...
 
Length of side opposite to angle a, = 2Ksin(a/2) ; for small a it will approximate to K.a (a in radian ) Let, say this side "Black"
Since,"Orange" line is perpendicular to "Blue". Orange, Blue and Black line form Pythagorean triangle. So the problem is reduced to finding the Pythagorean triplet. Length of Black line, l(Black) is already known, now we need to find, l(Orange) and l(Blue).

Length of Black line, l(Black) = 2Ksin(a/2). Now if l(Black) is not an integer, then divide l(Black) by a rational number "k", such that l(Black)/k is an integer. Let call this number "B".

If B is odd then, other two numbers of Pythagorean triplet are P1 = B2/2 - 1/2 and P2 = P1+1

If B is even then, other two numbers of Pythagorean triplet are P1 = B2/4 - 1 and P2 = P1+2

Now, l(orange), l(Blue) = kP1 , kP2 ( if kP1 > kP2 then l(Blue) = kP1 and l(orange)= kP2 otherwise l(Blue) = kP2 and l(orange)= kP1)
 
As far as I can tell, you don't need the angle b.

The blue side is K \ \sin \left(a\right). The orange part is K \ \left(1-\cos\left(a\right)\right).

You'll see that in your diagram, if you switch the blue line over you can make a right triangle with K as the hypotenuse. This means that sin(a) * k = the blue line.

You'll also notice that the other leg of the right triangle with hypotenuse K is cos(a) * k. Subtracting this from your length K gives you the length of your orange section.
 
Consider this:
You have an isosceles triangle
You know the measures of it's angles
You know the lengths of it's legs
You know the length of it's base

What you DON'T know is the angle that the triangle makes with either the vertical or horizontal translation lines.

In other words, you could rotate the triangle, keeping the same physical qualities as the original one, which would change the lengths of those translation lines.
Therefore, each line independently has the potential for having a length ranging from zero to the same length as the base of the triangle.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
7
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
2
Views
19K
  • · Replies 2 ·
Replies
2
Views
11K
  • · Replies 9 ·
Replies
9
Views
1K
Replies
1
Views
4K
  • · Replies 13 ·
Replies
13
Views
3K