Planar Quad (PQ) Meshes
Quad Planarity Invariant:
1import numpy as np23def evaluate_quad_planarity(v0, v1, v2, v3):4 """5 Computes planarity error of quadrilateral (v0, v1, v2, v3).6 A quad is strictly planar if the scalar triple product is zero:7 vol = det([v1 - v0, v2 - v0, v3 - v0]) = 0.8 Normalized planarity metric: distance from v3 to plane(v0, v1, v2).9 """10 e1 = v1 - v011 e2 = v2 - v012 normal = np.cross(e1, e2)13 norm_len = np.linalg.norm(normal)14 if norm_len < 1e-9:15 return 0.0 # Degenerate16 unit_norm = normal / norm_len1718 # Distance of 4th vertex from plane19 dist_v3 = abs(np.dot(v3 - v0, unit_norm))20 diag_avg = (np.linalg.norm(v2 - v0) + np.linalg.norm(v3 - v1)) * 0.521 relative_planarity = dist_v3 / diag_avg22 return relative_planarity
Planar Quad (PQ) Meshes for Architectural Façades: While triangular mesh panels are always trivially flat, double-curved glass envelopes constructed from triangles require complex structural node stars with 6 incident beams, dramatically increasing fabrication costs. Planar Quad (PQ) meshes enforce that all 4 vertices of each quad panel lie strictly in a single plane, enabling standard, inexpensive flat glass sheets to form striking curved roofs.
Conical Mesh Geometry:
1import numpy as np23def is_conical_vertex(vertex, neighbor_ring, face_normals, tol=1e-4):4 """5 Evaluates whether a degree-4 quad mesh vertex is conical (Pottmann & Wallner 2006):6 1. Opposite interior corner angles sum equally: omega_1 + omega_3 == omega_2 + omega_4.7 2. Computes the vertex cone axis A such that A . n_i = cos(theta) is constant,8 allowing exact constant-distance face offsets v_offset = v + (d / cos(theta)) * A.9 """10 rays = [ (p - vertex) / np.linalg.norm(p - vertex) for p in neighbor_ring ]11 angles = [ np.arccos(np.clip(np.dot(rays[i], rays[(i + 1) % 4]), -1.0, 1.0)) for i in range(4) ]12 angle_balance = abs((angles[0] + angles[2]) - (angles[1] + angles[3]))1314 # Solve for cone axis A satisfying (n_i - n_0) . A = 015 N = np.asarray(face_normals[:3], dtype=float)16 axis = np.cross(N[1] - N[0], N[2] - N[0])17 axis /= np.linalg.norm(axis) + 1e-1218 if np.dot(axis, N[0]) < 0:19 axis = -axis20 cos_theta = np.dot(axis, N[0])21 return (angle_balance < tol), axis, float(cos_theta)
Conical Meshes (Constant-Depth Beam Offsets): In real-world architecture, glass panels cannot float; they are supported by steel or timber beams of finite depth. Offsetting an arbitrary mesh causes faces to twist and edges to skew into non-planar polygons. Conical meshes guarantee that face offsets at distance d remain exact planar quads with parallel edges, enabling uniform structural nodes.
Related Concepts
Planar quad meshes, conical offsets, developable unrolling, and geodesic grids.
Isovists, viewsheds, solar shadows, and acoustic ray tracing.
Interactive geometrical visualization of isovist fields and 3D viewshed line-of-sight.