# Draw lines from the center of the screen at specific angles

I want to draw multiple primitive lines which start at the center of the screen and end at the edges of the screen, traveling at specific angles:

How can I set the angle for each line?

Here is my code where I draw only one line from the middle of the screen to the top of the screen.

LineVertices = new VertexPositionColor[2];
LineVertices[0].Position = new Vector3(graphics.GraphicsDevice.Viewport.Width / 2, graphics.GraphicsDevice.Viewport.Height / 2, 0);
LineVertices[0].Color = Color.Red;
LineVertices[1].Position = new Vector3(graphics.GraphicsDevice.Viewport.Width / 2, 0, 0);
LineVertices[1].Color = Color.Red;
.
.
.
//Draw call
graphics.GraphicsDevice.DrawUserPrimitives<VertexPositionColor>(PrimitiveType.LineList, Line2Vertices, 0, 1);


This is essentially simple trigonometry. Assuming the center of the screen is your origin (i.e. (0, 0)), then it's pretty straightforward:
x = length * sin(angle);