brandonagr / gocupi

Polargraph (vertical plotter / drawing machine) written in Go
GNU Lesser General Public License v3.0
101 stars 26 forks source link

Trying to DIY this. Any thoughts? #31

Closed FuriouslyCurious closed 8 years ago

FuriouslyCurious commented 8 years ago

Hey Brandon, sorry couldn't find your DM/Email, so communicating through an issue.

I am trying to DIY this Zen sand garden using your project: https://vimeo.com/124882379 You can see more videos inside the artist's gallery.

What would it entail to covert Gocupi kit in a horizontal setup? I will use a Gocupi-controlled Neodymium magnet underneath a glass surface, and sand + metal ball on the top of the surface.

brandonagr commented 8 years ago

It would take a lot of work to rewrite a large portion of the code to use a more traditional XY based coordinate system instead of the 'polar' system of two string lengths used here. src/plotter/driver.go is the code that converts the XY coordinates to 'polar', everything downstream of that would have to change

scottvr commented 8 years ago

What brandonagr is certainly correct, however I did successfully use the gocupi horizontally as is. Your surface would need to be sufficiently elevated to pull it off the same way I did my silly hack, but I'll describe it here for posterity.

[post-edit. Whoa! That got long. Apologies. TL;DR.: If your surface is elevated, you can attach a counterweight to the gondola and have a horizontally-mounted vertical plotter. :-) You could then attach a strong magnet to the gondola and a glass table sitting over it - in fact, you might just stick some miniature casters or bearings on the bottom of something more suited for the purpose than a pen-holder gondola and you can forego the added consideration of keeping the gondola elevated from the surface below it, since you won't then have weight bearing down on a small pen-tip and wobblling and such. But I've rambled long enough so I really will stop now.]

The hanging vertical plotter mechanism relies on the magical invisible pulling force of gravity (and thus the weight of the gondola) to keep the string lengths taught and straight. The top of the drawing surface (imagine a line between the two motors) and the two string lengths form a triangle, with the motors and gondola at each vertex.

Briefly, I had the thought that two more motors opposite the original two would be needed for horizontal success, which while not being complex mathematically or programatically to add them, how to set the initial position, keeping all four lines taught and not having the motors battling against each other was to much to entertain for a silly proof of concept.

But then I thought of that invisible "motor" (gravity) pulling downward on the gondola now, and realized only one additional motor would be needed, perhaps on a rod parallell to the invisible line between the "top" motors.. Visions of a truly ludicrous setup with a bottom "slack" stepper perpendicular to the invisible line, with its own X-axis motion briefly made me chuckle before I realized that a rubber band on a spool over a dowel would meet both purposes, although the further the gondola moved away from this rod, the greater the force pulling the gondola toward it and then things I can barely remember about elastic potential energy and unpleasant memories of the physics class I failed where I should have learned it shut down the thought experiment for the moment. But then, with the vision of the horizontal surface, motors on one side, and a rod running the length of the other still rattling around in the back of my head, it occurred to me that I could attach a string with the surprising properties of (nearly) always (nearly) exerting the same amount of horizontal force away fro the steppers which (not) coincidentally happens to be (nearly) exactly 9.8ms^s. Those of you who passed the physics I failed no doubt immediately recognize that as the acceleration of gravity and probably see where I'm going with this.

So... I laid a whiteboard horizontally on the trunk of my '61 Biscayne, which conveniently already had gocupi motor mounts suction-cupped in place (the board, not my car.. but there's a different story for a different time) and a gondola hanging in the center. I affixed a length of string the length of the "height" (these terms are getting confusing as we move our Euclidian plan in 3D space, for me at least) of the whiteboard + the elevation of the now-horizontal whiteboard from the ground. With the edge of the "bottom" (the 2D bottom, from back when it was in a vertical plane... this is why instructional diagrams label things with convenient unambiguous letters, isn't it?) anyway.. with the side of the whiteboard that used to be the bottom now hanging just beyond the edge of the trunk of the Chevy, and using washers, cable and wire guides and fasteners and other various sundries found in my garage, dangled this weighted line from the gondola over the edge of the whiteboard so that the washers now moved vertically up and down with the movement of the gondola on the whiteboard's Y-axis. With just enough weight from the washers to counteract the gravity that is now tending to draw the gondola to the board, and just enough height from the rod/wire guides/whathaveyou, I was able to replicate the vertical conditions faithfully enough to fool the gocupi into drawing for me as if it was still vertical.

If my writing was too confusing - perhaps a visual illustration would help. But I'm not going to take up any more space with ASCII art so I will leave you with this.. Do you remember the old Batman TV series from the 1960's? Do you remember the scenes where Batman and Robin would be scaling the side of a skyscraper by holding a rope hanging from the top of the building? And how even as a kid watching this, the occasional slack in the rope or other visual cues enabled even a 5-year-old to give the TV a side-eyed glare.. and then, with their innocent little imagination-filled heads turned sideways, they have a Eureka! moment when they realize "hey.... they're just walking and the camera is turned sideways!", and that innocence that enables the perfect suspension of disbelief is forever lost? Yeah, well I'm not saying it's like that, but it's like that.

I hope editing a closed topic doesn't piss anyone off.. but I found a video of the horizontal test I did. https://drive.google.com/open?id=0B4MXdNsnIo77U3FiYzBkQ0VuaFk