Re: 2D vector code

2006-04-20 Thread Han-Wen Nienhuys
2006/4/14, David Feuer <[EMAIL PROTECTED]>: > Does scm/guile not have such funtions for pairs/complex vectors?It probably does support complex numbers.  Complex numbers, however,are conceptually quite different from 2D vectors, and I don't feelcomfortable conflating them.  It's up to you and Han, o

Re: 2D vector code

2006-04-16 Thread Johannes Schindelin
Hi, On Sun, 16 Apr 2006, David Feuer wrote: > As I said, I'm not going to be working on any LilyPond this month, but I > think the best of those is vector-2d, which has the problems of being > too long and too easily confused with Scheme vectors. Whatever. Well, maybe when you come back, ther

Re: 2D vector code

2006-04-15 Thread David Feuer
On 4/15/06, Carl D. Sorensen <[EMAIL PROTECTED]> wrote: > As far as Lilypond is concerned, I don't think most of them _are_ vectors. > The points I've used in developing stencils _have_ been points (e.g. bounding > box corners) I guess in your work with ps, there may be more vector stuff. > I

RE: 2D vector code

2006-04-15 Thread Carl D. Sorensen
d, or vector-xy. Carl From: David Feuer [mailto:[EMAIL PROTECTED] Sent: Fri 4/14/2006 5:21 PM To: Carl D. Sorensen Cc: Jan Nieuwenhuizen; lily-devel Subject: Re: 2D vector code On 4/14/06, Carl D. Sorensen <[EMAIL PROTECTED]> wrote: > > After rev

Re: 2D vector code

2006-04-14 Thread David Feuer
On 4/14/06, Carl D. Sorensen <[EMAIL PROTECTED]> wrote: > > After reviewing what the scheme code would look like if we used complex > numbers, and thinking about the benefits of having nice names for data > types and procedures, I think I agree that we ought to have our own > coordinate pair type

RE: 2D vector code

2006-04-14 Thread Carl D. Sorensen
David Feuer wrote: --- The complex numbers form a field. The 2-D vectors don't. A complex number suggests that the real and imaginary components are of a different nature, whereas 2-D vectors are symmetrical in their components. Vectors could be implemented using comple

Re: 2D vector code

2006-04-14 Thread Geoff Horton
> The complex numbers form a field. The 2-D vectors don't. A complex > number suggests that the real and imaginary components are of a > different nature, whereas 2-D vectors are symmetrical in their > components. Vectors could be implemented using complex numbers, but I > think identifying them

Re: 2D vector code

2006-04-14 Thread David Feuer
On 4/14/06, Carl D. Sorensen <[EMAIL PROTECTED]> wrote: > > Actually, complex numbers are nothing more than 2-D vectors, but in the > real-imaginary plane rather than the x-y plane. In fact, when we use > complex numbers, we draw them in a plane indistinguishable from x-y > (real is x, imaginary i

RE: 2D vector code

2006-04-14 Thread Carl D. Sorensen
David Feuer writes >On 4/13/06, Jan Nieuwenhuizen <[EMAIL PROTECTED]> wrote: >> David Feuer writes: > >> In C++ we have Offset, which has a number of complex_* functions. We >> also have complex-to-offset and use offset pairs in SCM, but I do not >> know if we have any such functions in SCM. >

Re: 2D vector code

2006-04-13 Thread David Feuer
On 4/13/06, Jan Nieuwenhuizen <[EMAIL PROTECTED]> wrote: > David Feuer writes: > In C++ we have Offset, which has a number of complex_* functions. We > also have complex-to-offset and use offset pairs in SCM, but I do not > know if we have any such functions in SCM. I don't either. > Does scm/g

Re: 2D vector code

2006-04-13 Thread Jan Nieuwenhuizen
David Feuer writes: > My SVG polygon code uses 2D vectors ( (x,y) pairs ) a good bit. Does > LilyPond already have basic functions (addition, subtraction, > multiplication by a scalar, dot product, cross product, ...) for > vectors I can use? In C++ we have Offset, which has a number of complex_

Re: 2D vector code

2006-04-12 Thread David Feuer
I should have mentioned that I don't know yet how C++ code interacts with SRFI 9 records, if that's feasible at all. I'm sure C++ can interact with native Guile records, but I'm not sure I really want to deal with those. David ___ lilypond-devel maili

2D vector code

2006-04-12 Thread David Feuer
My SVG polygon code uses 2D vectors ( (x,y) pairs ) a good bit. Does LilyPond already have basic functions (addition, subtraction, multiplication by a scalar, dot product, cross product, ...) for vectors I can use? If not, I think I should probably write them as a separate module. If I write the