Letter of recommendation from a professor who barely knows me I  am having a situation. I am applying to America at the end of the year. Now I have 3 LoR from my department, 1 of which is not so strong (the professor barely knows me).

Anyway, this is why I want another LoR. Days ago I contacted a professor from one of the universities I am going to apply, sending him my thesis and asking to work under him in some project he may assign. He turned me down, but wanted me to contact him when I apply (could be a good sign). 

Obviously he did, since he barely knows me and I am even not sure to accept the admission from his university (if I luckily get accepted). The fact that he turned me down makes me think. Should I contact more professors? I mean if he accepts me, gives me some project and ultimately I do not go to his university, would it make him angry? And is the chance of I having a LoR from a famous professor in this way high?

This leads me to another option. I can go to my current university and strengthen my research with a professor there to get a stronger LoR. One drawback is that he is not as good as professors I may contact via email and he works in a different area, so basically I have to learn from scratch (my area and his are both algebra, though).

The most important question I want to ask in this post is that: what should I choose between two options?

I hope you guys can read all and answer to all the questions here, I would really appreciate it
Days ago I contacted a professor from one of the universities I am going to apply, sending him my thesis and asking to work under him in some project he may assign. He turned me down, [...]


I'm not surprised.  It's rare for a professor to assign or supervise a project for a student who's not already enrolled at the professor's university.  They already have plenty of other work to do, and working with outside students isn't part of their expected duties, so there's no real incentive for them to take on such a task.


  Should I contact more professors? 


It's unlikely to be successful, for the reasons I just mentioned.  So I don't think this is a good approach.


  I mean if he accepts me, gives me some project and ultimately I do not go to his university, would it make him angry?


This isn't the issue.  First, it's unlikely that any professor would accept an outside student for a project in the first place.  But if they did, they realize that students have many factors affecting their choice of graduate institution, and are not likely to be angry if they go somewhere else.


  And is the chance of I having a LoR from a famous professor in this way high?


No, it is not.  This is not an effective way to get a letter of recommendation.


  This leads me to another option. I can go to my current university and strengthen my research with a professor there to get a stronger LoR. One drawback is that he is not as good as professors I may contact via email and he works in a different area, so basically I have to learn from scratch (my area and his are both algebra, though).


This is a much better approach.