[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

RE: [FWP] Sideways Perl



Derek J. Balling [mailto:dredd@megacity.org] says:
: Well, near as I can tell, you NEED the spaces where ($deg % 
: 90) is true. 
: When you're at those 45 degree angles, if you DON'T put the 
: spaces in then 
: your square gets out of alignment and isn't rot45'ed any more.
: 
: D

Surely, some kind of spaces, anyway. But I wouldn't want to constrain
solutions to those which would insert spaces the way I did in the example. I
wasn't really considering a space to be a significant character. Instead, I
was fudging the output in an attempt to make the problem look like squares
and diamonds, for the sake of aesthetics, and enhanced understanding (good
luck). If one *really* considers the spaces significant, then the rotation
of 

	A B C D
	E F G H
	I J K L
	M N O P

90 degrees clockwise is, unless I'm missing something, actually

	MIEA
	
	NJFB
	
	OKGC
	
	PLHD

right? Furthermore, I don't really know what it would be in ($deg % 90).
Something hideous, I'm sure.

In any case, for the problem I was hypothesizing (wordsearch puzzles), you
wouldn't need the square to become a diamond; you'd only need the rotated
text to represent diagonal slices of the original text, as in:

0 DEG    45 DEG
-----    ------
ABCD     A
EFGH     EB
IKJL     IFC
MNOP     MKGD
         NJH
         OL
         P

As you can see, it's not very pretty to look at---more like squishing than
rotating. :-)

<snip>

: >backward, up, down, or any flavor of diagonal: just rotate 
: the puzzle 45
: >degrees and m// through it, e.g (spaces for readability):
: >
: >-------  -------  -------  -------
: >0 deg    45 deg   90 deg   135 deg
: >-------  -------  -------  -------
: >A B C D     A     M I E A     M
: >E F G H    E B    N J F B    N I
: >I J K L   I F C   O K G C   O J E
: >M N O P  M J G D  P L H D  P K F A
: >          N K H             L G B
: >           O L               H C
: >            P                 D
: >
: >-------  -------  -------  -------
: >180 deg  225 deg  270 deg  315 deg
: >-------  -------  -------  -------
: >P O N M     P     D H L P     D
: >L K J I    L O    C G K O    C H
: >H G F E   H K N   B F J N   B G L
: >D C B A  D G J M  A E I M  A F K P
: >          C F I             E J O
: >           B E               I N
: >            A                 M
: >

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe