Hacker News new | past | comments | ask | show | jobs | submit login
Coding Curves (bit-101.com)
267 points by atan2 on Nov 25, 2022 | hide | past | favorite | 33 comments



Series author here. To respond to some of the comments...

Making it interactive with a repl would be great, I agree. I've thought about going down that route a few times in the past, but it's then something new to maintain forever. Text and pseudocode will last a long time without touching it.

Thanks for the contents on the Youtube channel. The reason I stopped was because it takes a lot of effort to make those things. And I never was able to successfully monetize them. I've made videos on some other platforms and made good money from them. I just don't have the time to sink into that now for nothing in return.

As for needing a better sales pitch, etc. heh, yeah. This is just a labor of love. It'll go up there and stay up there for many years hopefully. If people find it and get something out of it, I'm happy. I don't expect to make a cent out of it. I'm just passionate about writing and teaching. And I find I learn a lot more when I try to teach.


Thanks for the reply re the yt channel, that's a shame as I'm sure you could package some of the content esp the physics ones into a course, I'd definitely buy that. There is a market for intermediate level training material that I've seen executed here and there, some examples are https://www.youtube.com/@DmitrySoshnikov-education/videos, release some free content from a course, hoping https://www.youtube.com/c/LowLevelJavaScript/videos does something similar in the future. Cheers and all the best!


Nice to see your article on here Keith... Maybe there is a way to get the old experiment a day back in order ? That is a gem worthwhile to share today too


I wanted to thank you for all the stuff and knowledge you’ve shared all these years. Great content.


What other platforms do you sell your videos? I'm a huge fan of your coding math series, also playing with chaos book. Thanks for the great work, I've learned a lot from you.


You are aware of processing.org?

This is more or less what you propose. I used it to teach programming more than once.


A similar, and fantastic resource is the book Morphing Architecture [1].

A while back I made an interactive REPL for the book, building out it's DSL, where you can play with the different examples interactively [2]. From what I can tell, a lot of the examples overlap.

[1] https://www.archdaily.com/612210/morphing-mathematical-trans...

[2] https://morphing-architecture.onrender.com/


very nice. just purchased!


I'm pleasantly surprised that is actually about programming geometric curves. This was my entry into coding as kid.

What would be cool is to present two different ways to plot the curves: The 'analytic' (or parametric way) and then also shader style where you basically decide for every pixel independently if you draw it or not.


I think of these two methods as “inside out” vs. “outside in”, which is not very scientific but lets me visualize the distinction: mapping the model to pixels vs. mapping the pixels to the model.


Nice blog! It would be awesome if the author could make the site more interactive, for example let the viewer play with parameters using sliders, while providing live rendering. That would be more fun and at the same time give more insight into the algebra behind it. It doesn't need to be super fancy, take a look at this page: https://www.earlevel.com/main/2021/09/02/biquad-calculator-v...


I wish he would go back to his fantastic youtube channel. I wonder if he ever said why he stopped posting. I also downloaded the entire thing in case it disappeared one day, some really good stuff there... https://www.youtube.com/@codingmath/videos


I still have one of his books on the shelf "Foundation ActionScript Animation: Making Things Move!". Lots of great explainations on the math behind animation and its easy to ignore the Flash specific stuff.

https://www.amazon.com.au/Foundation-ActionScript-Animation-...

Another good book (if that's still anyone's thing) on tweening is the freely available part Dynamic Visuals of Robert Penner's book Programming Macromedia Flash:

http://robertpenner.com/easing/penner_chapter7_tweening.pdf

http://robertpenner.com/easing/


I messed around a bit with this sort of thing: https://www.youtube.com/watch?v=pe4UAmb2wJw


Very nice! I wish there were more explanation in the comment of the video. Thank you for sharing.


I recursively generated a Hilbert curve, stuck four together for a Moore curve, then did a FFT (to generate the function pair θ -> {x, y}).

Then I drew it using a filthy decompilation of some (java) image editing crap that I knocked up in uni.

I spat all of the images out to a directory (saving buffered images as PNG files) and glued them together with ffmpeg.

I'm not 100% happy with the Moore Curve, since I think that under the circumstances rotational symmetry would be more useful.

I'm also not happy with the fourier transform; I think that for something like this there should be an adequate expression for n points using log(n)/log(2) terms, but the transform that I used includes one term in the output for each in the input.

There might be a degree of something similar to "overfitting" in the result.


Any thoughts on the least intrusive yet modern simple graphics library for Python? I've been wanting to play with some of these things but never quite find the time/motivation to deal with the "getting started" overhead.


I was about to propose https://www.pygame.org/wiki/GettingStarted but then I saw that meanwhile there is https://docs.python.org/3/library/turtle.html


Yes, the turtle graphics module has been in the Python standard library for some time.

Here are a couple of small programs using it, that I wrote a while ago:

Simple drawing program with Python turtle graphics:

https://jugad2.blogspot.com/2016/01/simple-drawing-program-w...

Square spiral - drawing with 3D effect (turtle graphics):

https://jugad2.blogspot.com/2016/08/square-spiral-drawing-wi...


I've also had very good luck with cairographics bindings in multiple languages. For python there is pycairo. But it does require installing the native cairographics libs on your system. That might be a deal breaker for you. Not sure.


as mentioned, pygame seems a common goto lib. Though it does a lot more than just graphics and animation, it does seem to be good with those too.


Already an error on first page. moveTo and Line to should have i * 10, not count * 10.


Thanks. Will fix.


A live, interactive REPL for coding these would take a weekend to implement and add orders of magnitude to the accessibility and UX of this resource.


These are available, observable cones to mind. Why would you build a new repl?


These look like processingjs, which has various live editors: https://editor.p5js.org/



The author wasn’t kidding. This is literally about coding curves. I guess a simple x^2 and the derivative of Sum isn’t enough in this day and age of programming.


Intro page needs to be more of a sales page. "This series is your introduction to the simple equations that can produce images like <image>, <complicated Lissajou image>, <beautiful image>, and more!" Not "Let me start by regretting that I didn't care enough to make this a book, and then show how to draw a straight line." I only clicked another chapter heading because of the HN endorsement.


Lissajous curves have some interesting mathematical properties [1] as well some practical applications in the physical world (as many other mathematical concepts do). I just looked at the Wikipedia article about them again, after some time, and found it cool.

https://en.m.wikipedia.org/wiki/Lissajous_curve

I had done a good amount of elementary 2D graphics programming earlier, on various models of computers and in a few different programming languages, as a hobby, not for work. As part of that tinkering, while plotting various combinations of trigonometric expressions, one of my programs generated what looked like a Lissajous figure, which I recognized from high school math. Fun.

[1] The article says that circles, ellipses, parabolas and lines are special cases of Lissajous figures, based on the values of the parameters in the equations.

Oscilloscopes can be made to generate Lissajous figures based on the inputs you give them.


Cool site, but I almost missed the content. I’m on mobile and just scrolling for pictures I blew past the index and saw

> Wait for it! > Look for the first installment soon!

You might want change that into a big “next article” button or something :)


That looks like a cool book!

I wish you well.

The consumer demographic may be a bit on the sparse side, so don't buy your yacht, just yet...


At least the OP is honest about his motivation and humble about his ignorance. I guess this is the result of an educational system that hands out participation awards instead of encouraging diligent work. Pointing out the truth is a surefire way to downvotes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: