Is it possible to make the PDF output in Processing not clip stuff? So that the canvas is "endless"?
I try to render out some graphics where the size of it is not known until at the end, and because of random values being used here and there, it is difficult to recreate it. But I want to output it to a PDF, so I can print. But when it goes out of bounds, the PDF clips the graphics.
Is this what I should use beginRaw for? Or beginRecord? When I tried those, I got a message that they weren't available for my render, and I am using the default renderer now. Or PDF, as mentioned.
I was thinking about ways to divide the load of a massive processing sketch between different machines in a network, in regards to a scenario where you want them all to be shown with the same projector, maybe as different textures or something, to do projection mapping or objects.
Since you can have a PGraphics or PImage as a texture, I am thinking there has to be a way to do this over a network.
On the receiving side you could just have an object from a class, that acts as a server, or client, that gets the pixel data send to it via the network, and puts it all in a Pimage, that can just be used as a texture.
On the other side you have a similar object, which you at the end of each draw use a send()-function, that sends the pixel data to the connected machine.
Does this make any sense?
I guess you could also maybe, to make it more portable, make a videostream reciever, and an "on the fly" encoder where you do the drawing.
The reason I would want all this, is both to get the load of the one machine, and also, you could render a totally different interface on the machine where you work with your sketch, that is to be displayed, from the displaying machine.
Anyone know such a project ongoing already? Or have any thoughts or suggestions?
I have an old HP 7550A plotter, which I have started using with Processing.
To make it easy for myself, I have started working on a derivative of PGraphics to draw to the plotter.
That way it will be easy to see how things are on screen before sending it to plotter. It should be able to use the same commands.
At the moment what is supported is:
beginShape()/endShape() with CLOSE, and POLYGON, TRIANGLES and QUADS as modes.
Also supported is ellipse(), line(), rect()
translate()/rotate()/scale() as well as push/popMatrix() works.
The serial communications i a bit dodgy, and it tends to crash at times, I still have to figure out a bit about the serial communication library for processing, and how to handle the information I get back from the plotter.
This is not a release, not even a release candidate, but just a heads up, and some preliminary testing, if anyone is interested.
Any comments is welcome. And if anyone is interested in collaborating on this with me, let me know, so we can set up some version control.
For now there is no web page either, but you can download if you want to
EDIT: Source is at Github:
https://github.com/gregersn/HPGL
I am working on a PGraphics derivative for sending HPGL-commands to an old plotter on the serial port, and have some problems regarding width and height.
The width and height of the paper is determined by the plotter, depending on the size of the paper that is put into it, so it is hard/meaningless to know what that should be when you call size() e.g. in setup().
The thing is, as it is now, I can't find the size of the paper before I get to allocate(), and would then like to set the new values for width/height in the pgraphics instance, but what seems to happen is that those values keep getting reset before each frame.
What is the proper way to do this?
Kinda what happens now is something like
size(0, 0, "PGraphicsHPGL") is called from the sketch.. and in my PGraphicsHPGL:
Constructor
Allocate
CheckPaperSize
Set width and height
but back in draw, when I try to check width, it is back at 0
With the above code I seem not to get all values. First of all, the value 0 is NEVER recieved. So the range is [1, 127], not [0, 127]. I've tried with two different midi controllers.
Second, if I turn a knob fast, it seems like it will skip a lot of values, understandably. But if I then get to the top or bottom of the range, I will ned to turn the knob back a bit, and then go up again to get to the top.
I am loading a lot of pictures from the web, and sometimes I hit URLs for pictures/sites that are very slow.
Is there any posibility to make some sort of set timeout for how long it should try to load, and then give up?
Or is there maybe some other function I can use, with a timeout, that can download the picture locally first, and then I can load it, if it manages to download?
I am working on a library for processing, using eclipse. And for most part I can manage fine. But...
I am using
commons-lang-2.6 from Apache, which I have put into my sketchfolder/libraries/mylib/library folder for my sketch to run with my own library. But every time I compile my library in eclipse, with new changes, commons-lang-2.6 is deleted from the mylib/library folder.
Is there some way in eclipse I can add that jar file so that it is included with my library? Or should I put the whole commons-lang-thing somewhere else for it to work with processing?