# How do I find the delta Z of the at the midpoint of the plane?

Suppose that there is a rectangular plane in coordinates x,y and z is pointing out of the page. There are corners A,B,C,D. How do I find the delta Z of the at the midpoint of the plane. I know that the equation of a plane is A + Bx + Cy = D
Thank you

EnumaElish
Homework Helper
laminatedevildoll said:
Suppose that there is a rectangular plane in coordinates x,y and z is pointing out of the page. There are corners A,B,C,D. How do I find the delta Z of the at the midpoint of the plane. I know that the equation of a plane is A + Bx + Cy = D
Thank you
What does Delta Z stand for? Can you give a definition? Is it like a derivative?

Also, the plane equation does not include z, is that correct? Why are there two separate constants, A and D? What makes me curious is that if the equation didn't include a Z term, it would have been more economical to write it as A + Bx + Cy = 0; or one might write it as Bx + Cy = F (such that F = D - A in your notation).

I might be able to help if you give a little more explanation and/or redefine the problem as a line in XY coordinates (Cartesian 2-dimensional plane) instead of a plane in XYZ coordinates (Cartesian 3-dimensional space). Does this makes sense?

Since your plane equation does not involve the z coordinate, I am going to assume that the equivalent formula for the line does not include the y coordinate: A - Bx = D. (Again, I could write this as Bx = F, but I am giving you the benefit of doubt.) Assuming that this is the correct equivalent formula for a line, how would you define delta Y (the equivalent of delta Z in your case) at the midpoint of this line?

Last edited:
EnumaElish said:
What does Delta Z stand for? Can you give a definition? Is it like a derivative?

Also, the plane equation does not include z, is that correct? Why are there two separate constants, A and D? What makes me curious is that if the equation didn't include a Z term, it would have been more economical to write it as A + Bx + Cy = 0; or one might write it as Bx + Cy = F (such that F = D - A in your notation).

How would you restate this problem on the Cartesian plane, a line replacing the plane? Since your plane equation does not involve the z coordinate, I am going to assume that the equivalent formula for the line does not include the y coordinate: Bx = D. How would you define delta Y (the equivalent of delta Z in your case) at the midpoint of the line?

I might be able to help if you give a little more explanation and/or redefine the problem as a line in the XY coordinates (Cartesian 2-dimensional plane) instead of a plane in the XYZ coordinates (Cartesian 3-dimensional space). Does this makes sense?
Sorry, I should've been more clearer. This is a 3-D problem. There is a traingle in a cartesian plane, with sides A,B,C. Suppose I want to find out what z(x,y) (the midpoint between the rectangular plane with respect to x,y), I have to write the following equations...

delta z - this is the midpoint of the rectangle

z(x,y) = A + Bx + Cy

z_a(x,y) = A + Bx_a + Cy_a (delta Z with respect to side 'A' et cetera)
z_b(x,y) = A + Bx_b + Cy_b
z_c(x,y) = A + Bx_c + Cy_c

Now is it true that I have solve for the above equations and plug it into z(x.y) to determine the midpoint of the rectangle, the delta z?

EnumaElish
Homework Helper
The 3 equations will give you constants A, B, C assuming you have numbers (data) for xi, yi, zi for i = a, b, c (that is, delta z with respect to each side).

