Displace $3$D vertices along a $2$ dimension plane using normals

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
-1
down vote

favorite












I have this one triangle with arbitrary vertices positioned in a 3D space.



It's also easy to find the normal for it with the plane equation.



There is a very simple method for moving the vertices away from the centroid, but that is too linear. I can only move the vertices back and forth.



What is the formula that I need to be able to freely move the existing vertices (independently) or even new ones in a pseudo X/Y axis that is formed from the projection of the triangle normal?



I'm not a math guy so I ask you kindly to be detailed (specially when it comes to matrices).







share|cite|improve this question





















  • do you mean to move it rigidly (as a rigid body) in its plane ?
    – G Cab
    Jul 18 at 23:03











  • Are you basically looking for a way to generate other points in the plane of the triangle?
    – amd
    Jul 18 at 23:24











  • I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
    – Alexandre Severino
    Jul 18 at 23:27














up vote
-1
down vote

favorite












I have this one triangle with arbitrary vertices positioned in a 3D space.



It's also easy to find the normal for it with the plane equation.



There is a very simple method for moving the vertices away from the centroid, but that is too linear. I can only move the vertices back and forth.



What is the formula that I need to be able to freely move the existing vertices (independently) or even new ones in a pseudo X/Y axis that is formed from the projection of the triangle normal?



I'm not a math guy so I ask you kindly to be detailed (specially when it comes to matrices).







share|cite|improve this question





















  • do you mean to move it rigidly (as a rigid body) in its plane ?
    – G Cab
    Jul 18 at 23:03











  • Are you basically looking for a way to generate other points in the plane of the triangle?
    – amd
    Jul 18 at 23:24











  • I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
    – Alexandre Severino
    Jul 18 at 23:27












up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











I have this one triangle with arbitrary vertices positioned in a 3D space.



It's also easy to find the normal for it with the plane equation.



There is a very simple method for moving the vertices away from the centroid, but that is too linear. I can only move the vertices back and forth.



What is the formula that I need to be able to freely move the existing vertices (independently) or even new ones in a pseudo X/Y axis that is formed from the projection of the triangle normal?



I'm not a math guy so I ask you kindly to be detailed (specially when it comes to matrices).







share|cite|improve this question













I have this one triangle with arbitrary vertices positioned in a 3D space.



It's also easy to find the normal for it with the plane equation.



There is a very simple method for moving the vertices away from the centroid, but that is too linear. I can only move the vertices back and forth.



What is the formula that I need to be able to freely move the existing vertices (independently) or even new ones in a pseudo X/Y axis that is formed from the projection of the triangle normal?



I'm not a math guy so I ask you kindly to be detailed (specially when it comes to matrices).









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 18 at 23:45
























asked Jul 18 at 22:56









Alexandre Severino

1014




1014











  • do you mean to move it rigidly (as a rigid body) in its plane ?
    – G Cab
    Jul 18 at 23:03











  • Are you basically looking for a way to generate other points in the plane of the triangle?
    – amd
    Jul 18 at 23:24











  • I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
    – Alexandre Severino
    Jul 18 at 23:27
















  • do you mean to move it rigidly (as a rigid body) in its plane ?
    – G Cab
    Jul 18 at 23:03











  • Are you basically looking for a way to generate other points in the plane of the triangle?
    – amd
    Jul 18 at 23:24











  • I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
    – Alexandre Severino
    Jul 18 at 23:27















do you mean to move it rigidly (as a rigid body) in its plane ?
– G Cab
Jul 18 at 23:03





do you mean to move it rigidly (as a rigid body) in its plane ?
– G Cab
Jul 18 at 23:03













Are you basically looking for a way to generate other points in the plane of the triangle?
– amd
Jul 18 at 23:24





Are you basically looking for a way to generate other points in the plane of the triangle?
– amd
Jul 18 at 23:24













I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
– Alexandre Severino
Jul 18 at 23:27




I want to move the existing points. But being able to generate new ones in the same plane is pretty much the same solution. The only difference is that the former is "delete" from here and "add" there, while the latter is only the "add" part.
– Alexandre Severino
Jul 18 at 23:27










