Skip to content

RodAlc24/magic-cubes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

magic-cubes

magic-cubes is a Typst package built on top of CeTZ that allows you to create, manipulate, and render Rubik’s cubes of any size.

See the manual for documentation.

Examples

example cube 04 example cube 05 example cube 06
example cube 07 example cube 08 example cube 09
example cube 10 example cube 11

Quick Start

To start using magic-cubes, add the following import at the top of your .typ file:

#import "@preview/magic-cubes:0.1.0": *

Creating and rendering a solved cube only requires two functions:

#draw-cube(cube())

draw cube

You can apply an algorithm before rendering the cube:

#draw-cube(
  apply(
    cube(),
    "R U R' U'"
  )
)

apply an algorithm

The package supports cubes of arbitrary size:

#draw-cube(
  cube(size: 5)
)

arbitrary size

Changelog

v0.1.0

  • Initial release

About

Represent Rubik's cubes of arbitrary size and apply algorithms to them.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Contributors

Languages