Find intersection in a 4-dimensional space

alx

New member
Joined
Jun 20, 2022
Messages
3
Hello everyone!
While working on a piece of code, I got stuck with a problem but my lack of math background makes it hard to even phrase the question to google, as whatever I find doesn’t seem to fit. Could you please push me in the right direction?

I have 4 points defining a 4 dimensional space. To be clear with my definitions, the first point in the table below is: x = 0, y = 900, z = 205, w = 526.
How to find x and y (is it a range?) for any given pair of z and w? In the table, z = 200, w = 1100, x = ?, y = ?
1655766919560.png

I tried starting with 2D intersections but that seems to lead nowhere.
Thank you!
 
I cannot understand the problem yet:
I have 4 points defining a 4 dimensional space.
What does this mean? Do you mean you have 4 points in a 4-dimensional space? Please clarify
What is known about dependencies between x,y,z and w?
What are other numbers in the table?
Maybe you can provide a fuller description of your problem, not necessarily in mathematical terms.
 
Yes, 4 points in a 4-d space. I was trying to visualize the space with the table, but perhaps just this would be easier:
A (0, 900, 205, 526)
B (0, 100, 80, 350)
C (100, 900, 410, 1119)
D (100, 100, 100, 1007)

In x-y dimensions, the 4 points always form a rectangle. The other two coordinates are variable.
Having the above, can I find x and y for another point E intersecting that plane, given two other coordinates?
E (x, y, 200, 1100)


Am I’m overcomplicating it by putting it in 4D? It can also be seen as 4 points forming a rectangle in a 2D space; each of them has two independent parameters, say z and w:
A (0, 900), z=205, w=526
B (0, 100), z=80, w=350
C (100, 900), z=410, w=1119
D (100, 100), z=100, w=1007

The z and w can be linearly interpolated between the points. With that, I’d need to find the x-y location of a point E, given its z and w:
E (x, y), z=200, w=1100

Hope that makes it more clear?
 
Yes, 4 points in a 4-d space. I was trying to visualize the space with the table, but perhaps just this would be easier:
A (0, 900, 205, 526)
B (0, 100, 80, 350)
C (100, 900, 410, 1119)
D (100, 100, 100, 1007)

In x-y dimensions, the 4 points always form a rectangle. The other two coordinates are variable.
Having the above, can I find x and y for another point E intersecting that plane, given two other coordinates?
E (x, y, 200, 1100)


Am I’m overcomplicating it by putting it in 4D? It can also be seen as 4 points forming a rectangle in a 2D space; each of them has two independent parameters, say z and w:
A (0, 900), z=205, w=526
B (0, 100), z=80, w=350
C (100, 900), z=410, w=1119
D (100, 100), z=100, w=1007

The z and w can be linearly interpolated between the points. With that, I’d need to find the x-y location of a point E, given its z and w:
E (x, y), z=200, w=1100

Hope that makes it more clear?
This is much, much clearer -- thank you.

You have a function ("map") from 2D to 2D, but the nature of this function is difficult to figure out from just 4 points. It is clear that the map is not linear or affine because parallel lines aren't mapped to parallel ones, as can be seen in the attached graph. We can try fitting a projective transformation to you data, but if you supplied more points it might be easier to guess the nature of the function.
Do you have more data than you posted?
1655816731757.png
 
Below is what I got for projective transforms between [imath](x,y)[/imath] and [imath](z,w)[/imath] -- let me know whether it looks right, and what you get for point [imath]E[/imath].

[math]z_k = \frac{a_{1,1} x_k + a_{1,2} y_k + a_{1,3}}{a_{3,1} x_k + a_{3,2} y_k + 1}[/math][math]w_k = \frac{a_{2,1} x_k + a_{2,2} y_k + a_{2,3}}{a_{3,1} x_k + a_{3,2} y_k + 1}[/math]
[math]x_k = \frac{b_{1,1} x_k + b_{1,2} y_k + b_{1,3}}{b_{3,1} x_k + b_{3,2} y_k + 1}[/math][math]y_k = \frac{b_{2,1} x_k + b_{2,2} y_k + b_{2,3}}{b_{3,1} x_k + b_{3,2} y_k + 1}[/math]where:

[imath]a_{1,1} = -0.581842[/imath]

[imath]a_{1,2} = 0.228045[/imath]

[imath]a_{1,3} = 59.798821[/imath]

[imath]a_{2,1} = -1.154890[/imath]

[imath]a_{2,2} = 0.398329[/imath]

[imath]a_{2,3} = 321.556739[/imath]

[imath]a_{3,1} = -0.007884[/imath]

[imath]a_{3,2} = 0.000325[/imath]

[imath]b_{1,1} = 9.293146[/imath]

[imath]b_{1,2} = -6.600246[/imath]

[imath]b_{1,3} = 1566.634358[/imath]

[imath]b_{2,1} = -43.670445[/imath]

[imath]b_{2,2} = -3.493936[/imath]

[imath]b_{2,3} = 3734.939933[/imath]

[imath]b_{3,1} = 0.087474[/imath]

[imath]b_{3,2} = -0.050896[/imath]
 
The green dot on this graph shows point E with [imath]z=200, w=1100[/imath] and the red dot shows which [imath]x,y[/imath] would it correspond to:
1655838577936.png
 
Thank you! Can I ask where do values for [imath]a[/imath] and [imath]b[/imath] come from?

From manual guessing, the expected values are x = 109.3, y = 340 (with some rounding), so the expected point is
E(109.3, 340, 200, 1100)
 
Top