All Projects → buchanae → Ink

buchanae / Ink

Creative coding in Go

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Ink

Urpflanze
A library for developers who want to approach to creative coding, artists who want to approach coding and for those who find it fun to play with math.
Stars: ✭ 118 (+2.61%)
Mutual labels:  2d-graphics, generative-art, creative-coding
Glisp
A Lisp-based Design Tool Bridging Graphic Design and Computational Arts
Stars: ✭ 519 (+351.3%)
Mutual labels:  generative-art, creative-coding
Pts
A library for visualization and creative-coding
Stars: ✭ 4,628 (+3924.35%)
Mutual labels:  generative-art, creative-coding
Curv
a language for making art using mathematics
Stars: ✭ 853 (+641.74%)
Mutual labels:  generative-art, creative-coding
Generativeart
Generative Art in Go
Stars: ✭ 313 (+172.17%)
Mutual labels:  generative-art, creative-coding
Fbg
Lightweight C 2D graphics API agnostic library with parallelism support
Stars: ✭ 349 (+203.48%)
Mutual labels:  opengl, 2d-graphics
Dungeontemplatelibrary
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 595 (+417.39%)
Mutual labels:  generative-art, creative-coding
dots
Dots & Boxes Visualization
Stars: ✭ 16 (-86.09%)
Mutual labels:  creative-coding, generative-art
Awesome Creative Coding
Creative Coding: Generative Art, Data visualization, Interaction Design, Resources.
Stars: ✭ 8,696 (+7461.74%)
Mutual labels:  generative-art, creative-coding
001
draw_code.001 — ThreeJS, WebGL & GLSL
Stars: ✭ 48 (-58.26%)
Mutual labels:  generative-art, creative-coding
Sketches
a starting point for sketches
Stars: ✭ 66 (-42.61%)
Mutual labels:  generative-art, creative-coding
Ofelia
A real-time cross-platform creative coding tool for multimedia development
Stars: ✭ 269 (+133.91%)
Mutual labels:  opengl, creative-coding
Artline
A Deep Learning based project for creating line art portraits.
Stars: ✭ 3,061 (+2561.74%)
Mutual labels:  generative-art, creative-coding
Simple2d
🎮 Simple, open-source 2D graphics for everyone
Stars: ✭ 390 (+239.13%)
Mutual labels:  opengl, 2d-graphics
pencil-scribbles
Create pencil effect drawings from pictures using R
Stars: ✭ 30 (-73.91%)
Mutual labels:  creative-coding, generative-art
Awesome Glsl
🎇 Compilation of the best resources to learn programming OpenGL Shaders
Stars: ✭ 530 (+360.87%)
Mutual labels:  opengl, creative-coding
Watercolor Canvas
Creating watercolor-style canvas art
Stars: ✭ 84 (-26.96%)
Mutual labels:  generative-art, creative-coding
gestalt
Creative coding playground - Color, Note, Code
Stars: ✭ 16 (-86.09%)
Mutual labels:  creative-coding, generative-art
manyworlds
A scifi-inspired study of signed distanced functions and noise fields in WebGL
Stars: ✭ 24 (-79.13%)
Mutual labels:  creative-coding, generative-art
Worlds2
Building Virtual Reality Worlds using Three.js
Stars: ✭ 34 (-70.43%)
Mutual labels:  generative-art, creative-coding

GoDoc

Ink is a framework for creative 2D graphics in Go, based on OpenGL. Visit buchanae.github.io/ink for more.

Example: a simple triangle

Install:

go get github.com/buchanae/ink

(Building Ink is a little tricky, because it depends on GLFW. You might need to install these packages:

build-essential
xorg-dev 

Write example.go:

package main

import (
	. "github.com/buchanae/ink/color"
	. "github.com/buchanae/ink/dd"
	"github.com/buchanae/ink/gfx"
)

func Ink(doc gfx.Doc) {
	t := Triangle{
		XY{0.2, 0.2},
		XY{0.8, 0.2},
		XY{0.5, 0.8},
	}
	s := gfx.Fill{Shape: t}.Shader()
	s.Set("a_color", []RGBA{
		Red, Green, Blue,
	})
	s.Draw(doc)
}

Run:

ink example.go

Ink opens a window and renders your triangle:

Triangle example

There are more examples in the sketches directory.

Implementation Notes

  • Ink is based on OpenGL only, although other backends are desired. There is an experimental WebGL branch.
  • Ink is focused on 2D graphics, although 3D is desired some day.
  • Most numbers are float32, because OpenGL APIs are mostly based on float32s.
    • This is also why I haven't used the Go stdlib image/color. I admit this feels messy.
  • Angles are in radians, unless otherwise noted.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].