egg.polygon.area: Polygon area

Description Usage Arguments Value Examples

View source: R/egg.polygon.area.R

Description

Iteratively find the area of a polygon on the surface of the egg

Usage

1
egg.polygon.area(egg, vertices, N = 6)

Arguments

egg

an object of class egg.fit

vertices

points describing the vertices of the polygon in spherical coordinates, as obtained from egg.coords

N

number of triangle subdivisions

Value

The area of the polygon in pixels^2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# Determine egg shape and plot
egg.image(egg)
fit = egg.fit()
egg.plot(fit, lwd = 3, col = "red")

# Interactively select a series of points (at least 3)
vertices = egg.coords(fit, type = "polygon", pch = 16, lwd = 3, col = "green")

# Determine the area of the polygon region
egg.polygon.area(fit, vertices, N = 6)

## End(Not run)

egg documentation built on May 2, 2019, 5:55 p.m.

Related to egg.polygon.area in egg...