line

package
v0.0.0-...-9c88ebf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 31, 2022 License: BSD-3-Clause Imports: 2 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Intersections

type Intersections interface {
	Intersections(Line) []float64
}

Intersections with the given line, expressed as parametric values on the line.

type Line

type Line struct {
	T0 d3.Pt
	D  d3.V
}

Line in 3D space, invoked parametrically

func New

func New(start, end d3.Pt) Line

New line defined by a starting and ending point so that l.Pt1(0)==start and l.Pt1(1)==end.

func (Line) AtX

func (l Line) AtX(x float64) float64

AtX return the T value when the X coordinate of the line is at x.

func (Line) AtY

func (l Line) AtY(x float64) float64

AtY return the T value when the Y coordinate of the line is at y.

func (Line) AtZ

func (l Line) AtZ(x float64) float64

AtZ return the T value when the Z coordinate of the line is at z.

func (Line) Closest

func (l Line) Closest(l2 Line) (float64, float64)

Closest returns the parametric points on both lines at the point they pass closest to eachother

func (Line) Pt1

func (l Line) Pt1(t float64) d3.Pt

Pt1 returns a Pt on the line.

func (Line) String

func (l Line) String() string

String fulfils stringer.

func (Line) V1

func (l Line) V1(t float64) d3.V

V1 always returns l.D, the slope of the line.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL