One Coding Train video a day, keeps the depression away
@AkshayAradhya6 жыл бұрын
Naej Choo-Chooo
@benciccarelli98706 жыл бұрын
Oui oui señor
@Naej76 жыл бұрын
Big Bang Ben Sí sí sir
@noosetime94236 жыл бұрын
it should crash in 4 hours and 37 minutes (if it's 60fps), because you're accessing i+1, and i+1 is gonna be 1 000 000, when the array goes only from 0 to 999 999
@TheCodingTrain6 жыл бұрын
oops!
@ConorDrew6 жыл бұрын
I noticed this when he wrote it, only because during one of my assignments indexOutofBounds caused me so many headaches as it’s a hidden gem of an error
@chitrachandrakar2724 жыл бұрын
@@TheCodingTrain whoops*
@timecubed6 ай бұрын
@@ConorDrew what did the assignment need you to do?
@ConorDrew6 ай бұрын
@@timecubed it was 6 years ago, so I don’t really know, but a good takeaway from this is, things like this get learnt very quick once they catch you out, the best way to learn to program is by making and fixing mistakes, understanding the error message, calling your self an idiot as you done the same thing last week, and fix it.
@fabiomarques41106 жыл бұрын
how to draw the moon in a very strange way!
@wiscatbijles6 жыл бұрын
Just sick how much it resembles it.
@VenturiLife6 жыл бұрын
*Mun
@Scouarn6 жыл бұрын
mün
@xemoable6 жыл бұрын
*Maan
@ilyazakharov58626 жыл бұрын
*Луна
@batfan19396 жыл бұрын
You should assign each line a hue, and have the saturation go up by one each time that number appears. So, the circle would start off white, then become more colorful the longer the algorithm ran.
@leonardgrellier87906 жыл бұрын
You're simply on the top of my 'most creative teachers' list, along with 3Blue1Brown
@Jabrils6 жыл бұрын
that last piece was mesmerizing
@leontius55023 жыл бұрын
@Will Mathias Nice joke
@quinxx123 жыл бұрын
Dude your hoodie is amazing! It's like the rainbow colors on the cords run right into the main body where the colors get mashed together and result in gray.
@rasyidcode31426 жыл бұрын
my new favorite channel for now.
@alexi11826 жыл бұрын
Me? The viewer? A more talented creative person than you are? REALLY DAN?!! I've been trying to do this in p5 for the last 4 hours in which I accomplished absolutely nothing :)
@TheCodingTrain6 жыл бұрын
you can do it, I believe in you!
@alexi11826 жыл бұрын
I hope so my friend...
@elliey.x6 жыл бұрын
Yay! Finally! Thank you so much for this, you're a huge help to my beginning of learning code!
@TheCodingTrain6 жыл бұрын
Glad to hear!
@RicoBrassers6 жыл бұрын
As a hint: You don't have to split a string into a string array to get each character. Just iterate through each char in the string. Or, more suitable for the draw()-method, you could just use the charAt(int) method of a string object, to get the char at the specified position. example: int digit = Character.getNumericValue(digits.charAt(i));
@Naveication6 жыл бұрын
RicoBrassers getNumericValue(char c) is way slower than accessing the index of a predefined integer array. While it wouldn't make much difference in this example, if he wanted to visualize the first trillion digits of pi and to speed up the process calculate a million on every drawcall then your approach would take a significantly longer amount of time. To parse a character in to an integer a million times per frame is just way slower than simply accessing a million integers from an array
@illustriouschin6 жыл бұрын
Looks like the webs my pet spider makes after he's had too much meth.
@xetop6 жыл бұрын
15:38 Hahahaa I was just about to comment, that you made a pi based moon :D Nice video as always Mr Processing God !
@jasonwalker46106 жыл бұрын
This is in response to the rand pi calc using square circle method. You would get a more accurate pi calculation if you just made a nested x,y for loop, counted the amount that has rad less this x/2 from center of x,y then calculated ratio after nest is complete.
@Budzique5 жыл бұрын
Added this just above line() for some random colors: stroke(255/10*(digit+1), 255/10*(nextDigit+1), 255/10*(digits[index+2]+1)); which will use the current, next and 3rd digits to create a random RGB.
@coding30706 жыл бұрын
I kind of want to print it out as a poster
@Xnoob5453 жыл бұрын
15:19 looks like the moon
@ManosChalvatzopoulos6 жыл бұрын
someone saw numberphile videos!
@AkshayAradhya6 жыл бұрын
Manos Chalvatzopoulos Its just pi day related
@grev77946 жыл бұрын
PBJANDHIGHFIVES math concepts arent supposed to be short or meaningful :) i do learn about combinatorics, encryption, decryption,... from that channel.
@sigmareaver6806 жыл бұрын
yeah that legit looks like a moon.... idk.... jupiter or saturn
@JinTsen6 жыл бұрын
Shouldn't it be random in between -diff/2 and diff/2, so the digits won't overlap?
@AkshayAradhya6 жыл бұрын
JinTsen Yes.
@TheCodingTrain6 жыл бұрын
thanks for the correction! (the visualization here is ultimately meaningless, but hopefully it is helpful and can inspire viewers to make meaningful ones!)
@inperangua6 жыл бұрын
JinTsen I'd even make a range a bit smaller, so the digits have visible space between them.
@inperangua6 жыл бұрын
It's finally done Moon = Pi
@tobiass.84966 жыл бұрын
Moon == Pi
@gautamsingh91756 жыл бұрын
this video is mind blowing but until now i am not good in coding so when i gain some knowledge then i can try it own my own you are great.
@TheCodingTrain6 жыл бұрын
Thank you!
@juangreen81946 жыл бұрын
Is a proven fact that the digits of pi are randomly distributed, so visualizing the digits of pi is equivalent to visualizing a randomly generated string of numbers.
@purrsum4 жыл бұрын
15:25 for some reason it reminds me alot of the moon, right there.
@datejer6 жыл бұрын
These artists are polish lol, dont worry about mispronounceing their names, polish names are hard to pronounce if youre not polish, and no one i saw on the internet could pronounce polish words right, im polish too lol
@datejer6 жыл бұрын
Accualy only tge first one is polish lol
@bittim6 жыл бұрын
15:20 It somehow looks like the moon
@0xDEAD_Inside5 жыл бұрын
If you squint your eyes to see the moon, you will see a smily.
@nemesmatyas6 жыл бұрын
We are cookin' here!
@cassandradawn7804 жыл бұрын
11:42 noice
@bryanmcconnahea98736 жыл бұрын
Can anyone explain to me why the map function defining the angles use 10 instead of 9? It does in fact produce a uniformity of points around the circle by using 10 where using 9 pairs two points but in uniform manner in relation to other pairs... if that makes any sense. Anywya, I thought the map function was to convert the possible range of 0-9 to their equivalent of the range of 0 - 2pi...
@Truueh6 жыл бұрын
You should marry Felicity Smoak from "The Green Arrow".
@vishalmishra19374 жыл бұрын
which technologies are used in this video to make visualization
@hermessantos1816 жыл бұрын
The moon is PI :)
@codeman10216 жыл бұрын
Sir pls start Neuro evolution 🙏🙏
@GOAFPilotChannel6 жыл бұрын
you should make the stroke weight proportional to the count
@TheCodingTrain6 жыл бұрын
Nice idea!
@qwertzuiopqwertzuiop21076 жыл бұрын
I respect the effort you out intk making this videos and of course when making a video every single day not every single one of them will reach the bar, that you set quite high wuth your other videos. Buti was expecting you visualizing the patterns hidden in pi, as pi isnt a random number. But the results you got would have been the same if youve had used random numbers. At least as far i cant tell.. if not please correct me. Keep up the good work, most of your videos are great!
@TheCodingTrain6 жыл бұрын
yes, this is right. this post offers more info: www.askamathematician.com/2009/11/since-pi-is-infinite-can-i-draw-any-random-number-sequence-and-be-certain-that-it-exists-somewhere-in-the-digits-of-pi/
@muhammadsaqlainishtiaq44676 жыл бұрын
Why processing if P5 is there or P5 if Processing is there. Do everything in 1.
@jakob72816 жыл бұрын
Hello fellow programmers! int randomInt = (int)random(10); That line of code stores a random integer between 0 and 10 in randomInt. But here comes my question: Is every outcome equally likely? Because if typecasting to int is the same as it is in some other languages, wouldnt 10 be very unlikely? Sorry for asking here, didnt know where else to put it. Thanks in advance, Jakob
@portalsrule12396 жыл бұрын
I think it should be equally likely. If you wanted to test it, you could keep track of how many times each digit got picked.
@sadhlife6 жыл бұрын
just run a code to count how many times each digit came up out of 10,000 total random draws and check how far each is from 1000
@jakob72816 жыл бұрын
So, turns out the last number is not likely at all... As i expected, you can assume the chance of it occuring is 0: 0: 111098824 1: 111085682 2: 111127480 3: 111127772 4: 111120418 5: 111117453 6: 111122554 7: 111103272 8: 111096545 9: 0
@Schnorzel13376 жыл бұрын
I dont know what you did but random(10) gives the range [0,9] or for integers [0,10). Here is why:. random() gives a number between 0 inclusive and 1 exclusive. The function random(n) is equal to random() * n. So the range is [0,n). Tested it in Processing and Java.
@sadhlife6 жыл бұрын
Schnorzel1337 yeah.
@AbdulAziz-lf9lg6 жыл бұрын
Journey to the Moon with PI....😂
@empiricistsacademy71816 жыл бұрын
Recently found your channel and am a new subscriber. I want to make interactive educational web apps for teaching statistic concepts (for example to illustrate central limit theorem), which of your playlist series do you think would be relevant?
@TheCodingTrain6 жыл бұрын
If you are totally new to programming try this one! kzbin.infoplaylists?view=50&shelf_id=14&sort=dd
@empiricistsacademy71816 жыл бұрын
Thank you very much for the reply, good think I clicked the bell icon. I am familiar with python programming for data analysis and implementing ML algorithms. But I don't know anything about web development, I heard django and flask in python can make web apps as well, so I was wondering whether I should learn that in python or java script. I will check out your java script playlist, thanks.
@JinTsen6 жыл бұрын
painful to be up to date with your videos, now I can only watch whenever you realease one ^^'
@gronkhfan0116 жыл бұрын
JinTsen
@arwa93855 жыл бұрын
you r the cutest old man i've ever seen
@thederpyminecrafter776 жыл бұрын
what text editor are you using
@GenesisRussell-jt2rp6 жыл бұрын
what does PI sound like if smaller integers are lower pitched and larger integers are higher pitched
@GenesisRussell-jt2rp6 жыл бұрын
on second thought it probably sounds like white noise
@kniscior6 жыл бұрын
By the way surname od this guy krzywinski is polish, u pronounce it like kshyvinsky
@meikusje6 жыл бұрын
Do you think you could write a code to simulate the movements of a flock of starlings?
@aggressivegeek6 жыл бұрын
I think he has a video (series?) on PSO, a Swarm Intelligence algorithm based on patterns such as a flock of birds. Might be a bit more abstract from what you're asking for but certainly worth a look.
@waterfallbw6 жыл бұрын
11:42 *420!!!!!*
@septicsounds32166 жыл бұрын
Shouldn't the map-function for the angles only go from 0 to 9? (instead of 10)
@farhansyabibi1706 жыл бұрын
Die Chaoten that would make 0 at 0, and 9 at two_pi, which is basically the same
@SelmanIsHere5 жыл бұрын
The point is counted as a digit???
@Bloodwyn1756Swagger6 жыл бұрын
You could at least used a byte array ;)
@alanesamuel51676 жыл бұрын
Hi Dan Which Laptop do u use?
@danielsotojaimes36026 жыл бұрын
alane samuel .
@svanse45.566 жыл бұрын
Does he use Java?
@frogdeity6 жыл бұрын
NONAGON INFINITY 12:56
@samtheman4486 жыл бұрын
Just saw them live about a week ago... amazing experience.
@frogdeity6 жыл бұрын
They're coming to philly in June. I've never seen them live before and I am so hype.
@samtheman4486 жыл бұрын
Well you have much to look forward to! My personal fav from the gig was greenhouse heat death but it was all mindblowing.
@prabhjotsingh12556 жыл бұрын
51 viewer i watched it live
@theking234576 жыл бұрын
200 liker
@MsTwte6 жыл бұрын
what language i s this?
@TheCodingTrain6 жыл бұрын
Java with Processing: processing.org
@nietschecrossout5506 жыл бұрын
101 Likes!
@LoganDark43576 жыл бұрын
TAU
@Rightlime79236 жыл бұрын
Coding train is million times better than numberphile ----
@Zakiyfarhanfuad6 жыл бұрын
When i look at the clickbait, i thought it was a moon image