I need to distort the pattern of parallel lines in shape, simulating volume. The work should be in vector. Attach a pic of smth likely I want to do:

img with lines pattern

But I want to do it with any shape, not only type. I've struggled a bit with Illustrator, but wasn't successful. For example, I can't envelope lines around compound path (thats I need)

If someone knows how to do it, it would be wonderful! ヾ(•ω•`)o