Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.39 KB

README.md

File metadata and controls

28 lines (20 loc) · 1.39 KB

Soma Cube Solver in Dart

See it in action: http://lrytz.github.io/soma/build/soma.html

  • Works in recent versions of Chrome and Firefox (WebGL is the limiting factor, the code compiled by dart2js works in all browsers)
  • Drag to rotate the shape
  • Scroll to zoom

Screenshot

Details

This project implements a solver for the Soma cube, an elegant 3D-Puzzle. It is implemented in Dart. A plethora of information on the Soma cube can be found on Thorleif's Soma page.

The solver is an implementation of Donald Knuth's Dancing Links. The linked paper presents an efficient backtracking algorithm named "Algorithm X" for the exact cover problem, and it proposes an efficient implementation technique called "Dancing Links".

The 3D presentation uses three.dart, a Dart-port of the three.js Javascript library.

The three.js examples page by Lee Stemkoski was tremendously helpful. The code for zooming and rotating the camera was directly translated to Dart from his examples.