intersect_one_line Function

public function intersect_one_line(lx, ly) result(intersections)

intersect_one_line

Find the intersections of a single line with itself.

Description

This function finds the self-intersections in a line. This is determined by checking all possible pairs of lines segments. The iteration starts from the first segment of the line and compares it with all subsequent segments to find intersections. Then it goes to the next segment and repeats the process. The intersections are stored in an array of point type, which contains the coordinates of the intersection points.

Examples


References

Arguments

Type IntentOptional Attributes Name
real(kind=pr), intent(in) :: lx(:)
real(kind=pr), intent(in) :: ly(:)

Return Value type(Point), allocatable, (:)


Calls

proc~~intersect_one_line~~CallsGraph proc~intersect_one_line intersect_one_line proc~intersects intersects proc~intersect_one_line->proc~intersects proc~solve_system solve_system proc~intersects->proc~solve_system none~dgesv dgesv proc~solve_system->none~dgesv

Variables

Type Visibility Attributes Name Initial
integer, public :: i
integer, public :: j
real(kind=pr), public :: s
real(kind=pr), public :: t
real(kind=pr), public :: x
real(kind=pr), public :: xold
real(kind=pr), public :: y
real(kind=pr), public :: yold