Coding Challenge

  Рет қаралды 115,156

The Coding Train

The Coding Train

Күн бұрын

Пікірлер: 145
@dawalton7435
@dawalton7435 6 жыл бұрын
5:46 I like how the captions just read "(silly noises)". You are literally my favourite youtuber and give me my will to survive at times.
@rolfvankleef8439
@rolfvankleef8439 6 жыл бұрын
The error you got is a but in JOGL. It is harmless and can be ignored. It will be silenced in a later release.
@xRoGeSx
@xRoGeSx 6 жыл бұрын
Saw the tiny bit of those cuves in Matt Parker video myself, coded it myself and then here you are! Amazing to see another style of coding for the identical tasks.
@trans_foxgirl
@trans_foxgirl 6 жыл бұрын
I wonder what the curves would look like in 3D, like another set of sin waves that control height?
@CalSeedy
@CalSeedy 6 жыл бұрын
In 3D I think you would need another angle.
@morphman86
@morphman86 6 жыл бұрын
You need a third set of wheels for a third dimension. So yeah, basically another set of sine waves. It will look rather similar, but with another dimension added. The circles will be spheres, the arcs will be semispheres etc. The interesting thing is that a three-dimensional lissajous is only possible in a virtual environment, as the "arms" would cross each other and the lines would intersect. But copy the project and add another dimension to it, change to P3D and check for yourself.
@spectralpiano3881
@spectralpiano3881 6 жыл бұрын
A 3d lissajous curve is basically 3 lissajous curves merged, if you look from infinity in the x direction you'll see a 2d lissajous curve created by the circles rotating in the y and z plane. If looking from the y axis you'll see the lissajous from xz and from the z axis you'll see the xy curve. I made a 4d version projected to 3d quite recently, a bit harder to imagine/understand that but it's fun to play around with ^^
@Bolt6265
@Bolt6265 6 жыл бұрын
i made this for fun i guess gfycat.com/ColorfulMeatyAmericankestrel
@k1ngjulien_
@k1ngjulien_ 5 жыл бұрын
@@Bolt6265 dang that's cool!
@jorgedominguez9484
@jorgedominguez9484 5 жыл бұрын
I love how you seem to have so much fun doing these videos haha keep it up man you made me get into coding
@QuickAnalysis
@QuickAnalysis 3 жыл бұрын
I never normally comment on youtube videos but you have helped me be able to code some mathematical ideas of my own I have had for years but not been able to progress them any further, thank you for bringing me your videos.
@owlsurojit
@owlsurojit 6 жыл бұрын
Could someone please make a remix of 5:43 to 5:47 ? Because that's hilarious ^^ PS: Love your videos; It is you who motivated me to become a programmer...
@letsgocamping88
@letsgocamping88 6 жыл бұрын
Owl Surojit some beatboxing eh
@georgeyjm
@georgeyjm 6 жыл бұрын
I was playing at 1.5x speed😂had to stop at this part
@chicapercebe
@chicapercebe 2 жыл бұрын
I was searching about lissajous curves and thought it would be cool to write it in processing, I'm glad there is a video about that! You are the best :D
@d_v_d1070
@d_v_d1070 6 жыл бұрын
Yay Processing 3 is used again . Daniel hope you see that videos you make with Processing 3 are watched the most often ( * hint* hint* :) ), maybe a topic regarding the some applications of sharders might be good , huge huge admirer of all the work you do
@Holobrine
@Holobrine 5 жыл бұрын
The order of rows and columns still fits the standard (x,y) notation, because the computer reads right-to-left to define the array. When you go to access it though, it reads left-to-right. Think of it like a low-level list and a high-level list. You define bottom up, but you access top down.
@timatiloh9653
@timatiloh9653 6 жыл бұрын
it really looks so cool, just like pure harmonics in nature
@maxteer2800
@maxteer2800 5 жыл бұрын
It feels like I'm learning, but really I'm just watching art
@lemon3389
@lemon3389 5 жыл бұрын
I ended up taking the challenge and did it myself In 1h45... I rarely program so cut me some slack BUT I succeeded!
@ffggddss
@ffggddss 5 жыл бұрын
Not watched yet, so I may be repeating things you'll say here, but here goes: This is something I tackled on a graphing calculator some years ago, using parametric curves with horizontal and vertical sine waves of different integer frequencies. What I found trickiest was choosing the relative phases so that the curves never came to a "point," but always flowed as a complete, continuous curve. I solved that problem by the following rules: Parameter = t; (x,y) = (f(mt), g(nt)) where m & n are positive integers; and f and g are each either sin or cos, chosen independently. And to make those choices, first test the parity of m and n. Then: (1) If at least one of them is odd, then that one gets cos; the other gets sin, whether it's even or odd. (2) If both are even, repeatedly divide both by 2 until condition (1) holds, then apply that rule. [But still use the original m,n to draw.] There are always other choices that will achieve the desired result, but this is the simplest set of rules that always work. And here's another insight into Lissajous figures: All of these result from orthographic projection of a sine wave, drawn on a strip of width W, then rolled into a cylinder of height W, with the sine wave's frequency chosen so that the rolled-up version matches the sine curve smoothly with itself. And the same L-Curve can be produced by one sine wave rolled up horizontally, or another sine wave rolled up vertically. In either case, the phase can be changed by simply rotating the cylinder continuously on its axis; this gives the full, general case of L-Curves. OK, watched it now. Really neat! So I leave it to you to try these phasing rules or not; what you've got is awesome enough. So just if you're interested... Fred
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
Thanks for the feedback!
@eugen189763987689379
@eugen189763987689379 6 жыл бұрын
Wow, rarely have been so excited to enjoy a video!!
@jsg425
@jsg425 6 жыл бұрын
I love your videos! I learn so much from them. I understand programming concepts as taught by you quicker and more completely than anyone else. I also love how you problem solve as you go. It helps me see the process. Keep it up, my man!
@ddavity
@ddavity 6 жыл бұрын
Just saw that Lissajous gif on Twitter and were asking to myself "hey, that could be a nice project to do on Processing...". And here it is! Thank you!
@smanzoli
@smanzoli 5 жыл бұрын
Love your videos, congratulations! And after watching I always rewrite from zero in Processing.py, but never, NEVER using classes at all... imho they only add weight, complexity and let everything less obvious and unclear, with longer code. Sure, all "objects" as arrays, but never in the pseudo oop way, just hate it in "anything bellow 1000 lines" (aka "simple stuff", where I do not need lots of classes and tons of objects). But YES, it gratley serves the purpose to TEACH oop, damn it, and you do it great! And again, your channel is AWESOME, and YOU are awesome! Keep the passion and the great mood!
@kipchickensout
@kipchickensout 5 жыл бұрын
you didn't make me get into coding but watching your videos is hella fun
@goldenfreddy8649
@goldenfreddy8649 6 жыл бұрын
I’m so confused, yet so satisfied. This was pretty cool!
@lapischicken
@lapischicken 6 жыл бұрын
Pff this is easy ..to watch
@forloop7713
@forloop7713 6 жыл бұрын
...if you aren't following
@Jacker_Deluxe
@Jacker_Deluxe 6 жыл бұрын
Hey Dan! You can use Processing's built-in attribute functions like ellipseMode(CORNER) for drawing circles from their upper-left corner. That way you won't have to calculate the circles' center offset.^^
@juansebastianosorio6757
@juansebastianosorio6757 6 жыл бұрын
I Love your videos! Thanks for your amazing positiveness. Greetings from Colombia
@johnkarippery511
@johnkarippery511 5 жыл бұрын
very nice how you think like that.. without any stuck you are a genius bro
@jimrummy1300
@jimrummy1300 6 жыл бұрын
ABC Aus! Wonderful video Dan. I love your work. You are sensational!
@RupertBruce
@RupertBruce 3 жыл бұрын
When you are iterating over rows, cols use r, c instead of i, j
@ruby_wired
@ruby_wired 5 жыл бұрын
12 rows and 23 columns. That's a minute or so of my life well spent.
@nazishahmad1337
@nazishahmad1337 5 жыл бұрын
This lissajouss figure is created when we superpose two SHM with different frequency
@thedarkglovemusic
@thedarkglovemusic 4 жыл бұрын
OMG OMG OMG OMG LEAVE THE CASINO LEAVE THE CASINO It's OK. He fixed the second HALF_PI sneakily around 19:37
@ambarishphysics
@ambarishphysics 2 жыл бұрын
CHECK OUT MY ORIGINAL CHALLENGE ON LISSAJOUS PATTERNS HERE: kzbin.info/www/bejne/q5qpp3SKZb9osK8
@porigonopop
@porigonopop 4 жыл бұрын
It look like the sierpinski triangle pattern when you increase the number of circle, kinda fun imo
@trans_foxgirl
@trans_foxgirl 6 жыл бұрын
I first saw the Lissajous demonstration in the standupmaths video, and I wanted to see if I could do this in Python. I havent tried it out, but Ill follow along as I watch, converting to Python... ^_^
@zawmaciek
@zawmaciek 6 жыл бұрын
What do you use to render live graphics in python?
@thrownofgrace
@thrownofgrace 6 жыл бұрын
Hey, how do i show graphics. Have you tried that already, i mean in python?
@trans_foxgirl
@trans_foxgirl 6 жыл бұрын
I use Zelle's graphics.py library, with a few tweaks. That does 2D rendering. Very simple to work with. But performance is terrible the more drawn objects there are (as Python runs code sequentially) I had to generate the curves first, them render it all at once. If you want 3D graphics, there are other librarys better suited (or you can do what I did and create a framework for n-dimensional vectors and points, and over time create projections for higher dimensions)
@OonHan
@OonHan 6 жыл бұрын
well, this probably was just a Parker Square of a video
@merthyr1831
@merthyr1831 6 жыл бұрын
Could true arcade.academy. OpenGL accelerated.
@akunanonim8105
@akunanonim8105 6 жыл бұрын
As an electrical engineering student, I admit that this is awesome
@marco_gallone
@marco_gallone 5 жыл бұрын
This could be a real cool application/integration for the new Fourier videos you’re in the process of making. This code can be remixed to visualize a 3D phase map the combination of 3 separate circle rates and amplitudes. Let me know what you think!
@LoganGuerra
@LoganGuerra 2 жыл бұрын
Nice thanks
@plary
@plary 6 жыл бұрын
Nice! Great video as always, Dan!
@magenoir999
@magenoir999 5 жыл бұрын
omg around 25:40 shifman got compressed out of reality
@zperk13
@zperk13 4 жыл бұрын
more so around 25:00
@Blananas2
@Blananas2 5 жыл бұрын
The chances of the URL starting with two hyphens after the equal is 1/64^2... and you got it.
@brandonhuynh6153
@brandonhuynh6153 6 жыл бұрын
Make a Spirograph simulation! I think that’d be cool along side this as things that are fun to watch
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
i traveled back in time to make this video for you! kzbin.info/www/bejne/ZpXae2CYoK-qeqs
@albertemc2stein290
@albertemc2stein290 5 жыл бұрын
When you searched for the saved frame of the table the file name was something like "lissajous00629" although you saved it as "lissajous####.jpg" is this some command for saving it with a certain numeric code?
@dukestt
@dukestt 6 жыл бұрын
I got it...........almost, in VB. Its kinda the same that is to say it draws the paths but no circles at the top of the columns or rows. Its a work in progress i guess.
@kevnar
@kevnar 5 жыл бұрын
Coming soon, in a future episode of The Coding Train: Lissajou curves... in 3D!!!
@patrick.1943
@patrick.1943 5 жыл бұрын
Youre so smart man!
@liquidexw
@liquidexw 6 жыл бұрын
if you want really good performance, use the FX2D renderer
@pinkierar_real
@pinkierar_real 6 жыл бұрын
Люблю твои видео! Ты очень позитивный и занимаешься хорошим делом))
@juanluisclaure6485
@juanluisclaure6485 6 жыл бұрын
this is too good to be
@peterhayman
@peterhayman 6 жыл бұрын
you're a magician dan
@netanelberman6291
@netanelberman6291 3 жыл бұрын
5:43 ahh ohh uhh ehh ahh
@amirulidzham3686
@amirulidzham3686 6 жыл бұрын
Thanks for the great video. I want to know why did you choose eclipse for the dots along the circle? Why not use vertex?
@grantdelacy4537
@grantdelacy4537 6 жыл бұрын
The pattern made by these curves at 25:04 looks as if it is following the left visualisation shown here: mathworld.wolfram.com/LeastCommonMultiple.html
@rovatk373
@rovatk373 6 жыл бұрын
Cool
@leandroboog1311
@leandroboog1311 5 жыл бұрын
*dinnnng* processing, now processing is a java based programming enviroment ... I parrot along ever since my 2nd episode =>
@rlasc84
@rlasc84 6 жыл бұрын
I tried to do in one loop but still need the functions addX and addY. If I add the point only get the circles in diagonal.
@letsgocamping88
@letsgocamping88 6 жыл бұрын
I had literally the same thought when I saw Matt Parker’s video
@syxwolf373
@syxwolf373 6 жыл бұрын
Masterrrr!
@Diamonddrake
@Diamonddrake 6 жыл бұрын
The angle is offset when being used, so your angle reset is out of phase. But really cool
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Oops!
@publikumsorientiert
@publikumsorientiert 6 жыл бұрын
优秀
@fixedfuji
@fixedfuji 6 жыл бұрын
The error is only on Macs that use the graphics card. More often than not, you can ignore the error. However, I hooked up an Arduino and a gesture sensor to a Processing sketch. Input from the sensor would crash the sketch when using P2D. The program would run fine (albeit slower) without P2D. I could use arrow key presses to replace the gesture sensor input and P2D without the sketch crashing.
@luismiguelgallegogomez8000
@luismiguelgallegogomez8000 6 жыл бұрын
15:35 Hahaha :) I agree rows and columns in that order is more standard, but without a doubt, when I declare matrices that carry even a minimal of "cartesianity" meaning, I always go for X and Y order. I think code should be the more unambiguous the better. I even prefer to call the iteraring variables x and y, instead of i and j... XD
@phrebh
@phrebh 6 жыл бұрын
Finally! Rows, columns! lol
@higuy55100
@higuy55100 5 жыл бұрын
now move the circles with perlin noise instead
@BaronVonTacocat
@BaronVonTacocat 6 жыл бұрын
Very cool. *: D*
@OonHan
@OonHan 6 жыл бұрын
Goodness, a Parker Square of a video
@khushitshah979
@khushitshah979 5 жыл бұрын
I created this in java a week ago and now i am seeing this video... i dont known its name. I made it after watching a video of ted which shows pattern of 3/4
@sebastianiuga3020
@sebastianiuga3020 4 жыл бұрын
Don't know what kind of diseases your affected by but thanks the explanations.
@LifEsYouTubeChannel
@LifEsYouTubeChannel 6 жыл бұрын
"I is iterating through all columns" isn't it supposed to be "I am"? Just kidding... 😁 Nice video as always
@wheeler2137
@wheeler2137 6 жыл бұрын
Dojebales
@MarinusMakesStuff
@MarinusMakesStuff 5 жыл бұрын
At 6:40 'Can I make that look nicer?' Well: pixelDensity(displayDensity());
@lorenzm7412
@lorenzm7412 6 жыл бұрын
would like to see you try to replicate the growth of a slimemold in p5.js
@lorenzm7412
@lorenzm7412 6 жыл бұрын
If that is even possible
@Squire3555
@Squire3555 6 жыл бұрын
I need that whistle
@akgrs83
@akgrs83 6 жыл бұрын
Dan sells them at amazon.com - www.amazon.com/ideas/amzn1.account.AFRDHABWPWJEAX34FWZKCMUULDTA/FTP7TKU60DU5
@kipchickensout
@kipchickensout 5 жыл бұрын
is there a tshirt for it? I'll refactor this later? xd
@TheCodingTrain
@TheCodingTrain 5 жыл бұрын
Well, there is, hah! www.designbyhumans.com/shop/codingtrain
@ranielyfire
@ranielyfire 6 жыл бұрын
You should do a break down on some of the “Art” programs on the site called complexification .net. Its run by Jared Tarbel although he no longer posts new pieces. But his art is cool and he posts the source code!
@cashel1111
@cashel1111 6 жыл бұрын
what a site! very impressive images
@ruchisheth9430
@ruchisheth9430 4 жыл бұрын
why is the pvector current reintialized in the addPoint function?
@lennart7912
@lennart7912 4 жыл бұрын
someone know how I can give every curve a unique coloring?
@eeddeellwweeiiss
@eeddeellwweeiiss 6 жыл бұрын
Do a rubicks cube next time
@eeddeellwweeiiss
@eeddeellwweeiiss 6 жыл бұрын
Please, I am really waiting for it
@ochoatrash
@ochoatrash 6 жыл бұрын
Seria interesante ver como lo realizar ia
@theunpopularcuber9554
@theunpopularcuber9554 5 жыл бұрын
Rubik's, not rubicks.
@MinthZe
@MinthZe 5 жыл бұрын
Can you do a version of this in 3d?
@mrrandom2484
@mrrandom2484 6 жыл бұрын
The dots alone look kind of like moving water
@vierajohaninecova3998
@vierajohaninecova3998 6 жыл бұрын
Matt Parker fanclub
@sujals7108
@sujals7108 6 жыл бұрын
The code runs fast i the start but when one of the shapes finishes and starts overlapping, the code becomes very slow. is there any way to fix this?
@renealgera
@renealgera 5 жыл бұрын
This is because the program keeps adding points to the path. Even if the Lisa-figure is complete. I added a check if the last point added (self.current) is equal to curves[row].col].path[0] (the first point in the path). If so, then the path is closed and the Lisa-figure complete. So you don't have to add more points. However, some Lisa-figures are now only drawn in half: because the path crosses the first point. Haven't a solution for that just now...
@sujals7108
@sujals7108 5 жыл бұрын
@@renealgera I already fixed the part where it keeps on adding points. So when all the curves are completed, it becomes fast. But It becomes slow even before all the figures are completed, even if one is completed,
@biogpy5509
@biogpy5509 3 жыл бұрын
Can i get algorithm plz sir?
@ricardo.mazeto
@ricardo.mazeto 6 жыл бұрын
27:30, find the pretzel.
@sindrebergevikene120
@sindrebergevikene120 6 жыл бұрын
(10,12)?
@ReverendFlatus
@ReverendFlatus 6 жыл бұрын
It looks like there is a phase difference between the columns and rows.
@voxeledphoton
@voxeledphoton 5 жыл бұрын
27:37
@voxeledphoton
@voxeledphoton 5 жыл бұрын
10:16
@voxeledphoton
@voxeledphoton 5 жыл бұрын
11:25
@voxeledphoton
@voxeledphoton 5 жыл бұрын
11:44
@voxeledphoton
@voxeledphoton 5 жыл бұрын
25:01
@Otakutaru
@Otakutaru 6 жыл бұрын
sin waves under an oscilloscope XY anyone?
@davidjeremy6790
@davidjeremy6790 6 жыл бұрын
Hey Dan. Nice video!! For a future coding challenge it would be awesome if you can try to implement a griddlers solver. It would be really cool I think. For some info and ideas of what this is: www.griddlers.net/es/home
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
Please suggest here! github.com/CodingTrain/Rainbow-Topics/issues
@davidjeremy6790
@davidjeremy6790 6 жыл бұрын
Done!
@Asu-i5i
@Asu-i5i 6 жыл бұрын
Please teach python please
@ara7546
@ara7546 6 жыл бұрын
Hey can you build cryptography ? using an algorithm like Lattice-based? it is post-quantum proof algo,here is wiki page en.wikipedia.org/wiki/Lattice-based_cryptography
@offtheball87
@offtheball87 6 жыл бұрын
Are you on Mastodon, can I follow you??
@TheCodingTrain
@TheCodingTrain 6 жыл бұрын
choochoo.space/@shiffman
@lutzweb
@lutzweb 5 жыл бұрын
As a computer science, I am sorry to say that is very cool but very poor implemented. in the table there are repeating patterns, would have been much more interesting plotting non multiple frequency and get more patterns or not to redraw multiple, and even , to fasten the process, to detect the completed picture and stop (just detect both circles have completed the loop) :-) By the way, I understand the coding exercise, but again, as computer enthusiast we should not forget the basic: this is the classica exercize for NON digital computer, can be done with 0 lines of codes, just running an xy oscilloscope and 2 function generators, and I am sure.... it will even run faster :-)
@CaelVK
@CaelVK 6 жыл бұрын
please make a video about kotlin
@FINFilmersyay
@FINFilmersyay 6 жыл бұрын
First
@FINFilmersyay
@FINFilmersyay 6 жыл бұрын
nobody cares
Coding Challenge #116 Continued: Lissajous Curve Table in p5.js
8:06
The Coding Train
Рет қаралды 29 М.
Coding Challenge 185: Unfolding Fractals
31:04
The Coding Train
Рет қаралды 37 М.
Coding Challenge #71: Minesweeper
53:46
The Coding Train
Рет қаралды 528 М.
Making a physical Lissajous curve
12:24
Stand-up Maths
Рет қаралды 235 М.
How do non-euclidean games work? | Bitwise
14:19
DigiDigger
Рет қаралды 2,4 МЛН
Oh, wait, actually the best Wordle opener is not “crane”…
10:53
Coding Challenge #24: Perlin Noise Flow Field
33:34
The Coding Train
Рет қаралды 361 М.
The BEST Way to Find a Random Point in a Circle | #SoME1 #3b1b
18:35
Dear Game Developers, Stop Messing This Up!
22:19
Jonas Tyroller
Рет қаралды 713 М.
Recreating Vintage Computer Art with Processing
16:44
Alexander Miller
Рет қаралды 349 М.
Every Programming Language Ever Explained in 15 Minutes
15:29
Flash Bytes
Рет қаралды 327 М.
Coding Challenge #90: Floyd-Steinberg Dithering
28:51
The Coding Train
Рет қаралды 437 М.