Thread overview | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
May 27, 2002 geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
I think it would be fantastic Walter if you could read this webpage: http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html and then go back over the fundamental types and operations of D in much the same way as you have extended it for complex numbers, and have D directly support mathematical operations on multivectors using Clifford algebra. I highly recommend anyone who has any interest in 3D math to read this page. It generalizes the concept of rotation and vector products for all higher dimensions by integrating the dot and cross product in much the same way that complex numbers integrate real and imaginary parts. This stuff is amazing... it's sad that mathematics had taken such a wrong turn, but Clifford algebra (aka geometric algebra) attempts to correct the problem. They've got a C++ template library for multivectors, but D has no templates so it wouldn't be easy to make this general in D from a user perspective. It would have to go in the core language design. (or, you can put in generics ;) Sean |
May 27, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | In article <acuc30$30hq$1@digitaldaemon.com>, Sean L. Palmer says... > >I think it would be fantastic Walter if you could read this webpage: > >http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > This really ticks me off. I think about all the painful hours I spent trying to understand this stuff, and failing, and the real problem was that it was very badly described by the mathematics. Arrrrrgh. Let me say that again. Aaaaarrrrrrrrrrgh. I think it would be fantastic if there were a clear, powerful syntax for the Clifford algebra before Walter tries to implement it. Then graduate students in physics would would do it in Bright (D) or risk being ignored. That alone would be worth a pick-up load of masters theses in physics. It would also be one heck of a sales tool for Bright (D). It might guarantee that every Electrical Engineering graduate knows the language. Andy Walker jawalker@stl.quik.com |
May 27, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | My brain is going to explode after reading that article... But hey, more power to the compiler... ;-} Bob "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:acuc30$30hq$1@digitaldaemon.com... > I think it would be fantastic Walter if you could read this webpage: > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > > and then go back over the fundamental types and operations of D in much the > same way as you have extended it for complex numbers, and have D directly support mathematical operations on multivectors using Clifford algebra. > > I highly recommend anyone who has any interest in 3D math to read this page. > It generalizes the concept of rotation and vector products for all higher dimensions by integrating the dot and cross product in much the same way that complex numbers integrate real and imaginary parts. > > This stuff is amazing... it's sad that mathematics had taken such a wrong turn, but Clifford algebra (aka geometric algebra) attempts to correct the problem. > > They've got a C++ template library for multivectors, but D has no templates > so it wouldn't be easy to make this general in D from a user perspective. It would have to go in the core language design. (or, you can put in generics ;) > > Sean > > |
May 28, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | > > and then go back over the fundamental types and operations of D in much the > same way as you have extended it for complex numbers, and have D directly support mathematical operations on multivectors using Clifford algebra. > I haven't read completely the article, but I don't think D should support that directly. Not that it wouldn't be good, but as far as I understand most of the programming languages (including C-like or C-based) are designed to be general purpose. If geometric algebra is ever included in any language, then that language would become (instantly or eventually) completely math oriented. Not that I wouldn't like that (I mean, Fortran is so old that I can't figure out how someone can still make NEW programs there, but it's still the best in math! --maybe that's why) but I'm not quite sure that this should be D's next step. Mainly because of one reason: if right now D (I mean, Walter) does that, then D would lose a big group (can't think of another word) of programmers: those who aren't interested in math. I know that programming is closely related to math, but not everything related to programming is math (obviously). For example, if D is better than C, and almost every operating system has been done in C, what stops us (D programmers) from doing a better OS in D. And if someone is writing an OS (not that I am), why would that someone need geometric algebra? It's like someone said before: by wanting that, you're wanting to add things that aren't really necessary, though they can be needed by some. |
May 28, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | Have you looked into vertex shaders (programs)? I would love to beable to do matrix/vector operations as quickly and effectiantly as you can in a vertex shader in program code (rarther then in the shader). OpenGL 2.0 has a real good spec on this, and it'd be great of D had something along the same lines. http://www.3dlabs.com/support/developer/ogl2/whitepapers/index.htm http://www.3dlabs.com/support/developer/ogl2/whitepapers/OGL2_Shading_Langua ge_1.2.pdf But then again, that could probably be done in a lib (parhaps a standard lib). PS - Walter I'd be good if the openGL headers/extention could come as part of the standard libary as it does with C++. If a 2d lib is going to be included in the standard libs, why not a multi-platform 3d lib? "Sean L. Palmer" <seanpalmer@earthlink.net> wrote in message news:acuc30$30hq$1@digitaldaemon.com... > I think it would be fantastic Walter if you could read this webpage: > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > > and then go back over the fundamental types and operations of D in much the > same way as you have extended it for complex numbers, and have D directly support mathematical operations on multivectors using Clifford algebra. > > I highly recommend anyone who has any interest in 3D math to read this page. > It generalizes the concept of rotation and vector products for all higher dimensions by integrating the dot and cross product in much the same way that complex numbers integrate real and imaginary parts. > > This stuff is amazing... it's sad that mathematics had taken such a wrong turn, but Clifford algebra (aka geometric algebra) attempts to correct the problem. > > They've got a C++ template library for multivectors, but D has no templates > so it wouldn't be easy to make this general in D from a user perspective. It would have to go in the core language design. (or, you can put in generics ;) > > Sean > > |
May 28, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | I suppose it can wait until D 2.0 when D supports generics or templates, geometric algebra can be made into a module. I was just thinking that if Walter went out of his way to support the complex type, this kind of stuff isn't far beyond that. Closer than you may think. With complex you can add a real to an imaginary to get a complex: complex c = 2.0 + 3.0i; With geometric algebra you can add a scalar and a vector and a bivector (etc etc) to get a generic multidimensional vector: multivector v = 3.0 + [ 1.0, 2.0, 0.5 ]; multiplication of vectors is defined to produce both a scalar and a bivector. float[3] v1 = [ 1.0, 2.0, 0.5 ]; float[3] v2 = [ 3.0, 0.2, 0.0 ]; multivector v3 = v1 * v2; // result is scalar 1.0*3.0+2.0*0.2+0.5*0.0 and bivector [[ v1 X v2 ]], combined printf("scalar part is %f\n",v3.scalar); printf("vector part is %f,%f,%f\n",v3.vector[0],v3.vector[1],v3.vector[2]); printf("bivector part is %f,%f,%f\n",v3.bivector[0],v3.bivector[1],v3.bivector[2]); That's the kind of thing that needs good language support to be easy to use and fast (operator overloading and generics would help; making them builtins would also work). Maybe after I get a fuller understanding of it I can propose something more formally. Sean "Carlos" <carlos8294@msn.com> wrote in message news:acurdj$foa$1@digitaldaemon.com... > > > > and then go back over the fundamental types and operations of D in much > the > > same way as you have extended it for complex numbers, and have D directly > > support mathematical operations on multivectors using Clifford algebra. > > > > I haven't read completely the article, but I don't think D should support that directly. Not that it wouldn't be good, but as far as I understand most > of the programming languages (including C-like or C-based) are designed to be general purpose. If geometric algebra is ever included in any language, then that language would become (instantly or eventually) completely math oriented. Not that I wouldn't like that (I mean, Fortran is so old that I can't figure out how someone can still make NEW programs there, but it's still the best in math! --maybe that's why) but I'm not quite sure that this > should be D's next step. Mainly because of one reason: if right now D (I mean, Walter) does that, then D would lose a big group (can't think of another word) of programmers: those who aren't interested in math. I know that programming is closely related to math, but not everything related to programming is math (obviously). For example, if D is better than C, and almost every operating system has been done in C, what stops us (D programmers) from doing a better OS in D. And if someone is writing an OS (not that I am), why would that someone need geometric algebra? It's like someone said before: by wanting that, you're wanting to add things that aren't really necessary, though they can be needed by some. |
May 28, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos | I agree in most, this could be included in a lib. I'll bet Walter has to many other things to do then supporting that level of mathematics as well. I'd like to point out, if someone else could write an excellent calculus/applicable maths lib. Walter could provide support by including it in the lib packages that comes with D, and perhaps adding (or improving support for) a few of the more orquad ones to the language spec. I'm not saying that D should have just any old libs blotting the size, but (at least in my field) vector mathematics is pretty important in programming. "Carlos" <carlos8294@msn.com> wrote in message news:acurdj$foa$1@digitaldaemon.com... > > > > and then go back over the fundamental types and operations of D in much > the > > same way as you have extended it for complex numbers, and have D directly > > support mathematical operations on multivectors using Clifford algebra. > > > > I haven't read completely the article, but I don't think D should support that directly. Not that it wouldn't be good, but as far as I understand most > of the programming languages (including C-like or C-based) are designed to be general purpose. If geometric algebra is ever included in any language, then that language would become (instantly or eventually) completely math oriented. Not that I wouldn't like that (I mean, Fortran is so old that I can't figure out how someone can still make NEW programs there, but it's still the best in math! --maybe that's why) but I'm not quite sure that this > should be D's next step. Mainly because of one reason: if right now D (I mean, Walter) does that, then D would lose a big group (can't think of another word) of programmers: those who aren't interested in math. I know that programming is closely related to math, but not everything related to programming is math (obviously). For example, if D is better than C, and almost every operating system has been done in C, what stops us (D programmers) from doing a better OS in D. And if someone is writing an OS (not that I am), why would that someone need geometric algebra? It's like someone said before: by wanting that, you're wanting to add things that aren't really necessary, though they can be needed by some. > > |
May 29, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean L. Palmer | > I think it would be fantastic Walter if you could read this webpage: > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html Yes I know this article, and I have read many other papers on Geometric Algebra as well. I have thought about it myself: "If Walter is to make complex numbers a builtin datatype, he should really make builtin support for Geometric Algebra." This has pros and cons: Pro: Geometric Algebra seems to be what mathematicians and physicists have long looked after: a super-entity for doing computational geometry and physics with a unified "interface". Just as Real numbers incorporate the Integers, and Complex numbers incorporate the Real numbers, Geometric algebra incorporates all the above plus the Quaternions, the Octonions, the Minkowski spaces, the Plücker coordinates, the Homogeneous Projective spaces and that's by far not complete. Rewriting math in G.A. makes many formulas simpler and renders many proofs trivial. So G.A. seems to be the natural choice for a builtin language support. Cons: The "Multivector", which is the basic element of G.A., is a very polymorphic datatype, which must be dynamically typed. Basic operations like "addition" are non-trivial functions when done in software. If I was to write a 3D engine using a generic, full featured Geometric Algebra datatype, it would be SLOW. Geometric Algebra is very elegant to write math, but it's not well suited to be implemented directly in software (at least as long as there is no processor support for it :-). So Geometric Algebra can be used well with pencil and paper to derive algorithms, but the final implementation is best made hand-taylored. So if you ask me if there should be builtin G.A. support in the D language, I have mixed feelings. One part of me says YEEESS, because it would be way cool, and anyway. The other part of mine says no, because such a generic implementation would be useful only for programs with low computation load, like a desktop calculator application. Sean L. Palmer <seanpalmer@earthlink.net> schrieb in im Newsbeitrag: acuc30$30hq$1@digitaldaemon.com... > I think it would be fantastic Walter if you could read this webpage: > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > > and then go back over the fundamental types and operations of D in much the > same way as you have extended it for complex numbers, and have D directly support mathematical operations on multivectors using Clifford algebra. > > I highly recommend anyone who has any interest in 3D math to read this page. > It generalizes the concept of rotation and vector products for all higher dimensions by integrating the dot and cross product in much the same way that complex numbers integrate real and imaginary parts. > > This stuff is amazing... it's sad that mathematics had taken such a wrong turn, but Clifford algebra (aka geometric algebra) attempts to correct the problem. > > They've got a C++ template library for multivectors, but D has no templates > so it wouldn't be easy to make this general in D from a user perspective. It would have to go in the core language design. (or, you can put in generics ;) > > Sean > > |
May 30, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to Christian Schüler | After reading about it more fully, including the runtime performance characteristics, I have to agree. Leave it for a library. Sean "Christian Schüler" <cschueler@gmx.de> wrote in message news:ad3bj5$1ce8$1@digitaldaemon.com... > > I think it would be fantastic Walter if you could read this webpage: > > > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > > Yes I know this article, and I have read many other papers on Geometric Algebra as well. I have thought about it myself: "If Walter is to make complex numbers a builtin datatype, he should really make builtin support for Geometric Algebra." This has pros and cons: > > Pro: > Geometric Algebra seems to be what mathematicians and physicists have long > looked after: a super-entity for doing computational geometry and physics > with a unified "interface". Just as Real numbers incorporate the Integers, > and Complex numbers incorporate the Real numbers, Geometric algebra > incorporates all the above plus the Quaternions, the Octonions, the > Minkowski spaces, the Plücker coordinates, the Homogeneous Projective spaces > and that's by far not complete. Rewriting math in G.A. makes many formulas simpler and renders many proofs trivial. So G.A. seems to be the natural choice for a builtin language support. > > Cons: > The "Multivector", which is the basic element of G.A., is a very polymorphic > datatype, which must be dynamically typed. Basic operations like "addition" > are non-trivial functions when done in software. If I was to write a 3D engine using a generic, full featured Geometric Algebra datatype, it would be SLOW. Geometric Algebra is very elegant to write math, but it's not well > suited to be implemented directly in software (at least as long as there is > no processor support for it :-). So Geometric Algebra can be used well with > pencil and paper to derive algorithms, but the final implementation is best > made hand-taylored. > > So if you ask me if there should be builtin G.A. support in the D language, > I have mixed feelings. One part of me says YEEESS, because it would be way cool, and anyway. The other part of mine says no, because such a generic implementation would be useful only for programs with low computation load, > like a desktop calculator application. > > > Sean L. Palmer <seanpalmer@earthlink.net> schrieb in im Newsbeitrag: acuc30$30hq$1@digitaldaemon.com... > > I think it would be fantastic Walter if you could read this webpage: > > > > http://www.mrao.cam.ac.uk/~clifford/introduction/intro/intro.html > > > > and then go back over the fundamental types and operations of D in much > the > > same way as you have extended it for complex numbers, and have D directly > > support mathematical operations on multivectors using Clifford algebra. > > > > I highly recommend anyone who has any interest in 3D math to read this > page. > > It generalizes the concept of rotation and vector products for all higher > > dimensions by integrating the dot and cross product in much the same way that complex numbers integrate real and imaginary parts. > > > > This stuff is amazing... it's sad that mathematics had taken such a wrong > > turn, but Clifford algebra (aka geometric algebra) attempts to correct the > > problem. > > > > They've got a C++ template library for multivectors, but D has no > templates > > so it wouldn't be easy to make this general in D from a user perspective. > > It would have to go in the core language design. (or, you can put in > > generics ;) > > > > Sean > > > > > > |
June 11, 2002 Re: geometric algebra as core component of D | ||||
---|---|---|---|---|
| ||||
Posted in reply to anderson | "anderson" <anderson@firestar.com.au> wrote in message news:acusps$hno$1@digitaldaemon.com... > PS - Walter I'd be good if the openGL headers/extention could come as part of the standard libary as it does with C++. If a 2d lib is going to be included in the standard libs, why not a multi-platform 3d lib? If you want to write it, I can include it. |
Copyright © 1999-2021 by the D Language Foundation