Skip to content

A tool to generate a raytraced video of a Rubik's cube given a sequence of moves

Notifications You must be signed in to change notification settings

prateek-0/rubik

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

This tool generates a raytraced video (or rather, a sequence of frames) of a 3x3x3 Rubik's cube, using POV-Ray, given a sequence of moves. It needs Python3 with numpy, and POV-ray. Here is a sample video.

#Usage Run r.py in an empty directory (this is preferable since it creates several files). It reads a sequence of moves in Singmaster notation from standard input (for example, F L B' f' x2), and produces POV-Ray source files, and a render script which calls POV-Ray to generate individual frames. The file cube_setup_scene.inc needs to be available in the same directory for the script to run.

The frames can be combined into a video using a separate tool, such as ffmpeg or avconv.

Singmaster notation

Currently supports FBUDLR, corresponding two-layer moves (both f,b,etc and Fw,Bw,etc), whole cube rotations (x,y,z), middle-layer rotations (MES), and inverses of all the above. Also supports 180-degree rotations (F2, f2, Fw2, x2, M2, etc).

About

A tool to generate a raytraced video of a Rubik's cube given a sequence of moves

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published