Question: I am trying to make a button that when clicked points to a specific section of a different page. 

For example a user is on his profile page and clicks on "change personal information" button. He/She should be redirected to the settings page and the browser should scroll down (or land) where the "Change your Personal Information" section is (at the bottom of that page for example).

I use something similar in which it scrolls down to a section of the same page by using this js lines:

```
    function goToByScroll(id){
      // Removing "link" from the ID
    id = id.replace("link", "");

      // Scroll
    $('html,body').animate({
        scrollTop: $("#"+id).offset().top},
        'slow');
}

```

which animates down to the section. 

Can something like that be done? If so, tips to the right direction would be really appreciated.

Answer: 
I would combine this (triangulation of the convex hull) with another algorithm which would check if a given point is inside the polygon or not. Then, for each resulting triangle, I would check if it's median point is inside the polygon.
If you can use a 3rd party library, you can use [CGAL](http://www.cgal.org) and the following [example](http://doc.cgal.org/latest/Triangulation_2/index.html#title29) will do what you want (including the triangulation).