5.8: Experimento Numérico (Campo Estelar)
- Page ID
- 82375
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)Con la Tierra en el origen, podemos especificar las posiciones estelares para los Dippers Grandes y Pequeños en coordenadas homogéneas tridimensionales. Con años luz como nuestras unidades, tenemos G\(^T\) =
1.5441 -1.2064 153.0875 1.0000 -1.0386 8.4588 142.7458 1.0000 -8.7955 26.2870 198.0698 1.0000 -12.8807 19.0964 106.5383 1.0000 -18.8926 17.461 90.6185 1.0000 -45.1364 54.2706 215.1148 1.0000 -9.6222 20.1734 88.0062 1.0000 -33.7097 -8.4048 64.6574 1.0000 -33.7144 -8.7191 52.3806 1.0000 -43.8531 -1.1483 59.7193 1.0000 -36.1086 2.3667 55.7927 1.0000 -34.2309 8.2181 52.1260 1.0000 -30.7876 11.8182 46.9810 1.0000 -61.8581 31.5183 80.7615 1.0000
Para hacer uso de estos datos, necesitamos una función para mostrarlos. Entra y guarda la siguiente generalización de la función de la Demo 1 en “Gráficos vectoriales: Representación de Imagen Bidimensional”. Llámalo vhgraph.m.
function vhgraph (P,L,A,ps,ls); % vhgraph(P,L,A,PS,LS) graphs images whose points are % stored in P and whose lines are stored in L. The points % in P must be in homogeneous coordinates in either 2 or 3 % dimensions, with each column of P representing a point. % The lines are coded in L, with each column of L containing % 2 integers pointing to a pair of points in P to be % connected by a line segment. If A is present, the points % in P are transformed to A*P beforre graphing. For 3D data % points, only the first two coordinates are graphed, so A % should include the desired projection from 3D to 2D. The % point symbol may be specified in PS and the line type in % LS, if desired % % Richard T. Behrens, October 1989. % % The first dection of the program determines the sizes of % all the input matrices and chacks that they make sense. [mp,np] = size(P); if (nargin > 1) [ml,nl] = size(L); else ml = 2; nl = 0; end if (nargin <=2) A = eye(mp); end [mA,nA] = size(A); if ((mp~= nA) | (ml~=2)) error('Incompatible sizes of input matrices.") end if (nargin <= 3); ps = '*'; end P = A*P; % Performs the transformation A on the points % (effect is only local to this function). % The next section contains a loop that renormalizes the % homogeneous coordinates of the points if necessary. renorm = find((P(mA,:)~= 1)); if~isempty(renorm) for i = 1:length(renorm) P(:,renorm(i)) = P(:,renorm(i))/P(mA,renorm(i)); end end % The next program line sets a fixed scale output window % from -50 to 50 in both x and y directions on the screen. % For automatic scaling to include all points of the % image, we could use instead the line q = min(min(P)); % r = max(max(P)); q = -50; r = 50; axis([q r q r]) axis('square') plot(P(1,:),P(2,:),ps) % Plots the points with symbol ps. hold on % Saves the points while we plot for i = 1:nl % lines with line type LS. plot([P(1,L(1,i))P(1,L(2,i))],.. [P(2,L(1,i))P(2,L(2,i))],ls) end hold off
Ingresa la matriz de puntos dada al inicio de esta sección (y toma su transposición para ponerla en la forma habitual). También ingrese la matriz de líneas de la Demo 1 en “Gráficos vectoriales: Representación de imágenes bidimensionales”. Guarde estas dos matrices e intente mirar la imagen
≫ save dip3d ≫ vhgraph(G,H)
No hay cazos a la vista, ¿verdad? Sin especificar una matriz de transformación\(A\), por defecto hemos mirado hacia abajo en el\(x-y\) plano desde\(z=\infty\) (una proyección paralela). Así se verían las constelaciones desde una galaxia distante (digamos, mil millones de años luz al norte de aquí) a través de un enorme telescopio. Necesitamos una perspectiva desde el origen (Tierra), pero primero necesitamos un conjunto de funciones que nos den los operadores fundamentales con los que podamos construir la proyección deseada.
Toma R\(_y(\theta)\) como ejemplo. La función para construirlo parece
function Ry = vhry (theta) ; % Rotation matrix about y-axis for 3-D homogeneous % coordinates. Ry = eye(4); Ry(1,1) = cos(theta); Ry(3,3) = cos(theta); Ry(3,1) = -sin(theta); Ry(1,3) = sin(theta);
Entra y guarda hry.m como se indica. Luego escribe funciones para
\ [\ begin {reunió}
\ mathrm {R} _ {x} (\ theta)\ quad vhrx. \ mathrm {m}\\
\ mathrm {R} _ _ {z} (\ theta)\ quad vhrz. \ mathrm {m}\\
\ mathrm {S}\ izquierda (s_ {x}, s_ {y}, s_ {z}\ derecha)\ quad vhs. \ mathrm {m}\\
\ mathrm {T}\ izquierda (t_ {x}, t_ {y}, t_ {z}\ derecha)\ quad vht. \ mathrm {m}\\
\ mathrm {M} (d)\ quad vhm. \ mathrm {m}
\ final {reunido}\ nonumber\]
Las funciones útiles de MATLAB para esta tarea incluyen ceros, ojo y diag.
Ahora construye y usa una proyección en perspectiva con punto de vista Tierra y plano de proyección\(z=1000\) detrás de las inmersiones:
- traducir la Tierra para\(z=-1000\) que el plano de proyección coincida con el\(x-y\) plano: T (O,0, −1000);
- utilizar la proyección de perspectiva fundamental: M (-1000); y
- traducir de nuevo: T (O,0,1000)
≫ A = vht(0,0,1000) * vhm(-1000) * vht(0,0,-1000) ≫ vhgraph(G,H,A)
¡Uy! Ahora la imagen es demasiado grande; está mayormente fuera de la pantalla. Escalarlo y echar otra mirada:
≫ A = vhs(.06,.06,.06) * A ≫ vhgraph(G,H,A)
Ahora la vista debería parecer familiar. Deja\(A\) como es ahora:
≫ save dip3d
Experimentar con escala y rotación alrededor del eje z. Por ejemplo, prueba
≫ vhgraph(G,H,vhrz(pi/2) * A)
Las posiciones de estrella bidimensionales dadas en la Demo 1 en “Gráficos vectoriales: representación de imagen bidimensional” se obtuvieron a partir de las posiciones tridimensionales con el operador compuesto A que está utilizando ahora. Para comparar los dos, escriba
≫ Gnew = A * G ≫ for i = 1:14 Gnew(;,i) = Gnew(:,i)/Gnew(4,i); end ≫ Gnew
y compare las\(y\) coordenadas\(x\) y con las de la Demo 1 en “Gráficos vectoriales: Representación de Imagen Bidimensional”.
Los astrónomos dan posiciones estelares en coordenadas ecuatoriales usando ascensión derecha, declinación y distancia. La siguiente función convierte las coordenadas ecuatoriales, que son esféricas, en coordenadas cartesianas con el eje z apuntando hacia el norte, el eje x apuntando al equinoccio vernal (primavera) en la constelación Piscis, y el eje y apuntando hacia el solsticio de invierno en la constelación Opheuchus.
function v = starxyz(rah,ram,decd,decm,dist) % starxyz is the cartesian coordinates of a star whose % spherical coordinates ( e.g. from a star catalog) are % % rah right ascension hours % ram right ascension minutes % decd declination degrees % decm declination minutes (should be negative % if decd is negative) % dist distance (light years) % phi = (pi/180) * (decd + decm/60); theta = (pi/12) * (rah + ram/60); r = dist; v = [r * cos(phi) * cos(theta); -r * cos(phi) * sin(theta); r * sin(phi)];
¿Alguna vez te has preguntado cómo serían las constelaciones de otros lugares de la galaxia? Pronto veremos la respuesta. Primero veremos los cazos de Alpha Centauri, la estrella más cercana, cuyas coordenadas son
-1.5680 1.3157 -3.6675.
Miraremos hacia el centroide de las catorce estrellas en los dippers, ubicados en
-26.3632 12.8709 100.4714.
Para obtener la vista deseada, debemos
- traducir el punto de vista al origen;
- rotar el centroide (dirección para mirar) al eje z; tenga en cuenta que el centroide tendrá nuevas coordenadas después del paso (1); y
- aplicar el compuesto A=S (.06, .06, .06) *T (0,0,1000) *M (-1000) *T (0,0, -1000) (como se usa para ver desde la Tierra).
Escribe una función vhz.m basada en el Ejercicio 5 de “Gráficos Vectoriales: Coordenadas Homogéneas Tridimensionales” para lograr el paso (2). Pruébalo en varios puntos aleatorios para asegurarte de que funciona bien. Ahora escribe una función general de proyección en perspectiva llamada vhview.m. La función vhview debe aceptar como entradas dos vectores, el primero especificando el punto de vista y el segundo el punto a mirar hacia. Su salida debe ser un operador compuesto que realice los tres pasos anteriores.
Ahora queremos mirar hacia el centroide de los dippers de Alpha Centauri. Para ello, ingresa los vectores para los dos puntos de interés y construye la vista así:
≫ acentauri = [-1.5680; 1.3157; -3.6675] ≫ centroid = [-26.3632; 12.8709; 100.4714] ≫ A = vhview(acentauri,centroid) ≫ vhgraph(G,H,A) ≫ title('From Alpha Centauri')
Cuanto más nos alejemos de la Tierra, más distorsionados se verán los cazos en general. Ahora debería ser fácil verlos desde cualquier ubicación deseada. Simplemente elija un punto de vista, recalcular el operador compuesto para ese punto de vista usando vhview y use vhgraph. Siga este procedimiento para ver los cazos de cada una de las estrellas en la siguiente lista. Primero necesitarás usar starxyz para convertir sus coordenadas.
Star | Ascensión Derecha | Declinación | Distancia (ly) |
Alfa Centauri | 14h 40m | -60° 50' | 4.2 |
Sirius | 6h 45m | -16°43' | 9.5 |
Arcturus | 14h 16m | 19°11' | 16.6 |
Pollux | 7h 45m | 28°02' | 35.9 |
Betelgeuse | 5h 55m | 7°24' | 313.5 |
Por supuesto, la visualización de estrellas no es la única aplicación de gráficos vectoriales. Haz algunos experimentos con el cubo unitario (ver Ejercicio 2 de “Gráficos vectoriales: Coordenadas homogéneas tridimensionales”). Visualiza el cubo desde la ubicación (4,3,2) mirando hacia el origen usando el procedimiento que acabamos de esbozar para las estrellas. Es posible que deba ajustar la escala para obtener una vista significativa.