- #1
sqljunkey
- 181
- 8
So I have a cube in 3d space and this cube is made out of 8 coordinate points at each corner. Now I have a temperature reading at each point of these corner points. Inside the box I have another point, I want to be able to use the information from the 8 points surrounding the the one middle point( the point in the box) to calculate the direction of change of the temperature.
So if this was in one dimension, and at p1 I had 90 degrees and p2 I had 80 degrees and I would get that the change in temperature is -10. telling me that if I go in the direction of p2 my temperature will decrease.
Someone helped me out for the case of 3d, But I don't quite understand it.
if p_1, ..., p_8 are your points and
w_1, ..., w_8 are your weights (or temperatures) and p is
the point in the middle, calculate T := Sum w_i * (p_i - p)
* (p_i - p)^T for 1 <= i <= 8, and then calculate the
eigenvectors v_1, v_2, v_3 and according eigenvalues l_1,
l_2, l_3 of T, and then pick the v_k where abs(l_k) is > 0
and the greatest or smallest of all abs(l_j) [for 1 <= j,k
<= 3]
if the point p in the middle has a temperature (w)
as well, you should to use (w_i - w) instead of w_i of course You could also "normalize" your tensor T by multiplying with
1 / Sum w_i (or 1 / Sum (w_i - w) if you have w), but that
makes no difference for the eigenvectors
Can anybody help me?
So if this was in one dimension, and at p1 I had 90 degrees and p2 I had 80 degrees and I would get that the change in temperature is -10. telling me that if I go in the direction of p2 my temperature will decrease.
Someone helped me out for the case of 3d, But I don't quite understand it.
if p_1, ..., p_8 are your points and
w_1, ..., w_8 are your weights (or temperatures) and p is
the point in the middle, calculate T := Sum w_i * (p_i - p)
* (p_i - p)^T for 1 <= i <= 8, and then calculate the
eigenvectors v_1, v_2, v_3 and according eigenvalues l_1,
l_2, l_3 of T, and then pick the v_k where abs(l_k) is > 0
and the greatest or smallest of all abs(l_j) [for 1 <= j,k
<= 3]
if the point p in the middle has a temperature (w)
as well, you should to use (w_i - w) instead of w_i of course You could also "normalize" your tensor T by multiplying with
1 / Sum w_i (or 1 / Sum (w_i - w) if you have w), but that
makes no difference for the eigenvectors
Can anybody help me?