Hello Tiago,
Good to hear from you.
I understand that your data set is defined in 3-D. You want to calculate the variogram (of the underlying GRF, using vario,pgs)
in given directions.
The definition of these directions would be the same in the case of calculating the experimental variograms
in several directions in the 3-D space ... using vario.calc() procedure.
In all cases, we must define the 'dirvect' argument.
As mentioned in the documentation (common to thee two functions), dirvect is a matrix which defines the set of directions in which the variogram must be calculated. Its number of rows correspond to the space dimension (i.e. 3) and the number of columns gives the number of directions.
As mentioned, this matrix can be generated by using the function get.directions() which is more flexible to generate this matrix.
In particular, it contains a possibility for defining a set of directions in the XoY plane for a 3-D space:
- Code: Select all
dirvect = get.directions(dirvect=c(155,65),ndim=3)
This provides the following result:
- Code: Select all
[,1] [,2]
[1,] -0.9063078 0.4226183
[2,] 0.4226183 0.9063078
[3,] 0.0000000 0.0000000
which obviously corresponds to 2 directions (because of 2 columns) in a 3-D space (because of 3 rows).
Note that get.direction() does not provide any possibility to generate a complex direction, such as the 3 main directions of an ellipsoid which has been rotated by the combination of three basic rotations. To understand, you must start with the trdiaional unrotated system with three axes OX, OY and OZ. Then:
- you rotate the system AZ degrees around OZ: this gives the new system OX', OY',OZ'=OZ
- then you rotate this new system AY around the OY' axis: you obtain the new system: OX", OY"=OY', OZ"
- finally you rotate the new system around OX" and obtain the final system.
To my knowledge, these angles are called respectively aximuth, dip and pitch.
To facilitate the calculation of the directions along the main axes of the final system we also provided a tool called
util.ang2mat() where you simply specify the space dimension (i.e. 3) and the list of the three angles.
This directly provides the a 3x3 matrix which can be entered as the 'dirvect' for the definition of the directions: each one of the three columns corresponds to one axis of the final system
Hope this will help.
IF it solved your problem, please modify the name of your POST by adding "[SOLVED]" before its contents.