|
Yasiu Math 1
Collection of mathematic functions that help create game mechanics and procedural tools
|
BP Function library used with trigonometry. More...
#include <BPFunLib_Trigonometry.h>
Public Member Functions | |
| double | FindMinimalRadiusForIntersectingTangentsOnArc (double alfa, double beta, double symmetricWidth) |
| Find radius of circle for both tangent lines that intersect. | |
| FVector2D | FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric (double alfa, double beta, double widthA, double widthB) |
| Find radius of circle for both tangent line that intersect. | |
Static Public Member Functions | |
| static void | SpreadPointsOnTangentByXY (TArray< FVector2D > &out, const double X, const double Y, const double spreadDistance) |
| Spread points on tangent line to arc located by XY offset from arc center point 0,0. | |
| static void | SpreadPointsOnTangentByAngleRadius (TArray< FVector2D > &out, double angle, double radius, double spreadDistance) |
| Spread points on tangent line to arc located by angle and radius of given arc. | |
BP Function library used with trigonometry.
| double UYasiuMathFL_Trigonometry::FindMinimalRadiusForIntersectingTangentsOnArc | ( | double | alfa, |
| double | beta, | ||
| double | symmetricWidth ) |
Find radius of circle for both tangent lines that intersect.
Tangents on circle are defined by angle Alfa and Beta. Tangent line distance to meeting point from circle intersection is symmetricWidth. Angle is in radians.
\[ R=\frac{\sin(\alpha)*A-\sin(\beta)*B}{\cos(\beta)-\cos(\alpha)} \]
| alfa | Tangent point location defined by angle |
| beta | Tangent point location defined by angle |
| symmetricWidth | Width from tangent point to intersect |
| FVector2D UYasiuMathFL_Trigonometry::FindMinimalRadiusForIntersectingTangentsOnArcAsymmetric | ( | double | alfa, |
| double | beta, | ||
| double | widthA, | ||
| double | widthB ) |
Find radius of circle for both tangent line that intersect.
Asymmetry comes from 2 different widths. Tangents on circle are defined by angle Alfa and Beta. Tangent line distance to meeting point from circle intersection is symmetricWidth. Angle is in radians. First radius is bigger.
\[ R=\frac{\sin(\alpha)*A-\sin(\beta)*B}{\cos(\beta)-\cos(\alpha)} \]
| alfa | Tangent point location defined by angle |
| beta | Tangent point location defined by angle |
| widthA | Distance from intersection for point A |
| widthB | Distance from intersection for point B |
|
static |
Spread points on tangent line to arc located by angle and radius of given arc.
Points are moved away from tangent point by spreadDistance in perpendicular direction
| out | Returned collection of points |
| angle | Tangent location defined by angle |
| radius | Radius of arc |
| spreadDistance | Distance to spread in one direction from tangent point |
|
static |
Spread points on tangent line to arc located by XY offset from arc center point 0,0.
Points are moved away from tangent point by spreadDistance
| out | Returned collection of points |
| X | Position X |
| Y | Position Y |
| spreadDistance | Distance to spread in one direction from tangent point |