bauble.studio
toodle.studio
bauble.studio | toodle.studio | |
---|---|---|
7 | 1 | |
341 | 61 | |
- | - | |
5.1 | 4.4 | |
5 months ago | 9 months ago | |
Janet | TypeScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
bauble.studio
-
Domain Repetition
If you aren't familiar with SDFs, some rough intuition for what's going on here: you have some primitive functions that define shapes, you have combinators that distort shapes, and you then have combinators that distort space. And then when you trace rays through distorted space, you render an image that looks like your combinators distorted the shapes themselves, but really you're distorting the path that your rays travel along.
The operation here is that you distort space with the modulo operator. So now you have space that repeats -- and when you trace rays through this repeated space, you're basically teleporting the rays back to the origin (using mod in the classic "wrapping around" fashion) every time they pass out of a section of space.
And then ultimately the ray will collide with the shape -- the one shape -- that exists in this distorted space, after wrapping around some number of times.
If the idea of "taking the mod of space" is intriguing, I would encourage you to try playing with SDFs! It's a really incredible technique for real-time rendering of "3D vector graphics."
Also shameless plug for my SDF playground https://bauble.studio, and an example program that uses instanced repetition to render an "infinite" number of varying shapes:
(tile [400 0 300] (fn [i]
-
Why Janet?
Depending on what you're doing, Janet might be a great fit! I wrote a DSL for [expressing and shading 3D shapes](https://bauble.studio), and it was pretty easy. Depending on exactly what you're trying to do, the ease of embedding the Janet interpreter inside of other programs might be a big point in its favor.
- Signed distance functions in 46 lines of Python
-
Is there a name for this? -- Intermediate Representation with Graphics Primitives
For other inspiration check out Pyret in DCIC and the term Constructive Solid Geometry like Bauble
- Bauble: an interactive tutorial that will teach you everything you need to know to make art with lisp and math
- Bauble: A playground for making art with Lisp and math
toodle.studio
-
Show HN: Toodle.Studio is an art playground with Lisp and turtles
I don't think that's ignorance :)
Embedding Janet in the browser is hard! My real motivation for making this website was to have a simple example to point to of how to do it. Short answer: Emscripten + WebAssembly. Long answer: https://github.com/ianthehenry/toodle.studio
Specifically I think these are the interesting bits:
https://github.com/ianthehenry/toodle.studio/blob/master/bui...
What are some alternatives?
3d-game-shaders-for-beginners - 🎮 A step-by-step guide to implementing SSAO, depth of field, lighting, normal mapping, and more for your 3D game.
wasm4 - Build retro games using WebAssembly for a fantasy console.
sdf-viewer - A fast and cross-platform Signed Distance Function (SDF) viewer, easily integrated with your SDF library.
jupyterlite - Wasm powered Jupyter running in the browser 💡
janetroids - This was a paint program and then became asteroids
simplex-noise.js - A fast simplex noise implementation in Javascript / Typescript.
sdf - Simple SDF mesh generation in Python
glyph.janet - Personal Data Manager for the command line
conjure - Interactive evaluation for Neovim (Clojure, Fennel, Janet, Racket, Hy, MIT Scheme, Guile, Python and more!)
bencode - A Janet library for the Bencode format