-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathReflection.cs
29 lines (28 loc) · 1.09 KB
/
Reflection.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace RefractionOfLight
{
class Reflection
{
int centerX = 350;
int centerY = 250;
public double AngleOfReflection(double angleOfInc) // Метод выводит значение угла отражения равный углу падения.
{
double angleOfReflection = angleOfInc;
return angleOfReflection;
}
public float ReflectionXRay(double angleOfInc) // Метод выводит положение линии в "x" координатах.
{
float xReflection = centerX + centerX * (float)Math.Sin(AngleOfReflection(angleOfInc));
return xReflection;
}
public float ReflectionYRay(double angleOfInc) // Метод выводит положение линии в "y" координатах.
{
float yRefraction = centerY - centerY * (float)Math.Cos(AngleOfReflection(angleOfInc));
return yRefraction;
}
}
}