Coding Challenge #58: 3D Earthquake Data Visualization

preview_player
Показать описание


References:

Videos:

Live Stream Archives:

Related Coding Challenges:

Timestamps:
0:00 Introduce the coding challenge
1:59 Mention the previous coding challenge 'Earthquake Data Visualization'
2:59 Set up Processing environment with a 3D renderer
3:32 Draw a sphere
4:45 Add lights to shade the sphere
5:06 Rotate sphere around the y axis
5:58 Place a point with a fixed longitude and latitude
7:18 Convert longitude and latitude to an x and y location
8:00 Describe spherical coordinates
8:21 Find Cartesian coordinates
10:28 Draw a box
11:54 Load earthquake data
12:36 Describe `.csv` dataset
14:37 Parse data in a table
15:04 Loop through the rows of the table
15:55 Extract longitude, latitude and magnitude
17:15 Use coordinates to draw boxes
18:34 Add more data points
19:45 Describe how to draw boxes with a different height
22:20 Map the magnitude to the height of the boxes
23:29 Describe how to extrude boxes from the sphere
24:08 Implement vector math
26:47 Introduce cross product
29:11 Diagram cross product
29:37 Calculate rotation axis
30:06 Rotate boxes
31:55 Extrude boxes from the sphere
32:41 Re-introduce magnitude to size the boxes
33:04 Experiment with height values
33:35 Describe output and improvements
34:22 Find Earth texture from NASA reference
35:47 Load texture image
36:18 Add the texture to the sphere
38:12 Describe issue with the alignment of the texture
39:42 Conclude the coding challenge

Editing by Mathieu Blanchette
Animations by Jason Heglund
Music from Epidemic Sound

#datavisualization #earthquakedata #3d #processing
Рекомендации по теме
Комментарии
Автор

Daniel, there's only one word to describe you: awesome!

lionpersia
Автор

The x, y, z sailor moon transformation sequence really was the best part of an excellent videp

TheWeezyOfOz
Автор

"I have to instinctively run away whenever I hear 'quaternion'..."
This cracked me up ;'D
Don't ever change.

thetastefultoastie
Автор

Starting to watch, it'll surely be an awesome coding challenge! Ding!

luismiguelgallegogomez
Автор

This will correct the GPS positions :

theta = radians(lat) + PI/2;
phi = radians(-lon) + PI;
// and after beatenkevin1995:
x = r * sin(theta) * cos(phi);
y = r * cos(theta);
z = r * sin(theta) * sin(phi);

JoaoEspancaBacelar
Автор

I dont remember the last time I saw a video with 0 dislikes. Great content!

OMRI
Автор

Shouldn't the equations be:
x = rsin(theta)cos(phi)
y = rcos(theta)
z = rsin(theta)sin(phi)
if the y direction is vertically up and the z direction in out of the screen, since it is usually the opposite in calculus?

beatenkevin
Автор

Can you do one like a music visualisation thing?? That would be really cool and have always wondered how to do that sort of thing but just don't know where to start

LordPtaker
Автор

hamagad, its a rectangular prism. A prisssmmm. I love your videos, thanks for making them!

typicallucas
Автор

Three things: It's either (1) Neural Networks are really ridiculously difficult to learn; (2) Siraj (no intention to undermine his greatness) unfortunately doesn't have your talent in explaining things clearly, succinctly, and effectively; or (3) I just suck at Neural Networks.

But please give it a try. Please do Neural Nets!

grainfrizz
Автор

if you have to run when u say Quaternion, you would have one heck of a time trying to do a Unity3D tutorial :P

NathanChambers
Автор

really like your work with geocoded data. especially because i'm a student in the field of computer science and geography :D

Quickpinguin
Автор

Hey Dan, I've been trying to make a 3D game in Processing, and I have to say, it's really difficult! It's a fun challenge, though (since I don't know how to change the position of the camera without PeasyCam, and I'm not using PeasyCam because of the admittedly horrible roll control.) So far, I have an interface called WorldObject, and two WorldObjects (the Player and a Cube). I figured out how to draw cubes at the proper location only a few days ago (thank pushMatrix() )

valshaped
Автор

where can I find the code or the video with the rotated earth texture to correct the data position on it?

ilaydahanci
Автор

Also, once your applied the earth image texture, I'd drop the lights(), so the geography shows up a little better.

kenhaley
Автор

"Sounds like a terrible idea but I'm going to do it anyways". That's so me hahaha

johncerpa
Автор

very slick job Dan ! use the cylinder primitive instead(as a 1st choice for demo/test)....good thing u didn't get involved with the quad(for this tut)LOL @ your regular tangents ....& change radius & height & color based on mag(logarithmic or not?), if/when you revisit this yet again an old c cat, I'm still blown away by processing & something this cool can be done in like a page of code & so quickly & easily great channel !

realcygnus
Автор

when I am inputing rotateY(angle), an error occurs, and it says the variable angle does not exist

shuhanzhou
Автор

Where did he explain the correction (coordinates/ textured map)? I can't find the video for that although he announced it. I'm very interested because I couldn't figure out how to do that.

kli
Автор

Could you do another coding challenge that updates live as the earthquakes happen.

sapninn