I have been stuck in an issue since couple of days and would be glad if someone could help.
In My Processing code, I have 3 knob controller elements which are used mainly for output purposes (as meter gauges to display some metrics) instead of user input.
When I put a saveFrame() or save() function at the end of draw() function, the image saved has rest of the sketch correctly stored but not the above gauges. The space occupied by them is left blank.
However, when I put this save() function inside a keyPressed() function, it works fine . But I do NOT want someone to manually press a key each time as this code is gonna be set up in a cron to run every half an hour and generate a new sketch.
I tried simulating the key Press event of pressing say key "q" using an object of Robot class and that works fine only till the time I don't use my mouse/keyboard meanwhile the code completes execution which isn't a good solution at all.
Please provide me the solution to correctly save the meter gauges in .png image file.
I am drawing a knob as below using controlP5 library.
.
Relevant Code for the same is
Knob myKnobA;
cp5 = new ControlP5(this);
myKnobA = cp5.addKnob("knob")
.setRange(0,255)
.setValue(75)
.setPosition(100,70)
.setRadius(50)
.setNumberOfTickMarks(5)
.setTickMarkLength(4)
.setViewStyle(Knob.ARC)
.setDragDirection(Knob.VERTICAL)
;
I also want to display the values represented by each tick mark on the knob and also the selected value. Each value should be next to the respective tick mark.
I am trying to design a project where in different entities are represented by ellipses.
And I need to display connections between these entities based on reading certain records from an input text file.
However, there can be a large number of connections between any two entities so drawing lines using the line() command won't give a good visual effect.
Are there any other in built features available in processing which can be used to display such information effectively ? For example colored dots showing the intensity of the number of connections.
I have written a processing code that takes certain text files as input, performs computations and displays a sketch.
The code works fine when I run it using the Processing IDE for Windows.
The input text files are being generated/updated every hour on an Linux server.
Right now, I manually copy these text files from Linux server to my Windows machine and run the code.
Is there any way the same processing code could run on the Linux server itself(where the input text files are getting generated) and that too without manual intervention ?
Can this be automated ? Relevant examples would be helpful.
I have been trying to display a sketch built using processing on a web browser (FireFox) with the help of processing.js
However, my browser window hangs (Not responding message in the title bar) for a couple of minutes before the sketch can be successfully loaded. I know this time is being taken as lot of computations(like reading from a huge text file several times) are being carried out by the processing code before it can display the sketch.
However, this gives a bad user experience.
Can someone help me with the resolution of this issue ? Tried alot of things but none seem to work.
I have been able to display below sketch built using processing on a web browser (using processing.js).
My requirement is that whenever I move the mouse over any block say HA1 or HA2, i should get a sort of small window/box alongside that block indicating some details about those block. (This information to be displayed is already present in the processing code and is being used to generate the different colors )
Can someone please help on how can this be done ?
Any relevant code snippets would be really helpful.
I am relatively new to processing. I want to store data in the format. <key> <value1, value2> so basically the value in the hashmap is an arrayList instead of a single value. I used this
HashMap<String, ArrayList> building_drawn = new HashMap<String, Arraylist>();
And I am getting error as "Cannot find a class or type named HashMap<String, ArrayList>".
How can such a data structure be created in processing ?
I have an image of a data center (like a building diagram). I want to color certain blocks in this image with a specific color code which is obtained based on certain computations for each block.
What is the most effective way to do that ? Any examples or code snippets would be of great help.
I initially thought of manually replicating the diagram using functions like rect() but it seems tedious to manually enter (x,y) co-ordinates for all blocks of the detailed diagram.