Skip to content

A python reimplementation of Animated Construction of Line Drawings (SIGGRAPH Asia 2011)

Notifications You must be signed in to change notification settings

zachzeyuwang/AnimatedDrawings

Repository files navigation

AnimatedDrawings

This is a python reimplementation of Animated Construction of Line Drawings by Fu et al. published on ACM Transaction on Graphics (Proceedings of SIGGRAPH Asia 2011).

  1. compute_cost.py: reads drawings from drawing.json and computes unary and binary stroke costs, output saved in cost.json.
  2. construct_graph.py: reads computed cost.json and constructs a graph for each drawing, output saved in graph.json.
  3. tsp_bnb.py: reads graph.json and searches the Hamiltonian path (similar to the traveling salesman problem) using branch and bound, output saved in result.json with stroke ordering that minimizes the cost.

Note: drawing.json is formatted as a dictionary. You can access a drawing with drawing_json[image_key][artist_key]. A drawing is a list of strokes. A stroke is a dictionary with keys of path, pressure, color, width, and opacity. path is a string with all timestamps, x and y coordinates concatenated. The canvas is 800x800.

About

A python reimplementation of Animated Construction of Line Drawings (SIGGRAPH Asia 2011)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages