[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Help-gsl] Cross product between two vectors
From: |
John Pye |
Subject: |
Re: [Help-gsl] Cross product between two vectors |
Date: |
Thu, 15 May 2008 16:03:26 +1000 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080505) |
Martin Jansche wrote:
> The 3d cross product can be easily written as a short inline function.
> There is no GSL method for the cross product because it is not
> defined in general for arbitrary GSL vectors. If you're doing a lot
> of 3d vector computations, you might want to look into graphics
> libraries instead of GSL.
> -- mj
>
Here is some fairly self-contained C code that you might like to use.
There is any number of other libraries you could try too, of course,
depending on your particular application.
http://frame3dd.svn.sourceforge.net/viewvc/frame3dd/trunk/src/microstran/vec3.h?view=markup
http://frame3dd.svn.sourceforge.net/viewvc/frame3dd/trunk/src/microstran/vec3.c?view=markup
Also a small test suite:
http://frame3dd.svn.sourceforge.net/viewvc/frame3dd/trunk/test/testvec3.cpp?revision=79&view=markup
If anyone one has similar code like this, please let me know. Especially
if anyone has a nice implementation of coordinate transformations
including quaternions in plain C.
Hope that helps
Cheers
JP
> On Wed, May 14, 2008 at 9:37 PM, Ronald Römer <address@hidden> wrote:
>
>> Hello out there,
>>
>> I will perform a simple cross product between two vectors. What ist the
>> right way to do this, because I can not found a function in gsl to do this
>> simple calculation? After that I will also perform a normalization of the
>> resulting vector.
>>
>> Greetings
>> _______________________________________________
>> Help-gsl mailing list
>> address@hidden
>> http://lists.gnu.org/mailman/listinfo/help-gsl
>>
>>
>
>
> _______________________________________________
> Help-gsl mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/help-gsl
>