1,866 karma · joined Sep 13, 2011 (15y ago) · 177 submissions
3d lisp art playground: https://bauble.studio
book i wrote: https://janet.guide
2d lisp art playground: https://toodle.studio
comment 2mo ago · link · parent
That said! There are people making DIY isomorphic keyboards using hall-effect keyboard switches. None are commercially available right now, but see e.g. the MidiHex at https://gullsonix.co.uk/. You could make one for a fraction of the cost of a lumatone -- but of course it would be a very different instrument.
comment 3mo ago · link · parent
It’s a little datalog script - input is a text file, output is a text file. I’ve used it a few times to decide what to pick up at the store!
comment 5mo ago · link · parent
This is a very very barebones version of this, but it’s not too hard to construct environment tables dynamically
comment 5mo ago · link · parent
comment 5mo ago · link · parent
comment 1y ago · link · parent
It’s pretty great and hard to imagine going back to a React-like component hierarchy.
comment 1y ago · link · parent
It's easy to add it as a plain overlay over the screen if you're graphing a function, but I really want it to be able to plot arbitrary expressions with free variables where it just infers the axes, so you can just see values overload in the orthographic view (press alt-q to see that). That way you can just write something like (ss p.x 0 10 | graph) on any expression and visualize it as you go. I haven't quite figured out how to make it seamless though...
comment 1y ago · link · parent
(def octaves 4)
(def lacunarity 2.00)
(def persistence 0.50)
(def period 100)
(def height 40)
(plane y (fbm octaves :f lacunarity :gain persistence perlin p.xz period * height)
# try s/color/shade on the line below
| color (ss p.y -20 0 blue (ss p.y 0 20 green white))
| slow (20 / height)
| intersect (sphere 200))
(Using the terms from the article.) You can right-click and drag those numbers to see how the parameters affect the result in realtime. Also an easy way to compare perlin and simplex noise. Procedural terrain is fun!Also while this uses 2D perlin noise -- you're just changing the height of a plane -- you can create some pretty detailed neat "rocky" terrain effects by using 3D perlin noise instead. Change "p.xz" to "p.xyz" to see what that looks like.
comment 1y ago · link · parent
comment 1y ago · link · parent
13.
Building Bauble(ianthehenry.com ↗)
205 points · by ianthehenry · 1y ago · 26 comments
comment 1y ago · link · parent
comment 1y ago · link · parent
comment 2y ago · link · parent
(color r2 (vec3
(fbm 8 :f (fn [q] (rotate (q * 2) (pi * sin (t / 100)) + [t 0]))
(fn [q] (cos q.x + sin q.y /)) q (osc t 30 30 10) | remap+)))
Basically taking the function (1 / (cos(x) + sin(y))) and adding it to itself 8 times, each time scaling and rotating the input a little more (:f).I'm curious if it looks the same on all GPUs because it kinda relies on floating point precision errors to give it that film-grainy textured effect. And it definitely divides by zero sometimes.
comment 2y ago · link · parent
comment 2y ago · link · parent
SDFs are very cool in general, and widely used in the generative art communities, but kinda hard to wrangle when you're writing shader code directly. They really are functions, but GLSL doesn't support first-class functions, so if you want to compose shapes you have to manually plumb a bunch of arguments around. So Bauble is essentially a high-level GLSL compiler that lets you model SDFs as first-class values, and as a result you can make a pretty cool 3D shape in just a few lines of code. And then 3D print them!
I need to do some actual work to promote and publicize it once I'm done with the documentation and implement a few more primitives, but it's very close!
The docs have lots of examples of the sorts of things you can do with SDFs: https://bauble.studio/help/
And for examples of some "art" that I've made with it recently:
https://x.com/ianthehenry/status/1839061056301445451 https://x.com/ianthehenry/status/1839649510597013592 https://x.com/ianthehenry/status/1827461714524434883
comment 2y ago · link · parent
comment 2y ago · link · parent
So lately I've been working on a "v2" that exposes a full superset of GLSL, so you can write arbitrary shaders -- even foregoing SDFs altogether -- in a high-level lisp language. The core "default" raymarcher is still there, but you can choose to ignore it and implement, say, volumetric rendering, while still using the provided SDF combinators if you want.
The new implementation is much more general and flexible, and it now supports things like 2D extrusions, mesh export for 3D printing, user-defined procedural noise functions... anything you can do in Shadertoy, you can now do in Bauble. One upcoming feature that I'm very excited about is custom uniforms and embedding in other webpages -- so you can write a blog post with interactive 3D visualizations, for example.
(Also as a fun coincidence: my first cast bronze Bauble arrived today! https://x.com/ianthehenry/status/1827461714524434883)
comment 2y ago · link · parent
comment 2y ago · link · parent
comment 2y ago · link · parent
I wrote a book whose third chapter is a much "gentler" introduction to macros. I don't know if it's actually intelligible (see: the monad tutorial fallacy) but it presents them the way that I was first able to understand them -- explicitly starting without quasiquote and working up to it. Easier for me than getting lost in the notation. https://janet.guide/macros-and-metaprogramming/