[SOLVED] anisotropic rotation matrix

Here you can report the problems encountered when using a function relative to the variography:
- experimental variography (vario.calc, vario.grid, vmap.calc, ...)
- model fitting (model.auto)

[SOLVED] anisotropic rotation matrix

Postby pilartugores » Mon Feb 10, 2014 6:18 pm

Hi again!
I'm using RGeoS 9.1.6. I'm trying to create models with anisotropy to see try to see how CVgeo changes.
I did not want to create them interactively but instead I wanted to use new ("model", ...).
However, I cannot understand how the 2x2 rotation matrix is working.

I think that the first column of the matrix are the cosinus and the sinus of the major axis of my anisotropic model (i.e. the "x" and the "y") but the second column it's a bit confusing for me. How can I compute the values myself?

For instance, let's say my data have anisotropy in the 53º direction. The rotation matrix would be:
0.602 -0.799
0.799 0.602

Could someone explain it to me?
pilartugores
 
Posts: 3
Joined: Fri Feb 07, 2014 4:38 pm

Re: anisotropic rotation matrix

Postby Didier Renard » Fri Feb 21, 2014 8:54 pm

Hello

Sorry for this late answer.
If you wish to define the model in a non-interactive way, let me first point out that you can use the function model.create() which will help you in setting the correct values through arguments (described in the on-line help) rather than feeding the Model class directly. As a matter of fact, defining the fields of a class directly (without going through a dedicated function) can be dangerous as the tests (involved within model.create function for example) are bypassed. Then the result is unpredicatble.

Nevertheless, either when defining directly the fields of the Model class or using model.create, you must provide the rotation matrix in case of anisotropy.
In 2-D, if the rotation angle is 53 degrees (counted counterclockwise starting from East ... i.e. the trigonometric angle), you must define the argument called aniso.rotmat which is a 2x2 rotation matrix.

Using Internet, you can certainly check that the 2x2 rotation matrix is given as follows:
Cos(d) -Sin(d)
Sin(d) Cos(d)

That corresponds exactly to the argument that you gave in you post, i.e. aniso.rotmat=
0.602 -0.799
0.799 0.602

Note that, using model.create, il you wish to enter the following matrix:
0.602 0.799
0.799 0.602

A message warns you that the previous matrix is NOT a valid rotation matrix (determinant not equal to 1).

Hope this helps.
Didier Renard
 
Posts: 337
Joined: Thu Sep 20, 2012 4:22 pm


Return to Variography

Who is online

Users browsing this forum: No registered users and 1 guest

cron