I am using randomSeed() in both a processing sketch and a processingjs canvas element. However I think I am getting different numbers from each implementation so I cannot synchronise the two versions.
For example...
I have made an application, but it does not function when I export the java application (developing and testing exported application on Mac OSX 10.8.4) although works fine running it out the Processing IDE.
If I make an application just rendering a black screen and white rect() no problem; but if I try to load a PShape or PImage it fails!
What am I doing wrong??? Is there some special step to include any assets in the application???
I need this resolved pretty urgently!
I read through the wiki and didn't see anything to solve this.
Since upgrading to Processing 2, I have noticed that copy() seems to be really stubborn about working or not.
In several different sketches I have tried using it to copy a section from one image and draw to the main window and it doesn't copy anything.
For example I have 8 images and I want a strip from each, in one sketch it is working OK but in another it is not, copying nothing or occasionally just one strip?!
It seems to be better if it is in a separate function to draw() and using OPENGL renderer.
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: