Untitled
public lua v1 · immutablefunction GetSphereVertices( diameter, xdivisions, zdivisions ) local coords= { x = {}, y = {}, z = {} } for z = 0, 1, zdivisions ) do for angle = 0, 360,( xdivisions / 360 ) do x,y = math.sin(angle),math(angle) x,y,z = (x * diameter), (y * diameter), (z * diameter) table.insert( coords.x, x) table.insert( coords.y, y) table.insert( coords.z, z) end endend