2 Answers
2






active

oldest

votes

















up vote
2
down vote



accepted










Label the three vertices $A$, $B$ and $C$. Assuming that they’re not colinear, every point on their common plane can be expressed in the form $A+lambda(B-A)+mu(C-A)$ for $lambda, mu in mathbb R$. Essentially, the vertex $A$ and the direction vectors $B-A$ and $C-A$ define a coordinate system $(lambda,mu)$ for the plane. The three points have coordinates $(0,0)$, $(1,0)$ and $(0,1)$, respectively. If you want to move a point parallel to $B-A$, adjust its $lambda$-coordinate; to move it parallel to $C-A$, adjust its $mu$-coordinate.



Depending on what you want to do, you might find an orthonormal coordinate system more convenient. A simple choice is to set $mathbf u$ to $B-A$, normalized, and $mathbf v$ to $((B-A)times(C-A))times(B-A)$, also normalized. Just as above, every point on the plane can then be expressed in the form $A+smathbf u+tmathbf v$, but now the coordinates $s$ and $t$ are equal to the actual distances from $A$ in the $mathbf u$ and $mathbf v$ directions.



You can, of course, choose any of the three points to be the origin of these coordinate systems, and use the two resulting direction vectors in either order.






share|cite|improve this answer




























    up vote
    2
    down vote













    If you mean to move it as a rigid body in the plane where it initially lays, having a unit normal vector $bf n$, then



    • add to all vertices a same displacement vector $bf d$, which is normal to $bf n$;


    • take a rotation center point $bf c$ on the plane (could be the centroid or one of the vertices, or ..), and take a rotation angle $alpha$, multiply $bf n$ by that, and add the cross product $ alpha bf n times (bf v_k- bf c)$ to each vertex $bf v_k$.


    If, instead, as you commented, you want to move the vertices freely in the plane, then just add different displacement vectors $bf d_k$ to each vertex. The vectors $bf d_k$ shall be parallel to the plane, i.e. normal to $bf n$.

    To do that you will need to construct a new (orthogonal) basis having $n$ as one of the axis (as the new z, for example).

    But, since you already have the triangle, you can go with a basis that is constituted, e.g. by $bf a= (bf v_2-bf v_1)$, $bf b =(bf v_3-bf v_1 )$, and $bf n$.

    Then $bf v_k=mu_k bf a + lambda_k bf b$.






    share|cite|improve this answer























    • I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
      – Alexandre Severino
      Jul 18 at 23:21










    • Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
      – Alexandre Severino
      Jul 18 at 23:25










    • @AlexandreSeverino: added in answer
      – G Cab
      Jul 19 at 0:09










    • Will try and let you know.
      – Alexandre Severino
      Jul 19 at 0:22










    • Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
      – Alexandre Severino
      Jul 19 at 0:33










    Your Answer




    StackExchange.ifUsing("editor", function ()
    return StackExchange.using("mathjaxEditing", function ()
    StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
    StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
    );
    );
    , "mathjax-editing");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "69"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2856097%2fdisplace-3d-vertices-along-a-2-dimension-plane-using-normals%23new-answer', 'question_page');

    );

    Post as a guest






























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote



    accepted










    Label the three vertices $A$, $B$ and $C$. Assuming that they’re not colinear, every point on their common plane can be expressed in the form $A+lambda(B-A)+mu(C-A)$ for $lambda, mu in mathbb R$. Essentially, the vertex $A$ and the direction vectors $B-A$ and $C-A$ define a coordinate system $(lambda,mu)$ for the plane. The three points have coordinates $(0,0)$, $(1,0)$ and $(0,1)$, respectively. If you want to move a point parallel to $B-A$, adjust its $lambda$-coordinate; to move it parallel to $C-A$, adjust its $mu$-coordinate.



    Depending on what you want to do, you might find an orthonormal coordinate system more convenient. A simple choice is to set $mathbf u$ to $B-A$, normalized, and $mathbf v$ to $((B-A)times(C-A))times(B-A)$, also normalized. Just as above, every point on the plane can then be expressed in the form $A+smathbf u+tmathbf v$, but now the coordinates $s$ and $t$ are equal to the actual distances from $A$ in the $mathbf u$ and $mathbf v$ directions.



    You can, of course, choose any of the three points to be the origin of these coordinate systems, and use the two resulting direction vectors in either order.






    share|cite|improve this answer

























      up vote
      2
      down vote



      accepted










      Label the three vertices $A$, $B$ and $C$. Assuming that they’re not colinear, every point on their common plane can be expressed in the form $A+lambda(B-A)+mu(C-A)$ for $lambda, mu in mathbb R$. Essentially, the vertex $A$ and the direction vectors $B-A$ and $C-A$ define a coordinate system $(lambda,mu)$ for the plane. The three points have coordinates $(0,0)$, $(1,0)$ and $(0,1)$, respectively. If you want to move a point parallel to $B-A$, adjust its $lambda$-coordinate; to move it parallel to $C-A$, adjust its $mu$-coordinate.



      Depending on what you want to do, you might find an orthonormal coordinate system more convenient. A simple choice is to set $mathbf u$ to $B-A$, normalized, and $mathbf v$ to $((B-A)times(C-A))times(B-A)$, also normalized. Just as above, every point on the plane can then be expressed in the form $A+smathbf u+tmathbf v$, but now the coordinates $s$ and $t$ are equal to the actual distances from $A$ in the $mathbf u$ and $mathbf v$ directions.



      You can, of course, choose any of the three points to be the origin of these coordinate systems, and use the two resulting direction vectors in either order.






      share|cite|improve this answer























        up vote
        2
        down vote



        accepted







        up vote
        2
        down vote



        accepted






        Label the three vertices $A$, $B$ and $C$. Assuming that they’re not colinear, every point on their common plane can be expressed in the form $A+lambda(B-A)+mu(C-A)$ for $lambda, mu in mathbb R$. Essentially, the vertex $A$ and the direction vectors $B-A$ and $C-A$ define a coordinate system $(lambda,mu)$ for the plane. The three points have coordinates $(0,0)$, $(1,0)$ and $(0,1)$, respectively. If you want to move a point parallel to $B-A$, adjust its $lambda$-coordinate; to move it parallel to $C-A$, adjust its $mu$-coordinate.



        Depending on what you want to do, you might find an orthonormal coordinate system more convenient. A simple choice is to set $mathbf u$ to $B-A$, normalized, and $mathbf v$ to $((B-A)times(C-A))times(B-A)$, also normalized. Just as above, every point on the plane can then be expressed in the form $A+smathbf u+tmathbf v$, but now the coordinates $s$ and $t$ are equal to the actual distances from $A$ in the $mathbf u$ and $mathbf v$ directions.



        You can, of course, choose any of the three points to be the origin of these coordinate systems, and use the two resulting direction vectors in either order.






        share|cite|improve this answer













        Label the three vertices $A$, $B$ and $C$. Assuming that they’re not colinear, every point on their common plane can be expressed in the form $A+lambda(B-A)+mu(C-A)$ for $lambda, mu in mathbb R$. Essentially, the vertex $A$ and the direction vectors $B-A$ and $C-A$ define a coordinate system $(lambda,mu)$ for the plane. The three points have coordinates $(0,0)$, $(1,0)$ and $(0,1)$, respectively. If you want to move a point parallel to $B-A$, adjust its $lambda$-coordinate; to move it parallel to $C-A$, adjust its $mu$-coordinate.



        Depending on what you want to do, you might find an orthonormal coordinate system more convenient. A simple choice is to set $mathbf u$ to $B-A$, normalized, and $mathbf v$ to $((B-A)times(C-A))times(B-A)$, also normalized. Just as above, every point on the plane can then be expressed in the form $A+smathbf u+tmathbf v$, but now the coordinates $s$ and $t$ are equal to the actual distances from $A$ in the $mathbf u$ and $mathbf v$ directions.



        You can, of course, choose any of the three points to be the origin of these coordinate systems, and use the two resulting direction vectors in either order.







        share|cite|improve this answer













        share|cite|improve this answer



        share|cite|improve this answer











        answered Jul 19 at 0:34









        amd

        25.9k2943




        25.9k2943




















            up vote
            2
            down vote













            If you mean to move it as a rigid body in the plane where it initially lays, having a unit normal vector $bf n$, then



            • add to all vertices a same displacement vector $bf d$, which is normal to $bf n$;


            • take a rotation center point $bf c$ on the plane (could be the centroid or one of the vertices, or ..), and take a rotation angle $alpha$, multiply $bf n$ by that, and add the cross product $ alpha bf n times (bf v_k- bf c)$ to each vertex $bf v_k$.


            If, instead, as you commented, you want to move the vertices freely in the plane, then just add different displacement vectors $bf d_k$ to each vertex. The vectors $bf d_k$ shall be parallel to the plane, i.e. normal to $bf n$.

            To do that you will need to construct a new (orthogonal) basis having $n$ as one of the axis (as the new z, for example).

            But, since you already have the triangle, you can go with a basis that is constituted, e.g. by $bf a= (bf v_2-bf v_1)$, $bf b =(bf v_3-bf v_1 )$, and $bf n$.

            Then $bf v_k=mu_k bf a + lambda_k bf b$.






            share|cite|improve this answer























            • I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
              – Alexandre Severino
              Jul 18 at 23:21










            • Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
              – Alexandre Severino
              Jul 18 at 23:25










            • @AlexandreSeverino: added in answer
              – G Cab
              Jul 19 at 0:09










            • Will try and let you know.
              – Alexandre Severino
              Jul 19 at 0:22










            • Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
              – Alexandre Severino
              Jul 19 at 0:33














            up vote
            2
            down vote













            If you mean to move it as a rigid body in the plane where it initially lays, having a unit normal vector $bf n$, then



            • add to all vertices a same displacement vector $bf d$, which is normal to $bf n$;


            • take a rotation center point $bf c$ on the plane (could be the centroid or one of the vertices, or ..), and take a rotation angle $alpha$, multiply $bf n$ by that, and add the cross product $ alpha bf n times (bf v_k- bf c)$ to each vertex $bf v_k$.


            If, instead, as you commented, you want to move the vertices freely in the plane, then just add different displacement vectors $bf d_k$ to each vertex. The vectors $bf d_k$ shall be parallel to the plane, i.e. normal to $bf n$.

            To do that you will need to construct a new (orthogonal) basis having $n$ as one of the axis (as the new z, for example).

            But, since you already have the triangle, you can go with a basis that is constituted, e.g. by $bf a= (bf v_2-bf v_1)$, $bf b =(bf v_3-bf v_1 )$, and $bf n$.

            Then $bf v_k=mu_k bf a + lambda_k bf b$.






            share|cite|improve this answer























            • I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
              – Alexandre Severino
              Jul 18 at 23:21










            • Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
              – Alexandre Severino
              Jul 18 at 23:25










            • @AlexandreSeverino: added in answer
              – G Cab
              Jul 19 at 0:09










            • Will try and let you know.
              – Alexandre Severino
              Jul 19 at 0:22










            • Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
              – Alexandre Severino
              Jul 19 at 0:33












            up vote
            2
            down vote










            up vote
            2
            down vote









            If you mean to move it as a rigid body in the plane where it initially lays, having a unit normal vector $bf n$, then



            • add to all vertices a same displacement vector $bf d$, which is normal to $bf n$;


            • take a rotation center point $bf c$ on the plane (could be the centroid or one of the vertices, or ..), and take a rotation angle $alpha$, multiply $bf n$ by that, and add the cross product $ alpha bf n times (bf v_k- bf c)$ to each vertex $bf v_k$.


            If, instead, as you commented, you want to move the vertices freely in the plane, then just add different displacement vectors $bf d_k$ to each vertex. The vectors $bf d_k$ shall be parallel to the plane, i.e. normal to $bf n$.

            To do that you will need to construct a new (orthogonal) basis having $n$ as one of the axis (as the new z, for example).

            But, since you already have the triangle, you can go with a basis that is constituted, e.g. by $bf a= (bf v_2-bf v_1)$, $bf b =(bf v_3-bf v_1 )$, and $bf n$.

            Then $bf v_k=mu_k bf a + lambda_k bf b$.






            share|cite|improve this answer















            If you mean to move it as a rigid body in the plane where it initially lays, having a unit normal vector $bf n$, then



            • add to all vertices a same displacement vector $bf d$, which is normal to $bf n$;


            • take a rotation center point $bf c$ on the plane (could be the centroid or one of the vertices, or ..), and take a rotation angle $alpha$, multiply $bf n$ by that, and add the cross product $ alpha bf n times (bf v_k- bf c)$ to each vertex $bf v_k$.


            If, instead, as you commented, you want to move the vertices freely in the plane, then just add different displacement vectors $bf d_k$ to each vertex. The vectors $bf d_k$ shall be parallel to the plane, i.e. normal to $bf n$.

            To do that you will need to construct a new (orthogonal) basis having $n$ as one of the axis (as the new z, for example).

            But, since you already have the triangle, you can go with a basis that is constituted, e.g. by $bf a= (bf v_2-bf v_1)$, $bf b =(bf v_3-bf v_1 )$, and $bf n$.

            Then $bf v_k=mu_k bf a + lambda_k bf b$.







            share|cite|improve this answer















            share|cite|improve this answer



            share|cite|improve this answer








            edited Jul 19 at 0:09


























            answered Jul 18 at 23:14









            G Cab

            15.1k31136




            15.1k31136











            • I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
              – Alexandre Severino
              Jul 18 at 23:21










            • Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
              – Alexandre Severino
              Jul 18 at 23:25










            • @AlexandreSeverino: added in answer
              – G Cab
              Jul 19 at 0:09










            • Will try and let you know.
              – Alexandre Severino
              Jul 19 at 0:22










            • Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
              – Alexandre Severino
              Jul 19 at 0:33
















            • I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
              – Alexandre Severino
              Jul 18 at 23:21










            • Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
              – Alexandre Severino
              Jul 18 at 23:25










            • @AlexandreSeverino: added in answer
              – G Cab
              Jul 19 at 0:09










            • Will try and let you know.
              – Alexandre Severino
              Jul 19 at 0:22










            • Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
              – Alexandre Severino
              Jul 19 at 0:33















            I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
            – Alexandre Severino
            Jul 18 at 23:21




            I like that and will use for future reference, but it doesn't answer my question. I want to freely move any vertices, or even add a new vertex to the same plane. I'll edit my question.
            – Alexandre Severino
            Jul 18 at 23:21












            Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
            – Alexandre Severino
            Jul 18 at 23:25




            Why would I use an arbitrary rotation angle when I want to move the points in a $2$D fashion? I mean... I need to keep the points in a plane that is 90 degrees with the normal vector.
            – Alexandre Severino
            Jul 18 at 23:25












            @AlexandreSeverino: added in answer
            – G Cab
            Jul 19 at 0:09




            @AlexandreSeverino: added in answer
            – G Cab
            Jul 19 at 0:09












            Will try and let you know.
            – Alexandre Severino
            Jul 19 at 0:22




            Will try and let you know.
            – Alexandre Severino
            Jul 19 at 0:22












            Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
            – Alexandre Severino
            Jul 19 at 0:33




            Say I know I want to move this vertex 5 on the pseudo X axis and 3 on the pseudo Y axis, how do I translate that so it's parallel to the plane?
            – Alexandre Severino
            Jul 19 at 0:33












             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2856097%2fdisplace-3d-vertices-along-a-2-dimension-plane-using-normals%23new-answer', 'question_page');

            );

            Post as a guest













































































            Comments

            Popular posts from this blog

            What is the equation of a 3D cone with generalised tilt?

            Color the edges and diagonals of a regular polygon

            Relationship between determinant of matrix and determinant of adjoint?