Skip to content

lrytz/soma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Soma Cube Solver in Dart

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published