A comet might orbit either prograde or retrograde, and it might be significantly out of theplane of the ecliptic. Comets have the highest ecentricity of anything orbiting the sun. Recall that e = 0.02 for the Earth–a comet might have an eccentricity of 0.30 or even larger! This means that when it approaches perihelion, it will get very close to the sun, and at aphelion it can be tens–or even hundreds–of AU distant.