Lines2

class sonic.Lines2

Bases: sonic.GeometryP2

Constructor Summary
Lines2(varargin)

Container for Lines in P2. Can specify the lines either directly in P2 coordinates, or using angle and perpendicular distance (see Inputs list for details). If specified with angle and perpendicular distance, the convention for conversion into P2 coordinates is:

Coords = [cos(angle); sin(angle); -distance];

Note that this object can contain an arbitrary number of lines.

Inputs:
  • coeffs (3xn double): P2 coordinates of n lines, with the coordinates of each line as the columns of the matrix.

    OR

  • angle (n double): Vector of angles in radians (measured clockwise from the +x axis) for each line, with the n-th entry cooresponding to the n-th line. Must have the same length as perp_dist.

  • perp_dist (n double): Vector of perpendicular distances from the origin to each line, with the n-th entry cooresponding to the n-th line. Must have same length as angle.

Outputs:
  • obj (1x1 sonic.Lines2): Lines2 object, which can contain a multitude of lines.

Last revised: 4/05/24 Last author: Michael Krause

Property Summary
angle
angle_finite
has_inf_lines
inf_lines

Record any lines at infinity:

n

Number of lines represented in this object:

p2

Primarily storing parameterization in P2:

p2_finite
p2_infinite
perp_dist

Perpendicular distances:

perp_dist_finite