Mirror of https://github.com/0x1a8510f2/gopoints
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('') and can be up to 35 characters long.
0x1a8510f2
abf4e1133a

2 years ago  

.github  2 years ago  
examples  2 years ago  
LICENSE  2 years ago  
README.md  2 years ago  
constants.go  2 years ago  
go.mod  2 years ago  
plane.go  2 years ago  
point.go  2 years ago  
sets.go  2 years ago 
README.md
GoPoints
A very simple Go library for creating shapes on a 2D plane out of points, using only the Go stdlib. Supports some basic functions like:
 storing points in a
Plane
structure  joining arbitrary points with lines (including diagonal)
 filling shapes with points
 flipping the whole plane or some points along the X or Y axis
 fetching all points from a plane
 fetching points from a plane based on the return value (boolean) of a given function (like a mathematical equation)
 TODO: Applying an arbitrary transformation based on a function to the points on the plane
Use cases
Can be used for any number of things, but my primary usecase is generating images made of 2D shapes, such as the example image generated with examples/CreatePngImage.go
:
Usage examples
Some example code can be found in the examples
directory in the root of this repository