One-time pad using RSA and Diffie-Hellman functions
This feels like homework, and so I won't give you the answer; I'll give you hints:


  If F(x) = x^e mod n, and (n, e) pair is public, will the first 1024 bits of both plaintext and ciphertext be enough for Eve to read the entire message?


If Eve knows the first plaintext $M_0$, and the ciphertext $M_0 \oplus (r^e \bmod n)$, how can Eve recover $r^e \bmod n = F(r)$?  Given that, how can she reconstruct $F(kr) = (rk)^e \bmod n = r^e \cdot k^e \bmod n$?


  Same for F(x) = g^x mod p, and public (g, p) pair.


Again, given $F(r) = g^r \bmod p$, how can Eve recover $F(kr) = g^{kr} \bmod p = (g^r)^k \bmod p$?


  Are the cases described above good examples of public-key cryptography?


Nope; they're not examples of public-key cryptography as all.  We know this based on your description:


  Suppose that Alice and Bob use an encryption algorithm based on ... r, a secret key shared between Alice and Bob


Public key cryptography doesn't use a secret key shared between the two parties.

Also, please don't describe these algorithms as 'one-time-pad'.  That has a very specific meaning (where the pad is generated in a truly random fashion, and not algorithmicly); this is not that.