All Projects → tidwall → Pinhole

tidwall / Pinhole

Licence: isc
3D Wireframe Drawing Library for Go

Programming Languages

go
31211 projects - #10 most used programming language

Labels

Projects that are alternatives of or similar to Pinhole

Lume
Create CSS3D/WebGL applications declaratively with HTML. Give regular DOM elements shadow and lighting.
Stars: ✭ 445 (-12.92%)
Mutual labels:  graphics
Smpl
NumPy, TensorFlow and PyTorch implementation of human body SMPL model and infant body SMIL model.
Stars: ✭ 460 (-9.98%)
Mutual labels:  graphics
Jasonmatoonrenderpipeline
JTRP : Unity HDRP ToonShading Render Pipeline (Preview)
Stars: ✭ 478 (-6.46%)
Mutual labels:  graphics
Aachartkit
📈📊🚀🚀🚀An elegant modern declarative data visualization chart framework for iOS, iPadOS and macOS. Extremely powerful, supports line, spline, area, areaspline, column, bar, pie, scatter, angular gauges, arearange, areasplinerange, columnrange, bubble, box plot, error bars, funnel, waterfall and polar chart types. 极其精美而又强大的跨平台数据可视化图表框架,支持柱状图、条形图、折…
Stars: ✭ 4,358 (+752.84%)
Mutual labels:  graphics
Unityurpunlitscreenspacedecalshader
Unity unlit screen space decal shader for URP. Just create a new material using this shader, then assign it to a new unity cube GameObject = DONE, now you have unlit decal working in URP
Stars: ✭ 455 (-10.96%)
Mutual labels:  graphics
Ultraviolet
The Ultraviolet Framework is a .NET game development framework written in C#.
Stars: ✭ 466 (-8.81%)
Mutual labels:  graphics
Luminancehdr
A complete workflow for HDR imaging
Stars: ✭ 443 (-13.31%)
Mutual labels:  graphics
Renderhelp
⚡️ 可编程渲染管线实现,帮助初学者学习渲染
Stars: ✭ 494 (-3.33%)
Mutual labels:  graphics
Icg Webgl
交互式计算机图形学——基于WebGL的自顶向下方法(第七版)的例子与练习题
Stars: ✭ 458 (-10.37%)
Mutual labels:  graphics
Core2d
A multi-platform data driven 2D diagram editor.
Stars: ✭ 475 (-7.05%)
Mutual labels:  graphics
Miniengineao
SSAO image effect from Microsoft MiniEngine, ported to Unity.
Stars: ✭ 448 (-12.33%)
Mutual labels:  graphics
Rewriting
Rewriting a Deep Generative Model, ECCV 2020 (oral). Interactive tool to directly edit the rules of a GAN to synthesize scenes with objects added, removed, or altered. Change StyleGANv2 to make extravagant eyebrows, or horses wearing hats.
Stars: ✭ 454 (-11.15%)
Mutual labels:  graphics
Kvantwig
Non-realistic hair simulation in Unity
Stars: ✭ 467 (-8.61%)
Mutual labels:  graphics
Tprpix
a Cross-Platform, 2D Survival Sandbox Game Project. Based on C++17/cmake/OpenGL/SQLite3.
Stars: ✭ 448 (-12.33%)
Mutual labels:  graphics
Rust Sloth
A 3D software rasterizer... for the terminal!
Stars: ✭ 478 (-6.46%)
Mutual labels:  graphics
Scour
Scour - An SVG Optimizer / Cleaner
Stars: ✭ 443 (-13.31%)
Mutual labels:  graphics
Dwarfcorp
An open-source 3D colony management game for PC, Mac and Linux
Stars: ✭ 460 (-9.98%)
Mutual labels:  graphics
Mathc
Pure C math library for 2D and 3D programming
Stars: ✭ 504 (-1.37%)
Mutual labels:  graphics
Firefly
Unity ECS example for special effects
Stars: ✭ 489 (-4.31%)
Mutual labels:  graphics
Yeetgif
gif effects CLI. single binary, no dependencies. linux, osx, windows. #1 workplace productivity booster. #yeetgif #eggplant #golang
Stars: ✭ 467 (-8.61%)
Mutual labels:  graphics

pinhole

GoDoc

3D Wireframe Drawing Library for Go

Javascript Version
Demo

earthshapes spiralgopher

Why does this exist?

I needed a CPU based 3D rendering library with a very simple API for visualizing data structures. No bells or whistles, just clean lines and solid colors.

Getting Started

Installing

To start using pinhole, install Go and run go get:

$ go get -u github.com/tidwall/pinhole

This will retrieve the library.

Using

The coordinate space has a locked origin of 0,0,0 with the min/max boundaries of -1,-1,-1 to +1,+1,+1. The Z coordinate extends from -1 (nearest) to +1 (farthest).

There are four types of shapes; line, cube, circle, and dot. These can be transformed with the Scale, Rotate, and Translate functions. Multiple shapes can be transformed by nesting in a Begin/End block.

A simple cube:

p := pinhole.New()
p.DrawCube(-0.3, -0.3, -0.3, 0.3, 0.3, 0.3)
p.SavePNG("cube.png", 500, 500, nil)

Rotate the cube:

p := pinhole.New()
p.DrawCube(-0.3, -0.3, -0.3, 0.3, 0.3, 0.3)
p.Rotate(math.Pi/3, math.Pi/6, 0)
p.SavePNG("cube.png", 500, 500, nil)

Add, rotate, and transform a circle:

p := pinhole.New()
p.DrawCube(-0.3, -0.3, -0.3, 0.3, 0.3, 0.3)
p.Rotate(math.Pi/3, math.Pi/6, 0)

p.Begin()
p.DrawCircle(0, 0, 0, 0.2)
p.Rotate(0, math.Pi/2, 0)
p.Translate(-0.6, -0.4, 0)
p.Colorize(color.RGBA{255, 0, 0, 255})
p.End()

p.SavePNG("cube.png", 500, 500, nil)

Contact

Josh Baker @tidwall

License

pinhole source code is available under the ISC License.

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].