  We identify R^7 as the pure imaginary part of octonions. Then the
multiplication in octonions gives a natural almost complex structure for the
unit 6-sphere. It is known that a cone over a surface M in S^6 is an
associative submanifold of R^7 if and only if M is almost complex in S^6. In
this paper, we show that the Gauss-Codazzi equation for almost complex curves
in S^6 is the equation for primitive maps associated to the 6-symmetric space
G_2/T^2, and use this to explain some of the known results. Moreover, the
equation for S^1-symmetric almost complex curves in S^6 is the periodic Toda
lattice associated to G_2, and a discussion of periodic solutions is given.
