get vector of reflected photon
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(vector), | intent(inout) | :: | I |
incident vector |
||
type(vector), | intent(in) | :: | N |
normal vector |
subroutine reflect(I, N) !! get vector of reflected photon !> incident vector type(vector), intent(INOUT) :: I !> normal vector type(vector), intent(IN) :: N type(vector) :: R R = I - 2._wp * (N .dot. I) * N I = R end subroutine reflect