Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. vector math/cross product

vector math/cross product

Scheduled Pinned Locked Moved The Lounge
questiongraphicscareerlearning
51 Posts 20 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Michael A Barnhart

    Jeremy Falcon wrote:

    does OGL allow you change to left-handed?

    For the raw display no, however how you build relative coordinate systems to place objects, yes you can do both. But it is a mind trip to do so and not violate physics somewhere, so the best advise is to not try (even by accident.)

    Jeremy Falcon wrote:

    I'm used to left-handed thanks to apps like 3DS Max

    I am not familuar with 3DS so I could be mistaken but I would suspect it to be right handed. What throws people and some text improperly state being left handed, when in reality you a travesing a path from the aboslute reference plane to the viewing coordiante system. This is really not left handed but performing an inverse on the tranformation which locates the viewing position to the absolute reference. Think of a stage with props placed on it and the camera dolly moving around. Yes a nit but I feel a more accurate statement of what is physically happening. The fact you can do this I think is very cool. Well just my 2 cents. Have fun. "Yes I know the voices are not real. But they have some pretty good ideas."

    J Offline
    J Offline
    Jeremy Falcon
    wrote on last edited by
    #40

    Out of curiosty, do you prefer right or left handed? I mean is there are reason why (like most people tend to use one). I heard DX was left-handed (don't know for sure though), so my guess would be not everyone in the industry goes the same way. Anyway just curious as you seem to have more experience in this than I do. Jeremy Falcon

    M 1 Reply Last reply
    0
    • J Jeremy Falcon

      Out of curiosty, do you prefer right or left handed? I mean is there are reason why (like most people tend to use one). I heard DX was left-handed (don't know for sure though), so my guess would be not everyone in the industry goes the same way. Anyway just curious as you seem to have more experience in this than I do. Jeremy Falcon

      M Offline
      M Offline
      Michael A Barnhart
      wrote on last edited by
      #41

      Jeremy Falcon wrote:

      Out of curiosty, do you prefer right or left handed?

      I prefer right handed. In my Finite Element background, right hand is universally used. "Yes I know the voices are not real. But they have some pretty good ideas."

      J 1 Reply Last reply
      0
      • J Jeremy Falcon

        Michael A. Barnhart wrote:

        For the raw display no, however how you build relative coordinate systems to place objects

        I was afraid of that. I suppose it wouldn't be too much overhead, but I'm anal about speed. :laugh:

        Michael A. Barnhart wrote:

        I am not familuar with 3DS so I could be mistaken but I would suspect it to be right handed.

        In 3DSMax +X is pointing to the right. And from what I've been told that's left-handed because it matches the direction the thumb is pointed on your left hand. Of course, there could be a way to swap Max to use right-handed for all I know. This is just the default.

        Michael A. Barnhart wrote:

        Well just my 2 cents. Have fun.

        Thanks for the info! Jeremy Falcon

        M Offline
        M Offline
        Michael A Barnhart
        wrote on last edited by
        #42

        Jeremy Falcon wrote:

        In 3DSMax +X is pointing to the right.

        Ok, and I assume +Y is up. So it is right hand if +Z is towards you (Screen to viewer) and left if +Z is awar from you. In my work (well past life) the viewer being at a positive distance from the object is common and is right hand. To late in the day to spell very well. "Yes I know the voices are not real. But they have some pretty good ideas." -- modified at 21:20 Saturday 1st July, 2006

        J 2 Replies Last reply
        0
        • M Marc Clifton

          You're thinking too linearly. Start with a 2D cross product and draw both vectors and the resulting cross product vector on paper. You should have an appropriate "ah ha" moment. Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson

          U Offline
          U Offline
          UniversalConstructs
          wrote on last edited by
          #43

          a 2D cross product? there is no such thing.

          M 1 Reply Last reply
          0
          • U UniversalConstructs

            a 2D cross product? there is no such thing.

            M Offline
            M Offline
            Marc Clifton
            wrote on last edited by
            #44

            Arjang Assadi wrote:

            a 2D cross product? there is no such thing.

            See? What do I know? Yet my suggestion to get out the graph paper helped. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson

            U 1 Reply Last reply
            0
            • M Michael A Barnhart

              Jeremy Falcon wrote:

              In 3DSMax +X is pointing to the right.

              Ok, and I assume +Y is up. So it is right hand if +Z is towards you (Screen to viewer) and left if +Z is awar from you. In my work (well past life) the viewer being at a positive distance from the object is common and is right hand. To late in the day to spell very well. "Yes I know the voices are not real. But they have some pretty good ideas." -- modified at 21:20 Saturday 1st July, 2006

              J Offline
              J Offline
              Jeremy Falcon
              wrote on last edited by
              #45

              It's left handed then. Now I just gotta decide to stick with one. Jeremy Falcon

              1 Reply Last reply
              0
              • M Michael A Barnhart

                Jeremy Falcon wrote:

                Out of curiosty, do you prefer right or left handed?

                I prefer right handed. In my Finite Element background, right hand is universally used. "Yes I know the voices are not real. But they have some pretty good ideas."

                J Offline
                J Offline
                Jeremy Falcon
                wrote on last edited by
                #46

                Thanks for the info. Jeremy Falcon

                1 Reply Last reply
                0
                • M Michael A Barnhart

                  Jeremy Falcon wrote:

                  In 3DSMax +X is pointing to the right.

                  Ok, and I assume +Y is up. So it is right hand if +Z is towards you (Screen to viewer) and left if +Z is awar from you. In my work (well past life) the viewer being at a positive distance from the object is common and is right hand. To late in the day to spell very well. "Yes I know the voices are not real. But they have some pretty good ideas." -- modified at 21:20 Saturday 1st July, 2006

                  J Offline
                  J Offline
                  Jeremy Falcon
                  wrote on last edited by
                  #47

                  Nevermind, I decided to actually open up Max and test and it's right handed. :laugh: If Max is right and so is OGL then I think I have a winner! Jeremy Falcon

                  M 1 Reply Last reply
                  0
                  • J Jeremy Falcon

                    Nevermind, I decided to actually open up Max and test and it's right handed. :laugh: If Max is right and so is OGL then I think I have a winner! Jeremy Falcon

                    M Offline
                    M Offline
                    Michael A Barnhart
                    wrote on last edited by
                    #48

                    Jeremy Falcon wrote:

                    I have a winner!

                    Have fun. "Yes I know the voices are not real. But they have some pretty good ideas."

                    1 Reply Last reply
                    0
                    • J Jeremy Falcon

                      I really don't want to ask this question here, but since there's no math forum I haven't much of a choice. Anyway, I have a math question for the gurus again. I'm trying to understand just how a cross product works rather than just do as I'm told kinda thing. So, given this...

                      | x1 | | x2 | | y1z2 - z1y2 |
                      | y1 | x | y2 | = | z1x2 - x1z2 |
                      | z1 | | z2 | | x1y2 - y1x2 |

                      My question is, why is that so? I realize (using the dot product as a reference) that the elements are independent or so I thought. I would've thought that multiplying the two would mean somethign of this nature...

                      x1 * x2 + y1 * y2, etc.

                      But I realize that would just be the dot product again. Also, why do I need to subtract at all when multiplying? Can anyone please explain this to me? The book I'm reading did a great job at explaining the dot product, but not the cross product. TIA Jeremy Falcon

                      J Offline
                      J Offline
                      JohnDMorgan
                      wrote on last edited by
                      #49

                      The cross product of two vectors A and B is a third vector (A x B) that is perpendicular to BOTH A and B. The magnitude of (A x B) is equal to the product of the magnitudes of the first two vectors and the sine of the angle between A and B: |A x B| = |A| |B| sin(/_ A,B) The perpendicularity condition determines the (two-headed) line in the direction of (A x B). The magnitude condition narrows down (A x B) to one of two vectors. The precise choice of (A x B) follows the right hand rule: 1.) Point your RIGHT index finger along A. 2.) Point your RIGHT middle finger along B. 3.) Lift your RIGHT thumb perpendicular to the plane of your index and middle fingers. It will then point along (A x B). (If you use your LEFT hand, you will get -(A x B) NOT (A x B). Whether to use a RIGHT hand rule or a LEFT hand rule is essentially just an arbitrary choice, but it needs to be used consistently. The right hand rule for moving currents and magnetic field in electricity basically come from the right hand rule for cross products.) The origin of the cross product actually comes from looking at tensor products: If A = A1 i + A2 j + A3 k and B = B1 i + B2 j + B3 k then AB = A1*B1*i*i + A1*B2*i*j + ... + A3*B2*k*j + A3*B3*k*k where i, j, and k are unit vectors in the X, Y, and Z directions, respectively. (The tensor product is usually represented as a square matrix.) The dot product is the trace (the sum of the ii part, the jj part, and the kk part) and the cross product is the antisymmetric part of the tensor product. The i component of (A x B) is the jk component of the tensor minus the kj component, etc. In matrix terms, look at AB - BA: The diagonal terms are all zero, the off-diagonal terms are the components of (A x B). As to when you would use it? It depends on how often you need to find a line perpendicular to two other lines. John Morgan Center for Health Statistics Arkansas Department of Health and Human Services

                      J 1 Reply Last reply
                      0
                      • J JohnDMorgan

                        The cross product of two vectors A and B is a third vector (A x B) that is perpendicular to BOTH A and B. The magnitude of (A x B) is equal to the product of the magnitudes of the first two vectors and the sine of the angle between A and B: |A x B| = |A| |B| sin(/_ A,B) The perpendicularity condition determines the (two-headed) line in the direction of (A x B). The magnitude condition narrows down (A x B) to one of two vectors. The precise choice of (A x B) follows the right hand rule: 1.) Point your RIGHT index finger along A. 2.) Point your RIGHT middle finger along B. 3.) Lift your RIGHT thumb perpendicular to the plane of your index and middle fingers. It will then point along (A x B). (If you use your LEFT hand, you will get -(A x B) NOT (A x B). Whether to use a RIGHT hand rule or a LEFT hand rule is essentially just an arbitrary choice, but it needs to be used consistently. The right hand rule for moving currents and magnetic field in electricity basically come from the right hand rule for cross products.) The origin of the cross product actually comes from looking at tensor products: If A = A1 i + A2 j + A3 k and B = B1 i + B2 j + B3 k then AB = A1*B1*i*i + A1*B2*i*j + ... + A3*B2*k*j + A3*B3*k*k where i, j, and k are unit vectors in the X, Y, and Z directions, respectively. (The tensor product is usually represented as a square matrix.) The dot product is the trace (the sum of the ii part, the jj part, and the kk part) and the cross product is the antisymmetric part of the tensor product. The i component of (A x B) is the jk component of the tensor minus the kj component, etc. In matrix terms, look at AB - BA: The diagonal terms are all zero, the off-diagonal terms are the components of (A x B). As to when you would use it? It depends on how often you need to find a line perpendicular to two other lines. John Morgan Center for Health Statistics Arkansas Department of Health and Human Services

                        J Offline
                        J Offline
                        Jeremy Falcon
                        wrote on last edited by
                        #50

                        Thanks for the reply. Jeremy Falcon

                        1 Reply Last reply
                        0
                        • M Marc Clifton

                          Arjang Assadi wrote:

                          a 2D cross product? there is no such thing.

                          See? What do I know? Yet my suggestion to get out the graph paper helped. :) Marc Pensieve Some people believe what the bible says. Literally. At least [with Wikipedia] you have the chance to correct the wiki -- Jörgen Sigvardsson

                          U Offline
                          U Offline
                          UniversalConstructs
                          wrote on last edited by
                          #51

                          Damn, that was meant to be a joke. I was expecting an answer like if the vectors are on a mobius strip then each is on a 1 dimensional surface and crossing them give a 2D vector! Mark, your suggestion was good and that shows you know about what matters. Regards and Cheers :-D Arjang

                          1 Reply Last reply
                          0
                          Reply
                          • Reply as topic
                          Log in to reply
                          • Oldest to Newest
                          • Newest to Oldest
                          • Most Votes


                          • Login

                          • Don't have an account? Register

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • World
                          • Users
                          • Groups