If you take these solutions (for ex., let's say you find A = 2, B = 0.5, C = -3) and plug them into the eq. for z(x,y) then you will have a general (or generic) formula that would represent the relationship between the (x, y) coordinates and the z coordinate.

EnumaElish
Homework Helper
myself said:
... If you take these solutions (for ex., let's say you find A = 2, B = 0.5, C = -3) and plug them into the eq. for z(x,y) then you will have a general (or generic) formula that would represent the relationship between the (x, y) coordinates and the z coordinate.
...
I should've said, "then you will have a general (or generic) formula that would represent the relationship between the (x, y) coordinates and the z coordinate ON THE OBJECT THAT THOSE 3 EQUATIONS ARE DESCRIBING." So if the 3 eq's describe a triangle then the generic eq. would also describe the same triangle in generic terms.

EnumaElish said:
The 3 equations will give you constants A, B, C assuming you have numbers (data) for xi, yi, zi for i = a, b, c (that is, delta z with respect to each side).

If you take these solutions (for ex., let's say you find A = 2, B = 0.5, C = -3) and plug them into the eq. for z(x,y) then you will have a general (or generic) formula that would represent the relationship between the (x, y) coordinates and the z coordinate.

Well, if I am writing a computer program, then I don't have number constants. Instead, I have to plug in and form equations in order to find the coefficients I guess. Is there any way, to calculate the slope of each side, right, left, top and bottom to determine delta z? Can I relate delta z to the slopes in any way. I am still experimenting a bit.

EnumaElish
Homework Helper
I hear you, but when it is time to run the program, will the user (running the prog.) going to have those inputs? Is each of these points an input to the prog.? Just trying to understand the context.

Is this somehow related to the warped plane question that has been posted under a different thread?

EnumaElish said:
I hear you, but when it is time to run the program, will the user (running the prog.) going to have those inputs? Is each of these points an input to the prog.? Just trying to understand the context.
Yes... the user will enter some coordinates.
EnumaElish said:
Is this somehow related to the warped plane question that has been posted under a different thread?
Yes, I suppose so. However, the question about the warped plane is behind me now. I have moved on to much better things.

EnumaElish
Homework Helper
I have a 3-D traingle, and the edges are a,b,c. ...

My equations are
$$\Delta Z$$ = A + Bx + Cy
$$\Delta Z_a$$ = A + Bx_a + Cy_a
$$\Delta Z_b$$ = A + Bx_b + Cy_b
$$\Delta Z_c$$ = A + Bx_c + Cy_c

In order to solve for $$\Delta Z$$, how do I use the above equations? Do I have to add them (equations 2,3,4) all up and substitute in A for the first equation?

To find the coefficients, do I just solve for A,B,C after I know what $$\Delta Z$$ is?
...
Yes, solve for A,B,C after knowing what $$\Delta Z_i$$ is, for i = a, b, c.

1st specific eq gives you A = z_a - Bx_a - Cy_a
Write 2nd eq as
z_b = z_a - Bx_a - Cy_a + Bx_b + Cy_b
z_b - z_a = B(x_b - x_a) + C(y_b - y_a)
then
B = ( (z_b - z_a) - C(y_b - y_a) )/(x_b - x_a)
Write 3rd eq as
z_c = z_a - Bx_a - Cy_a + Bx_c + Cy_c
z_c - z_a = B(x_c - x_a) + C(y_c - y_a)
z_c - z_a = (x_c - x_a)( (z_b - z_a) - C(y_b - y_a) )/(x_b - x_a) + C(y_c - y_a)
Solve for C.
Replace C in B.
Replace B and C in A.
You're golden.

EnumaElish
Homework Helper
z_c - z_a = ((x_c - x_a)(z_b - z_a))/(x_b - x_a) + C[(y_c - y_a) - (y_b - y_a)/(x_b - x_a)]

which yields the following solution for C:

C* = [ (z_c - z_a) - ((x_c - x_a)(z_b - z_a))/(x_b - x_a) ] / [(y_c - y_a) - (y_b - y_a)/(x_b - x_a)]

B* = ( (z_b - z_a) - C*(y_b - y_a) )/(x_b - x_a)
A* = z_a - B*x_a - C*y_a

z = A* + B*x + C*y.

Last edited:
EnumaElish said:
Yes, solve for A,B,C after knowing what $$\Delta Z_i$$ is, for i = a, b, c.

1st specific eq gives you A = z_a - Bx_a - Cy_a
Write 2nd eq as
z_b = z_a - Bx_a - Cy_a + Bx_b + Cy_b
z_b - z_a = B(x_b - x_a) + C(y_b - y_a)
then
B = ( (z_b - z_a) - C(y_b - y_a) )/(x_b - x_a)
Write 3rd eq as
z_c = z_a - Bx_a - Cy_a + Bx_c + Cy_c
z_c - z_a = B(x_c - x_a) + C(y_c - y_a)
z_c - z_a = (x_c - x_a)( (z_b - z_a) - C(y_b - y_a) )/(x_b - x_a) + C(y_c - y_a)
Solve for C.
Replace C in B.
Replace B and C in A.
You're golden.
I see. I appreciate your help. I had initially had some sort of equations like that, except I had a 4 thrown somewhere in there. It's really strange how I have forgotten the easier concepts in Math. Old age, I presume.

In truth, earlier I had mentioned that I had forgotten the warped problem, but it's still in my mind. After posting that rather naive message, I figured out that if I took the average slope of each side of the plane, the "warpedness" would flatten out. If this sounds drastically wrong, then I'd appreciate if you say so. A simple yes or a no would be fine.

Last edited:
EnumaElish
Homework Helper
It doesn't sound drastically wrong, but it will surely depend on at which point the average is being calculated. The average slope may depend on how "lengthy" the flat portion is relative to the warped portion (as well as how warped).

I think the important step is to program this in its simplest conceivable form, and then see that the program works as intended and expected. You can always improve it later. So go ahead and program away. That's what I'd do in your shoes right now, to the best of my understanding and imagination. Last edited:
EnumaElish
Homework Helper
l.e.d.,

I understand you're familiar with the concept of simulation. Here is a thought that may be useful in calculating your average flat plane as a best approx. to a warped plane.

I will first describe this in terms of a warped line in 2-d. Suppose a curve looks like a flat line everywhere except at either end where it is curved up or down. Suppose one wishes to fit a flat line to represent a best approx. to the warped line. I could start using Excel. FIrst step is to simulate the flat part of the actual line (the fault line, as you noted in another post). Using the "Rand()" function I can generate 10,000 "X" points and then project them on to the y coordinate simpy by y = A + Bx (you may have to experiment in Excel to come up with the "right" A and B values, but you could accomplish this by graphing y vs. x for different A and B values and then choosing the one you find most appropriate. THe next step is to simulate the curved (warped) end of the fault. Here again I would generate 10,000 X values using RAND(). Then experiment with a polynomial form, such as y = a + b1x + b2x2 + ... + bkxk and choose the right parameters (a and the b's) by experimenting and graphing them in Excel. Then I'd append (splice) the set of data points for the flat part to the set of data points for the the curved part.

Now that I have x and y values both for the flat part and the curved part(s), I would run a regression in Excel where I would specify "y values" as the "Y variable" (left hand side, explained, dependent variable) and "x values" as the "X variable" (right hand side, explaining, independent variable). THen run the regression, and let Excel determine the best linear fit to your nonlinear fault. A sample regression line is $y=\theta_0 + \theta_1 x + \varepsilon$ where epsilon is the statistical error term of the regression.

You can implement all this using any statistical package, and in fact any computer language, including Fortran. But visuals in Excel are easier to obtain. OTOH, Fortran is much more suitable for a simulation project because it's fast like nothing else. So if your ideal sample size in a simulation is 10,000,000 rather than 10,000, you should use Fortran. But no harm in trying it out in Excel first using 10,000 because then you'll have a feeling of control.

FInally, to apply this to 3-d, you need to generate two data vectors, x and y; then project each onto the z coordinate. E.g. for the flat part, you'll have z = A + By + Cx. For the warped parts you might have z = a + b10y + b01x + b11xy + b20y2 + b02x2 + b21y2x + b12yx2 + b22x2y2 + ... Once you determine your a and b's, you can then splice this part to the flat part and run a multiple regression with left hand side variable z and right hand side variables x and y (as in $z=\theta_0+ \theta_1 x + \theta_2 y + \varepsilon$ where epsilon is the statistical error term of the regression).

If you already have data points describing a fault (e.g. obtained from geo. surveys, etc.) then you can skip the data generation step and the trial-and-error process to visually determine the best a and b's; you can directly go and run your linear regression to determine the best linear (flat) approximation to a nonlinear object (warped plane or warped line).

I hope this is useful.