I'm trying to store pde files on my Amazon S3 server, and pull them into the canvas tag when I render an HTML template. It doesn't seem to be working. Has anyone tried this?
I'm using the
iGeo library for the first time, and having a hard time deciphering the documentation and find examples lacking. I'm relatively new to Processing, so Java docs are still Greek to me.
I'm trying to create a series of 3D lines (called Pipes in iGeo), and export the resulting shape as an OBJ. I can see the Pipes, but can't seem to figure out how to export to OBJ. Seems like iGeo wants me to use their internal exporter function. I tried using superCAD's exporter, which worked for this sketch prior to introducing iGeo, but it didn't export a file.
Thanks for any help. Code below.
import processing.opengl.*;
import processing.dxf.*;
import superCAD.*;
boolean record = false;
String cadSoftware, ext;
import igeo.*;
String[] doc; // holds all lines of text in the doc
String[] s; // used to hold one word at a time
int x, y, z;
int prevX = 0;
int prevY = 0;
int prevZ = 0;
int lineCounter = 0; // for each line in the txt file
int linesPerPage = 36; // average # of lines per page in this version of the book
int wordsPerLine = 13; // average number of words per line in this version of the book
int pageNum = 1; // start on page 1!
int totalPages = 308; // total # of pages in printed book
int occurance = 0; // keeps track of which occurance of the word "Ulysses" is currenlty being calculated. Should match totalOccurances
int totalOccurances = 580; // total number of times the target String appears in the text
int[] Xs; // Array of x-coordinates
int[] Ys; // Array of y-coordinates
int[] Zs; // Array of z-coordinates
void setup() {
size(300, 500, IG.GL);
doc = loadStrings("Od.txt");
//println(doc.length); (11374)
Xs = new int[totalOccurances];
Ys = new int[totalOccurances];
Zs = new int[totalOccurances];
for (int j=0; j<doc.length; j++) { // for every line in the document...
lineCounter++; // keep track of the line we're on.
if (lineCounter == linesPerPage+1) {
lineCounter = 0; // 1 page = 36 lines
pageNum++;
}
y = lineCounter;
y = int(map(y, 0, linesPerPage, 0, height)); // all mapped figures are arbitrary. Can be changed.
z = pageNum;
//z = int(map(z, 0, totalPages, -100, 100));
s = splitTokens(doc[j]);
for (int i=0; i<s.length; i++) {
String temp_s = trim(s[i]);
//println(temp_s);
if (temp_s.contains("Ulysses")) {
x = (temp_s.length())*(i+1);
x = int(map(x, 0, doc[j].length(), 0, width)); // arbitray limits to make sure Processing displays all values in canvas