Finding point on line from perpendicular variable

Albin

New member
Joined
May 30, 2016
Messages
3
Hi, I'm programming a small program that creates some geometrical figures in a 3d-space. It mostly goes well, but now I have a small problem I just can't get my head around. (I also want to add my math-skills are not the best, but I'm slowly learning.)

Here's a picture of the problem: (It's a 2d-problem[in 3d space, if that make's sense])

attachment.php

A, B, C and D are a 2d-point in space that can be moved around as pleased. They also have a known unit-vector that always point towards the next point. (Could be converted into angles, if needed)
X is a variable that can be increased and decreased. Should always be perpendicular to point A.
? Are the points that needs to be calculated.
I have a function for meassuring the distances between the red points.

Hope that clarifies everything. Thanks in advance!
Albin
 

Attachments

  • MathProblem.jpg
    MathProblem.jpg
    50.6 KB · Views: 16
Last edited:
Ok, by just drawing it and defining the question, I realized it wasn't that hard after all. I simply converted the unit vector to degrees, offsetted them to zero and returned the absolute value. From that I could calculate the hypotenuse of the blue triangle and multiply that value with the direction vector of the corners.
 
Label top of rectangle (with 2 sides = x) as EF: so rectangle ABFE.

Can ABCD be looked at as a "floor" and ABFE as a "wall"?

If so, how in heck can you have crossing points :confused:

Oh, no, it's all flat. (Should probably not have mention the 3d in the first place) I actually already found a solution, realizing it wasn't that hard after all, once I made the picture and described the problem here on the forum. Posted it here too, but it seems it never really showed up.. :/

Anyway, I just converted the unit-vectors to degrees, offsetted them to zero and from thier absolute value used them to find the hypotenuses in the blue triangles with X as adjacent. Then I meassured the distance between point A and D, subtracted the hypotenuse with that distance, created a new point with coordinates of point D + D's unit-vector * (Distance(A,D) - hypotenuse). Point BC was calculated kind of in the same way. I hope that was kind of understandable.. :-?
 
Top