Visualization of the earthquake data (01/01/1973 ~ 01/16/2011) using Visualization Toolkit (VTK) and Qt 4.The raw data is available at the USGS website.
Here’s the procedure I went through in my source code.
– The 8K size earth image is used as a texture for a vtkSphereSource using vtkTextureMapToSphere
– Read the csv raw data using a vtkReader, create data arrays. Especially, the latitude and longitude point data can be converted to XYZ coordinate by
X = -R cos LAT cos LON
Y = R sin LAT
Z = R cos LAT sin LON
So set the points like this and the cell is just a vertex. Magnitude at each data point is the scalar.
Each data point should also have a vector (because of the line representation using a glyph with a line source). So it’s like this..