Hm, we're talking about fundamental concepts of the universe here (axioms?), aren't we? At least concerning the three positive unit vectors - the rest are just mirrors through origin. These things don't like to be defined using other concepts.<div>
<br></div><div>From what you state in your problem - what exactly is the question? "All 6 directions" is intuitive enough for me, but how to formulate it logically? Compare to questions like "All 3 directions" or "All 8 directions".</div>
<div><br></div><div>I usually struggle when it comes to determining how "elegant" a piece of code is, but</div><div><br></div><div>1,0,0</div><div>0,1,0</div><div>0,0,1</div><div><br></div><div>looks elegant enough for me. :)</div>
<div><br></div><div>/Stefan</div><div><br><div class="gmail_quote">On Fri, Jul 15, 2011 at 11:15 PM, Kassen <span dir="ltr"><<a href="mailto:signal.automatique@gmail.com">signal.automatique@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Dear list,<div><br></div><div>I've had a sort of "toy question" in the back of my mind for a while now.</div>
<div><br></div><div>Say we'd like to livecode a shape that extends in all 6 directions (up, down, left, right, forward, backward) in some way. One way to go about this would be to write a list of unit-length vectors in those directions. However, writing that literally is not very elegant. Nicer would be to generate it. I tried and got this far;</div>

<div><br></div><div><div>(build-list </div><div>    6 </div><div>    (ë (x) (build-vector </div><div>        3 </div><div>        (ë (y) (if (eq? (quotient x 2) y) </div><div>            (if (even? x) </div><div>                1 </div>

<div>                -1) </div><div>            0)))))</div></div><div><br></div><div>Evidently it works, it looks very "scheme-ish" and so on; it's as small as I can get it.</div><div><br></div><div>However, disappointingly, it is also longer to type than its output, more or less defeating the purpose. It also doesn't really express the question itself, it seems more of a thing that heads straight for what we already know is the answer.</div>

<div><br></div><div>Would anyone else like to try too?</div><div><br></div><div>Yours,</div><div>Kas.</div>
</blockquote></div><br><br clear="all"><br>-- <br>Release me, insect, or I will destroy the Cosmos!<br>
</div>