mapping a cube into a tetrahedron

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











up vote
0
down vote

favorite
1












I have a cube with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0),(0,1,1),(1,1,0),(1,0,1),(1,1,1), and a tetrahedron with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0).



How do I map the cube's coordinates to the tetrahedron bijectively? Are there an elegant function that would do it?



Note: on 2-dimension, to map a square to a triangle I can do f(x,y) = (x-xy/2,y-xy/2); I'm struggling to extend this to 3-dimension







share|cite|improve this question





















  • It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
    – G Tony Jacobs
    Jul 26 at 2:10










  • that's what I was thinking. But I'm not sure how to express that process by a function
    – More water plz
    Jul 26 at 2:26











  • You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
    – G Tony Jacobs
    Jul 26 at 2:57














up vote
0
down vote

favorite
1












I have a cube with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0),(0,1,1),(1,1,0),(1,0,1),(1,1,1), and a tetrahedron with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0).



How do I map the cube's coordinates to the tetrahedron bijectively? Are there an elegant function that would do it?



Note: on 2-dimension, to map a square to a triangle I can do f(x,y) = (x-xy/2,y-xy/2); I'm struggling to extend this to 3-dimension







share|cite|improve this question





















  • It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
    – G Tony Jacobs
    Jul 26 at 2:10










  • that's what I was thinking. But I'm not sure how to express that process by a function
    – More water plz
    Jul 26 at 2:26











  • You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
    – G Tony Jacobs
    Jul 26 at 2:57












up vote
0
down vote

favorite
1









up vote
0
down vote

favorite
1






1





I have a cube with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0),(0,1,1),(1,1,0),(1,0,1),(1,1,1), and a tetrahedron with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0).



How do I map the cube's coordinates to the tetrahedron bijectively? Are there an elegant function that would do it?



Note: on 2-dimension, to map a square to a triangle I can do f(x,y) = (x-xy/2,y-xy/2); I'm struggling to extend this to 3-dimension







share|cite|improve this question













I have a cube with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0),(0,1,1),(1,1,0),(1,0,1),(1,1,1), and a tetrahedron with vertex at (0,0,0),(0,0,1),(0,1,0),(1,0,0).



How do I map the cube's coordinates to the tetrahedron bijectively? Are there an elegant function that would do it?



Note: on 2-dimension, to map a square to a triangle I can do f(x,y) = (x-xy/2,y-xy/2); I'm struggling to extend this to 3-dimension









share|cite|improve this question












share|cite|improve this question




share|cite|improve this question








edited Jul 26 at 2:25
























asked Jul 26 at 2:05









More water plz

1,331320




1,331320











  • It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
    – G Tony Jacobs
    Jul 26 at 2:10










  • that's what I was thinking. But I'm not sure how to express that process by a function
    – More water plz
    Jul 26 at 2:26











  • You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
    – G Tony Jacobs
    Jul 26 at 2:57
















  • It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
    – G Tony Jacobs
    Jul 26 at 2:10










  • that's what I was thinking. But I'm not sure how to express that process by a function
    – More water plz
    Jul 26 at 2:26











  • You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
    – G Tony Jacobs
    Jul 26 at 2:57















It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
– G Tony Jacobs
Jul 26 at 2:10




It’s certainly possible: just scale each ray from the origin linearly to take the edge of the cube to the edge of the tetrahedron. I’m interested to see whether anyone can do it more elegantly than that.....
– G Tony Jacobs
Jul 26 at 2:10












that's what I was thinking. But I'm not sure how to express that process by a function
– More water plz
Jul 26 at 2:26





that's what I was thinking. But I'm not sure how to express that process by a function
– More water plz
Jul 26 at 2:26













You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
– G Tony Jacobs
Jul 26 at 2:57




You would have to write down separate functions depending which face of the cube and the tetrahedron each ray intersects. Like I said, not very elegant.
– G Tony Jacobs
Jul 26 at 2:57










1 Answer
1






active

oldest

votes

















up vote
2
down vote













A potentially useful observation is that the unit cube and unit simplex in any number of dimensions can be expressed in terms of the maximum norm $||vec x||_M=max(|x_i|)$ and the taxicab norm $||vec x||_T=sum_i|x_i|$, allowing us to make use of the convenient properties of norms:
$$
textUnit Cube: mathcal C=
$$
$$
textUnit Simplex: mathcal S=vec x
$$
Note that your cube and tetrahedron are the $d=3$ case.



One way to transform between these shapes, then, is to map each vector $vec x$ in the cube to a vector $vec y$ in the same direction such that $||vec x||_M=||vec y||_T$. This gives us a simple function, which multiplies $vec x$ by some positive constant $c(vec x)$, for which we can find an expression.
$$beginalign
||vec x||_M & = ||cvec x||_T \
||vec x||_M & = |c| ||vec x||_T \
c & = fracvec x
endalign$$
This allows us to write down a function, taking care of the problematic zero case:
$$
f:mathcal Ctomathcal S, f(vec x) = begincases
fracvec xvec x & vec x neq vec 0 \
vec 0 & vec x = vec 0
endcases
$$
From here, showing that this is a bijection should be straightforward.






