rot Y Matrix 0 0 1 0 1 0 -1 0 0 rot X Matrix 1 0 0 0 0 -1 0 1 0 rotZ Matrix 0 -1 0 1 0 0 0 0 1Assume we have a Vector for 5 elements like this [0,0,0][0,1,0][0,2,0][0,3,0][1,3,0] .
x' = 0*x + 0*y + 1*z y' = y z' = -x
rot 0[0,0,0] [0,1,0] [0,2,0] [0,3,0] [1,3,0] |
rot 1[0,3,0] [0,0,1] [0,1,1] [0,2,1] [0,3,1] |
rot 2[1,0,0] [1,1,0] [1,2,0] [0,3,0] [1,3,0] |
rot 3[0,0,0] [0,1,0] [0,2,0] [0,3,0] [0,3,1] |
rot 4[0,0,0] [0,0,1] [0,0,2] [0,0,3] [1,0,3] |
rot 5[3,0,0] [0,0,1] [1,0,1] [2,0,1] [3,0,1] |
rot 6[0,0,0] [1,0,0] [1,0,1] [1,0,2] [1,0,3] |
rot 7[0,0,0] [1,0,0] [2,0,0] [3,0,0] [0,0,1] |
rotate X | |||||||
rot 8[0,0,0] [0,0,1] [0,0,2] [0,0,3] [0,1,3] |
rot 9[0,0,0] [1,0,0] [2,0,0] [3,0,0] [3,1,0] |
rot 10[0,0,0] [0,1,0] [0,0,1] [0,0,2] [0,0,3] |
rot 11[0,0,0] [1,0,0] [2,0,0] [3,0,0] [0,1,0] |
rot 12[0,0,0] [0,1,0] [0,2,0] [0,3,0] [0,0,1] |
rot 13[0,0,0] [1,0,0] [0,1,0] [0,2,0] [0,3,0] |
rot 14[0,0,0] [0,0,1] [0,1,1] [0,2,1] [0,3,1] |
rot 15[0,0,0] [1,0,0] [1,1,0] [1,2,0] [1,3,0] |
rotate Z | rotate X | ||||||
rot 16[0,0,0] [1,0,0] [2,0,0] [3,0,0] [3,0,1] |
rot 17[0,0,0] [1,0,0] [0,0,1] [0,0,2] [0,0,3] |
rot 18[0,0,0] [0,0,1] [1,0,1] [2,0,1] [3,0,1] |
rot 19[1,0,0] [1,0,1] [1,0,2] [0,0,3] [1,0,3] |
rot 20[3,0,0] [0,1,0] [1,1,0] [2,1,0] [3,1,0] |
rot 21[0,0,0] [0,1,0] [0,1,1] [0,1,2] [0,1,3] |
rot 22[0,0,0] [0,1,0] [1,1,0] [2,1,0] [3,1,0] |
rot 23[0,1,0] [0,1,1] [0,1,2] [0,0,3] [0,1,3] |
rotate Z | rotate X |
create(level) { while findFreePosAtStone { set position if addThis // is a new unique puzzle create(next level) rset position } }
Level1: create single Box X Level2: add box XX Level3: add box XXX Level4: add box XXXX XXX X.. XXX .X. Level3: add box continue XX X. Level4: add box continue .XX XX. XX X.
-string maxX maxY maxZ solutionString -vector vector -file solution_file nbr -scale <0.3 .. 10> for smaller or bigger cubes, default: 1.0 -ani <0..9> AnimationNbr, just try; default: 8 -label add abc char on each side of box; default: false -gray create a gray box only; default: false -all option for -file -title use this String on puzzle -parts create multipe SVGs for all parts; default: false -opt optimize SVG output; default: falseThe java program will report all generated SVG to stdout. Some valid examples:
java -jar PuzzleShow.jar -string 3 1 1 ABC creates a ABC puzzle in one line java -jar PuzzleShow.jar -vector [0,0,0][1,0,0][2,0,0] another 3 element puzzle in on line java -jar PuzzleShow.jar -file puzzle.lsg 7 read a file called puzzle.lsg and use solution number 7 for SVG creation
java -jar JPuzzle.jar --------------------------------------------------------------------------------- Welcome to my puzzle solver --------------------------------------------------------------------------------- reading args: mandatory arguments, either by file or cmd line: -box X Y Z put puzzles into a box with X,Y,Z size -pdef [0,0,0].. puzzle definition as multipe vector[x][y][z] or vector[x][y] optional arguments: -conf filename read args from filename -title a title a short title for this puzzle -desc more txt a description for this puzzle -stop stop after first solution -stop n stop after n solutions, where n>1 -kill n stop after n seconds -threadBy default there are 2 files created during the rundefine max running threads -pinc include file with -pdef puzzle Definitions special optional arguments: -disp report exeTime & thread -sql insert solution in MySQL database -unique report unique puzzles only -groupBy common name for same group of puzzles -verbose more output for debugging -dispThread show start/finish of running threads -sortAsc sort puzzle sequence based on number of sets asc -sortDesc sort puzzle sequence based on number of sets desc -single use only a single puzzle many times -3D puzzle is in 3D -2D puzzle is in 2D -1D puzzle is in 1D -keyGen define x,y,z sequence, where 0.. ..5 -opt use optimized fill up sequence -wholeChk chk for isolated wholes -twinWholeChk chk for isolated twin wholes example: java -jar JPuzzle.jar -box 3 2 1 -2D -single -pdef [0,0][0,1][0,2][1,0] -pdef [0,0][0,1] ...terminating
p_6918 rot 24 [1,1,0][0,2,0][1,2,0][2,0,1][1,1,1][2,1,1][0,2,1][2,0,2] 3D
8_3D_2592_24.svg 3 3 3 _AA__A_AA_A_______AA_______and a solution section for all puzzles filled into the box definition.
--------------------------------------------------------------------------------- Welcome to my puzzle svg creator --------------------------------------------------------------------------------- -string maxX maxY maxZ solutionString _ whole + free position, not set 1 2 3 4 ... positions set -vector vector [x,y,z] -pdef vector [x,y,z] puzzle definition -3D show 3D puzzle default: false -2D show 2D puzzle default: true -no vector not used puzzles -scale <0.3 .. 10> for smaller or bigger cubes, default: 1.0 -ani <0..9> AnimationNbr, just try; default: 0 -noFatLines hide fat lines for puzzle default: false -label add abc char on each side of box; default: false -gray create a gray box only; default: false -title use this String on puzzle -part <nbr> create multipe SVGs for all parts; default: false -layer <nbr> create multipe SVGs for all y layers default: false e.g.: java -jar PuzzleShow.jar -vector [0,0,0][1,0,0][2,0,0][0,1,0] java -jar PuzzleShow.jar -scale 10 -string 5 1 1 0 _ 1 + 2Examples:
java -jar PuzzleShow.jar -vector [0,0,0][1,0,0][2,0,0][0,1,0] | |
java -jar PuzzleShow.jar -vector [0,0,0][1,0,0][2,0,0][0,1,0] -3D | |
java -jar PuzzleShow.jar -scale 2 -string 5 1 1 0 _ 1 + 2 -3D | |
java -jar PuzzleShow.jar -scale 2 -string 5 1 1 0 _ 1 + 2 -3D -label -title demo-titel |
1D A000988 | 2D A000105 | 3D A000162 | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
# parts | SVG | calc time | # puzzles download | # parts | SVG | calc time | # puzzles download | # parts | SVG | calc time | # puzzles download |
1 | SVG | 00:00:00,0 | 1 | 1 | SVG | 00:00:00,0 | 1 | 1 | SVG | 00:00:00,0 | 1 |
2 | SVG | 00:00:00,0 | 1 | 2 | SVG | 00:00:00,0 | 1 | 2 | SVG | 00:00:00,0 | 1 |
3 | SVG | 00:00:00,0 | 2 | 3 | SVG | 00:00:00,0 | 2 | 3 | SVG | 00:00:00,0 | 2 |
4 | SVG | 00:00:00,0 | 7 | 4 | SVG | 00:00:00,0 | 5 | 4 | SVG | 00:00:00,0 | 8 |
5 | SVG | 00:00:00,0 | 18 | 5 | SVG | 00:00:00,0 | 12 | 5 | SVG | 00:00:00,0 | 29 |
6 | SVG | 00:00:00,0 | 60 | 6 | SVG | 00:00:00,0 | 35 | 6 | SVG | 00:00:00,0 | 166 |
7 | SVG | 00:00:00,0 | 196 | 7 | SVG | 00:00:00,0 | 108 | 7 | SVG | 00:00:00,0 | 1 023 |
8 | SVG | 00:00:00,0 | 704 | 8 | SVG | 00:00:00,0 | 369 | 8 | SVG | 00:00:00,1 | 6 922 |
9 | SVG | 00:00:00,0 | 2 500 | 9 | SVG | 00:00:00,0 | 1 285 | 9 | SVG | 00:00:00,9 | 48 311 |
10 | SVG | 00:00:00,1 | 9 189 | 10 | SVG | 00:00:00,1 | 4 655 | 10 | SVG | 00:00:06,4 | 346 543 |
11 | SVG | 00:00:00,2 | 33 896 | 11 | SVG | 00:00:00,2 | 17 073 | 11 | SVG | 00:01:03,9 | 2 522 522 |
12 | SVG | 00:00:00,8 | 126 759 | 12 | SVG | 00:00:00,7 | 63 600 | 12 | SVG | 00:09:10,2 | 18 598 427 |
13 | SVG | 00:00:03,3 | 476 270 | 13 | SVG | 00:00:02,6 | 238 591 | 13 | SVG | 01:39:02,2 | 138 462 649 |
14 | SVG | 00:00:14,1 | 1 802 312 | 14 | SVG | 00:00:11,3 | 901 971 | ||||
15 | SVG | 00:01:02,2 | 6 849 777 | 15 | SVG | 00:00:51,5 | 3 426 576 | ||||
16 | SVG | 00:04:27,5 | 26 152 418 | 16 | SVG | 00:03:45,1 | 13 079 255 | ||||
17 | SVG | 00:26:33,1 | 100 203 194 | 17 | SVG | 00:19:03,1 | 50 107 909 |