| Jacob 2007-06-26, 10:07 pm |
| Hi. I'm fairly new to fortran, using fortran 90 now. I have a 3-D
array of values (emissivities) that I need to be able to rotate in 3-D
and sum up along the line of sight (the indices of the array serve as
x,y,z values). What I'm doing now is:
1. getting user inputed rotation values (theta, phi)
2. getting a 3xn array of x,y,z from the indices (where n is the total
# of data points)
3. converting xyz to spherical coordinates (rho,theta,phi) (maybe
doing this incorrectly)
4. adding rotation to (r,th,phi)
5. converting new r,th,phi back to xyz
6. using ANINT to round xyz to nearest integers for use as indices
7. assigning emissivities to new xyz values
8. sum values along z
(9. display new 2-D array as image using IDL, since I don't know how
to do that with fortran)
A few problems exist:
a. clearly in step 6 I'm messing up the array some by shifting the
values around to integer x,y,z. Any suggestions for dealing with
this?
b. i'm not sure about the coordinate system for fortran. Is it a
right-hand system with z out of the screen? My images are messed up
enough that I actually can't tell how they've been rotated!
I'm sure there are far more problems too, but if anyone can help me
with the above, I'd be mighty grateful.
Thanks!
|