I was wondering if anyone knew of a way to take the output of generative typography(the points and lines after the original geometry is altered) done in processing and convert it back into a something like an svg or true type file that could then be read by something like fontlab or fontforge or even ai.
I have written/modified some code to serve my purpose, but after a while it becomes terribly inefficient...
What I am currently doing is in one sketch slicing or tiling images down and producing other files of those individual slices that I then in another sketch put back together various ways, but when I start breaking down images into 5px by 5px squares I get 10s of thousands of small(really small) files that are clumsy to manage. Is there a way to do this same thing without writing files out to another sketch and maniuplating them there ie using the pixel array as opposed to get() if so how?
I have a sketch that retrieves an image from flickr through the api. It retrieves an xml document sorts through and gets the neccesary piece, puts them together to form the url for the image. I then take the image and run it through multiple "glitching" functions that I modified from a sketch I found.
Two problems occur when I try running it in the browser. One is that I get an error saying the the XMLelement a is undefined. The actual error being printed is "a is undefined". The second problem is that when I process this sketch using an image located in the directory(not retrieved through flickr's api) I get an error that says:
IndexSizeError: Index or size is negative or greater than the allowed amount
Im assuming the glitch functions are attempting to step outside of the image/background, but Im confused why this is only occuring inside the browser, but when ran in processing its fine. Obviously processing and javascript are very different, but the thing is Im not sure how to edit the sketch to make it work.
Here is some abridged code, if requested I can post the full length of code.
// get payload
XMLElement xml = new XMLElement(this, rest);
println(xml);
// parse XML results
XMLElement a = xml.getChild(0).getChild(0);
println(a);
String fm = a.getStringAttribute("farm");
String sv = a.getStringAttribute("server");
String id = a.getStringAttribute("id");
String sc = a.getStringAttribute("secret");
// build http string
String url = "http://farm"+fm+".static.flickr.com/"+ sv + "/" + id + "_" + sc + "_b.jpg";
return url;
};
a few of the "glitch" functions that Im using that work in processing, but step beyond arraylength(imagesize) in p.js
void getSetGlitch1() {
for (int i=0; i<2; i++) {
int x = r(width);
int y = r(height);
randomSeed(int(0.03*frameCount*i/10+r(36)));
for (int j=0;j<random(10); j++) {
set(x+r(width/100),y+int(pow(j,2)),get(x,y,r(width),r(height/5)));
}
}
}
void getSetGlitch2() {
for (int i=0; i<10; i++) {
int x = r(width);
int y = r(height);
randomSeed(int(0.05*frameCount+r(15)));
for (int j=0;j<50; j++) {
set(x+j*20+r(width)-width/2,y+j*10,get(x,y,r(width/10),r(5)));
}
}
}
void getSetGlitch3() {
for (int i=0; i<10; i++) {
int x = r(width);
int y = r(height);
set(x+r(50)-1,y+r(3)-1,get(x,y,r(99),r(30)));
}
}
void getSetGlitch4() {
for (int i=0; i<width; i++) {
int x = r(width);
int y = r(height);
set(x+r(5)-2,y+r(5)-2,get(x,y,r(99),r(5)));
}
}
this bit of code is returning a "Not a function error" when its ran on the web using processing.js but when running on just plain old processing does just fine. Does anyone know why and how it can be rewritten to work on processing.js
Im looking to animate the points retrieved using geomerative using perlin noise. Using Daniel Shiffman's Perling noise tutorial I have came up with the current code below. But this code is only drawing the sequence once because time is being increased once inside the for loop? How do increment the time more than once inorder to animate the points in a smooth fashion?
edited for ease. No since in asking a complicated question when there is a simpler more fundamental problem embedded.
Start question...
I have adapted a perlin noise object off of openprocessing and wish to create an array of these objects. I have read multiple tutorials and seen may example, which I understand but when a go to apply there examples syntax it just doesnt work. How would I go about making lets say 100 of these perlin points?
Ultimately I hope to take this and apply it to text using geomerative, but this application can wait.