Project

hexflex

0.0
No commit activity in last 3 years
No release in over 3 years
# Hexflex [![Build Status](https://travis-ci.org/aauthor/hexflex.svg?branch=master)](https://travis-ci.org/aauthor/hexflex) Hexflex is a Ruby gem and command-line tool for automatically generating [hexaflexagon] templates. ## Installation gem install 'hexaflexa' ...or you can put it in your Gemfile. ## Usage ### as a gem in your ruby project To create an [RVG] object containing a vector of the hexaflexagon template: Hexflex.make_template_vector(side_fills: ARRAY_OF_SIDE_FILLS, template: TEMPLATE) To save the hexaflexagon template as a file to the disk: Hexflex.create_template_image!(side_fills: ARRAY_OF_SIDE_FILLS, template: TEMPLATE, output_file_name: OUTPUT) Where: - a `SIDE_FILL` is a [standard X color] or path to file for a side of the hexaflexagon. Either three or zero sides should be specified. The default are cyan, magenta, and yellow. - `TEMPLATE` is template the form for the hexaflexagon. It can either be "tape" or "glue". The default is "tape". - `OUTPUT` is a path to save the hexaflexagon template image. The default is "out.png". ### as a command-line tool hexflex [-s SIDE_FILL -s SIDE_FILL -s SIDE_FILL] [-t TEMPLATE] [-o OUTPUT] See above for definitions of `SIDE_FILL`, `TEMPLATE`, AND `OUTPUT`. [hexaflexagon]: https://en.wikipedia.org/wiki/Flexagon#Trihexaflexagon [standard X color]: https://en.wikipedia.org/wiki/X11_color_names [RVG]: https://rmagick.github.io/rvg.html
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.4
~> 3.3

Runtime

 Project Readme

No longer actively developed

I rewrote this in Javascript. Any new feature work will happen there.

Hexflex

Hexflex is a Ruby gem and command-line tool for automatically generating hexaflexagon templates.

Installation

gem install 'hexaflexa'

...or you can put it in your Gemfile.

Usage

as a gem in your ruby project

To create an RVG object containing a vector of the hexaflexagon template:

Hexflex.make_template_vector(side_fills: ARRAY_OF_SIDE_FILLS, template: TEMPLATE)

To save the hexaflexagon template as a file to the disk:

Hexflex.create_template_image!(side_fills: ARRAY_OF_SIDE_FILLS, template: TEMPLATE, output_file_name: OUTPUT)

Where:

  • a SIDE_FILL is a standard X color or path to file for a side of the hexaflexagon. Either three or zero sides should be specified. The default are cyan, magenta, and yellow.
  • TEMPLATE is template the form for the hexaflexagon. It can either be "tape" or "glue". The default is "tape".
  • OUTPUT is a path to save the hexaflexagon template image. The default is "out.png".

as a command-line tool

hexflex [-s SIDE_FILL -s SIDE_FILL -s SIDE_FILL] [-t TEMPLATE] [-o OUTPUT]

See above for definitions of SIDE_FILL, TEMPLATE, AND OUTPUT.