MathGroup Archive 2005

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

Search the Archive

Re: spiral cipher

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55830] Re: spiral cipher
  • From: zak <chocolatez at gmail.com>
  • Date: Thu, 7 Apr 2005 05:10:10 -0400 (EDT)
  • Reply-to: zak <chocolatez at gmail.com>
  • Sender: owner-wri-mathgroup at wolfram.com

Thanks DrBob
yes this is what i want ,a move like the LOGO language instructions, i
wish wolfram may have special functions for this, this has a benefit
for controling small toy cars via mathlink like move left up right
down and so on, or with an angle.
if we give the first 1000 digits of Pi as a list to DrBob routine we
will see a plot something like the continents of the earth, try it
regards
zak
===============================
From: DrBob <drbob at bigfoot.com>
To: mathgroup at smc.vnet.net
Reply-To: drbob at bigfoot.com
Subject: [mg55830] Re: [mg55777] Re: spiral cipher
Reply | Reply to all | Forward | Print | Add sender to Contacts list |
Trash this message | Report phishing | Show original
I understood the problem very differently:

dat = (ToCharacterCode["i love apples and cats"] /. (32 -> Sequence[])) - 96;
right = {1, 0}; north = {0, 1};
Show@Graphics@Line@FoldList[
    Plus,
    {0, 0},
    dat*PadRight[{}, Length@dat, {right, north, -right, -north}]]

Bobby

- Hide quoted text -

On Wed, 6 Apr 2005 03:11:05 -0400 (EDT), dh <dh at metrohm.ch> wrote:

> Hi zak,
> here a short solution:
> get some data:
> dat = ToCharacterCode["i love apples and cats"];
> calculate the spiral
> res = {};
> Fold[(AppendTo[res, {#1 + {#2[[1]], 0}, #1 + {0, #2[[2]]}, #1 +
>     {-#2[[3]], 0}, #1 + {0, -#2[[1]]} } ]; {0, -#2[[1]]} ) & , {0, 0} ,
> Partition[dat, 4] ];
> and draw it:
> Show[Graphics[Line[Flatten[res, 1]]]];
>
>
> zak wrote:
>> spiral cipher
>> suppose i have the string "i love apples and cats"
>> the sentence composed from 18 letters. we will neglect space letter.
>> if we give to every letter a value which depend on the english
alphabet such as:
>> a=1; b=2 ; c=3; d=4;...; i=9;...; l=12 ...
>> now i pick the letters one by one:
>> I=9  plot 9 units to the right
>> L=12  plot 12 units to the north
>> O=15  plot 15 units to the left
>> V=22  plot 22 units to the south
>> E=5  plot 5 units to the right
>> and so on...
>>
>> this will create a messy spiral but it will represent our string.
>> we may dream to see some patterns in poets or similar texts.
>> i hope someone may have an idea about how to draw this messy spiral
>> cipher using mathematica
>> we will see if the letters of some texts will crawl to some
>> directions, or it will clutter arround the center point
>> and if someone could construct a text wich when spiralling it will
>> crawl to the north as an example. or may plot a bird figure.
>> regards
>>
>> zak


  • Prev by Date: Re: Complex integration
  • Next by Date: Re: Re: Recommendations for a programming book?
  • Previous by thread: Re: Re: spiral cipher
  • Next by thread: Re: Re: spiral cipher