A Geometry problem that is giving me trouble

  • Context: Undergrad 
  • Thread starter Thread starter Yondaime5685
  • Start date Start date
  • Tags Tags
    Geometry
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
Yondaime5685
Messages
27
Reaction score
0
So here is a picture I quickly made in photoshop that has the problem:

[PLAIN]http://img21.imageshack.us/img21/9406/trigproblem.png

The rectangle's dimensions are known. (w & h) So it follows that the angle, "@", and the diagonal, "d", is also known. The width between the two black lines, "g", is known too. (I actually "slid" that line down to the end of the black line(The "bottom" one).) Also the black lines themselves are of the same length.

Basically everything that is in red is known and I need either x OR y in terms of the other "knowns."

Now in the paper that I drew this, I labeled more things such as all the possible angles that I saw or could create. I used law of cosines for that non-right triangle in the middle made up of d, y, and the length of one of the black lines. But I didn't label them on this picture since that would really clutter it up. I figured all those other things could be derived with the information from this picture and maybe even more that I missed.

I was hoping someone could help me find a relationship that gives me x OR y, since w is known, I just need one or the other.

This seems, at first, a doable trig problem, but when I started working on it, I found that it is not so simple.

So I would definitely appreciate any help on this problem. This is not a homework or some sort of hard teaser problem that was assigned in class. This popped up while I was doing my research work and I need to find "x" so that I can write finish writing my code for my research.

And if you need any more details, please ask. Thanks in advance.
 
Last edited by a moderator:
Mathematics news on Phys.org
Hi Yondaime568! :smile:

Because I will work with x and y coordinates, I will call your x by a. I won't use the y.

First, fix a coordinate axis on the rectangle. The leftbottom corner will be (0,0), the lefttop corner is (0,h) and the rightbottom corner is (w,0).

The straight line emanating from (0,h) will intersect the x-axis in (a,0). Thus the line has the equation

[tex]hx+ay-ha=0[/tex]

A vector parallell to this line an emanating from (0,0) is (-a,h).

Let (s,r) be a vector normal to (-a,h), then this must satisfy

[tex]-sa+hr=0[/tex]

and thus

(s,r)=(h,a) seems to be a good choice for a normal. Normalizing this normal to have length g yields the normal

[tex]\left(\frac{h}{g\sqrt{h^2+a^2}},\frac{a}{g\sqrt{h^2+a^2}}\right)[/tex]

The line in your picture coming from (w,0) must go through

[tex]\left(\frac{h}{g\sqrt{h^2+a^2}},\frac{a}{g\sqrt{h^2+a^2}}+h\right)[/tex]

The line parallell to [itex]hx+ay-ha=0[/itex] and through this point is

[tex]hx+ay-\frac{h^2}{g\sqrt{h^2+a^2}}-\frac{a^2}{g\sqrt{h^2+a^2}}-ha=0[/tex]

Now you can check for yourself for which value of a that this line goes through (w,0). Thus you must find a such that the following is satisfied:

[tex]hw-\frac{h^2}{g\sqrt{h^2+a^2}}-\frac{a^2}{g\sqrt{h^2+a^2}}-ha=0[/tex]
 
Well first of all, thank you for replying.

I followed your steps and it makes sense. I was a bit uneasy in understanding the normalizing parts, but I trusted you. (It is definitely because of my limited knowledge than yours. :shy:)

So I decided to use your end result and I solved for a using Alpha:

http://www.wolframalpha.com/input/?i=solve%28h*w-%28%28h^2%29%2F%28g*sqrt%28h^2%2Ba^2%29%29%29-%28%28a^2%29%2F%28g*sqrt%28h^2%2Ba^2%29%29%29-h*a%3D0%2Ca%29

I then plugged in test values to get some numerical results. g=50 w=997 h=1200

But when I used these values, I didn't get a sensible answer:

http://www.wolframalpha.com/input/?i=%28%28g^2*h^2*w%29-%28sqrt%28g^2*h^4%2Bg^2*h^2*w^2-h^2%29%29%29%2F%28g^2*h^2-1%29+where+g%3D50+h%3D1200+w%3D997

Of course the other result would give me an answer if the second line was on the other side. But either way, clearly the "x", or "a" from your definition, is less than that. Actually it should be around 932. (I checked it with photoshop. In fact, that is where this whole problem arose from: writing a code that can manipulate an image. Now I can do it manually with no problem. But I need it automated. And that is where I need to know what "x" is in terms of the other knowns.)

Again I thank you for replying and I don't want to be a burden. :shy:

-edit

Actually what I really need is that angle that forms from the end of "x" and the end of the black line. (The one starting from the top left corner of the rectangle.) I figured that might help someone.
 
Last edited:
OK, I made a mistake on the normalizing part :frown:

Here's the corrected version

Because I will work with x and y coordinates, I will call your x by a. I won't use the y.

First, fix a coordinate axis on the rectangle. The leftbottom corner will be (0,0), the lefttop corner is (0,h) and the rightbottom corner is (w,0).

The straight line emanating from (0,h) will intersect the x-axis in (a,0). Thus the line has the equation

[tex]hx+ay-ha=0[/tex]

A vector parallell to this line an emanating from (0,0) is (-a,h).

Let (s,r) be a vector normal to (-a,h), then this must satisfy

[tex]-sa+hr=0[/tex]

and thus

(s,r)=(h,a) seems to be a good choice for a normal. Normalizing this normal to have length g yields the normal

[tex]\left(\frac{gh}{\sqrt{h^2+a^2}},\frac{ga}{\sqrt{h^2+a^2}}\right)[/tex]

The line in your picture coming from (w,0) must go through

[tex]\left(\frac{hg}{\sqrt{h^2+a^2}},\frac{ag}{\sqrt{h^2+a^2}}+h\right)[/tex]

The line parallell to [itex]hx+ay-ha=0[/itex] and through this point is

[tex]hx+ay-\frac{gh^2}{\sqrt{h^2+a^2}}-\frac{ga^2}{\sqrt{h^2+a^2}}-ha=0[/tex]

Now you can check for yourself for which value of a that this line goes through (w,0). Thus you must find a such that the following is satisfied:

[tex]hw-\frac{gh^2}{\sqrt{h^2+a^2}}-\frac{ga^2}{\sqrt{h^2+a^2}}-ha=0[/tex]

Wolfram alpha gave me as solution

[tex]a=\frac{gh\sqrt{h^2+w^2-g^2} -h^2w}{g^2-h^2}[/tex]

I'll check it some more, but it makes more sense now...
 
Yep, that does it! :cool: Thanks so much! This is going to help me out a lot. I wish I could give you something. So here are some http://freeinternetcookies.com/" . You have to click yes. :smile:
 
Last edited by a moderator: