Discussion about math, puzzles, games and fun. Useful symbols: ÷ × ½ √ ∞ ≠ ≤ ≥ ≈ ⇒ ± ∈ Δ θ ∴ ∑ ∫ • π ƒ ¹ ² ³ °
 

You are not logged in. #1 20051205 20:27:01
more vectors, angles and vertices...Hi again, #2 20051206 06:36:22
Re: more vectors, angles and vertices...arctan slope of line AB = angle of the line AC from the vertical because of the 90 degree angle between AB and AC. Last edited by irspow (20051206 06:41:07) #3 20051206 07:38:30
Re: more vectors, angles and vertices...Nice job, irspow! I like it! igloo myrtilles fourmis #4 20051206 07:48:57
Re: more vectors, angles and vertices...Thanks both! #5 20051206 08:06:43
Re: more vectors, angles and vertices...It is much worse than that! Because I flipped the x and y positions for the original points my slope was off also. In corrected form: Last edited by irspow (20051206 08:12:32) #6 20051206 08:28:48
Re: more vectors, angles and vertices...That's not how I did it John. I just observed that if AB had an angle of arctan 14/5 above the horizontal then line C would have that same angle from the y axis or vertical because of the 90 degree angle between them. Constructing that triangle using C as the hypotenuse is how I used the trigonomic functions. Notice that the opposite side of this angle is horizontal and thus represents the change in x, hence the use of the sine function for the x position. #7 20051206 20:18:10
Re: more vectors, angles and vertices...Works great! #8 20051207 09:43:46
Re: more vectors, angles and vertices...Your first problem was because of how I structured the equations. By definition point A will have a smaller x value then point B. A simple "if" statement can easily cure that. #9 20051208 01:49:43
Re: more vectors, angles and vertices...Thanks Irspow. Yes, I did the if statement as I couldn't think of a way to solve this in the function. I am not sure about your second problem with the slope. With that simple if statement of x1 and x2 it seems to work fine. I tried all sorts of possible situations and it does give the desired result. Or, maybe I didn't check on y1 = y2, will do that later when I am back home. #10 20051208 03:11:23
Re: more vectors, angles and vertices...Both answers are correct depending which direction you want to go. igloo myrtilles fourmis 