A naturally occurring mixture of hydrocarbons secreted by many trees (especially conifers) into ducts or canals. Resins comprise chiefly terpenes, and are found either as brittle glassy substances or dissolved in essential oils. Their functions are similar to those of gums and mucilages, i.e. protecting the plant from predators such as wood-boring insects. Compare phytoncide.