Search Unity

3D Tetrahedron grid.

Discussion in 'Scripting' started by jister, Oct 24, 2011.

  1. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    hey,
    I'm chewing on my brain last couple of days, trying to figure out how to make a 3D grid based on a Tetrahedron.

    I'm no good with Maths :( so I tried modelling it... the Tetrahedron is easy, but i can't seem to figure out how to make a grid formed with the tetrahedron...
    should every vertex have lines going out in 30° as far as i could calculate it's 36° don't ask me why, it seems i can put 5 together to close a shape so i cover 180° so i figured for 360° i need 10, hence an angle of 36°...
    anyway my brain is not got at this stuff.

    I'm guessing it all doable with the right script, but it will need loads of fine math.

    anyway any help in figuring this out is greatly appreciated!

    J.
     
  2. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    The base of a tetrahedron is a triangle. A strip of triangles is pretty easy. From there, a grid is easy, too.

    What exactly are you trying to do that you can't just use the above to make your grid?
     
  3. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    wel i want a grid in 3D space where all the points show hints of the lines that can come from that point to other points. like I said i believe that to be 10 lines or axis. so each point connects to 10 different points.
    but i don't get around on how to make it so that it's symmetrical around 360°... in 3ds max i done it on sight :(
    i want to be able to adjust the length of the rib and so the spacing between each point equally enhances.
    the lines that are drawn have some vars to adjust some stuff like the width and lenght, or a gradient opacity, color that sort of stuff
    it would be easy for a cube you'd just have xyz, but i just get dizzy from all the angular stuff needed..
     
  4. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    I guess I'm just totally not understanding what you want. Can you draw it or something?
     
  5. jister

    jister

    Joined:
    Oct 9, 2009
    Posts:
    1,749
    for a cube it would look like this



    also i miscalculated i think, it's 12 points that connect to each point. so then it would be 30° only the triangles them self all have 60° degree corners, so it's probably 6 lines in an angle of 60°, but that seems to little... hmm confused again.

    it would be like this (but then not so messy :) )
    this is a grid of 4

     
    Last edited: Oct 25, 2011
  6. Daniel-Talis

    Daniel-Talis

    Joined:
    Dec 10, 2011
    Posts:
    425
    This is extremely old but I thought I would say something. . 3D Tetrahedrons are not spacefillers so you will have difficulty trying to create them as such into a matrix or a 3D grid. You could however fit two of them into a cube very nicely and cubes are spacefillers. :)
     
  7. SparrowGS

    SparrowGS

    Joined:
    Apr 6, 2017
    Posts:
    2,536
    If two tetrahedrons can make a cube and a cube can be a space filler - so can they.
    The shapes that can be made into a 2D grid is a triangle, cube and hexagon.

    Also, no need to necro such an old post for nothing really..