FD 100(susam.in)
susam.in
FD 100
https://susam.in/blog/fd-100.html
6 comments
This takes me back to https://mitpress.mit.edu/books/turtle-geometry, a great book by Harold Abelson and Andrea DiSessa. It uses turtle geometry to explore college-level maths concepts and biological phenomena such as predator-prey relationships.
This was a great blast from the past. A few friends of mine and I would write down instructions to draw crude pictures in Logo; the usual sorts of things you'd expect from kids (and one step away from calculator tricks that would result in 8,008,135).
I'm sure lots of other kids did the same thing; kind of a fun way to sneak into writing programs - a low barrier to entry, and immediate results you could tinker with.
Is there something popular like this today?
I'm sure lots of other kids did the same thing; kind of a fun way to sneak into writing programs - a low barrier to entry, and immediate results you could tinker with.
Is there something popular like this today?
A lot of kids (middle and high schoolers) these days have pet projects like making html based website and writing a discord bot in javascript. The fact that our district hands out chromebooks probably contributes to the trend.
Lovely post, though it's weird to end in saying that this "gave me a brief taste of functional programming"
Turtle drawing is arguably the most non-functional, stateful programming paradigm ever invented.
Turtle drawing is arguably the most non-functional, stateful programming paradigm ever invented.
Logo is more than the turtle -- Brian Harvey wrote a whole series of textbooks for Logo that really stressed the functional aspect of the language
http://people.eecs.berkeley.edu/~bh/v1-toc2.html
http://people.eecs.berkeley.edu/~bh/v1-toc2.html
Well, they say that Logo gave them a taste of functional programming, which is a broader statement than turtle drawing (which, to be fair, is the bulk of the prior discussion). Logo was strongly influenced by Lisp and, consequently, is a multi-paradigm language including functional as one of its paradigms.
You can think of it that way, but you can also think of a Logo program as a purely functional computation that follows the monad laws. Here's a Haskell package that implements it: https://github.com/aneilmac/worldturtle-haskell#readme
As someone who hasn't done graphics programming(or anything like this), it's amazing to me how 'simple' directives can yield such things. Is this type of logic still used in games/graphic programming today?
It can, and it does, sort of! There's a bit more boilerplate in most environments designed for shipping things, but one of the more high power/terseness activities is writing a shader that can render signed distance fields.
https://www.iquilezles.org/www/articles/distfunctions/distfu... compose a few of these together and you can manifest some pretty nuts infinity fractals.
Here's a video I made playing with the functions Inigo's provided. https://twitter.com/LeapJosh/status/1439876813258256385
https://www.iquilezles.org/www/articles/distfunctions/distfu... compose a few of these together and you can manifest some pretty nuts infinity fractals.
Here's a video I made playing with the functions Inigo's provided. https://twitter.com/LeapJosh/status/1439876813258256385
Thanks - that's really interesting stuff. Not immediately obvious to me what it would be used for, but mesmerizing nonetheless.
Visual effects in games and movies is a direct usage.
If I wanted to have a brick wall I could progressively melt with a large laser, I'd render it with an SDF. SDFs are good for anything with volume, as mesh based rendering is intrinsically 'hollow'.
It's not the only solution for things like that, there's also voxel and particle based rendering, as well as reasonable hybrids. It's just another tool in the toolbox.
If I wanted to have a brick wall I could progressively melt with a large laser, I'd render it with an SDF. SDFs are good for anything with volume, as mesh based rendering is intrinsically 'hollow'.
It's not the only solution for things like that, there's also voxel and particle based rendering, as well as reasonable hybrids. It's just another tool in the toolbox.
Sort of related to games/graphics programming - There's an open source CAD program called OpenSCAD that allows you to create 3D models with code that can be simple, but gets complex fast. I personally tried using it to create models for 3D printing, but got overwhelmed and decided to go to other tools.
https://openscad.org/
https://openscad.org/
https://news.ycombinator.com/item?id=28461915 - Discussion from about 2 weeks back, 13 comments.
fd 100? fd 0, 1 and 2 make sense. Perhaps 255. But not 100...?!
Looks like 100 pixels?