intersection Function

public pure function intersection(d1, d2, k) result(res)

Intersection operator. Returns the intersection of two SDFs.

Arguments

Type IntentOptional 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.

Return Value real(kind=wp)


Source Code

    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