Skip to content

A Rust app to generate a meander (Greek fret or Greek key design), a decorative border constructed from a continuous line, shaped into a repeated motif.

License

Notifications You must be signed in to change notification settings

bingqiao/meander

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Meander

Crates.io

Create a frame of Greek Key (Meander) design in SVG format.

This is a Rust crate for creating both rectangle and circle border designs of the Greek Key (Meander).

Images

Here are some examples of the images that can be generated:

Rectangle

Circle

Install

cargo install greek-meander

Usage

General Options

Option Description Default
stroke-width The width of the stroke 6.0
stroke-color The color of the stroke "#AB8E0E"
stroke-opacity The opacity of the stroke 0.7
border-margin The margin of the border 1
file The base name of the output file "meander"

Rectangle

To generate a rectangle meander design, use the rect command:

meander rect --size <SIZE> --width <WIDTH> --height <HEIGHT>

Options

Option Description Default
size The size of the greek key cells 25
width The number of cells for the top and bottom borders 16
height The number of cells for the left and right borders 9

Example

meander --stroke-color "blue" --file "my_design" rect --size 12 --width 22 --height 14

This will generate a my_design_rect.svg file.

Circle

To generate a circle meander design, use the circle command:

meander circle --radius <RADIUS> --pattern-count <PATTERN_COUNT>

Options

Option Description Default
radius The radius of the circle 300.0
pattern-count The number of patterns in the circle 30

Example

meander --stroke-color "red" --file "my_circle_design" circle --radius 120 --pattern-count 24

This will generate a my_circle_design_circle.svg file.

Build and Run

To build this project, navigate to the project root directory and run:

cargo build

To run the project, use:

cargo run -- <GENERAL_OPTIONS> <COMMAND> <OPTIONS>

For example:

cargo run -- --stroke-color "blue" --file "my_design" rect --size 12 --width 22 --height 14

License

This project is licensed under the MIT License. See the LICENSE file for details.

About

A Rust app to generate a meander (Greek fret or Greek key design), a decorative border constructed from a continuous line, shaped into a repeated motif.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages