geom

module
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

README

Geom

A vector package for Go. The two main sub packages are d2 and d3 for 2D and 3D math.

Parametric Naming Convention

Parametric methods take floating point arguments labeled as t0, t1, ..., tn.

The naming convention for parametric methods is as follows. First is the return type, either Pt or V. Then the number of parametric arguments. If it is a currying method, this will be followed by c and the number of arguments curried by the call.

So Pt1 takes one parametric argument and returns a Pt. Pt2c1 curries one of two parametric aruments, returning a Pt1 interface.

The arguments are anchored to the range of [0, 1]. So for a curve t0=0 represents the starting point and t0=1 represents the ending point. In the case of a curve, it may be meaningful to use values outside this range, for instance, on a line t0=-1 is a point equal distance from the end in the opposite direction. In the case of a surface, values outside this range may not be meaninful.

Directories

Path Synopsis
calc
fbuf
Package fbuf provides a set of helpers around buffers of []float64.
Package fbuf provides a set of helpers around buffers of []float64.
poly
Package poly performs operations on polynomials.
Package poly performs operations on polynomials.
d2
generate
Package generate helps generate random data from the types in the d2 package.
Package generate helps generate random data from the types in the d2 package.
d3
affine
Package affine allows for combinations of points where the sum of the coefficients is zero.
Package affine allows for combinations of points where the sum of the coefficients is zero.
solid/box
Package box provids a 3D bounding box.
Package box provids a 3D bounding box.
examples
Package ffmpeg is a utility for calling ffmpeg as a command and piping images to it to render a video file.
Package ffmpeg is a utility for calling ffmpeg as a command and piping images to it to render a video file.
Package geomtest provides helpers for testing the geom packages.
Package geomtest provides helpers for testing the geom packages.
Package iter provides logic for one dimensional iterators.
Package iter provides logic for one dimensional iterators.
Package work is not specific to geometry logic.
Package work is not specific to geometry logic.

Jump to

Keyboard shortcuts

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