Extend this 4D Tetrahedron (3-simplex) slicing to 3D triangles geometry shader to slice 6D Hexateron (5-simplex) to 3D triangles.
```glsl
#version 330 core

layout(lines_adjacency) in; // 4 vertices input (tetrahedron/3-simplex)
layout(triangle_strip, max_vertices = 8) out; // the slice result triangles output

// projection matrix is handled here after the coordinates are converted to 3D
uniform mat4 P;

void main()
{
	// calculate intersection between simplex and hyperplane (3D view)

	// simplex edge vertex indices (i0, i1)
	// each consecutive pair corresponds to an edge number: 0, 1, 2, 3, 4, 5
	int edges[12] = int[12](0, 1 /* 0 */, 0, 2 /* 1 */, 0, 3 /* 2 */, 1, 2 /* 3 */, 1, 3 /* 4 */, 2, 3 /* 5 */);

	// keep track of which simplex vertices intersect with the hyperplane
	bool insidePts[4] = bool[4](false, false, false, false);

	// number of intersection points
	int k = 0;
	// intersection points
	vec4 pts[4];
	// the edge that each point is found in (0 - 5)
	int ptEdges[4];

	// iterate through edges
	for (int i = 0; i < 12; i += 2)
	{
		// once hits 4 intersection points, stop
		if (k == 4)
		{
			break;
		}

		// get the edge vertices
		int k0 = edges[i];
		int k1 = edges[i + 1];
		vec4 p0 = gl_in[k0].gl_Position;
		vec4 p1 = gl_in[k1].gl_Position;

		// one or two points intersect with the hyperplane
		bool vertIntersect = false;
		if (abs(p0.w) <= 0.0000001 && k < 4 && !insidePts[k0])
		{
			pts[k] = p0;
			insidePts[k0] = true;
			++k;
			vertIntersect = true;
		}
		if (abs(p1.w) <= 0.0000001 && k < 4 && !insidePts[k1])
		{
			pts[k] = p1;
			insidePts[k1] = true;
			++k;
			vertIntersect = true;
		}
		if (vertIntersect)
		{
			continue;
		}

		// vertices are on the same side of the hyperplane so the edge doesn't intersect
		if ((p0.w < 0.0000001 && p1.w < 0.0000001) || (p0.w > -0.0000001 && p1.w > -0.0000001))
		{
			continue;
		}

		// edge intersection and interpolation of the points
		float a = 0;
		if (abs(p1.w - p0.w) > 0.0000001)
		{
			a = (-p0.w) / (p1.w - p0.w);
		}
		pts[k] = mix(p0, p1, a);
		pts[k][3] = 1.0;

		ptEdges[k] = i / 2; // keep track of the edge index
		++k;
	}
	
	// 3 intersection points = 1 triangle
	if (k == 3)
	{
		for (int i = 0; i < 3; ++i)
		{
			gl_Position = P * pts[i];
			EmitVertex();
		}
	}
	// 4 intersection points = 2 triangles
	else if (k == 4)
	{
		int k0 = 0;
		int k1;
		int k2;
		int k3;
		// set k1 to the opposite point of k0
		if (ptEdges[1] == 5 - ptEdges[k0])
		{
			k1 = 1;
			k2 = 2;
			k3 = 3;
		}
		else if (ptEdges[2] == 5 - ptEdges[k0])
		{
			k1 = 2;
			k2 = 1;
			k3 = 3;
		}
		else
		{
			k1 = 3;
			k2 = 1;
			k3 = 2;
		}
		
		gl_Position = P * pts[k0];
		EmitVertex();

		gl_Position = P * pts[k1];
		EmitVertex();

		gl_Position = P * pts[k2];
		EmitVertex();
		EndPrimitive();

		gl_Position = P * pts[k0];
		EmitVertex();

		gl_Position = P * pts[k1];
		EmitVertex();

		gl_Position = P * pts[k3];
		EmitVertex();
		EndPrimitive();
	}
}
```
you will need to make a `vec6` struct with `x,y,z,w,v,u` values and take input from vertex shader through `in vec6 gsPosition[]` instead of the default `gl_in gl_Position`.
make sure it properly handles the intersection and the triangulation.