What are the size limitations of holodeck scenes? [duplicate]

What is the limit on what the holodeck can generate? From the episodes of Star Trek that I've seen, the holodeck is at least capable of generating a few city blocks. But can it do more, an entire city, a country, or even a whole world?

Does it also depend on the ship? For example the holodeck on Enterprise might be more powerful than the one on Voyager, and thus might be able to generate more of a scene.

Theoretically there is no upper limit for the amount of perceived space inside a holo program.

IIRC the first episode of TNG explained it thusly:

When you move inside the holodeck, a force field is created under your feet and moves backwards at the same rate you move forward. It feels like you're moving but you actually aren't.

The same thing goes for the perceived distance of objects, except the holodeck uses projected light to make an object appear farther away. When you attempt to move towards the object, the projection is altered to make it appear you are moving closer.

• That wasn't stated in the first episode, but it was mentioned in the TNG technical manual. Commented Aug 11, 2016 at 8:19
• There is a limit. In VOY, when the crew was placed in a WW2 simulation with their personalities and memories wiped, the kidnappers had to physically expand the holodeck across multiple decks to expand the size of the simulation. Commented Aug 11, 2016 at 10:49
• @Petersaber explained in my answer... You have to have a given area around a person for them to be able to move freely. If you have a 10 x 10 m space, only 9 to 25 people can be in there at a given time if you want to move freely about. Commented Aug 11, 2016 at 21:03
• @Durakken the problem wasn't people bumping into each other. They already had the entire crew in the simulation, they were expanding it to fit more terrain, not more people. Commented Aug 11, 2016 at 22:54

There is no limit to the size of the area the computer can produce, however for each human you would need 2-3 meters squared so that there is no risk of anyone bumping into others when they separate and in different areas.

Also you can "trick" the holoprojectors by jumping or throwing things that are real. Doing so you are removing the ability for the simulation to move you/the object in such a way that you don't hit the wall. This being the case, for a perfect simulation to take this into account you need 407 meters. Obviously that's impractical on a ship, so it is designed to take into account free movement rather than thrown objects.