I understand how to constrain a balls movements within a box by testing its x,y according to some stored bounds. And I understand how to fill a circular area with graphics using trigonometry.
But is it possible, or how do you approach constraining within a "custom" shape? for example a pentagon or a letterform? Seems like it might involve some serious maths. How difficult is it to extend such a technique to a 3D shape?
Here is a little weekend project I made called Wire Letters. It was originally conceived as a sculpture project to make a 3-dimensional font using coat hanger wire (hence the name) and each letterform made from one piece of continuous wire. The idea being to create it so that it only looks like the letterform from a certain angle and otherwise look like a mess of wire. I think of it as a puzzle where you would be presented with a shape of wire and then you would have to figure out what letter it is.
Not looking forward to a day with coat hangers and wire cutters, I realised Processing would be ideal to make this and hopefully produce many options for export and reuse. I would like to get them printed using a 3D printer (i have previously written a little DXF file writer which I could repurpose) and I have another version which exports images of the letterforms rotated in 15° increments.
It would be great to hear any thoughts and suggestions for other export ideas like other 3D formats from DXF as I don't know much about 3D, or if it could be turned into a real font as a postscript, truetype, opentype, plus any ideas for re-use or extension.
It appears that lines in 3D space (P3D / OPENGL) are not affected by lighting methods like directionalLight().
Is this true? If so why? And what would anyone recommend as workaround? or do I need to alter another parameter to get lights() and line() to work together. Here is a quick demo: