triangles

Delaunay triangulation + Lambertian reflectance

Github星跟踪图

Delaunay Triangulation pattern maker

This project allows you to create beautiful high quality images featuring a nice pattern created from Delaunay triangulation and applying a flat surface shader. These images could be used for:

  • Wallpapers
  • Blog post headers
  • Magazines
  • Posters
  • And more

The tool provides export to PNG and SVG formats. With SVG format you could create an image of virtually any size, even as big as a billboard. Go crazy with it!

Show me some results!

Here are a few of most obvious uses for the tool:

three devices
two devices
billboard

And I made a video on Youtube of the tool in action, creating 11 wallpapers in under 7 minutes:
Video demo of the tool

You can also see some examples of the patterns made with this tool in this repository in the examples folder (the first one had text overlay added in Photoshop):

0
1
2
3
4
5
6
7

Using

  • To add a new light press Enter key on your keyboard or increase count manually via the slider.
  • To "drop" or "pick up" the currently selected light, press Space bar.
  • To change colors of the lights, change the ambient and diffuse color controls.
  • To export as SVG select SVG in the "renderer" panel and then export the image via "Export big" button. Then navigate to "File -> Save as" in the browser's menu to save the resulting image to your computer.

Running

Download this repository and run index.html in your browser or open this link.

Building

Install Dependencies:

npm install uglify-js@2.2.5

Build (cd into 'build' folder first):

node build.js

Inspiration

The iOS game called "Monument Valley" by ustwo served as an inspiration for this project. Specifically the simulation of the ocean in the game.

Acknowledgments

The shader work was done by Matthew Wagerfield on his MIT-licensed repository.

Author

Maksim Surguy @msurguy

TODO

There are a few things that can be improved to make this tool even better.

  • Add varying depth of the vertices of the triangles (Done as of 4/15/2014)
  • Add more color variation and presets (Done as of 4/25/2014 with the randomizer functionality)
  • Add text overlay and customizer for text

If you can do any of these things - feel free to make a pull request!

License

Licensed under MIT. Enjoy.

主要指标

概览
名称与所有者msurguy/triangles
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证Other
所有者活动
创建于2014-04-12 07:14:17
推送于2018-03-23 05:43:34
最后一次提交2017-11-02 14:59:34
发布数3
最新版本名称v1.0.2 (发布于 2017-10-08 14:19:27)
第一版名称1.0.0 (发布于 )
用户参与
星数720
关注者数31
派生数81
提交数45
已启用问题?
问题数14
打开的问题数5
拉请求数3
打开的拉请求数0
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?