Coordinates problems. How to convert from one system to another

In summary, to change the original model from assuming a central source to assuming photons starting from the surface of the sphere, you will need to convert from spherical coordinates to Cartesian coordinates and use the above equations to set the initial location and direction of the photon's travel.
  • #1
Anestis_T
2
0

Homework Statement



Hi

I got a problem with some simple modeling. The original code assumes a spherical cloud with a central source, and it assumes that the source sits at the centre of the sphere. I want to change this model and instead of using photons coming from the central source, I want to assume that the photons start from the surface of the sphere.


Homework Equations



The original parameters are:
Initial Location
xp = xs
yp = ys
zp = zs

Set the photon of travel ---------
! nxp=sint*cos(phi)
! nyp=sint*sin(phi)
! nzp=cost

I used spherical coordinates for the starting point (r,t,phi)

What sort of conversion is needed in the setting of the photon travel?

The Attempt at a Solution




Any hints/help is more than welcome

Thanks a lot in advance
 
Physics news on Phys.org
  • #2
.To convert from spherical coordinates to Cartesian coordinates, you will need to use the following equations:x = r*cos(t)*cos(phi)y = r*cos(t)*sin(phi)z = r*sin(t)Therefore, you can set the initial location of the photon's starting point using the following:xp = r*cos(t)*cos(phi)yp = r*cos(t)*sin(phi)zp = r*sin(t)To set the direction of the photon's travel, you can use the following equations:nxp = -sin(t)*cos(phi)nyp = -sin(t)*sin(phi)nzp = cos(t)
 

Related to Coordinates problems. How to convert from one system to another

1. What is the difference between latitude and longitude?

Latitude and longitude are two different coordinate systems used to specify a location on the Earth's surface. Latitude measures the distance north or south of the equator, while longitude measures the distance east or west of the Prime Meridian.

2. Why is it necessary to convert between coordinate systems?

Different countries and organizations may use different coordinate systems, making it necessary to convert between them in order to accurately communicate and compare locations.

3. How do you convert from degrees to decimal degrees?

To convert from degrees to decimal degrees, simply divide the number of minutes by 60 and add the result to the number of degrees. Then, divide the number of seconds by 3600 and add the result to the previous result. This will give you the decimal degree value.

4. What is the most commonly used coordinate system for GPS?

The most commonly used coordinate system for GPS is the World Geodetic System 1984 (WGS 84). It is used by the majority of GPS devices and mapping systems around the world.

5. Can you convert coordinates between different planets or celestial bodies?

Yes, it is possible to convert coordinates between different planets or celestial bodies, but it requires a different set of equations and calculations than converting between Earth-based coordinate systems. This is because the shape and size of each planet or body may differ, and therefore, the coordinate system used to measure them will also be different.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
3K
  • Calculus and Beyond Homework Help
Replies
3
Views
4K
Replies
1
Views
6K
  • Introductory Physics Homework Help
Replies
2
Views
3K
  • Differential Geometry
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
8K
Replies
3
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
2K
Back
Top