Moving does not change length
A pencil is the same length on your desk, in your backpack or on the floor.
If you move it, it stays the same length.
If you turn it so it stands up, it stays the same length. When it stands up, we talk about its height, but it did not grow!
The only way to make a pencil shorter is to change the pencil itself, like sharpening it.
Curvy things can trick your eyes
A string, a rope or a garden hose can be curvy. A curvy string can look short, because its ends are close together.
Pull it straight, and you see its real length. It did not grow. It was that long all along!