亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? rotate.c

?? c源碼
?? C
字號:
/* Matrix and rotation subroutines */#include "kep.h"#include <stdio.h>#if __STDC__double zatan2(double, double);double fabs(double);double sqrt(double);double sin(double);double cos(double);double atan2(double, double);void midentity (double M[]);void mmpy3 (double A[], double B[], double C[]);void mrotate (int from, int to, double M[], double theta);void EtoM (double e[], double M[]);void epmat (double JD, double P[]);#elsedouble zatan2(), fabs(), sqrt(), sin(), cos(), atan2();void midentity();void mmpy3();void mrotate();void EtoM();void epmat();#endif#define N 3/* Construct the matrix that represents the composite of * successive rotations by the three Euler angles: *   first by an angle phi about the z axis, *   second by an angle theta about the new x axis, *   third by an angle psi about the final z axis. * The input array e[] contains the three angles in the order * phi, theta, psi.  The 3x3 output matrix M[][] is the  * composite transformation of the three rotations in * Cartesian coordinates. *   The matrix elements have been written out directly * in trigonometric form so that the derivation of the * inverse function MtoE() will be clear. */voidEtoM( e, M )double e[];double M[];{double a, b;double sinpsi, cospsi, sinth, costh, sinphi, cosphi;sinpsi = sin(e[2]);cospsi = cos(e[2]);sinth = sin(e[1]);costh = cos(e[1]);sinphi = sin(e[0]);cosphi = cos(e[0]);a = costh*sinphi;b = costh*cosphi;M[0] = cospsi*cosphi - a*sinpsi;  /* M[0][0] */M[1] = cospsi*sinphi + b*sinpsi;  /* M[0][1] */M[2] = sinpsi*sinth;M[3] = -sinpsi*cosphi - a*cospsi;  /* M[1][0] */M[4] = -sinpsi*sinphi + b*cospsi;M[5] = cospsi*sinth;M[6] = sinth*sinphi;  /* M[2][0] */M[7] = -sinth*cosphi;M[8] = costh;  /* M[2][2] */}/* Deduce the three Euler angles e[] * from the input coordinate rotation matrix M[][]. * This is done by trigonometry from the elements of M. * * Since *   M[2][1] = -sin(theta) * cos(phi) *   M[2][0] =  sin(theta) * sin(phi), * then phi = arctan( M[2][0]/M[2][1]. * * Similarly, *  M[0][2] = sin(psi) * sin(theta) *  M[1][2] = cos(psi) * sin(theta), * so psi = arctan( M[0][2]/M[1][2] ). * * Finally, *   M[2][2] = cos(theta) *   M[1][2]/cos(psi) = sin(theta), * which gives the arctangent of theta. */voidMtoE( M, e )double M[], e[];{double a, b, phi, theta, psi;/* phi = zatan2( -M[2][1], M[2][0] ); */phi = atan2(  M[2*3+0], -M[2*3+1]);a = M[0*3+2];b = M[1*3+2];/* psi = zatan2( b, a ); */psi = atan2( a, b );if( fabs(a) > fabs(b) )	a = a/sin(psi);else	a = b/cos(psi);/* theta = zatan2( M[2][2], a ); */theta = atan2( a, M[2*3+2]);e[0] = phi;e[1] = theta;e[2] = psi;}/* Display elements of the NxN matrix M. */voidprtmat( M )double M[];{int r, c;for( r=0; r<N; r++ )	{	for( c=0; c<N; c++ )		printf( "%18.9f ", M[N*r+c] );	printf( "\n" );	}printf( "\n" );}voidprtvec( v )double v[];{int i;for( i=0; i<N; i++ )	printf( "%18.9f ", v[i] );printf( "\n\n" );}/* Fill the array M with an NxN identity matrix. */voidmidentity( M )double M[];{double *p;int i;p = &M[0];for( i=0; i<(N*N); i++ )	*p++ = 0.0;for( i=0; i<N; i++ )	M[i*(N+1)] = 1.0;}/* Matrix transpose. * B, the output, can occupy the same storage locations as * A, the input. */voidmtransp( A, B )double A[], B[];{double x, y;int r, c, rc, cr;for( r=0; r<N; r++ )	{	for( c=0; c<=r; c++ )		{		rc = N*r+c;		cr = N*c+r;		x = A[rc];		y = A[cr];		B[rc] = y;		B[cr] = x;		}	}}/* 3x3 matrix multiply * C = A * B * A is on the left. * C may occupy the same storage as either A or B. */voidmmpy3( A, B, C )double A[], B[], C[];{double ans[9];double s;int i, r, c;for( r=0; r<3; r++ )	{	for( c=0; c<3; c++ )		{		s = 0.0;		for ( i=0; i<3; i++ )			s += A[3*r+i] * B[3*i+c];		ans[3*r+c] = s;		}	}for( i=0; i<9; i++ )	{	C[i] = ans[i];	}}/* Modify matrix M to include a rotation of theta radians * in the from-to plane.  The sense of the rotation is * from the "from" axis (labeled 0, 1, or 2) to the "to" axis. */voidmrotate( from, to, M, theta )int from, to;double M[];double theta;{double c;double R[N*N];if( from == to )	{	printf( "mrotate: from and to must be different\n" );	return;	}midentity( R );c = cos(theta);R[N*from+from] = c;R[N*to+to] = c;c = sin(theta);R[N*from+to] = c;R[N*to+from] = -c;mmpy3( R, M, M );}/* Modify the input matrix M to include a rotation * of theta radians about the x axis. */voidmrotx( M, theta )double M[];double theta;{mrotate( 1, 2, M, theta );}/* Modify the input matrix M to include a rotation * of theta radians about the y axis. */voidmroty( M, theta )double M[];double theta;{mrotate( 2, 0, M, theta );}/* Modify the input matrix M to include a rotation * of theta radians about the z axis. */voidmrotz( M, theta )double M[];double theta;{mrotate( 0, 1, M, theta );}/* Transform the input vector v by rotating the coordinate system * theta radians about the x axis. */voidrotx( v, theta )double v[];double theta;{double y, sinth, costh;sinth = sin(theta);costh = cos(theta);y = costh*v[1] + sinth*v[2];v[2] = -sinth*v[1] + costh*v[2];v[1] = y;}/* Transform the input vector v by rotating the coordinate system * theta radians about the y axis. */voidroty( v, theta )double v[];double theta;{double x, sinth, costh;sinth = sin(theta);costh = cos(theta);x = costh*v[0] - sinth*v[2];v[2] = sinth*v[0] + costh*v[2];v[0] = x;}/* Transform the input vector v by rotating the coordinate system * theta radians about the z axis. */voidrotz( v, theta )double v[];double theta;{double x, sinth, costh;sinth = sin(theta);costh = cos(theta);x = costh*v[0] + sinth*v[1];v[1] = -sinth*v[0] + costh*v[1];v[0] = x;}/* Return the largest element-by-element difference between * two NxN arrays A and B. */double l1diff( A, B )double *A, *B;{double x, max;int i;max = 0;for( i=0; i<N*N; i++ )	{	x = fabs( *A++ - *B++ );	if( x > max )		max = x;	}return( max );}/* The following subprogram, epmat( JD, P ), * constructs the precession matrix in ecliptic coordinates * to go from the epoch J2000.0 to the date JD.  Output P is the * 3x3 rotation matrix.  To go in the opposite direction, * from JD to J2000.0, the required matrix is just the transpose of P. * Note that the obliquity of Earth's equator is not required here * since the coordinates are ecliptic, not equatorial. */#if (DE403 | DE404 | LIB403 | DE405 | DE406 | DE406CD)/* James G. Williams, "Contributions to the Earth's obliquity rate,   precession, and nutation,"  Astron. J. 108, 711-72s4 (1994).   The values used here are slightly different, for DE403.  */  /* 0.000000   5028.791959   1.105414   0.000076  -0.000024 */static double pAcof[] = { -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.076, 110.5414, 50287.91959};/* Pi from Williams' 1994 paper, in radians.  No change in DE403.  *//* 629543.967373   -867.919986   0.153382   0.000026  -0.000004 */static double nodecof[] = {6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 1.9e-10, -3.54e-9, -1.8103e-7,  1.26e-7,  7.436169e-5,-0.04207794833,  3.052115282424};/* pi from Williams' 1994 paper, in radians.  No change in DE403.  *//* 0.000000     46.997570  -0.033506  -0.000124   0.000000 */static double inclcof[] = {1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, -5.4000441e-11, 1.32115526e-9, -6.012e-7, -1.62442e-5, 0.00227850649, 0.0 };#else /* not DE403 *//* Accumulated precession in longitude.  Coefficients are from: * J. Laskar, "Secular terms of classical planetary theories * using the results of general theory," Astronomy and Astrophysics * 157, 59070 (1986). */static double pAcof[] = { -8.66e-10, -4.759e-8, 2.424e-7, 1.3095e-5, 1.7451e-4, -1.8055e-3, -0.235316, 0.07732, 111.1971, 50290.966 };/* Node and inclination of the earth's orbit computed from * Laskar's data as explained in the following paper: * P. Bretagnon and G. Francou, "Planetary theories in rectangular * and spherical variables. VSOP87 solutions," Astronomy and * Astrophysics 202, 309-315 (1988). */static double nodecof[] = {6.6402e-16, -2.69151e-15, -1.547021e-12, 7.521313e-12, 6.3190131e-10, -3.48388152e-9, -1.813065896e-7, 2.75036225e-8, 7.4394531426e-5,-0.042078604317, 3.052112654975 };static double inclcof[] = {1.2147e-16, 7.3759e-17, -8.26287e-14, 2.503410e-13, 2.4650839e-11, -5.4000441e-11, 1.32115526e-9, -5.998737027e-7, -1.6242797091e-5, 0.002278495537, 0.0 };#endif /* not DE403 *//* radians per arc second */#define STR 4.8481368110953599359e-6voidepmat( JD, P )double JD;double P[];{double T, pA, i, Omega;double e[3];double *p;int j;/* Thousands of years from J2000.0.  */T = (JD - 2451545.0)/365250.0;/* Accumulated precession in longitude.  */p = pAcof;pA = *p++;for( j=0; j<9; j++ )	pA = pA * T + *p++;pA *= STR * T;/* Node of the moving ecliptic on the J2000 ecliptic.  */p = nodecof;Omega = *p++;for( j=0; j<10; j++ )	Omega = Omega * T + *p++;/* Inclination of the moving ecliptic to the J2000 ecliptic.  */p = inclcof;i = *p++;for( j=0; j<10; j++ )	i = i * T + *p++;/* Set up the Euler angles. */e[0] = Omega;e[1] = i;e[2] = -(Omega + pA );/* Construct the rotation matrix  to go from J2000 to JD  */EtoM( e, P );}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区中文字幕| 91福利在线观看| 国产精品1区2区| 免费国产亚洲视频| 美国av一区二区| 久久国产剧场电影| 国产麻豆精品在线| 高清在线不卡av| 成人午夜精品在线| 国产精品一色哟哟哟| 国产成人午夜片在线观看高清观看 | 亚洲欧洲精品一区二区三区| 亚洲国产精品传媒在线观看| 欧美激情一区三区| 亚洲欧美日本在线| 亚洲一区在线免费观看| 亚洲香肠在线观看| 日本成人在线视频网站| 激情五月婷婷综合网| 国产一区二区三区四区在线观看| 国产高清在线精品| 色综合久久中文综合久久牛| 欧美日韩卡一卡二| 2023国产精品| 中文字幕在线不卡一区二区三区| 亚洲精品自拍动漫在线| 亚洲国产精品精华液网站| 免费人成在线不卡| 国产成人免费在线视频| 成人国产精品免费网站| 欧美性三三影院| 欧美成人精品高清在线播放| 国产欧美综合色| 国产精品短视频| 亚洲成人自拍偷拍| 国产在线观看免费一区| 91在线码无精品| 欧美一区二区观看视频| 国产欧美一区二区三区网站| 亚洲自拍偷拍九九九| 激情久久五月天| 97久久精品人人做人人爽| 欧美日韩电影在线播放| 欧美一级国产精品| 成人欧美一区二区三区| 蜜臀国产一区二区三区在线播放| 国产成人av在线影院| 欧美另类videos死尸| 欧美精品一区二区三区视频| 亚洲欧洲精品一区二区三区不卡 | 青青青伊人色综合久久| 国产成人鲁色资源国产91色综 | 一二三区精品视频| 黑人巨大精品欧美黑白配亚洲| 91论坛在线播放| 精品国产网站在线观看| 国产精品色噜噜| 日本少妇一区二区| 成人黄页在线观看| 精品久久五月天| 亚洲国产精品久久久久秋霞影院 | 国产激情一区二区三区| 欧美日韩一区二区三区四区五区| 国产女主播一区| 蜜臀av性久久久久蜜臀aⅴ四虎 | 成人中文字幕电影| 欧美一区二区三区免费视频 | 黑人巨大精品欧美一区| 欧美吞精做爰啪啪高潮| 国产精品无人区| 蜜臀av一区二区三区| 色婷婷一区二区三区四区| 久久久精品国产99久久精品芒果| 午夜精品久久久久久久蜜桃app| 不卡电影免费在线播放一区| 久久综合网色—综合色88| 日韩电影网1区2区| 欧美中文字幕一区二区三区亚洲| 国产精品国产三级国产三级人妇| 国产在线看一区| 日韩女优毛片在线| 日韩福利视频网| 欧美色图片你懂的| 一区二区三区四区不卡在线| 丁香亚洲综合激情啪啪综合| 久久久久久久久久久黄色| 日本不卡高清视频| 欧美一区二区精品在线| 日韩黄色小视频| 欧美日本一区二区| 亚洲图片欧美综合| 日本精品裸体写真集在线观看| 最新日韩av在线| 99久久精品国产一区二区三区| 亚洲国产经典视频| 成人av午夜电影| 亚洲视频你懂的| 色一区在线观看| 亚洲男人的天堂在线观看| 色女孩综合影院| 亚洲另类在线一区| 日本高清不卡aⅴ免费网站| 亚洲女与黑人做爰| 在线观看日韩电影| 舔着乳尖日韩一区| 欧美一级欧美三级在线观看| 免费观看在线色综合| 欧美tickle裸体挠脚心vk| 极品瑜伽女神91| 国产欧美一区二区精品性| 成人精品免费看| 亚洲人吸女人奶水| 在线观看日韩高清av| 午夜不卡在线视频| 欧美美女视频在线观看| 蜜臀av一级做a爰片久久| 精品处破学生在线二十三| 国产成人av一区二区三区在线| 久久久www成人免费毛片麻豆| 国产不卡视频在线播放| 日韩毛片高清在线播放| 日本韩国一区二区| 日韩精品国产欧美| 久久综合久久99| 成人精品gif动图一区| 成人免费视频在线观看| 欧美性猛片aaaaaaa做受| 日韩中文欧美在线| 久久久不卡网国产精品一区| 91蜜桃免费观看视频| 午夜久久久久久久久久一区二区| 日韩欧美国产三级| 国产高清在线精品| 亚洲一卡二卡三卡四卡五卡| 337p亚洲精品色噜噜狠狠| 国产二区国产一区在线观看| 91精品国产高清一区二区三区| 国精产品一区一区三区mba视频| 国产精品国模大尺度视频| 欧美日韩极品在线观看一区| 狠狠色丁香九九婷婷综合五月| 亚洲国产精品黑人久久久| 欧美午夜精品电影| 国产一区二区精品在线观看| 亚洲人午夜精品天堂一二香蕉| 欧美一区二区美女| eeuss鲁一区二区三区| 日日嗨av一区二区三区四区| 国产欧美精品一区二区三区四区| 91高清视频在线| 蜜臀精品一区二区三区在线观看| 中文字幕一区在线| 欧美一级日韩免费不卡| 成人黄动漫网站免费app| 日本不卡一二三| 亚洲免费观看在线视频| 4hu四虎永久在线影院成人| 粉嫩蜜臀av国产精品网站| 五月激情丁香一区二区三区| 国产欧美日韩另类视频免费观看| 欧美日韩免费观看一区三区| 欧美三级电影一区| 国产二区国产一区在线观看| 亚洲激情综合网| 久久精品欧美一区二区三区不卡 | 国产成a人亚洲精| 亚洲成人777| 日本一区二区不卡视频| 欧美日本乱大交xxxxx| 国产精品一区一区三区| 五月天久久比比资源色| 亚洲视频在线一区观看| 久久无码av三级| 在线播放国产精品二区一二区四区| 99国产麻豆精品| 国产精品一区三区| 蜜臀av一区二区在线免费观看| 一区二区三区免费| 国产精品嫩草影院av蜜臀| 欧美电影免费观看高清完整版在线观看| 91免费精品国自产拍在线不卡| 国内精品第一页| 蜜桃视频第一区免费观看| 亚洲成人免费看| 亚洲女同一区二区| 亚洲视频免费看| 国产欧美日本一区二区三区| 欧美岛国在线观看| 337p亚洲精品色噜噜| 欧美日韩中文国产| 91丨porny丨蝌蚪视频| 成人精品免费视频| 成人性生交大片| 国产成人免费av在线| 国产精品自在在线| 国产精品综合在线视频| 国产在线国偷精品产拍免费yy| 韩国成人福利片在线播放| 麻豆传媒一区二区三区| 日本中文字幕一区二区有限公司|