#Cube Vertex Order Issue

1 messages · Page 1 of 1 (latest)

still wolf
#

I analyzed my current code, and this is the order of the vertex indices. I know it is not standard order, but I don't know how to get to the standard way they're labeled using my code. Should I just manually assign them? I'm going to do that for now, but if anyone has a better solution, please lmk!

    --[[
    So it goes...
        (x,y,z) - vertex_number :: pseudo coords
        (0,0,0) - 0 :: Left Bottom Front
        (0,0,1) - 1 :: Left Bottom Back
        (0,1,0) - 2 :: Left Top Front
        (0,1,1) - 3 :: Left Top Back
        (1,0,0) - 4 :: Right Bottom Front
        (1,0,1) - 5 :: Right Bottom Back
        (1,1,0) - 6 :: Right Top Front
        (1,1,1) - 7 :: Right Top Back

        in order
    ]]
    
    --       3________7  
    --      /|       /|  
    --     2_|______6 |  
    --     | |      | |  
    --     | 1______|_5  
    --     |/       |/  
    --     0________4  
    
    for x=0, sx, increment do
        for y=0, sy, increment do
            for z=0, sz, increment do
                local value = math.clamp(math.noise(x/sx,y/sy,z/sz), -1, 1)
                print(vertex..": ".."("..x..", "..y..", "..z..")")
            end
        end
    end
#

i computed by hand

ivory sundial
#

world's first script comment art

icy pasture
#

cube

ivory sundial