line_coords: Makes coordinates for a line

View source: R/heat_tree--shape_generators.R

line_coordsR Documentation

Makes coordinates for a line

Description

Generates an n x 2 matrix containing x and y coordinates between 1 and 0 for the points of a line with a specified width in cartesian coordinates.

Usage

line_coords(x1, y1, x2, y2, width)

Arguments

x1

(numeric of length 1) x coordinate of the center of one end

y1

(numeric of length 1) y coordinate of the center of one end

x2

(numeric of length 1) x coordinate of the center of the other end

y2

(numeric of length 1) y coordinate of the center of the other end

width

(numeric of length 1) The width of the line.


metacoder documentation built on April 3, 2025, 8:39 p.m.