  We show that a Gorenstein subcanonical codimension 3 subscheme Z in X = P^N,
N > 3, can be realized as the locus along which two Lagrangian subbundles of a
twisted orthogonal bundle meet degenerately, and conversely. We extend this
result to singular Z and all quasiprojective ambient schemes X under the
necessary hypothesis that $Z$ is strongly subcanonical in a sense defined
below. A central point is that a pair of Lagrangian subbundles can be
transformed locally into an alternating map. In the local case our structure
theorem reduces to that of Buchsbaum-Eisenbud and says that Z is Pfaffian.
  We also prove codimension one symmetric and skew-symmetric analogues of our
structure theorems.
