Skip to contents

Given the bottom-left and top-right coordinates, this function calculates the four corners of a parallelogram with a specified slope.

Usage

get_corners(x0, y0, x1, y1, slope)

Arguments

x0

Numeric. The x-coordinate of the bottom-left corner.

y0

Numeric. The y-coordinate of the bottom-left corner.

x1

Numeric. The x-coordinate of the bottom-right corner.

y1

Numeric. The y-coordinate of the top-right corner.

slope

Numeric. The slope of the parallelogram's diagonal edges.

Value

A list containing the coordinates of the four corners.