Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1997

[Date Index] [Thread Index] [Author Index]

Search the Archive

correction: Xah's graphs under rotation

  • To: mathgroup at
  • Subject: [mg7602] correction: Xah's graphs under rotation
  • From: "w.meeussen" <meeussen.vdmcc at>
  • Date: Thu, 19 Jun 1997 15:53:20 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Oops, forgot that rotation could produce permutations that were already dropped.
this cures it:

rotate[lis_,n_]:=Module[{it=cycle[lis,n],temp},temp=RotateLeft[it, Position[
it,Min[it]][[1,1]]-1];If[temp[[2]]<Last at temp,temp,RotateRight[Reverse[temp]]]]

for beauty's sake, also set the loop over j to Length[First[it]] instead of 6 :

DeleteCases[Table[ Position[it,rotate[it[[i]],j]],{i,1,Length at it},{j,Length[

Looks real nice now.

>Date: Sun, 15 Jun 1997 16:12:12
>To: Xah Lee <xah at>
>From: "w.meeussen" <meeussen.vdmcc at>
To: mathgroup at
>Subject: [mg7602] [mg7602] Xah's graphs under rotation
>Cc: mathgroup
>hi all,
>inspired by Xah's loopNpoints.nb, a small addition:
>if permutations over n elements are displayed graphicaly, with proviso that 
>        (1)
> Two lists are considered the same if one is the other shifted.(RotateRight).
>        (2)
> Two lists are considered the same if one is the other reversed.
>and, in addition, that the resulting graphs should be grouped according to
rotation symmetriy, one gets:
>Slight modification in sequence of reducedPerms[]:
:=Select[Prepend[#,1]&/@Permutations at Range[2,n],(#[[2]]<#[[n]])&]
>a definition of permutations (you could also load DiscreteMath`Permutations`) 
>*** a few helper functions ***
>cycle[lis_?permutationQ,n_]:=(Mod[#+n,Length[lis]])&/@(lis-1) +1
>*** now the one-liner ***
>        DeleteCases[Table[
Position[it,rotate[it[[i]],j]],{i,1,Length at it},{j,6}],{},
>                {2}]/.{{a_Integer}}->a)]
>*** this produces the permutations ***
>*** this is Xah's graphic rendering of them ***
>*** needs loopNPoints for the permutationgraphics[] ***

Dr. Wouter L. J. MEEUSSEN
eu000949 at
w.meeussen.vdmcc at

  • Prev by Date: Xah's graphs under rotation
  • Next by Date: Message
  • Previous by thread: Xah's graphs under rotation
  • Next by thread: Message