Coding Challenge 180: Falling Sand
23:00
How to Set Up a Node.js Project
24:44
Coding Challenge: 3D on Apple II
45:40
What was Coding like 40 years ago?
29:05
The Anal Retentive Coder
4:47
2 жыл бұрын
Coding Challenge 165: Slide Puzzle
26:53
Пікірлер
@Jilinhall
@Jilinhall 9 сағат бұрын
this is actually such a smart way to generate a random but smooth-ish curve!
@gauravjain183
@gauravjain183 13 сағат бұрын
love this!! :)
@ManishFrenchStudio
@ManishFrenchStudio 16 сағат бұрын
An absolute triumph! 🌟🎥 This video is a triumph of content creation, seamlessly blending knowledge and entertainment. The presentation is flawless, and the visuals are nothing short of spectacular. I was entranced from the first moment and left with a deep appreciation for the subject matter. It's evident that the creators poured their creativity and expertise into this project, and the result is nothing short of exceptional. I'll be singing the praises of this video for a long time. Bravo! 👏🚀2.8k
17 сағат бұрын
It seems like your quadtree example doesn't have any improvement over non quadtree approach.
@dkyeboah1
@dkyeboah1 Күн бұрын
Great video as always. Question: If I want to be able to click on an object and drag that same one object to a new location, how do I achieve this?
@SMVK
@SMVK Күн бұрын
Next, make this algorithm in raster (each individual's pixels)🌚
@Muffin--Man
@Muffin--Man Күн бұрын
let m=0; function setup() { createCanvas(400, 400); background(0); } function draw() { noStroke(); if(mouseIsPressed) ellipse(mouseX,mouseY,m); } function mousePressed(){ fill(random(255),random(255),random(255),100); m=random(20,50); }
@Muffin--Man
@Muffin--Man Күн бұрын
let m=0; function setup() { createCanvas(400, 400); background(0); } function draw() { noStroke(); if(mouseIsPressed){ fill(random(255),random(255),random(255),100); ellipse(mouseX,mouseY,random(50)); } } /* function mousePressed(){ fill(random(255),random(255),random(255),100); m=random(20,50); }*/
@Muffin--Man
@Muffin--Man Күн бұрын
//Each individual ellipse has its own color let balls=[]; function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background(220); for(let t of balls){ fill(random(100,255),random(100,255),random(100,255),200); t.show(); } } function mouseDragged(){ let d=new ball(mouseX,mouseY, random(20,50)); balls.push(d); } class ball{ constructor(x,y,d){ this.x=x; this.y=y; this.d=d; } show(){ // noStroke(); ellipse(this.x,this.y,this.d); } }
@ZyPPy_
@ZyPPy_ Күн бұрын
why do you need a seperate function for this? its same as just col=(255/600)*mouseX in the case of ranges starting from random values, u can just add the difference
@zsoltm2119
@zsoltm2119 Күн бұрын
Fun video! This channel has a lot of these simulation and math type coding problems, but unfortunately using java or JS isn't the right tool or language. Also as others have said, this particular way of calculating PI is best done with a dense scan of the rectangle, not random points. Lastly, we shouldn't need to use the prior knowledge of Pi ti calculate PI. We can compare the calculated PI at the end of the calculation, it just cannot be part of the calculation. Imagine, I can generate random numbers between 0 and 4 and compare them to the real PI, picking the closest one - this is not an actual algorithm to compute PI. So let's do this correctly. Written in C (not C++ which has complex syntax), which not only is significantly faster than Java but has a cleaner syntax and more options to use long double type for more precision. I've ran the code below for a few minutes to calculate PI to the 9th digit: Calculated PI: 3.1415926525707500000482441659954702117830 Real PI : 3.1415926535897932384626433832795028841971 main() { long long circle = 0; long long r = 2000000; long long r2 = r * r; for (long long y = -r; y < r; y++) { for (long long x = -r; x < r; x++) { if ((x * x + y * y) <= r2) circle++; } } long long total = 4 * r * r; printf("Calculated PI: %.40Lf ", 4.0L * (long double)circle / (long double)total); printf("Real PI : 3.1415926535897932384626433832795028841971 "); } compiled with: gcc main.c -w -O3 -mavx2 Really simple code, right? And for those who don't like C pointers, just use the array notation. Please, these tutorials would be so much better and faster in C. I've seen a lot of videos on this channel, where the resolution was dropped to get performance to be decent or there was a lot of waiting required to get the computed result - The Mandelbrot based PI (at 0.25, 0 location) was a perfect example where using a native language like C would have made it significantly faster.
@spongebobseyelashes8548
@spongebobseyelashes8548 Күн бұрын
I remember using grammars and lexers/parsers in Ocaml last year for college, was great to see it visualized like this!
@rodrigoqteixeira
@rodrigoqteixeira 2 күн бұрын
21:37 ✅ "fd": function() {turtle.forward()} ❌ "fd": turtle.forward
@spongebobseyelashes8548
@spongebobseyelashes8548 2 күн бұрын
8 years later frameRate() works when you put it in setup but still breaks when I try to use it in draw()
@pietroantenucci6415
@pietroantenucci6415 2 күн бұрын
That’s amazing
@rodrigoqteixeira
@rodrigoqteixeira 2 күн бұрын
13:40 Why did bro put a POST increment insead of an PRE increment. That returns the OLD value, not the NEW INCREMENTED one.
@jehree9850
@jehree9850 2 күн бұрын
The continue keyword is a joke to this man
@grimm2376
@grimm2376 2 күн бұрын
СУПЕР ТОПОВЫЙ КАНАЛ, жаль что я нашел этот канал только недавно. чууух чууух
@endunry
@endunry 3 күн бұрын
I stopped watching yt and thus also stopped watching your vids in the past years. But i just saw that you still create These amazing vids. You probably wont see this. But your videos where the first contact i had to computer science and it got me hooked on. Since the starfield challenge i Watched and Code every Challenge you posted and learned to Code. Because of this Joy now have a finished cs degree and a job as a software Developer. And i think withou your Videos and without the joy and passion you put into educating others i wont be where i am today... Im really grateful of what you do and i hope that you inspire a lot of people like me in the future. Thank you sir
@TheCodingTrain
@TheCodingTrain 2 күн бұрын
This makes me so happy to hear thank you for sharing!
@stickmasterlukeRBX
@stickmasterlukeRBX 3 күн бұрын
When we consider each circle filled in, does the Apollonian Gasket have any free space? Also, if I wanted to roll one of the circles, would it lockup or all start spinning?
@AegisPupus
@AegisPupus 3 күн бұрын
It would be interesting to use this as a random generator for games, defining the shooting frequency of a run in a boss fight, for example.
@farazk9729
@farazk9729 3 күн бұрын
When the book comes out, please let us know. I think it'll be in September, right?
@TheCodingTrain
@TheCodingTrain 2 күн бұрын
September 3rd. Check natureofcode.com for preorder info and updates!
@farazk9729
@farazk9729 2 күн бұрын
@TheCodingTrain will do. Thanks, and congrats.
@copperhun
@copperhun 3 күн бұрын
holy shit
@nkheart4
@nkheart4 4 күн бұрын
My first goal is to learn what you teach, but I also enjoy seeing your reactions when you start coding. I see myself in you, so I love your channel because I feel the same joy you get when coding graphics like this.
@cbbcbb6803
@cbbcbb6803 4 күн бұрын
Anyone not interested would not have listened for five minutes. I'm interested, so I'll keep listening. However, I must say, you are a little talkative. Whew. Finally, after the 14+ minutes point, we start getting somewhere and start doing something.
@TheCodingTrain
@TheCodingTrain 4 күн бұрын
Feel free to check the time codes to skip around!
@evealahin7483
@evealahin7483 5 күн бұрын
Wow!! You're really good at what you do. Actually I learnt about your channel from ChatGPT when I asked it for a good youtube channel for learning coding. And I'm glad I landed here!!!
@m-d-nabeel
@m-d-nabeel 5 күн бұрын
I had no idea I was watching this in 2x just thought he was going too fast 🙂
@matrixgeg
@matrixgeg 5 күн бұрын
nice
@atxmaps
@atxmaps 5 күн бұрын
I can't get past the redirects for Oauth2. I can't even see what you have for that on your screen you go right past it.
@TheCodingTrain
@TheCodingTrain 4 күн бұрын
Check the description for a link to the discord where you can get help with this!!
@atxmaps
@atxmaps 4 күн бұрын
@@TheCodingTrain it was my fault. I figured it out. Thx!
@PorkDude2013
@PorkDude2013 5 күн бұрын
and thank you for making AWESOME videos
@Dragondrew5181
@Dragondrew5181 5 күн бұрын
Keep up the good work
@makebreakrepeat
@makebreakrepeat 6 күн бұрын
PEMDAS intensifies!!!!
@farazk9729
@farazk9729 6 күн бұрын
In a nod to Camus's the Fall: "Monsieur", why are most coding teachers so boring? I find myself watching 30 minutes of C# and then head straight back to your videos for some fresh air... not everything is the content, after all... the form matters, too. Thanks for being different... for not taking all of this too seriously... for being colorful in this big white world... . Cheers from the land down under,
@creatorsremose
@creatorsremose 6 күн бұрын
Coding on Cocaine with Train
@killercarrot1029
@killercarrot1029 6 күн бұрын
me making this in python and finding increasingly stupid ways to misspell self. first, slef, and just now, welf :O
@otoS97
@otoS97 6 күн бұрын
Amount of time this man lost because Java Script syntax :D
@muriithijpeg
@muriithijpeg 6 күн бұрын
i'm getting a "ReferenceError: rect is not defined" what could be the issue lol
@Dragondrew5181
@Dragondrew5181 5 күн бұрын
uh share your code link here ill send the prob
@ampleman602
@ampleman602 6 күн бұрын
Just found this channel. Wow
@Chess_Is_Life_1998
@Chess_Is_Life_1998 8 күн бұрын
Wow, even though this video is 8 years old, it's still incredibly helpful! I've been diving into Unity for about a year and a half now, struggling to grasp game physics, and stumbling upon this channel has been a game-changer. Thank you for creating such valuable content, and making it so visually engaging and easy to follow!
@Jeetizded-
@Jeetizded- 8 күн бұрын
let x = 0; let y = 0; let d = 10; function setup() { createCanvas(500, 500); background(230); } function draw() { noStroke(); fill(x, y, 150, 200); circle(x, y, d); x = x + 5; y = y + 5; d = d + 2; } function mousePressed() { x = 0; y = 0; d = 10; background(230); }
@PersianUnityCommunity
@PersianUnityCommunity 8 күн бұрын
gooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooood Video
@Halleluyah83
@Halleluyah83 8 күн бұрын
Листинг очень быстро идёт)) Больше Эппл-2 ни а что не годен. В топку!)
@Solmead
@Solmead 8 күн бұрын
On my Apple Iic I remember double hi res, and how difficult drawing was especially using direct memory access to set the pixels. Then of course there is the entire reason different colors were showing up with your white lines (every 2 pixels together controlled what color they appeared as, with a hidden bit controlling color set one or two for the pixels in that byte. It’s how woz squeezed the color hi res display into 2k of memory.
@NeerajGupta-ot9eq
@NeerajGupta-ot9eq 9 күн бұрын
I made this on a rect-grid few years ago and was absolutely in awe of the random patterns it would generate🔥
@Halleluyah83
@Halleluyah83 9 күн бұрын
Falling Sand Simulator (FSS) kzfaq.info/get/bejne/jLKKnceQvpfLemw.htmlsi=2gAKi82gT1BN8Cjv
@user-oy8bs9xx3b
@user-oy8bs9xx3b 9 күн бұрын
Goodness this finally makes sense, I have been bouncing off regular expressions for ages. Thank you!
@stavros222
@stavros222 9 күн бұрын
I tried this on javascript. On z rotation with only 4 vertices the first dot is not spinning and the entire dots are spinning towards this point. Same with other rotations but with two dots being the center. Why does this happen
@nikhileshmarella2687
@nikhileshmarella2687 9 күн бұрын
what is the use of shift in update function what is happening there can anyone explain
@Sammysapphira
@Sammysapphira 10 күн бұрын
Please for the love of god learn semantic naming conventions
@yusef_01
@yusef_01 10 күн бұрын
First time to undedrstand the async and await after many attempts, appreciated (":
@bap6491
@bap6491 10 күн бұрын
Hi I am kinda late to the video but I wonder if you can help me? What are the Domain or Co domain of the hypothesis and cost function?
@fire249
@fire249 10 күн бұрын
smash! wharra vid