In 1855 H. J. S. Smith [8] proved Fermat's two-square theorem using the notion of palindromic continuants. In his paper, Smith constructed a proper representation of a prime number p as a sum of two squares, given a solution of z 2 +1 ≡ 0 (mod p), and vice versa. In this paper, we extend the use of continuants to proper representations by sums of two squares in rings of polynomials over fields of characteristic different from 2. New deterministic algorithms for finding the corresponding proper representations are presented.Our approach will provide a new constructive proof of the foursquare theorem and new proofs for other representations of integers by quaternary quadratic forms.