Hilbert curves of quadric fibrations