Learning Continuous Implicit Representation for Near-Periodic Patterns