• Stars
    star
    115
  • Rank 305,916 (Top 7 %)
  • Language
    Racket
  • License
    Other
  • Created almost 9 years ago
  • Updated almost 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A language for producing art

stamps

A language for producing art implemented on Racket, inspired by Context Free.

Install

Check out this repository, or download the ZIP file and extract. Start up Racket and open the Package Manager, using the 'Do What I Mean' tab set the Package Source to the directory you've just checked out and click Install.

Learn

Some places to start:

Examples

Sierpinksi

#lang s-exp stamps/lang

(define-shape sierp
  (triangle)
  (sierp [translate   0     0.288]
         [scale       0.5        ]
         [brightness  0.1        ])
  (sierp [translate  -0.25 -0.144]
         [scale       0.5        ]
         [brightness  0.1        ])
  (sierp [translate   0.25 -0.144]
         [scale       0.5        ]
         [brightness  0.1        ]))

(start-shape sierp)

Sierpinski Image

Tree

#lang s-exp stamps/lang

(define-shape tree
  (branch)
  (branch [flip 90]))

(define-shape branch
  [98 =>
      (circle)
      (circle [scale 0.9]
              [brightness 1])
      (branch [y 0.2]
              [scale 0.99]
              [rotate 3])]
  [2 =>
     (circle)
     (circle [scale 0.9]
             [brightness 1])
     (branch [y 0.2]
             [scale 0.99]
             [flip 90])
     (branch [y 0.2]
             [scale 0.6]
             [brightness 0.2])])

(start-shape tree)

Tree Image

Vortex

#lang s-exp stamps/lang

(define-shape S
  (square)
  (square [s 0.5     ]
          [b 1       ])
  (S      [r  .2     ]
          [t  .7   .7]
          [s  .995   ]
          [b  .002   ]))

(background '(0 0 .5))
(start-shape S)

Vortex Image

Anemone

#lang s-exp stamps/lang

(define-shape start
  ((stem 8) [h 300]))

(define-shape (stem branches)
  ((loop ([i branches])
         ((branch (random-real -6 6)) [x .1]
                                      [r (* i (/ branches 360))]
                                      [s .7]))))

(define-shape (branch turn)
  [1    => (circle        [sat .4])
           ((branch turn) [x .1  ]
                          [s .99 ]
                          [r turn]
                          [b .01 ])]
  [  .1 => ((branch (random-real   -6 6)))]
  [ .04 => ((stem   (random-integer 1 4)))]
  [.001 => ])

(background '(0 0 0))
(maximum-render-cycles 100000)
(start-shape start)

Anemone Image

More Repositories

1

master-plan

Project Management for Hackers
Haskell
131
star
2

azteroids

Simple Asteroids game in C++ and OpenGL
C++
56
star
3

dbn-cuda

GPU accelerated Deep Belief Network
Python
46
star
4

swagger-test

Property based testing tool for Swagger APIs
Haskell
33
star
5

corewar

Core War's MARS implementation in Python
Red
26
star
6

recruitr

Online Code Judging Tool
Python
25
star
7

sdl-mandelbrot

Simple Mandelbrot fractal renderer
C
21
star
8

hreddit

Reddit command line client
Haskell
12
star
9

pet-monitor

Make your pet's food bowl smarter by tracking refilling and consumption automatically.
JavaScript
10
star
10

ifs

Iterating Function Systems
Python
9
star
11

messagepack

Serialize instance for Message Pack Object msgpack.org[Haskell]
Haskell
7
star
12

io-throttle

Limit number of IO actions started per second
Haskell
6
star
13

biotopia

Simple Artificial Life Simulator using pygame
Python
6
star
14

frustum-culling

Some old 3D OpenGL experiments from college time
C++
6
star
15

fallingsand

A falling sand game implementation in Python (using pygame)
Python
6
star
16

factorization-diagrams

Creates a factorization diagram for a given integer
Haskell
5
star
17

git-self-update

A self-update repository script for very limited hosts
Shell
5
star
18

probdist

Probability Distributions in Node JS
JavaScript
4
star
19

json-archetype

A tool to help testing JSONs
Haskell
4
star
20

messagepack-rpc

Message pack RPC over TCP for Haskell
Haskell
4
star
21

iteration-tools

Scheme implementation of iteration tools
Racket
3
star
22

haskell-spoj

Sphere Online Judge solutions in Haskell
Haskell
3
star
23

pythonbots

Python robots programming game (AT-Robots clone)
Python
3
star
24

secret-santa

Secret Santa Assigner with QR-Codes
Haskell
2
star
25

simvida

Artificial life simulator
C++
2
star
26

rpjs

Reactive Programming Tutorial in Javascript
TeX
2
star
27

yammer2hello

An integration between Yammer and Evernote's Hello
Python
2
star
28

open-scale-influxdb-reader

Reads from OpenScale serial port, and writes to InfluxDB
Python
2
star
29

yconf

Yahoo Configuration Service (configuration as a service)
Haskell
1
star
30

liquidballs

A movie renderer using povray ray-tracer and ODE dynamics engine.
C
1
star
31

schemer

A Minimalist C++ Scheme interpreter
C++
1
star
32

secret-santa-server

The Server version of the secret-santa project
Haskell
1
star
33

springbots

Genetic algorithm experiment
Python
1
star
34

l-systems

Lindenmayer Systems is a parallel rewriting system, namely a variant of a formal grammar, most famously used to model the growth processes of plant development, but also able to model the morphology of a variety of organisms.
Python
1
star
35

dotfiles

A repository to help me organize my dotfiles across several hosts
Emacs Lisp
1
star
36

functional-programming-exercises

Haskell implementation of the exercises from the Book "Functional Programming in Scala (Chiusano, Bjarnason)"
Haskell
1
star