Intersection operator. Returns the intersection of two SDFs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=wp), | intent(in) | :: | d1 |
SDF_1 distance |
||
real(kind=wp), | intent(in) | :: | d2 |
SDF_2 distance |
||
real(kind=wp), | intent(in) | :: | k |
smoothing factor. |
pure function intersection(d1, d2, k) result(res) !! Intersection operator. Returns the intersection of two SDFs. !> SDF_1 distance real(kind=wp), intent(IN) :: d1 !> SDF_2 distance real(kind=wp), intent(IN) :: d2 !> smoothing factor. real(kind=wp), intent(IN) :: k real(kind=wp) :: res res = max(d1, d2) end function intersection