I have four points
$$(0,0),\ (0,1),\ (1,1),\ (1,0)$$
and $k$, where $k$ is a number, in this task $k = 1$.
I need to calculate the area of the figure extending it points less than or equal to $k$.
The given answer is $8.141593$ but I don't know how to get it.
The figure will look something like this:
Here the central square has corners at $(0,0), (0,1), (1,0), (1,1)$, and the outer figure has distance at most $1$ from the central square. Notice how the corners of the outer figure are rounded. It is because each corner is a quarter of a circle with center at the corresponding corner of the square and radius $1$.
To calculate the area of this figure, I suggest dividing it into smaller parts as follows:
The shapes marked $1$, $2$, $3$, $4$, and $5$ are all squares of side length $1$. As I said above, the shapes marked $A$, $B$, $C$, and $D$ are each a quarter of a disc of radius $1$. If you add up these areas, you get the area of the full figure that you are looking for.