segment

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package segment defines a truncated cone-like object whose bottom is defined by a characteristic line segment (instead of a point). This object also has a characteristic "turning radius", which defines the sharpness of the curve from the bottom line segment to the edges.

L \     / R
   \___/
     S

As with the case of the point-defined cone, we define tangential lines from the VO to the left and right circles of at the ends of the line segment S.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S

type S struct {
	// contains filtered or unexported fields
}

func New

func New(s segment.S, p vector.V, radius float64) *S

func (S) L

func (s S) L() line.L

L calculates the left vector of the tangent line from the agent position to the base of the truncated line segment.

N.B.: ℓ is always directed away from the agent.

func (S) R

func (s S) R() line.L

func (S) S

func (s S) S() segment.S

S returns the base of line segment VO. Depending on the setup, this segment may differ from the constructor input segment.

Jump to

Keyboard shortcuts

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