Skip to content
프로젝트

소개

A functional programming language for procedural art

프로그래밍 언어 및 런타임

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
+1
in 7 days
+2
in 15 days
+2
in 1 month
+2

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

Xylo   License Build Status Latest Version Docs

Xylo is a domain specific language of the functional paradigm that is designed for use in creative coding and procedural art.

Documentation: https://xylo-1.gitbook.io/docs

example

Example

root =
    l 0 FILL : ss 400 bouquet

quality = 750

bouquet =
    r 36 (ss 1.3 flower5)
    : r 15 flower6

flower6 =
    demiflower6
    : flip 90 demiflower6

flower5 =
    demiflower5
    : flip 90 demiflower5

demiflower6 =
    collect (
        for i in 0..12
            r (i * 30) (petal6 quality))

demiflower5 =
    collect (
        for i in 0..5
            r (i * 72) (petal5 quality))

petal5 i =
    if i == 0
        EMPTY
    else
        s 1 0.0001 SQUARE
        : ss 0.005 (tx -0.5 (l 0 CIRCLE))
        : tx 0.5 (r 144.04 (ss 0.998 (tx 0.5 (lshift (1 / quality * 0.6) (petal5 (i - 1))))))

petal6 i =
    if i == 0
        EMPTY
    else
        s 1 0.0001 SQUARE
        : tx -0.5 (ss 0.01 (l 0 CIRCLE))
        : tx 0.5 (r 120.21 (ss 0.996 (tx 0.5 (lshift (1 / quality) (petal6 (i - 1))))))

Installation

Released Builds

You can find the latest release of the Xylo binaries here.

Cargo Install

You can install Xylo using Cargo:

cargo install xylo-lang

Manual Build (Linux)

Clone the repo:

git clone https://github.com/giraffekey/xylo

Build the repo:

cargo build --release

Copy the CLI:

sudo cp target/release/xylo-lang /usr/bin/xylo

Usage

Write some Xylo code in a .xylo file e.g. art.xylo.

Then, generate an image from that code:

xylo generate art.xylo --width 800 --height 800

If your code is valid, you should see an image output to art.png.

관련 프로젝트 살펴보기

불러오는 중…