8 ms·
Ao is a tool for programmatic computer-aided design using Scheme
- brudgers 10y agoGithub repository: https://github.com/mkeeter/ao https://github.com/mkeeter/ao
- tempodox 10y agoI was just about to ask where the download button is :)
- fsloth 10y agoThe references section in the github repository is short but very good: https://github.com/mkeeter/ao/blob/master/doc/references.md https://github.com/mkeeter/ao/blob/master/doc/references.md
- j-pb 10y agoFinally something that looks like it could replace the horribleness that is openscad.
- qwertyuiop924 10y agoWhat's so bad about openscad? I haven't really worked with it, so I'm kind of curious.
- hobo_mark 10y agoAs far as I remember, the language was severely limited, and it's yet-another-syntax to learn for no discernible benefit.
- qwertyuiop924 10y agoAh. Yeah, I can identify. This is exactly the reason I prefer Guix to Nix.
- deleted 10y ago[deleted]
- farrellm23 10y agoShameless self promotion, but you might be interested in scad-clj [0]: a DSL to write OpenSCAD with Clojure. You can get a decent interactive environment combining an editor with an OpenSCAD window set to only show the render [1]. [0] https://github.com/farrellm/scad-clj https://github.com/farrellm/scad-clj [1] https://adereth.github.io/blog/2014/04/09/3d-printing-with-clojure/ https://adereth.github.io/blog/2014/04/09/3d-printing-with-c...
- dbcurtis 10y agoYou might also check out ImplicitCAD. Haskell-based. http://www.implicitcad.org/faq http://www.implicitcad.org/faq
- ruste 10y agoThis is really cool! Next time I need CAD software I know where to look. Maybe I'll actually buy a 3d printer and start playing around now that there's a good modeling software option.
- mkeeter 10y agoAo's author here – I'd be glad to answer questions.
- laveur 10y agoHaving looked through some of your other projects there is some really amazing work you have done. I was wondering the graph node code you wrote. What does it use for library to render them to the screen?
- mkeeter 10y agoI assume you're talking about Antimony. Its graph UI is done in Qt, using the QGraphicsView framework. That section of the code is at https://github.com/mkeeter/antimony/tree/develop/app/canvas https://github.com/mkeeter/antimony/tree/develop/app/canvas
- qwertyuiop924 10y agoWhat separates this from Antimony? Would you use one over the other in certain contexts? Why?
- mkeeter 10y agoAntimony [1] is stable and user-friendly. You can get started without knowing about the underpinnings, just by connecting predefined shape nodes into a graph – basic modeling is possible with just the mouse, as shapes can define handles in the UI. Using Python for scripts is also a bit more accessible than Scheme. The downside is that hacking raw shapes is less pleasant, because they're defined as strings implementing a DSL. Developing on Antimony is also slower – much of the code is UI and glue to attach the geometry + graph engines. Ao is more experimental and unstable. It's much lower-impedance for folks that want to work directly with f-reps, but doesn't have a click-and-drag UI with which to get started. The geometry kernel is also newer than Antimony's, and has slightly better performance. From a development perspective, I can play more easily with new algorithms without a cumbersome UI. For folks that aren't as comfortable with coding, Antimony is the right choice. For f-rep development, Ao is the right choice. Otherwise, it's a matter of personal preference. [1] https://github.com/mkeeter/antimony https://github.com/mkeeter/antimony
- qwertyuiop924 10y agoThis is a CAD tool truly worthy of the association with scheme. And I'm not just saying that: It provides minimal primitives for maximum power and flexibility. That's scheme in a nutshell. It's also, not by coincedence, really, really cool.
- davexunit 10y agoAdd in a REPL server so that I can make cool designs from Emacs and I'm sold. I'm a big Guile fan so this is a very exciting project for me.
- blanka-herono 10y agoThis was on guile-user and no one seemed interested. http://lists.gnu.org/archive/html/guile-user/2016-06/msg00040.html http://lists.gnu.org/archive/html/guile-user/2016-06/msg0004...
- amirouche 10y agoDoes Ao compute a mesh from scheme instructionz? or it is a trick? Basically can you dump the code that generates the things in a format that is efficient for a real time application? Oh! And thanks for using GNU Guile Scheme :)
- mkeeter 10y agoThe Scheme functions go through a JIT-ish pass into a representation that's efficient for rendering. Details are at http://www.mattkeeter.com/projects/ao/jit.html http://www.mattkeeter.com/projects/ao/jit.html Rendering is done with pixel-perfect rasterization of the function. Models are only gets converted into a mesh when you're exporting. This may change in the future, as it's much easier to spin around a mesh – the right strategy is probably a low-res mesh for interactivity, which gets replaced with a pixel-perfect rendering (running in the background until complete).
- davexunit 10y agoI wonder if using a generic procedure would work better than redefining + outright. If you opened up Ao and typed (+ 1 1) at the REPL, would you see 2 as the result or a token object?
- mkeeter 10y agoThe redefined + only behaves differently when one or more of its arguments is a token object, so normal math works fine. Generic procedures may be a cleaner way to do this, but I only discovered GOOPS after this implementation was already working.
- davexunit 10y ago>The redefined + only behaves differently when one or more of its arguments is a token object, so normal math works fine. Ah yes, I'm just blind and missed the implementation in your article. Thanks for explaining!
- 10y ago
- amirouche 10y agoAre you using a quadtree-like algorithm or filling curve? to create the mesh or you can compute edges from the math tree of operations? or it some of both? Otherwise said how does it approximate the final 3D.
- mcguire 10y agoApropos of nothing, whenever I see blue and red fonts close together, as in the first image or my recent Spacemacs configuration, my brain tries to interpret it as a 3-D image. It's been years since I've seen a blue/red 3-D image, but the effect is still there. Is it just me?
- blanka-herono 10y agoNobody ever listens to me: https://news.ycombinator.com/item?id=12033059 https://news.ycombinator.com/item?id=12033059 I don't get it, has he given up on Guile or not: http://lists.gnu.org/archive/html/guile-user/2016-06/msg00022.html http://lists.gnu.org/archive/html/guile-user/2016-06/msg0002... http://lists.gnu.org/archive/html/guile-user/2016-06/msg00027.html http://lists.gnu.org/archive/html/guile-user/2016-06/msg0002...
- mkeeter 10y agoI got Ao to a working state a few months before that exchange on the guile-users mailing list. Guile works fine for Ao – it's clean and simple, plays nice with C FFI, and has a good REPL. Racket was lower-impedance for the project discussed in that thread (and certainly has better documentation), but seems a bit heavy-weight for embedded use.
- qwertyuiop924 10y agoRacket always seemed a bit heavyweight to me in general. I'm more of a CHICKEN fan myself, though. You clearly are on the other side of that particular fight (r6rs vs. r4/5/7rs) though. Which is fine.
- gravypod 10y agoIf you are interested in this kind of thing you might want to check out OpenSCAD [0]. It's a similar idea: scripting behind cad. [0] - http://www.openscad.org/ http://www.openscad.org/