0.6.2-dev0
FORCES
FORtran lib for Comp. Env. Sys.
Loading...
Searching...
No Matches
mo_poly::areapoly Interface Reference

Area of polygon. More...

Public Member Functions

real(sp) function areapoly_sp (coord)
 Area of polygon.
 
real(dp) function areapoly_dp (coord)
 Area of polygon.
 

Detailed Description

Area of polygon.

Function for computing the area of a polygon (2D, convex or not). Function for computing the area of a polygon The polygon can be convex or not.

The method is only applicable for 2D polygons and points.

Example

polygon(:,1) = (/ 1.0_dp,2.0_dp,2.0_dp,1.0_dp /)
polygon(:,2) = (/ 1.0_dp,1.0_dp,2.0_dp,2.0_dp /)
area = areapoly( polygon )
! --> area = 1

See also example in test directory.

Literature

  1. http://de.wikipedia.org/wiki/Geometrischer_Schwerpunkt
Returns
Area of polygon
Parameters
[in]coordcoordinates of the polygon in question

Definition at line 31 of file mo_poly.f90.

Member Function/Subroutine Documentation

◆ areapoly_dp()

real(dp) function mo_poly::areapoly::areapoly_dp ( real(dp), dimension(:,:), intent(in)  coord)

Area of polygon.

Function for computing the area of a polygon (2D, convex or not). Function for computing the area of a polygon The polygon can be convex or not.

The method is only applicable for 2D polygons and points.

Example

polygon(:,1) = (/ 1.0_dp,2.0_dp,2.0_dp,1.0_dp /)
polygon(:,2) = (/ 1.0_dp,1.0_dp,2.0_dp,2.0_dp /)
area = areapoly( polygon )
! --> area = 1

See also example in test directory.

Literature

  1. http://de.wikipedia.org/wiki/Geometrischer_Schwerpunkt
Returns
Area of polygon
Parameters
[in]coordcoordinates of the polygon in question

Definition at line 487 of file mo_poly.f90.

◆ areapoly_sp()

real(sp) function mo_poly::areapoly::areapoly_sp ( real(sp), dimension(:,:), intent(in)  coord)

Area of polygon.

Function for computing the area of a polygon (2D, convex or not). Function for computing the area of a polygon The polygon can be convex or not.

The method is only applicable for 2D polygons and points.

Example

polygon(:,1) = (/ 1.0_dp,2.0_dp,2.0_dp,1.0_dp /)
polygon(:,2) = (/ 1.0_dp,1.0_dp,2.0_dp,2.0_dp /)
area = areapoly( polygon )
! --> area = 1

See also example in test directory.

Literature

  1. http://de.wikipedia.org/wiki/Geometrischer_Schwerpunkt
Returns
Area of polygon
Parameters
[in]coordcoordinates of the polygon in question

Definition at line 112 of file mo_poly.f90.


The documentation for this interface was generated from the following file: