Deriving the Schwarzschild solution I am CS student and i want to create graphical simulation of black hole,
so I need to use  The Schwarzschild solution to calculate possible coordinates of given body every second.
First try in 2D space+ time.
So, my question is how using Schwarzschild solution I can calculate Cones like in this picture: 
 A: It is with some hesitation I answer your question, because unless you understand what you're calculating you risk severely misinterpreting what's going on. Still, if you're a CS student presumably learning GR is not on the agenda so I'll go ahead anyway. All I can say is tread with care!
Anyhow, to calculate the cones in the coordinate system of the observer at infinity is easy, because the tangent of the angle is the velocity of light (using units where $c = 1$). Far from the event horizon $c = 1$ and arctan(1) is 45° so you get cones with the sides at 45° to the vertical.
The Schwarzschild metric is:
$$ ds^2 = -\left(1-\frac{r_s}{r}\right)dt^2 + \frac{dr^2}{\left(1-\frac{r_s}{r}\right)} + r^2 d\Omega^2 $$
where $r_s$ is the radius of the event horizon. The sides of the cones correspond to radially infalling and outgoing light i.e. $d\Omega = 0$, and because light moves on null geodesics we know $ds = 0$. Therefore the equation simplifies to:
$$ \left(1-\frac{r_s}{r}\right)dt^2 = \frac{dr^2}{\left(1-\frac{r_s}{r}\right)} $$
or:
$$ \left(\frac{dr}{dt}\right)^2 = \left(1-\frac{r_s}{r}\right)^2 $$
and $dr/dt$ is the coordinate velocity, so:
$$ v = \pm\left(1-\frac{r_s}{r}\right) $$
where the $+$ sign gives you the speed of the outgoing light and the $-$ sign gives you the speed of the infalling light. So the angles of the cones at a distance $r$ are just $\arctan(1 - r_s/r)$
As expected, at large distances where $r \gg r_s$ the angle is 45°, and as $r$ approaches $r_s$ the angle goes to zero. However this is only true in the coordinates of the observer far from the black hole. Observers near the black hole will always measure the angle to be 45° at their location.
Response to comment:
To understand why the angle is arctan(v) look at this spacetime diagram:

We draw these diagrams with time running upwards and distance sideways, so an object moving with constant velocity $v$ traces out a straight line. To work out the angle $\theta$ note that in a time $t$ the object moves a distance $vt$, so $\tan(\theta) = vt/t = v$ and therefore $\theta = \arctan(v)$. If the object is a light ray we call the angle $\theta$ the light cone angle, and the area in between the light ray travelling right and a light ray travelling in the other direction is called the light cone.
$d\Omega$ is the angular displacement. For an object moving radially towards or away from the black hole the angle it's moving at doesn't change do $d\Omega = 0$.
$ds$ is called the line element, and it's an invariant in both special and general relativity. For anything moving at the speed of light the length of the line element is always zero.
