[Puzzler-checkins] SF.net SVN: puzzler:[646] trunk/puzzler
Brought to you by:
goodger
|
From: <go...@us...> - 2017-01-15 17:38:35
|
Revision: 646
http://sourceforge.net/p/puzzler/code/646
Author: goodger
Date: 2017-01-15 17:38:33 +0000 (Sun, 15 Jan 2017)
Log Message:
-----------
added SolidPentominoes5x5x4SteppedPyramid puzzle, suggested by Colin Lacy
Modified Paths:
--------------
trunk/puzzler/docs/solid-pentominoes.txt
trunk/puzzler/puzzler/puzzles/solid_pentominoes.py
Added Paths:
-----------
trunk/puzzler/bin/cubes/solid-pentominoes-5x5x4-stepped-pyramid.py
trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png
trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg
trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.x3d
Added: trunk/puzzler/bin/cubes/solid-pentominoes-5x5x4-stepped-pyramid.py
===================================================================
--- trunk/puzzler/bin/cubes/solid-pentominoes-5x5x4-stepped-pyramid.py (rev 0)
+++ trunk/puzzler/bin/cubes/solid-pentominoes-5x5x4-stepped-pyramid.py 2017-01-15 17:38:33 UTC (rev 646)
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+# $Id$
+
+"""55 solutions"""
+
+import puzzler
+from puzzler.puzzles.solid_pentominoes \
+ import SolidPentominoes5x5x4SteppedPyramid as puzzle
+
+puzzler.run(puzzle)
Property changes on: trunk/puzzler/bin/cubes/solid-pentominoes-5x5x4-stepped-pyramid.py
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png
===================================================================
(Binary files differ)
Index: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png
===================================================================
--- trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png 2017-01-15 17:36:34 UTC (rev 645)
+++ trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png 2017-01-15 17:38:33 UTC (rev 646)
Property changes on: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/png
\ No newline at end of property
Added: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg
===================================================================
(Binary files differ)
Index: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg
===================================================================
--- trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg 2017-01-15 17:36:34 UTC (rev 645)
+++ trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg 2017-01-15 17:38:33 UTC (rev 646)
Property changes on: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.svg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+image/svg+xml
\ No newline at end of property
Added: trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.x3d
===================================================================
--- trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.x3d (rev 0)
+++ trunk/puzzler/docs/images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.x3d 2017-01-15 17:38:33 UTC (rev 646)
@@ -0,0 +1,487 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE X3D PUBLIC "ISO//Web3D//DTD X3D 3.0//EN"
+ "http://www.web3d.org/specifications/x3d-3.0.dtd">
+<X3D profile="Immersive" version="2.0">
+<Scene>
+<Transform translation="0 0 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 0.502"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 0 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.502 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 0 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.502 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 0 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 0 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 1 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 1.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 1 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 1 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 1 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 1 0">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 0 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 0.502"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 0 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 0 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.502 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 0 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.502 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 0 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.867 0.627 0.867"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 1 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 1.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 1 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 1 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.867 0.627 0.867"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 1 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.867 0.627 0.867"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 1 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.867 0.627 0.867"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 2 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 2 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.867 0.627 0.867"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 2 1">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.541 0.169 0.886"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 0 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 0.502"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 0 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 0.502"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 0 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.251 0.878 0.816"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 0 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.502 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 0 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.251 0.878 0.816"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 1 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 1.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 1 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 1 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.502 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 1 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.502 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 1 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.549 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 2 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.502 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 2 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.502 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 2 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.541 0.169 0.886"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 3 2">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.502 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 0 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 1.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 0 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 0.502"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 0 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.251 0.878 0.816"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 0 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.251 0.878 0.816"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 0 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.251 0.878 0.816"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 1 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 1.000 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 1 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.843 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 1 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.549 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 1 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.549 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 1 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.549 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 2 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.541 0.169 0.886"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 2 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.541 0.169 0.886"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 2 3">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.541 0.169 0.886"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 0 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 0 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 0 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 0 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 0 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="0.000 0.000 1.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="0 1 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.843 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="1 1 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.843 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="2 1 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.843 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="3 1 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.843 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+<Transform translation="4 1 4">
+ <Shape>
+ <Appearance>
+ <Material diffuseColor="1.000 0.549 0.000"/>
+ </Appearance>
+ <Box size="1 1 1"/>
+ </Shape>
+</Transform>
+</Scene>
+</X3D>
Modified: trunk/puzzler/docs/solid-pentominoes.txt
===================================================================
--- trunk/puzzler/docs/solid-pentominoes.txt 2017-01-15 17:36:34 UTC (rev 645)
+++ trunk/puzzler/docs/solid-pentominoes.txt 2017-01-15 17:38:33 UTC (rev 646)
@@ -376,6 +376,12 @@
(`X3D model
<images/cubes/solid-pentominoes-stairstep-walls-2.x3d>`__)
+* Stepped pyramid (design suggested by Colin Lacy): `55 solutions
+ <../solutions/ominoes/cubes/solid-pentominoes-5x5x4-stepped-pyramid.txt>`__
+ (`X3D model <images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.x3d>`__)
+
+ .. image:: images/cubes/solid-pentominoes-5x5x4-stepped-pyramid.png
+
.. _Kadon's Quintillions: http://gamepuzzles.com/polycube.htm#Q
.. |c| unicode:: U+00A9 .. copyright sign
Modified: trunk/puzzler/puzzler/puzzles/solid_pentominoes.py
===================================================================
--- trunk/puzzler/puzzler/puzzles/solid_pentominoes.py 2017-01-15 17:36:34 UTC (rev 645)
+++ trunk/puzzler/puzzler/puzzles/solid_pentominoes.py 2017-01-15 17:38:33 UTC (rev 646)
@@ -1360,3 +1360,45 @@
+ list(SolidPentominoes.coordinates_cuboid(2, 1, 1, offset=(4,0,0))))
holes = set(SolidPentominoes.coordinates_cuboid(2, 2, 1))
+
+
+class SolidPentominoes5x5x4SteppedPyramid(SolidPentominoes):
+
+ """
+ 55 solutions
+
+ Suggested by Colin Lacy.
+ """
+
+ height = 5
+ width = 5
+ depth = 4
+
+ transform_solution_matrix = Puzzle3D.swap_yz_transform
+
+ check_for_duplicates = True
+
+ duplicate_conditions = ({'x_reversed': True},)
+
+ def coordinates(self):
+ coords = set(
+ list(self.coordinates_cuboid(5, 5, 2))
+ + list(self.coordinates_cuboid(3, 3, 1, offset=(1,1,2)))
+ + list(self.coordinates_cuboid(1, 1, 1, offset=(2,2,3))))
+ return sorted(coords)
+
+ def build_matrix(self):
+ """
+ In all solutions the 'I' piece is positioned at an edge of the square
+ base. Restrict the 'I' piece to only one edge to reduce the duplicate
+ solutions 4-fold. The x_reversed duplicate condition check eliminates
+ the remaining duplicates.
+ """
+ keys = sorted(self.pieces.keys())
+ # Choose the I aspect along the X axis:
+ coords, aspect = self.pieces['I'][-1]
+ for z in range(2):
+ translated = aspect.translate((0, 0, z))
+ self.build_matrix_row('I', translated)
+ keys.remove('I')
+ self.build_regular_matrix(keys)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|