All gasoline vehicles have a generator (the alternator) that recharges the 12 volt starter battery. That factoid makes many ask why isn't there an alternator in electric cars to recharge the battery pack while driving. Or why not mount solar panels on the car? Or any of the other ways we think of to generate electricity.
The short answer is that physicists haven't figured out how to build perpetual motion machines. Instead, the physicists tell us that perpetual motion machines are impossible. There are physics equations about efficiency and conservation of energy that we're taught in high school. Do the math, and you'll find that adding a generator/alternator/etc to a car does not produce infinite motion but makes the vehicle to grid to a halt.
Maybe in a few centuries physicists will figure out how to build perpetual motion machines. If that happens I promise to revise this page.
The different proposed solutions each have their own problems. Let's go through each one.
There are several ways to attach a generator to the wheels or axles. For example some suggest having the traction motor drive one pair of wheels, and attach a generator to the other axle using the other pair of wheels to generate electricity. Or generators could be built into the wheels.
It doesn't matter how the generator is attached to the wheels. In all cases, the generator converts the vehicle's momentum/inertia into electricity. In fact the idea is identical to regnerative braking, which also converts momentum/inertia into electricity. Inertia is the physics measurement of resistence to change of velocity while Momentum is the combination of mass and velocity. When we accelerate a car, we increase its momentum, converting stored energy into momentum. To decelerate a car we reduce its momentum.
An electric generator works by rotating wire through a magnetic field, inducing a current flow in the wire. That current can be easily captured into a battery pack, recharging the battery. That much of the suggestion is accurate and would work to charge the battery. The thing is that it's precisely the same as regenerative braking.
Causing the generator to turn and induce that electricity flow requires that momentum is removed from the vehicle. Removing momentum, causes the vehicle to slow down. In other words, it is precisely the same as regenerative braking.
Enough energy is converted through regenerative braking that, for some cars, the car can be stopped solely with regen, and not require the mechanical brakes. In other conditions, one can start at the top of a mountain, drive 20 miles downhill and gain 4 miles of range thanks to regenerative braking.
An alternator is a kind of electric generator. Everything just said about adding a generator applies to adding an alternator.
A wind turbine is a generator with a propeller attached. In this case, rather than attaching the generator to the wheels, the generator and propeller would be in the air stream. The air flowing over the propeller blades would turn the generator, and then you're in the same mode of removing inertia from the wheels.
Additionally, the wind turbine degrades vehicle aerodynamics. The point of a wind turbine is sticking it into an air flow, to make the generator turn and generate electricity. Obviously that would degrade the aerodynamics, and the vehicle would require more energy to push it through the atmosphere.
What about solar panels? The problem is getting enough surface area on a car to give a significant amount of power, much less to drive it at highway speed. It's difficult or nigh-on-impossible to ensure the panels are optimally oriented to the sun while parking, much less driving, to capture energy. Even if there were enough surface area, solar panels interferes with the aerodynamics causing the vehicle to require more power to do the same thing. In other words, solar panels are highly unlikely to give benefit unless you purpose-design the vehicle for the solar panels.
Most solar-electric cars are special-purpose vehicles for solar races, and completely wrong for daily driving. Balancing between utility as a regular passenger vehicle while incorporating a large flat area for solar panels while still having decent aerodynamics is not impossible. A student team in the Netherlands came up with such a vehicle that isn't too bad. The constraints mean you'll be charging the car while it's parked, and unlikely to charge while it's moving. How many parking lots let you park in the correct orientation to capture sunlight? What if you need to park indoors?
There's nothing magical about this, because it works within the parameters developed by Physics researchers over the last few hundred years. The Law of Conservation of Energy applies to electric vehicles. A generator attached to the wheels diverts the inertia energy, causing a decrease in inertia, resulting in lower speed, while converting inertia into electricity. A little wind turbine attached to the car degrades its aerodynamics making the car less efficient, and also diverts inertia to generate electricity with the effects already stated.
By our modern understanding of physics:-
The folks thinking that an electric car battery can be recharged while the car is moving are envisioning a perpetual motion machine that's in violation of the Conservation of Energy principle.
From Wikipedia: A perpetual motion machine is a hypothetical machine that can do work indefinitely without an energy source. This kind of machine is impossible, as it would violate the first or second law of thermodynamics.