How can I find dip direction and a dip of a plane with known normal vectors?
11 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a question about converting normal vector components of a plane into dip and dip direction. I have a txt file containing multiple colums and three of than being nx, ny, and nz? Can you please help me on how to find a dip direction and a dip of a plane. Note - some of my nz values are negative. Below I am posting a core that i wrote but it is not giving be good values for dip direction. Thank you for your help
load('artificial_slope.txt') %loading data
% defining input values based of input txt file
nx = data(:,4)
ny = data(:,5)
nz = data(:,6)
% abs vaue of nz component to eliminite minus sign
nz_abs = abs(nz)
% dip calculation
dip_disc = acos(nz_abs)*(180/pi)
% dip direction calculation (giving wrong results)
dip_dir = (360-atan2(ny,nx) * (180/pi))-90
1 commentaire
Matt J
le 19 Oct 2022
Since most people in the forum are probably not aeronautical engineers, you will increase your chances of a response if you define some of the specialized terminology, like dip and dip direction. Figure illustrations may also be helpful.
Réponses (1)
Bjorn Gustavsson
le 19 Oct 2022
Modifié(e) : Bjorn Gustavsson
le 20 Oct 2022
Some corrections you might consider are:
load('artificial_slope.txt') %loading data
% defining input values based of input txt file
nx = data(:,4);
ny = data(:,5);
nz = data(:,6);
n = [nx,ny,nz];
n = n./vecnorm(n,2,2); % normalize to unit-vectors. People promise to only give you the unit-length
% normal-vector, if you normalize it you're sure it is. Big
% difference. Big.
% abs vaue of nz component to eliminite minus sign
% nz_abs = abs(nz) Scrap this. Handle the dip-direction some other way.
% This is too brutal and too early.
% dip calculation
dip_disc = acos(n(:,3))*(180/pi);
% dip direction calculation (giving wrong results)
dip_dir = atan2(n(:,2),n(:,1))*180/pi; % should be counter-clock-wise from your x-direction.
% If x is East and y is North and you want
% clock-wise from North:
dip_dir = atan2(n(:,1),n(:,2))*180/pi;
That should be it. There are many conventions for azimuthal angles. Just step through the different possibilities one by one till you stumble onto the one that fits.
HTH
2 commentaires
Hrvoje Lukacic
le 20 Oct 2022
Thank you for the answer. I tried to run the code and as soon as I do the normalization of the vector I am getting wrong results for the dip angle (angle between the plane and the horizontal) . So if I calculate the dip with original nz I get the correct result and when I use normalised the result is wrong. Why is thet, what does normalization do to the vector data
Bjorn Gustavsson
le 20 Oct 2022
My bad, I forgot that you had a whole array of normal-vectors. I think I've corrected the normalization now, it relies on the intelligently-extended element-wise division for the normalization, if you have a very old matlab-version that would have to be done with a repmat to get the dimensions to match.
HTH
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!