I have an series of shapes (drawn using beginShape, endShape function) and want to interrogate the pixel array, essentially to mark those pixels which are within each shape. How can I go about such a thing?
What I want to achieve is a buildup of colour (from cold, ie blue, to hot, ie red/yellow) over time as the shapes move and pixels are more or less commonly found within them. Any suggestions how to go about this would be welcome.
I want to write a very short text file from an applet embedded on a blog back to my web-server. What is the quickest and easiest way to do this? I've looked up savetoWeb but can't find the old tutorial page.
I've been working with the geomerative library and am building a bit of code that relies on calling up the final area of a shape that has a number of different 'difference' functions applied to it over time.
The getArea() function seems to work fine as long as the differences are simple but once the shape fragments into smaller parts they no-longer accurately add up; the total area results seem to get quite anomalous. Am I doing something wrong here? or is there a way round this that anyone knows?
I've prepared a simple bit of code that demonstrates the issue.
I'm experienced in processing but have just discovered the Geomerative library; really handy. Having spent a couple of days playing with it I've got a quick question on something I'm trying to do.
What I want to do is create a shape that has within it a series of 'sub 'shapes that are loaded from various .svg files.
Essentially the following:
shp1 = RG.loadShape("0-0-2.svg");
shp2 = RG.loadShape("0-0-3.svg");
shp3 = RG.loadShape("0-0-4.svg");
mastershp = new RShape();
mastershp.addShape(shp1);
mastershp.addShape(shp2);
mastershp.addShape(shp3);
mastershp.addClose();
stroke( 120 );
strokeWeight( 3 );
fill( 220 );
mastershp.draw();
Now, whilst I've successfully used the addShape() method for shapes built with basic functions, it doesn't seem to work when these shapes are called up from an .svg. Is this correct or is it just me being a dolt again?