...
Matrix4x4 mper = new Matrix4x4();
mper.SetRow(0, new Vector4(near_plane, 0f, 0f, 0f));
mper.SetRow(1, new Vector4(0f, near_plane, 0f, 0f));
mper.SetRow(2, new Vector4(0f, 0f, near_plane + far_plane,
-(far_plane * near_plane)));
mper.SetRow(3, new Vector4(0f, 0f, 1f, 0f));
...
Matrix4x4 m = mvp * ((morth * mper) * mcam);
for (int i = 0; i < world.lines.Length; i+=2)
{
Vector4 p = multiplyPoint(m,
new Vector4(world.vertices[world.lines[i]].x,
world.vertices[world.lines[i]].y,
world.vertices[world.lines[i]].z, 1));
Vector4 q = multiplyPoint(m,
new Vector4(world.vertices[world.lines[i + 1]].x,
world.vertices[world.lines[i + 1]].y,
world.vertices[world.lines[i + 1]].z, 1));
DrawLine(frameBuffer, (int)(p.x / p.w), (int)(p.y / p.w),
(int)(q.x / q.w), (int)(q.y / q.w), Color.white);
}
...