a language for making art using mathematics https://curv3d.org/
  • C++ 80.3%
  • Python 7.7%
  • HTML 6.5%
  • GLSL 2.5%
  • CMake 0.9%
  • Other 2.1%
Find a file
3DLirious bf573da133 Update Null.rst
Remove reference to `null`, changed `null` to `#null`
2026-02-26 19:12:26 -06:00
.github Update all dependencies and GCC-12 support (#165) 2023-01-31 21:18:06 -05:00
cmake update to latest version of openvdb 2021-05-31 23:23:46 -04:00
curv try to fix windows build 2023-02-04 09:16:48 -05:00
docs Update Null.rst 2026-02-26 19:12:26 -06:00
examples Change null to #null 2026-02-22 10:58:14 -06:00
extern Fix #227: unsigned char in tmc mesher 2026-01-30 17:12:13 -06:00
ideas Remove std.curv gyroid 2025-12-14 15:18:00 -06:00
issues Move RGB_Conversion to issues/closed 2026-02-20 13:36:47 -06:00
lib Change null to #null 2026-02-22 10:58:14 -06:00
libcurv colour.cc: remove old sRGB conversion code 2026-02-15 10:13:56 -06:00
tests Change null to #null 2026-02-22 10:58:14 -06:00
tools Update webRGB to sRGB.web 2026-02-13 11:27:46 -06:00
.gitattributes Update .gitattributes 2024-06-09 17:19:25 -05:00
.gitignore Move flatten_standalone.py to /tools/extern 2025-06-07 16:59:13 -05:00
.gitmodules fix #224 2025-01-11 12:35:54 -05:00
build-appimage.sh Updated AppImage build script 2021-09-12 15:50:52 +08:00
BUILD.md Update BUILD.md 2026-01-30 21:42:49 +01:00
CMakeLists.txt fix performance regression in mesh export 2024-06-24 21:06:30 -04:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2017-08-07 23:33:40 -04:00
CONTRIBUTING.md Update CONTRIBUTING.md 2025-12-20 19:37:59 +01:00
icon.curv Expose window size and update icon to be thicker (#152) 2021-12-02 18:14:04 -05:00
LICENSE update copyright notices 2018-04-08 17:02:51 -04:00
Makefile fix bug #154 -- Typo in Makefile 2021-12-04 07:35:31 -05:00
metainfo.xml Changed default screenshot 2021-09-08 12:59:07 +08:00
NOTICE update copyright to 2021 2021-09-28 11:32:21 -04:00
README.rst Update README.rst 2026-01-30 21:50:13 +01:00
TODO Update TODO 2026-02-15 10:38:11 -06:00
WINDOWS.md Update WINDOWS.md 2025-12-20 19:27:44 +01:00
windows.sh Update windows.sh for tbb package name 2026-01-09 11:53:39 -06:00

Curv: a language for making art using mathematics

Created by Doug Moen <[email protected]>

OKtwistor shreks_donut

Curv is a programming language for creating art using mathematics. It's a powerful 2D and 3D F-Rep implicit 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.

Current status

Curv is currently maintained by Tim Ayres (3DLirious). Work is primarily focused on library and tool development, such as:

  • lib.tpms - library of 27+ Triply Periodic Minimal Surface lattices. Go beyond the gyroid!
  • lib.blend - library of 14+ blending kernels, with colour mixing!
  • lib.shapes2d - library of additional 2D shape primatives, including quadratic bezier curves.
  • lib.shapes3d - library of additional 3D shape primatives.
  • lib.lattice2d - library of 2D infinite lattices, including hexagonal, rhombic, triagonal and rectangular.
  • lib.lattice3d - library of 3D beam/strut lattices.
  • lib.surfaces - library of interesting implicit surfaces, including Taubin's heart.
  • lib.cmap - library of 110+ pre-defined colour maps and utilities to create them.
  • lib.util - library of helpful utility functions, such bbox/viewport manipulation, show_ruler & show_grid to measure shapes.
  • curvimages.py - Python script to enhance output options. Export as still or animated GIF, APNG, or WEBP image formats with transparency, trace to an SVG vector image, or slice a 3D shape or mesh into layered STL, OBJ, PLY, OFF or X3D mesh formats for 3D printing.
  • Oklab and Oklch perceptually uniform colour space support.

...and more. See the TODO list for planned features and improvements.

Getting Started

Community

Hardware and OS Requirements

Linux and Windows (native & WSL) are supported.

MacOS is not currently supported since there is no one to support it and we have no way of testing changes. See issue #272 if you would like to try compiling Curv on MacOS.

In order to export meshes (STL files, etc) using the fast -Ojit method, you need to have a C++ compiler installed (GCC or Clang), and you need the glm C++ math library installed. These things will already be installed if you have built Curv from scratch using the build instructions. Otherwise, if you are using a prebuilt binary, you may want to install these things. Either way, see BUILD.md.

Curv mostly uses OpenGL 3.3, however features from later versions up to and including OpenGL 4.6 are planned to be added over time. The recommended configuration is a GPU made by Intel, AMD or Nvidia, using a known working GPU driver (see below).

  • On Linux, the GPU needs to be modern enough to be supported by the latest driver version from the GPU vendor. Any GPU from 2012 or later will work. Some older GPUs may work: check the list of supported hardware for the driver.
  • On Windows, you can use MSYS2 to build and run a native executable; see WINDOWS.md. Alternatively, you can use Windows Subystem for Linux (WSL) for building and running a Linux executable.
  • On Linux, you have 3 choices (note: some of the info below may be outdated, updates welcome!):
    • An Nvidia GPU, with the Nvidia closed source driver. Any GPU supported by the latest Nvidia driver will work with Curv.

      The open source Nouveau driver is not supported; it is too slow and buggy. Curv runs too slow, with visual glitches. See issue #78.

    • An Intel GPU, using the Intel supplied open source driver (based on Mesa). Any GPU supported by the latest Intel driver will work with Curv (this means: Intel HD Graphics or later).

    • An AMD GPU with the open source Mesa driver, version 19.x or later. The AMDGPU-PRO (closed source) driver should work, but I have no testing reports for it.

      Mesa version 18.x or earlier has a bug on AMD (issue #30) which prevents some Curv programs from running.

  • Raspberry Pi isn't supported.Raspberry Pi 3 and earlier will never be supported, as the GPU is not powerful enough.
  • If Curv is invoked within a VNC session, then it might not have direct access to GPU hardware (a slow software renderer is used instead of the GPU). Curv requires a GPU accelerated VNC server. Try TurboVNC combined with VirtualGL.
  • If Curv is run inside a VM, then it might not have direct access to the GPU. You need to ensure that the VM is GPU accelerated.
  • You can run Curv from the command line on a headless Linux server, to export images and meshes. For image export, you may need to configure a dummy X server: see https://github.com/curv3d/curv/discussions/131.

Curv is not as GPU intensive as AAA video games. Integrated graphics will work fine for most stuff. But you can definitely write Curv code that will benefit from expensive discrete graphics.

Why is Curv so picky about GPU drivers and hardware, when [some old 3D software] runs just fine? The answer is that old 3D software relies primarily on triangle meshes for representing and rendering 3D shapes, whereas Curv uses signed distance fields to represent shapes. Signed distance fields are a powerful, hot new technology that is only made practical by modern GPUs. Curv uses shader programs to render shapes, and uses larger and more complex shader programs than [some old 3D software]. This places a heavy and atypical load on the GPU driver and hardware, which old hardware and old, outdated driver software may not be prepared to deal with.