answersLogoWhite

0


Best Answer

float2 CartesianToSpherical(float x, float y, float z)

{

float2 SphericalPos;

SphericalPos.x = atan2(x,z)/6.28318f;

if(SphericalPos.x < 0.0f)

SphericalPos.x += 1.0f;

SphericalPos.y = atan2(sqrt(x*x+z*z),y)/3.14159f;

return SphericalPos;

}

User Avatar

Wiki User

16y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How do you change cartesian to spherical coordinates?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How the heat conduction equations for spherical and cylindrical coordinates were derived?

The coordinates for equations dealing with cylindrical and spherical conduction are derived by factoring in the volume of the thickness of the cylindrical control. Coordinates are placed into a Cartesian model containing 3 axis points, x, y, and z.


Is a cartesian plane the same as a cartesian coordinate?

The cartesian coordinates are plotted on the cartesian plane


What are the 3 coordinates in cartesian plane?

You do not have 3 coordinates in the Cartesian plane. The Cartesian plane is a plane and is therefore 2 dimensional. In 2 dimensional space you require only 2 coordinates. 3 coordinates are required to locate a point in 3-dimensional space but then it cannot be a Cartesian PLANE.


Which coordinates is horizontal?

The x coordinates are horizontal whereas the y coordinates are vertical on the Cartesian plane.


How do you Enter 3D Coordinates in GstarCAD?

Cartesian, cylindrical, or spherical coordinates locate points when you are creating objects in 3D.Enter X.Y.Z coordinate3D Cartesian coordinates specify a precise location by using three coordinate values: X, Y, and Z.Entering 3D Cartesian coordinate values (X,Y,Z) is similar to entering 2D coordinate values (X,Y). In addition to specifying X and Y values, you also specify a Z value using the following format:X,Y,Z


How do you draw a line?

use cartesian coordinates


What is the need for conversion of polar coordinate to Cartesian coordinate?

Some problems are easier to solve using polar coordinates, others using Cartesian coordinates.


What is cartesian coordinates and cartesian curves?

it s hfhsafaj ahjgag gfafggahfg jahfgyu ggakHGSDLFHF YR


Who created coordinates?

They were developed by Rene Descartes (and so are also called Cartesian Coordinates).


How do you draw a line graph?

use cartesian coordinates


How do you draw line graph?

use cartesian coordinates


What are the x y cordinates called?

Cartesian coordinates.