I wrote a post two months ago about how I had begun converting my Wolfram Demonstration into JavaScript. Its done, and now with a much better UI:
Monday, April 18, 2022
Finally Finished One Vertex Folding in JS
Sunday, February 20, 2022
Converting One Vertex Folding into JS
I was revisiting my earlier One-Vertex Origami Folding project. The project was originally written in Mathematica and presented on the Wolfram Demonstrations project. Previously I began porting some of its functionality into 3D, which I documented on this blog!.
I've recently been working on updating this project - converting it into Javascript so that it can one day run easily online without requiring someone to download Mathematica or the Wolfram CDF player. Hopefully I'll finish implementing 3D functionality at some point soon (probably with WebGL) and it will be able to do 3D simulation online!
This time around I'm also trying to make the implementation more extensible so that the core infrastructure can be used in a much larger project like recreating Oripa.
The github repo of this project is public in case anybody wants to poke around or take a look: https://github.com/anugrahchemparathy/OrigamiToyProjects.
In the meantime here's a video of the basic functionality for computing the flat folding edge. I know the UI is very simple, but those are cosmetic improvements that can be finished later.
I'll try to update this blog with developments under the "Programming" label.
Thursday, December 20, 2018
Some 3D folding
Most of the changes are cosmetic. I quickly familiarized myself with the rotation transform functions and got to work. This time around I was too unfamiliar/intimidated with the huge matrices so I just shelved it for at least a month or two. But it did inspire to start looking at some Linear Algebra material so hopefully a more direct implementation of rotation matrices can come soon?
Anyways to familiarize myself with the 3D graphics tools I glanced through the documentation and found some useful code to pick up.
First off was a quick test with creating polygons in 3space.
Then I moved on to rotating around an arbitrary vector v (In this case <1,0,0>, the x axis)
An hour or so of messing around, and I finally got the hang of the 3D folding:
Now, when I turned to revising my original code for 3D I actually noticed several things:
Firstly, my original code was super messy and disorganized and poorly documented (oops)
I was trying to bring over some of my old functions to 3D but I was having trouble figuring out what functions did what exactly. I think a good Saturday afternoon exercise would be to cleanly rewrite the entire original program from scratch.
I was writing most of this during my TA period in school (finals week doesn't really leave much help/work for us to do around here :o) so I didn't really feel like updating most of the code or fixing it. I really only changed two functions by adding a z component and super lazily but quickly fixed the others on the fly.
With an arbitrary point I had chosen I just directly implemented the last bit of the rotation matrices (some quick coordinate geometry resolved the question of what vector to rotate around etc.)
I was having some trouble constructing the top polygon for now as the shape folds so I've left it out for now. (My struggle is to do with the way Mathematica stores points versus ordered pairs in their 3D graphics directives)
The actual code for the finished graphic isn't published yet. I probably want to clean it up a bit but that should come soon.
Here are some pictures of my graphic so far for an arbitrary Kawasaki obeying point (the top polygon is missing, see above)
It's still missing the top polygon but you can see the resemblance to some a 2d relative of a similar figure (the opacities are not accurate in 2d, the 3d is correct, because the polygon ordering wasn't considered when the demonstration was originally made, another problem I really should resolve when I find time).
As from my Wolfram Demonstration
http://demonstrations.wolfram.com/OneVertexOrigamiFolding/
Have a nice day
Spring 2024
I haven't updated this blog in so long. I guess I'm graduating from college soon which I have a lot of feelings about. Hopefully I ...
-
In 1997, Kamiya designed God dragon Bahamut, known more commonly as Bahamut BL on origami forum for some reason (presumably because it is me...
-
Over the past two years I've become more and more busy, and my new schedule makes it more difficult for me to make polished and practice...
-
I wrote a post two months ago about how I had begun converting my Wolfram Demonstration into JavaScript. Its done, and now with a much bett...









