A small problem for any geometry/maths-heads out there. I am exporting models from Processing into 3D programs, and find that 1 dimensional lines with variable stroke widths that look pretty effective in processing lose their width detail in the export process. So I'm now trying to plot thin 3D boxes in place of lines, meaning a translation operation to the line's mid-point, and a rotation operation of the frame of reference so that the box's Z dimension is adjacent to the line's vector. I've made a simple example script to illustrate:
https://gist.github.com/2770618

Annoyingly the rotation operation does not quite work as intended - the box is aligned approximately but not precisely with the line it is trying to replicate. But I've tried all other combinations I can think of - e.g. making all numbers floats - with no luck, and can't work out where I'm going wrong.

Very grateful for any assistance!

Robin

1