Adrian Herbez Rotating Header Image

Posts under ‘Uncategorized’

Web-based CAD for cams

Impatient? See the tool for yourself here

This past weekend, I went to an estate sale and snagged a two-volume set of “Ingenious Mechanism for Designers and Inventors” from 1936 for a whopping $4 (I was happy, to say the least).

I was flipping through it and was struck by an illustration of a cylindrical cam with a sinusoidal groove for making two slides move in opposite directions at the same time. It’s not particularly complicated, but struck me as something that would be kinda hard to do in CAD.

While I’m sure that there’s a way to achieve that in FreeCAD, I thought it would be fun to whip together a web-based tool to generate such models in a parametric way, so I did just that:

Instead of generating the full cam, I focused on just making the hard part- the sinusoidal groove. I thought that in any actual application, it was probably make sense to make the base shape of the cam in FreeCAD (or similar), including any additional (and possibly complex) features, then add a boolean operation to cut out the groove.

This ended up being pretty easy, especially since I had the simple web-based CAD starter project I created for the talk I gave at last year’s Roguelike Celebration.

The tool lets you specify the outer radius, the depth of the groove, the number of crests and their height, and an amount of taper. Once that’s all set up to your liking, click the button to get an STL.

Bringing that into OpenSCAD and subtracting it from a cylinder gives something like the following:

And then printing it out gives you something like…

It’s a simple test, and hasn’t been proven out via inclusion in an actual mechanism yet, but results are promising so far. Not bad for a couple hours of javascript.

If you want to play with it yourself, head here: https://zanzastoys.com/camcad/. I’ll be releasing a video on how I made it soon on my YouTube channel– if that sounds like something you’d be into, please consider subscribing.

Uncategorized , , , ,

Veve v0.1

I recently found myself wanting to be able to code up some animations and maybe some graphs for my youtube channel (Zanzas Toys), but wasn’t able to find a good tool for creating 2d animations with code and outputting video. So, I decided to make one, and Veve was born.

I really like using the canvas API for drawing 2d content, and I’m really comfortable with it, so I made an Electron app that allows the user to write code (in the left half) that is then used to draw content into a canvas (on the right). For the text editor, I used Monaco, which worked out really well.

The user can set the dimensions of the canvas, the duration, and the FPS, control the playback with buttons underneath the canvas, and export the result as a single image, an image sequence, or a video.

It also saves the user code and document settings to a custom file format (basically just json) named “.loa”.

Here’s a short video of what it looks like to code up a simple animation using it:

I’ll eventually open-source it, but it needs a little more work before it’s ready for that.

Uncategorized , , ,

Virtual Books (first pass)

Lately, I’ve been working on a system to display virtual books in a browser as fully 3d objects using Three.js. While there are still lots of things I want to add, it’s finally at the point where I feel like it’s worth sharing.

book_exterior
The system loads data from archive.org and uses it to create a 3d model of a book. The book can be opened, and pages can be flipped, allowing the user to read the entire contents. The current iteration is hard-coded to load just one book (The Wizard of Oz), but I’ll be expanding it to pull from the rest of the Internet Archive’s extensive collection.

To see it for yourself, head here. Controls:
  • space: start/stop rotation
  • up/down: open/close the book
  • left/right: flip the pages

All of the geometry is procedural, allowing for books of any size and proportion. The texture used for the cover is also procedural, allowing for any color of book, and for proper rendering of title and author along the spine.

book_open

projects, Uncategorized , , ,

Viewing STLs in Unreal

stlUnrealI recently made a small demo that reads an STL file from the always awesome thingiverse and creates a model in Unreal. Note that it reads the file directly from Thingiverse, not from the local drive.

At present, it’s only working with simple models- more R&D will be required to get it working with more complex models.

The model in the screenshot is the awesome “Low Poly Fox” by Thingiverse user slavikk.

Uncategorized , ,

Puzzle Keepers of Palau #1

My nephew recently turned 5, and as it’s his first “big” birthday, I wanted to do something special for him. So, I created a secret society dedicated to ferreting out hidden knowledge, and invited him to join.

My longtime friend and business partner, Blair Erickson was kind enough to help me with the creative, and suggested that the society be set in the Pacific Ocean. And so, the “Puzzle Keepers of Palau” was born.
Read more…

Uncategorized , ,

Doods

This was a little, one-night experimental project that grew out of poking around with the excellent Flash Devekop IDE. The result was a proto-game where a bunch of little doods wander around the screen. I added a couple of rules that, while not really making it a game, do make for a fun little system to poke at, namely:

  • If a given dood happens to find himself close to the mouse pointer, he will stay near it
  • If the mouse moves too quickly, the doods will lose it and disperse
  • If the user clicks, all of the doods under the mouse will be frozen (stop moving) for a period of time. Frozen doods are blue
  • The more doods that get frozen, the longer the duration of the freeze

All in all, it means that there’s a kind of proto-game to be had in moving the mouse around the screen slowly to gather doods and then clicking to freeze them in place. Definitely not a game, but kinda fun to play with.

To play with it yourself, head here. Also note that the graphic for the dood came from the always-awesome Open Game Art site.

Uncategorized ,

New Site

After two years of updating my website sporadically if at all, I’ve finally moved over to a wordpress-driven blog. I’ll be moving content from www.purplestatic.com over here over the next few days.

Uncategorized

UCI ICS/ACE video shoot

UCI promo vidWow three TLA (three-letter acryonyms), all at once. A few weeks ago, a film crew came through the ACE (Arts, Computation, Engineering) department area as part of a promo shoot for the school of ICS (Information and Computer Science) here at UCI (Univeristy of California, Irvine). They had me say a few canned phrases, and then interviewd me about the ACE program, which ended up in the video.
They shot myself and Garnet Hertz (in the background working on his cokroach-controlled robot) in the ACE fabrication shop for that authentic blue-collar this-is-where-we-build-things feel, hence the image at left.

Uncategorized ,

The Construction of Living Robots revealed

the construction of living robotsBack when I was working out of the Studio for Creative Inquiry at Carnegie Mellon University, I came across a pamplet published in 1952 by one Edmund C. Berkley entitled “The Construction of Living Robots” where it was put forth that…

It would seem reasonable to expect that before a dozen more years go by, automatic machines (i.e., robots) that possess the essential properties of life will be “in existence” — or should we say “alive”? Certainly much more than half the distance to the construction of living robots has been traveled

I scanned in all the pages (it’s a fairly short document), and I recently found the scans and their web-ready versions in an old CD, so I put it up here for anyone who’s interested. Click on the pages to advance them.

Uncategorized

Larry Beau

Lately I’ve been really busy rehearsing for the Larry Beau show, a performance of the music of Declan Burke. Declan’s joined by Cindy Weyuker on vocals and piano, Jason Webster on guitar and vocals, and myself on electronic saxaphone and vocals. We’re playing the Xenodrome here in San Francisco this Friday (July 16th), and the Baggot Inn in New York next Thursday.
In addition to the flyer at left, I’ve also made a little program to interactively cycle through still images to provide a backdrop for the action of the show- one of these days I’ll get around to posting it somewhere.

Uncategorized ,