Actually, the magnetic field from each little piece of wire with a
current flowing through it just adds to the field from all the other
pieces. Coiling a wire up makes the magnetic field stronger and more
uniform over a volume because it brings more of the wire closer in to
where the field is desired (inside the core of a solenoid).
You can bend a solenoid around on itself, no problem, and in fact
many are constructed in exactly this way. The magnetic field lines
travel along the length of a solenoid, and if you bend the ends around,
you can get the magnetic field lines to go in a circle inside a
torus-shaped coil of wire. You can increase the strength of the field
by putting a magnetizable material inside -- a doughnut-shaped piece of
iron, for example, will serve admirably.
This is a very useful configuration, because of Faraday's law of
induction. If you wrap another coil of wire around the iron doughnut,
and flow an alternating current through the first coil, the second coil
will see a voltage across it, and the ratios of the two voltages in the
coils is given by the ratio of the number of turns in the wire (because
each turn adds to all the others). This is the idea of a transformer --
coiled magnets wrapped around toroidal cores can take electrical energy
in one set of wires at one voltage and give you electrical energy out
of a second set of wires at any voltage you desire, just by choosing
the number of turns properly.
You don't have to wrap the coils around into a doughnut, but it's
better if you do. The field lines spread out at the ends of an ordinary
solenoid, and the filed gets weak outside as the field lines travel to
the other end. If you use a magnetizable material as a "flux return"
you can avoid all the stray fields leaking outside which would cause
radio interference and energy loss.
I guess you can do the same thing with a permanent magnet, but the
result is not quite so exciting. Horseshoe-shaped magnets are already
almost coiled up anyhow -- I guess by bending around the magnet you can
make the poles close together, which increases its ability to pick
(republished on 08/02/06)