Sunday, October 30, 2011

API progress

As of now, I've made a test api call that gets a database object, saves data to it, and then reads other data from it. I've also managed to create 'watcher' database objects via API and retrieve data from them (a callback url) elsewhere.

The next step is to send a POST request to that callback_url when the relevant event happens. This can be expanded to cover assignments being added, achievements, etc.

EDIT: and then I uploaded the code - my api call is test_call in lib/gwt/ajax.rb

EDIT2: now featuring working post/response of JSON data to and from an external php script! Proof of concept finished, time to start on the actual product.

Wednesday, October 26, 2011

Sunday, October 23, 2011

Source Code and Documentation

First, I want to say that I’ve open-sourced LcAlg, my program for generating laser-cut polygonal sculptures from 3d models. There’s a link a little bit farther down on the page if that’s what you came here for.

Second, the majority of this post will be about an interesting method of connecting coroplast sheets using acrylic connectors that I’ve developed.

Source Code

svn co lcalg
  1. Check out the code. Download either of the two obj files and put them in the input folder.
  1. Adjust constants in to change most values in the program. Currently it’s set to use 2.5mm acrylic and ~3.5mm coroplast.
  1. Run LcAlg by running You’ll need python 2.7.
  1. Watch for updates. This is an early beta that I’ll be updating regularly.

Coroplast is essentially plastic cardboard. It is lightweight and flexible, and bends rather than breaking. I now use it for the triangles, or faces, in my models.

I used to use acrylic plates for both the faces and the connectors. It was shatter-prone, heavy and expensive. I secured the faces to the connectors with first solvent glue and then cotter pins. This worked, but was labor intensive and in some cases fragile.

The solution is to use acrylic connectors and coroplast sheets. This leverages the strength of both materials. Because the coroplast is flexible, I use retaining tabs - the coroplast deforms around the rigid acrylic tabs and is locked into place

This forms a very strong connection. I have to pull very hard to force the pieces apart. However, I can easily remove a connector by slipping the retaining tabs over the coroplast retainer. Think zip ties - all it takes is a small piece of metal to jimmy one open but brute force will get you nowhere.

(By vector-cut I mean vector-etched)

Unfortunately, sharp angles lead to an issue that can be seen in this diagram: if angle A increases much more, distance B will decrease until there is not enough material there to hold the connector together

Large angle A’s can also lead to intersecting faces: In the diagram below, imagine if angle A were to increase. The two coroplast panels would quickly be intersecting. LcAlg solves this issue by calculating an offset and then removing that much material from the relevant edge.


A face is a flat coroplast triangle with 3 pairs of two mounting points for the acrylic connectors.

They’re cut out as below, to save laser time and material.


I've made an algorithm that transforms a 3d model (a mesh of triangles) into the autoCAD files neccesary to laser-cut a set of triangles and angled connectors that, when assembled, form a real life version of that 3d model.

You can see an example here

This is an intro post. In later posts I'll go over how it works and how to use it.

Source code can be found here:

Wednesday, October 5, 2011

Assistments API

We've decided that the best way to go forwards is to work with Assistments as a service. We'll be extending the existing API to do what we need, instead of trying to add new functionality directly to Assistments.

Fortunately, Assistments already has at least the beginnings of an API.

Monday, October 3, 2011

PHP and JS Guidlines for FB: Acronyms!

I've put together a guide on the php and javascript sdks for facebook. It mostly consists of links to facebook's own documentation, which is amazing. This needs to be cleaned up, but these links show examples on pretty much every part of facebook's api.

login/out and requesting permissions, posting to a user’s wall, getting a user’s information all with graph api, newest api
methods for login/logout
what to show depends on result of
You should also authorize your app using the values from you facebook developer app page
i dont see it in the docs explicitly but in the examples this method is used to init facebook object:
$config = array( 'appId' => 'YOUR_APP_ID', 'secret' => 'YOUR_APP_SECRET', );
$facebook = new Facebook($config);
info, how to load sdk
FB.login() -- login and/or request extended permissions FB.logout() -- logout (only if the user is connected with your application) FB.getLoginStatus() -- get current login status from FB.getSession() -- synchronous accessor for the current session. Note that in OAuth 2.0, this function will no longer function and you should use FB.getAuthResponse(). FB.getAuthResponse() -- accessor for the current authorization response record, which for connected users includes an access token, a signed request, and a user ID.
api calls:
can trigger dialogs with ui methods
lots of useful methods - can control position, size, etc for canvas page, login/out, etc
you can make calls in facebook query language to get info