Pinwheel update for 128x128 pixels
This commit is contained in:
@@ -841,11 +841,14 @@ constexpr int Pinwheel_Size_Big = 50; // larger than this -> use "XL"
|
||||
constexpr int Pinwheel_Steps_XL = 368;
|
||||
constexpr int Pinwheel_Size_XL = 58; // larger than this -> use "XXL"
|
||||
constexpr int Pinwheel_Steps_XXL = 456;
|
||||
constexpr int Pinwheel_Size_XXL = 68; // larger than this -> use "LL"
|
||||
constexpr int Pinwheel_Steps_LL = 592; // 128x64 no holes, 28fps
|
||||
constexpr float Int_to_Rad_Small = (DEG_TO_RAD * 360) / Pinwheel_Steps_Small; // conversion: from 0...72 to Radians
|
||||
constexpr float Int_to_Rad_Med = (DEG_TO_RAD * 360) / Pinwheel_Steps_Medium; // conversion: from 0...192 to Radians
|
||||
constexpr float Int_to_Rad_Big = (DEG_TO_RAD * 360) / Pinwheel_Steps_Big; // conversion: from 0...304 to Radians
|
||||
constexpr float Int_to_Rad_XL = (DEG_TO_RAD * 360) / Pinwheel_Steps_XL; // conversion: from 0...368 to Radians
|
||||
constexpr float Int_to_Rad_XXL = (DEG_TO_RAD * 360) / Pinwheel_Steps_XXL; // conversion: from 0...456 to Radians
|
||||
constexpr float Int_to_Rad_LL = (DEG_TO_RAD * 360) / Pinwheel_Steps_LL; // conversion: from 0...456 to Radians
|
||||
|
||||
constexpr int Fixed_Scale = 512; // fixpoint scaling factor (9bit for fraction)
|
||||
|
||||
@@ -856,8 +859,9 @@ static float getPinwheelAngle(int i, int vW, int vH) {
|
||||
if (maxXY <= Pinwheel_Size_Medium) return float(i) * Int_to_Rad_Med;
|
||||
if (maxXY <= Pinwheel_Size_Big) return float(i) * Int_to_Rad_Big;
|
||||
if (maxXY <= Pinwheel_Size_XL) return float(i) * Int_to_Rad_XL;
|
||||
if (maxXY <= Pinwheel_Size_XXL) return float(i) * Int_to_Rad_XXL;
|
||||
// else
|
||||
return float(i) * Int_to_Rad_XXL;
|
||||
return float(i) * Int_to_Rad_LL;
|
||||
}
|
||||
// Pinwheel helper function: matrix dimensions to number of rays
|
||||
static int getPinwheelLength(int vW, int vH) {
|
||||
@@ -866,8 +870,9 @@ static int getPinwheelLength(int vW, int vH) {
|
||||
if (maxXY <= Pinwheel_Size_Medium) return Pinwheel_Steps_Medium;
|
||||
if (maxXY <= Pinwheel_Size_Big) return Pinwheel_Steps_Big;
|
||||
if (maxXY <= Pinwheel_Size_XL) return Pinwheel_Steps_XL;
|
||||
if (maxXY <= Pinwheel_Size_XXL) return Pinwheel_Steps_XXL;
|
||||
// else
|
||||
return Pinwheel_Steps_XXL;
|
||||
return Pinwheel_Steps_LL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user