bresenham {plotcli}R Documentation

Bresenham's line algorithm

Description

This function generates a list of points that form a line between two given points using Bresenham's line algorithm.

Usage

bresenham(x0, y0, x1, y1)

Arguments

x0

The x-coordinate of the starting point.

y0

The y-coordinate of the starting point.

x1

The x-coordinate of the ending point.

y1

The y-coordinate of the ending point.

Value

A list of points that form a line between the two given points.

Examples

bresenham(0, 0, 5, 5)
bresenham(0, 0, -5, -5)

[Package plotcli version 0.1.0 Index]