RayNormal_unit Subroutine

public subroutine RayNormal_unit(t, phi, e1, e2)

Arguments

Type IntentOptional Attributes Name
real(kind=8), intent(in) :: t(3)
real(kind=8), intent(in) :: phi
real(kind=8), intent(out) :: e1(3)
real(kind=8), intent(out) :: e2(3)

Called by

proc~~raynormal_unit~~CalledByGraph proc~raynormal_unit RayNormal_unit proc~influence3dgeogaussiancart Influence3DGeoGaussianCart proc~influence3dgeogaussiancart->proc~raynormal_unit proc~influence3dgeohatcart Influence3DGeoHatCart proc~influence3dgeohatcart->proc~raynormal_unit proc~step3d Step3D proc~step3d->proc~raynormal_unit proc~bellhopcore BellhopCore proc~bellhopcore->proc~influence3dgeogaussiancart proc~bellhopcore->proc~influence3dgeohatcart proc~traceray3d TraceRay3D proc~bellhopcore->proc~traceray3d proc~traceray3d->proc~step3d program~bellhop3d BELLHOP3D program~bellhop3d->proc~bellhopcore

Source Code

  SUBROUTINE RayNormal_unit( t, phi, e1, e2 )

    ! Computes the ray normals
    ! Same as routine RayNormal except this version assumes t is already normalized

    REAL (KIND=8), INTENT( IN  ) :: t( 3 )             ! tangent vector (normalized)
    REAL (KIND=8), INTENT( IN  ) :: phi                ! torsion
    REAL (KIND=8), INTENT( OUT ) :: e1( 3 ), e2( 3 )   ! ray normals

    RL = NORM2( t( 1 : 2 ) )

    !  e1
    e1( 1 ) = ( t( 1 ) * t( 3 ) * COS( phi ) + t( 2 ) * SIN( phi ) ) / RL
    e1( 2 ) = ( t( 2 ) * t( 3 ) * COS( phi ) - t( 1 ) * SIN( phi ) ) / RL
    e1( 3 ) = -RL * COS( phi )

    !  e2
    e2( 1 ) = ( t( 1 ) * t( 3 ) * SIN( phi ) - t( 2 ) * COS( phi ) ) / RL
    e2( 2 ) = ( t( 2 ) * t( 3 ) * SIN( phi ) + t( 1 ) * COS( phi ) ) / RL
    e2( 3 ) = -RL * SIN( phi )

    RETURN
  END SUBROUTINE RayNormal_unit