neilofbodom
Member
Hi guys,
I am attempting to create an earthquake data visualization program using Processing. I created a 3D sphere and applied a texture of the map of the Earth on it using createShape(SPHERE, radius); and setTexture();
Everything works except for a major detail...the locations of the earthquakes are off completely from their respective position. I have my data loaded into a csv file and I then convert each latitude and longitude to x,y,z positions using the following formulae:
where theta is latitude in radians, phi is longitude in radians and r is the radius of my sphere.
Any idea what might be an issue? Maybe I am not considering sth?
Thanks!
I am attempting to create an earthquake data visualization program using Processing. I created a 3D sphere and applied a texture of the map of the Earth on it using createShape(SPHERE, radius); and setTexture();
Everything works except for a major detail...the locations of the earthquakes are off completely from their respective position. I have my data loaded into a csv file and I then convert each latitude and longitude to x,y,z positions using the following formulae:
Code:
x = r * sin(theta) * cos(phi);
y = r * sin(theta) * sin(phi);
z = r * cos(theta);
where theta is latitude in radians, phi is longitude in radians and r is the radius of my sphere.
Any idea what might be an issue? Maybe I am not considering sth?
Thanks!