36 #define M_SQRT7 2.6457513110645905905016157536392604257102
40 {0.803582649718989942, 1.248397419617396099},
41 {1.307747883455638156, 2.536945009877921159},
42 {1.054751253523952054, -1.347517358900396623},
43 {0.600191595538186799, -0.450603909469755746},
44 {0.491715428198773866, 0.401988202911306943},
45 {0.172745327415618701, 1.678146885280433686},
46 {0.605929321571350690, 2.953923329812411617},
47 {0.427370518328979641, -1.888876200336285401},
48 {-0.079066118549212831, -0.733429513380867741},
49 {-0.230961644455383637, 0.506495587332349035},
50 {0.079066118549212831, 2.408163140208925497},
51 {0.230961644455383637, -2.635097066257444203},
52 {-0.172745327415618701, -1.463445768309359553},
53 {-0.605929321571350690, -0.187669323777381622},
54 {-0.427370518328979641, 1.252716453253507838},
55 {-0.600191595538186799, 2.690988744120037492},
56 {-0.491715428198773866, -2.739604450678486295},
57 {-0.803582649718989942, -1.893195233972397139},
58 {-1.307747883455638156, -0.604647643711872080},
59 {-1.054751253523952054, 1.794075294689396615},
64 {0.2199307791404606, 0.6583691780274996, 0.7198475378926182},
65 {-0.2139234834501421, 0.1478171829550703, 0.9656017935214205},
66 {0.1092625278784797, -0.4811951572873210, 0.8697775121287253},
67 {0.7428567301586791, -0.3593941678278028, 0.5648005936517033},
68 {0.8112534709140969, 0.3448953237639384, 0.4721387736413930},
69 {-0.1055498149613921, 0.9794457296411413, 0.1718874610009365},
70 {-0.8075407579970092, 0.1533552485898818, 0.5695261994882688},
71 {-0.2846148069787907, -0.8644080972654206, 0.4144792552473539},
72 {0.7405621473854482, -0.6673299564565524, -0.0789837646326737},
73 {0.8512303986474293, 0.4722343788582681, -0.2289137388687808},
74 {-0.7405621473854481, 0.6673299564565524, 0.0789837646326737},
75 {-0.8512303986474292, -0.4722343788582682, 0.2289137388687808},
76 {0.1055498149613919, -0.9794457296411413, -0.1718874610009365},
77 {0.8075407579970092, -0.1533552485898819, -0.5695261994882688},
78 {0.2846148069787908, 0.8644080972654204, -0.4144792552473539},
79 {-0.7428567301586791, 0.3593941678278027, -0.5648005936517033},
80 {-0.8112534709140971, -0.3448953237639382, -0.4721387736413930},
81 {-0.2199307791404607, -0.6583691780274996, -0.7198475378926182},
82 {0.2139234834501420, -0.1478171829550704, -0.9656017935214205},
83 {-0.1092625278784796, 0.4811951572873210, -0.8697775121287253},
90 {5.619958268523939882, 3.525563166130744542, 1.431168063737548730},
91 {5.760339081714187279, 3.665943979320991689, 1.571548876927796127},
92 {0.780213654393430055, 4.969003859179821079, 2.874608756786625655},
93 {0.430469363979999913, 4.619259568766391033, 2.524864466373195467},
94 {6.130269123335111400, 4.035874020941915804, 1.941478918548720291},
95 {2.692877706530642877, 0.598482604137447119, 4.787272808923838195},
96 {2.982963003477243874, 0.888567901084048369, 5.077358105870439581},
97 {3.532912002790141181, 1.438516900396945656, 5.627307105183336758},
98 {3.494305004259568154, 1.399909901866372864, 5.588700106652763840},
99 {3.003214169499538391, 0.908819067106342928, 5.097609271892733906},
100 {5.930472956509811562, 3.836077854116615875, 1.741682751723420374},
101 {0.138378484090254847, 4.327168688876645809, 2.232773586483450311},
102 {0.448714947059150361, 4.637505151845541521, 2.543110049452346120},
103 {0.158629650112549365, 4.347419854898940135, 2.253024752505744869},
104 {5.891865957979238535, 3.797470855586042958, 1.703075753192847583},
105 {2.711123289609793325, 0.616728187216597771, 4.805518392002988683},
106 {3.294508837434268316, 1.200113735041072948, 5.388903939827463911},
107 {3.804819692245439833, 1.710424589852244509, 5.899214794638635174},
108 {3.664438879055192436, 1.570043776661997111, 5.758833981448388027},
109 {2.361378999196363184, 0.266983896803167583, 4.455774101589558636},
398 double r = acos(1 - sqd / 2);
418 for (
int i = 0; i <
res; i++)
458 for (
int i = 0; i <
res; i++)
884 const int* fijkOrient;
#define GeoCoord(variable_name)
EXTENSION_INLINE int isResClassIII(int res)
EXTENSION_NOINLINE bool _hex2dToGeo(const Vec2d(v), int face, int res, int substrate, GeoCoord(g))
static DEVICE const int unitScaleByCIIres[]
unit scale distance table
#define EXTENSION_NOINLINE
#define FaceIJK(variable_name)
EXTENSION_INLINE bool _ijkSub(const CoordIJK(h1), const CoordIJK(h2), CoordIJK(diff))
static DEVICE const double faceAxesAzRadsCII[NUM_ICOSA_FACES][3]
icosahedron face ijk axes as azimuth in radians from face center to vertex 0/1/2 respectively ...
DEVICE const GeoCoordArray(faceCenterGeo, NUM_ICOSA_FACES)
icosahedron face centers in lat/lon radians
EXTENSION_NOINLINE bool _ijkRotate60ccw(CoordIJK(ijk))
static DEVICE const FaceOrientIJK2DArray(faceNeighbors, NUM_ICOSA_FACES, 4)
Definition of which faces neighbor each other.
EXTENSION_NOINLINE bool _ijkRotate60cw(CoordIJK(ijk))
EXTENSION_INLINE bool _ijkScale(CoordIJK(c), int factor)
EXTENSION_NOINLINE bool _hex2dToCoordIJK(const Vec2d(v), CoordIJK(h))
EXTENSION_NOINLINE bool _geoToHex2d(const GeoCoord(g), int res, int *face, Vec2d(v))
EXTENSION_NOINLINE double _posAngleRads(double rads)
#define CoordIJK_clone(ijk)
#define Vec2d(variable_name)
Geodetic (lat/lon) functions.
EXTENSION_NOINLINE bool _geoAzDistanceRads(const GeoCoord(p1), double az, double distance, GeoCoord(p2))
EXTENSION_INLINE bool _ijkAdd(const CoordIJK(h1), const CoordIJK(h2), CoordIJK(sum))
EXTENSION_INLINE bool _ijkToHex2d(const CoordIJK(h), Vec2d(v))
#define CoordIJK_ptr(variable_name)
#define CoordIJK(variable_name)
#define Vec3d(variable_name)
FaceIJK functions including conversion to/from lat/lon.
EXTENSION_NOINLINE bool _geoToVec3d(const GeoCoord(geo), Vec3d(v))
EXTENSION_NOINLINE bool _faceIjkToGeo(const FaceIJK(h), int res, GeoCoord(g))
torch::Tensor f(torch::Tensor x, torch::Tensor W_target, torch::Tensor b_target)
3D floating point vector functions.
EXTENSION_NOINLINE double _geoAzimuthRads(const GeoCoord(p1), const GeoCoord(p2))
static DEVICE const int maxDimByCIIres[]
direction from the origin face to the destination face, relative to the origin face's coordinate syst...
static DEVICE const Vec3dArray(faceCenterPoint, NUM_ICOSA_FACES)
icosahedron face centers in x/y/z on the unit sphere
EXTENSION_NOINLINE double _pointSquareDist(const Vec3d(v1), const Vec3d(v2))
EXTENSION_INLINE double _v2dMag(const Vec2d(v))
EXTENSION_NOINLINE int _adjustOverageClassII(FaceIJK(fijk), int res, int pentLeading4, int substrate)
EXTENSION_INLINE bool _setIJK(CoordIJK(ijk), int i, int j, int k)
EXTENSION_NOINLINE bool _geoToFaceIjk(const GeoCoord(g), int res, FaceIJK(h))
EXTENSION_NOINLINE bool _ijkNormalize(CoordIJK(c))
#define GeoCoordCopy(dest_coord, src_coord)