share|cite|improve this answer























    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%2f2862995%2fmapping-a-cube-into-a-tetrahedron%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote













    A potentially useful observation is that the unit cube and unit simplex in any number of dimensions can be expressed in terms of the maximum norm $||vec x||_M=max(|x_i|)$ and the taxicab norm $||vec x||_T=sum_i|x_i|$, allowing us to make use of the convenient properties of norms:
    $$
    textUnit Cube: mathcal C=
    $$
    $$
    textUnit Simplex: mathcal S=vec x
    $$
    Note that your cube and tetrahedron are the $d=3$ case.



    One way to transform between these shapes, then, is to map each vector $vec x$ in the cube to a vector $vec y$ in the same direction such that $||vec x||_M=||vec y||_T$. This gives us a simple function, which multiplies $vec x$ by some positive constant $c(vec x)$, for which we can find an expression.
    $$beginalign
    ||vec x||_M & = ||cvec x||_T \
    ||vec x||_M & = |c| ||vec x||_T \
    c & = fracvec x
    endalign$$
    This allows us to write down a function, taking care of the problematic zero case:
    $$
    f:mathcal Ctomathcal S, f(vec x) = begincases
    fracvec xvec x & vec x neq vec 0 \
    vec 0 & vec x = vec 0
    endcases
    $$
    From here, showing that this is a bijection should be straightforward.






    share|cite|improve this answer



























      up vote
      2
      down vote













      A potentially useful observation is that the unit cube and unit simplex in any number of dimensions can be expressed in terms of the maximum norm $||vec x||_M=max(|x_i|)$ and the taxicab norm $||vec x||_T=sum_i|x_i|$, allowing us to make use of the convenient properties of norms:
      $$
      textUnit Cube: mathcal C=
      $$
      $$
      textUnit Simplex: mathcal S=vec x
      $$
      Note that your cube and tetrahedron are the $d=3$ case.



      One way to transform between these shapes, then, is to map each vector $vec x$ in the cube to a vector $vec y$ in the same direction such that $||vec x||_M=||vec y||_T$. This gives us a simple function, which multiplies $vec x$ by some positive constant $c(vec x)$, for which we can find an expression.
      $$beginalign
      ||vec x||_M & = ||cvec x||_T \
      ||vec x||_M & = |c| ||vec x||_T \
      c & = fracvec x
      endalign$$
      This allows us to write down a function, taking care of the problematic zero case:
      $$
      f:mathcal Ctomathcal S, f(vec x) = begincases
      fracvec xvec x & vec x neq vec 0 \
      vec 0 & vec x = vec 0
      endcases
      $$
      From here, showing that this is a bijection should be straightforward.






      share|cite|improve this answer

























        up vote
        2
        down vote










        up vote
        2
        down vote









        A potentially useful observation is that the unit cube and unit simplex in any number of dimensions can be expressed in terms of the maximum norm $||vec x||_M=max(|x_i|)$ and the taxicab norm $||vec x||_T=sum_i|x_i|$, allowing us to make use of the convenient properties of norms:
        $$
        textUnit Cube: mathcal C=
        $$
        $$
        textUnit Simplex: mathcal S=vec x
        $$
        Note that your cube and tetrahedron are the $d=3$ case.



        One way to transform between these shapes, then, is to map each vector $vec x$ in the cube to a vector $vec y$ in the same direction such that $||vec x||_M=||vec y||_T$. This gives us a simple function, which multiplies $vec x$ by some positive constant $c(vec x)$, for which we can find an expression.
        $$beginalign
        ||vec x||_M & = ||cvec x||_T \
        ||vec x||_M & = |c| ||vec x||_T \
        c & = fracvec x
        endalign$$
        This allows us to write down a function, taking care of the problematic zero case:
        $$
        f:mathcal Ctomathcal S, f(vec x) = begincases
        fracvec xvec x & vec x neq vec 0 \
        vec 0 & vec x = vec 0
        endcases
        $$
        From here, showing that this is a bijection should be straightforward.






        share|cite|improve this answer















        A potentially useful observation is that the unit cube and unit simplex in any number of dimensions can be expressed in terms of the maximum norm $||vec x||_M=max(|x_i|)$ and the taxicab norm $||vec x||_T=sum_i|x_i|$, allowing us to make use of the convenient properties of norms:
        $$
        textUnit Cube: mathcal C=
        $$
        $$
        textUnit Simplex: mathcal S=vec x
        $$
        Note that your cube and tetrahedron are the $d=3$ case.



        One way to transform between these shapes, then, is to map each vector $vec x$ in the cube to a vector $vec y$ in the same direction such that $||vec x||_M=||vec y||_T$. This gives us a simple function, which multiplies $vec x$ by some positive constant $c(vec x)$, for which we can find an expression.
        $$beginalign
        ||vec x||_M & = ||cvec x||_T \
        ||vec x||_M & = |c| ||vec x||_T \
        c & = fracvec x
        endalign$$
        This allows us to write down a function, taking care of the problematic zero case:
        $$
        f:mathcal Ctomathcal S, f(vec x) = begincases
        fracvec xvec x & vec x neq vec 0 \
        vec 0 & vec x = vec 0
        endcases
        $$
        From here, showing that this is a bijection should be straightforward.







        share|cite|improve this answer















        share|cite|improve this answer



        share|cite|improve this answer








        edited Jul 26 at 3:06


























        answered Jul 26 at 3:00









        Kajelad

        1,848619




        1,848619






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2862995%2fmapping-a-cube-into-a-tetrahedron%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?