Last change
on this file since 1148 was
1108,
checked in by sommeria, 3 years ago
|
phys_XYZ modified for angular scan
|
File size:
592 bytes
|
Rev | Line | |
---|
[1078] | 1 | %calculate the components of the unit vector norm_plane normal to the plane |
---|
| 2 | %defined by the rotation vector PlaneAngle (in degree) |
---|
[1108] | 3 | % this gives the equation of the plane as norm_plane(1)x + norm_plane(2)y +norm_plane(3)z = cte |
---|
[1078] | 4 | |
---|
[1080] | 5 | function norm_plane=rotate(PlaneAngle) |
---|
| 6 | |
---|
[1078] | 7 | om=norm(PlaneAngle);%norm of rotation angle in degrees |
---|
| 8 | OmAxis=PlaneAngle/om; %unit vector marking the rotation axis |
---|
| 9 | cos_om=cos(pi*om/180); |
---|
| 10 | sin_om=sin(pi*om/180); |
---|
| 11 | coeff=OmAxis(3)*(1-cos_om); |
---|
| 12 | norm_plane(1)=OmAxis(1)*coeff+OmAxis(2)*sin_om; |
---|
| 13 | norm_plane(2)=OmAxis(2)*coeff-OmAxis(1)*sin_om; |
---|
| 14 | norm_plane(3)=OmAxis(3)*coeff+cos_om; |
---|
Note: See
TracBrowser
for help on using the repository browser.