Language for making art using mathematics that supports full color, animation and 3D printing.

Curv is a programming language for creating art using mathematics. Itâ€™s a 2D and 3D geometric modelling tool that supports full colour, animation and 3D printing.

Features:

- Curv is a simple, powerful, dynamically typed, pure functional programming language.
- Curv is easy to use for beginners. It has a standard library of predefined geometric shapes, plus operators for transforming and combining shapes. These can be plugged together like Lego to make 2D and 3D models.
- Coloured shapes are represented using Function Representation (F-Rep). They can be infinitely detailed, infinitely large, and any shape or colour pattern that can be described using mathematics can be represented exactly.
- Curv exposes the full power of F-Rep programming to experts. The standard geometry library is written entirely in Curv. Many of the demos seen on shadertoy.com can be reproduced in Curv, using shorter, simpler programs. Experts can package techniques used on shadertoy as high level operations for use by beginners.
- Rendering is GPU accelerated. Curv programs are compiled into fragment shaders which are executed on the GPU.
- Curv can export meshes to STL, OBJ and X3D files for 3D printing. The X3D format supports full colour 3D printing (on Shapeways.com, at least). These meshes are defect free: watertight, manifold, with no self intersections, degenerate triangles, or flipped triangles.

```
// Voronoi
let
random2f(x,y) =
let t = sin(x+y*1e3);
in (frac(t*1e4), frac(t*1e6));
voronoi(x,y) =
let p = floor(x,y);
f = frac(x,y);
res = 8;
in do
for (i in -1 .. 1)
for (j in -1 .. 1)
let b = (i,j);
r = b - f + random2f(p+b);
d = dot(r,r);
in res := min(res, d);
in sqrt res;
in
make_texture ((x,y,_,_) -> sRGB.grey(voronoi(x,y)))
```

Information updated 09/03/19