Other Libraries - Processing Discourse board_LibraryProblems.html Other Libraries - Processing Discourse en-us Processing Discourse Thu, 22 Mar 2012 06:04:01 +0000 http://blogs.law.harvard.edu/tech/rss 30 using cocoa library to run applescript num_1225564736.html Processing Discourse/Other Libraries num_1225564736.html Mon, 05 Jul 2010 08:34:35 +0000 <b><a class="message" href="num_1225564736.html#8">Wind Up Toy wrote</a> on Mar 27<sup>th</sup>, 2010, 2:07pm:</b><br /><div class="quote" style="width: 90%">I also cannot find &quot;com&quot; inside my /System/Library/Java folder...<br /><br />OS X 10.6.2<br /> </div><br /><br />The Java/Cocoa bridge has been removed by Apple in 10.6. :-( AFAIK you can use the files from 10.5 – or switch to http://code.google.com/p/rococoa/ OpenCV not working on Windows! num_1272528963.html Processing Discourse/Other Libraries num_1272528963.html Thu, 17 Jun 2010 11:04:19 +0000 Hi!<br /><br />I think i have the same problem that HHH, but i can't solve it.<br /><br />I installed opencv1.0 on windows, I configure the path to the bin directory, i moved the openCV.dll, openCV.so, openCV.jnilib to the bin directory and i have on my building path the library openCV.jar.<br /><br />The error is shown when i instantiate a new OpenCV object ( cv = new OpenCV(); ) and the error is:<br /><br />!!! required library not found : no OpenCV in java.library.path<br />Verify that the java.library.path property is correctly set and the '\path\to\OpenCV\bin' exists in your system PATH<br /><br />I'm totally novice on this technology. Can anyone help me?<br /><br />Thanks.<br /><br /> Processing + jUnit Tests num_1276612740.html Processing Discourse/Other Libraries num_1276612740.html Thu, 17 Jun 2010 10:22:15 +0000 I tried getting it to work today using eclipse (and the proclipse addon since I was having issues getting the serial library's DLL to load properly without it).<br /><br />This project is more of a proof of concept type of thing.  It's a very simple program that sends a byte to my arduino, and the arduino is programmed to respond with another byte.  The serial communication is done in a &quot;SerialLink&quot; class which as of right now just forwards information to and from the arduino using the Serial library( I didn't use the serial library directly becayse I wanted to learn how to import classes to the PDE environment(if that is what it is called)).  The program works when run as a applet and as an application.<br /><br />I have a jUnit test project setup which builds against the processing project.  I cannot seem to get the serial port working correctly from the jUnit tests.  I think I'm starting the processing class incorrectly, but I'm not sure how you are supposed to do it.  The only reason I'm starting the processing class is because the serial library's constructor takes a PApplet as a parameter.  I tried creating my own PApplet object and starting the serial connection with that in the test project, but it gave me a null pointer exception (on the serial's constructor).<br /><br /><br />Currently in the jUnit test project, my setUp method starts the processing class with the following:<br />PM = new ProcessingMain();<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;PM.main(null);  //contains: PApplet.main(new String[] &#123; &quot;--present&quot;, &quot;processingtesttake2.ProcessingMain&quot; &#125;);<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;    sl = PM.getArd(); // returns a SerialLink object containing the Serial library's object and a few methods<br /><br />PM/sl are class variables. This starts up the processing application fine, but it doesn't save a reference to it in the PM variable.<br /><br />PM.getArd(); returns a <b>null</b> object(because the PApplet.main is creating a different PM object, thus, the serial link objects were created in a different PM).  This is the root of the problem, but i do not know how to fix it with any of the following means:<br />1) get a valid reference to this processing class that the papplet.main creates so i can retrieve the arduino serial link reference<br />2) start the processing class without calling the main method so I have a reference to it from the start (calling the setup method of the PM class doesnt work either)<br />3) start a serial library object with a normal PApplet parent object<br /><br /><br />Any idea how to get this to work?  If I left out any info, please ask.<br /><br /> Problem with RiTA library num_1275728178.html Processing Discourse/Other Libraries num_1275728178.html Thu, 17 Jun 2010 04:06:38 +0000 Hi PhiLo,<br /><br />I try your tips and that's worked perfectly. Obviously, I didn't read the documentation of RiTa enough. <br /><br />I thank you much for your invaluable assistance...<br /><br />This is the webpage of our project <a href="http://www.zeitlinie.net" target="_blank">www.zeitlinie.net</a> that interest you to look at. Mother/Foetus sketch troubleshooting num_1276379808.html Processing Discourse/Other Libraries num_1276379808.html Wed, 16 Jun 2010 15:41:48 +0000 ok, so now my code doesn't crash Mother but it only shows as a black layer. Running it in processing in the same size gives no error and runs smooth.<br /><br />Im very happy for any input!<br /><br />cheers,<br />g <br /><br /> <b>Code:</b><pre class="code"><br &#47;>import megamu&#46;shapetween&#46;*;<br &#47;>import oscP5&#46;*;<br &#47;>import netP5&#46;*;<br &#47;>import processing&#46;opengl&#46;*;<br &#47;><br &#47;>import foetus&#46;*;<br &#47;>import processing&#46;core&#46;*;<br &#47;>import processing&#46;core&#46;PApplet&#46;RegisteredMethods;<br &#47;><br &#47;>import java&#46;util&#46;*;<br &#47;>import javax&#46;media&#46;opengl&#46;*;<br &#47;>import javax&#46;media&#46;opengl&#46;glu&#46;*;<br &#47;><br &#47;>&#47;&#47; Log Starburst<br &#47;>&#47;&#47;  &#45; Jim Bumgardner, Ryan Govostoes<br &#47;>&#47;&#47; using a formula from Bumgardner's &quot;Pixel Magic&quot; &#45; 1992&#46;<br &#47;><br &#47;>float sineTable&#91;&#93;;<br &#47;>float dTable&#91;&#93;;<br &#47;>float aTable&#91;&#93;;<br &#47;><br &#47;>float dMult = 2;<br &#47;>float aMult = 2;<br &#47;>int   cMode = RGB;<br &#47;>&#47;&#47;int w= 300, h= 300;<br &#47;><br &#47;>public Foetus f;<br &#47;><br &#47;> <br &#47;>void setup&#40;&#41;<br &#47;>&#123;<br &#47;>  &#47;&#47; When run as a synth, setup&#40;&#41; is never called&#33;<br &#47;>  &#47;&#47; put the necessary initialization code in a method named initializeFoetus&#40;&#41;&#46;<br &#47;>  &#47;&#47; The necessary Processing initialization calls are called by Mother, and so should be left out from<br &#47;>  &#47;&#47; initializeFoetus&#40;&#41;&#46;<br &#47;>  &#47;&#47; Finally, for the synth to work as a processing sketch within the P&#068;E, call initializeFoetus&#40;&#41; from within<br &#47;>  &#47;&#47; setup&#40;&#41;&#46;<br &#47;><br &#47;>size&#40;1280, 800, OPENGL&#41;;<br &#47;>  initializeFoetus&#40;&#41;;<br &#47;>&#125;<br &#47;><br &#47;>void initializeFoetus&#40;&#41;<br &#47;>&#123;<br &#47;><br &#47;>    &#47;&#47; Instantiate foetus object here<br &#47;>  f = new Foetus&#40;this&#41;;<br &#47;>  <br &#47;>  &#47;&#47;size&#40;300, 300&#41;;<br &#47;>  colorMode&#40;cMode, 2&#41;;<br &#47;><br &#47;>  &#47;&#47; precalculate 1 period of the sine wave &#40;360 degrees&#41;<br &#47;>  sineTable = new float&#91;360&#93;;<br &#47;>  for &#40;int i = 0; i &lt; 360; i ++&#41;<br &#47;>    sineTable&#91;i&#93; = sin&#40;radians&#40;i&#41;&#41;;<br &#47;><br &#47;>  &#47;&#47; precalculate polar coords<br &#47;>  dTable = new float&#91;width * height&#93;;<br &#47;>  aTable = new float&#91;width * height&#93;;<br &#47;>  <br &#47;>  float cx = width &#47; 2;<br &#47;>  float cy = height &#47; 2;<br &#47;>  <br &#47;>  int i = 0;<br &#47;>  for &#40;int y = 0; y &lt; height; y ++&#41; &#123;<br &#47;>    for &#40;int x = 0; x &lt; width; x ++&#41; &#123;<br &#47;> if &#40;x &#33;= cx &#124;&#124; y &#33;= cy&#41; &#123;<br &#47;>  dTable&#91;i&#93; = 359&#45;pos&#068;egrees&#40; 0&#46;5 * log&#40;sq&#40;x &#45; cx&#41; + sq&#40;y &#45; cy&#41;&#41; &#41;;<br &#47;>  aTable&#91;i&#93; = pos&#068;egrees&#40; atan2&#40;y &#45; cy, x &#45; cx&#41; &#41;;<br &#47;> &#125;<br &#47;> i ++;<br &#47;>    &#125;<br &#47;>  &#125;<br &#47;>  <br &#47;><br &#47;><br &#47;><br &#47;>&#125;<br &#47;><br &#47;>void draw&#40;&#41;<br &#47;>&#123;<br &#47;>  loadPixels&#40;&#41;;<br &#47;><br &#47;>  float tb = millis&#40;&#41;*&#46;2;<br &#47;>  float tg = tb*&#46;25;<br &#47;>  <br &#47;>  for&#40;int i = 0; i &lt; &#40;width * height&#41;; i ++&#41; &#123;     <br &#47;>    float a = sineTable&#91;&#40;int&#41;&#40;aTable&#91;i&#93; * aMult&#41; % 360&#93;;<br &#47;>    float da = dTable&#91;i&#93; * dMult + aTable&#91;i&#93;;<br &#47;>    <br &#47;>    float r = 1 + a * sineTable&#91;abs&#40;&#40;int&#41;da&#41; % 360&#93;;<br &#47;>    &#47;&#47; float g = 2 &#45; r;<br &#47;>    float g = 1 + a * sineTable&#91;&#40;int&#41;&#40;da + tg&#41; % 360&#93;;<br &#47;>    float b = 1 + a * sineTable&#91;&#40;int&#41;&#40;da + tb&#41; % 360&#93;;<br &#47;> <br &#47;>    pixels&#91;i&#93; = color&#40;r, g, b&#41;;<br &#47;>  &#125;<br &#47;><br &#47;>  updatePixels&#40;&#41;;<br &#47;>  fpscalc&#40;&#41;;<br &#47;>&#125;<br &#47;><br &#47;><br &#47;>float fps;<br &#47;>int fpsN;<br &#47;><br &#47;>void fpscalc&#40;&#41; &#123;<br &#47;>  fps += frameRate;<br &#47;>  fpsN ++;<br &#47;>  if&#40;&#40;fpsN % 60&#41; == 0&#41;<br &#47;>    print&#40;&#40;fps &#47; fpsN&#41; + &quot; &quot;&#41;;<br &#47;>&#125;<br &#47;><br &#47;>float pos&#068;egrees&#40;float rad&#41; &#123;<br &#47;>  float deg = degrees&#40;rad&#41; % 360;<br &#47;>  if&#40;deg &lt; 0&#41; deg += 360;<br &#47;>  return deg;<br &#47;>&#125;<br &#47;> </pre> PDF export num_1276542892.html Processing Discourse/Other Libraries num_1276542892.html Wed, 16 Jun 2010 12:10:12 +0000 no problem <img src="yabbfiles/Templates/Forum/processing_one/smiley.gif" border="0" alt="Smiley" title="Smiley" /> thats why it is always a good idea to break it down. the problem is much easier to spot then exporting as an applet with libraries num_1276714328.html Processing Discourse/Other Libraries num_1276714328.html Wed, 16 Jun 2010 11:52:08 +0000 I recently published an applet for an processing sketch, and everything worked fine.  I then found I had to add a couple buttons to the sketch, which required me to import the interfascia gui library.  I did so, everything worked fine and i re-exported as both an applet and an application.  The application works fine, but when I try to run the core.jar applet, it gives me an error.  The console error says that &quot;java.lang.NoClassDefFoundError: processing/core/PApplet&quot;.  Other posts have said that all I have to do is sign my applets, but I signed all three applets (the library .jar, the main .jar, and the core .jar) and it still does not work.<br /><br />Any help would be appreciated. (and let me know if it would be helpful to post my code) ControlP5 problem---shadow? num_1276637126.html Processing Discourse/Other Libraries num_1276637126.html Tue, 15 Jun 2010 15:28:38 +0000 thank you using google api num_1276555781.html Processing Discourse/Other Libraries num_1276555781.html Tue, 15 Jun 2010 02:04:41 +0000 It's hard to help when you don't post any of your code. &nbsp;The error seems straightforward however: &nbsp;whatever web address at Google you're trying to access is returning a 404 not found... &nbsp;So that would be the first thing to check. Genetic Programming in Processing num_1276190185.html Processing Discourse/Other Libraries num_1276190185.html Sat, 12 Jun 2010 15:36:02 +0000 seems to me to be way too ambitious for someone new to a programming language. controlP5 peculiarities num_1218474319.html Processing Discourse/Other Libraries num_1218474319.html josephgray@grauwald.com (Joseph Gray) Sat, 12 Jun 2010 12:12:45 +0000 Hi, <br /><br /> I'm running across this strokeWeight issue with a textField, a slider changes line width for a drawing program, but also changes the linewidth of the textfield!<br /><br />The workaround I used is to set the strokeWeight back to 1 and then call the textfield.draw() method.<br /><br />Looking at the source for textfield and knob I see that knob has some extra lines for handling the strokeWeight issue.<br /><br /><br /> post2web error num_1276061103.html Processing Discourse/Other Libraries num_1276061103.html Sat, 12 Jun 2010 11:56:20 +0000 Updated the library now, with some bug fixes and some updates.<br /><br />-seltar Transparency in PDF num_1276207292.html Processing Discourse/Other Libraries num_1276207292.html Fri, 11 Jun 2010 11:49:21 +0000 correct, i didnt thought about it, that you use your images and rescale them, but that means, your images do have different resolutions, so you can zoom in on the little ones, but not on the big ones. but i understand the problem... hmm OpenCV num_1276222094.html Processing Discourse/Other Libraries num_1276222094.html Thu, 10 Jun 2010 19:08:14 +0000 hi,<br /><br />i was wondering if there are some better libraries than the openCV library that is available for face detection. Or is there a nice way to adjust the precisement. My experience is that the library takes allot of shapes that aren't even close to a face. More towards the crouch area <img src="yabbfiles/Templates/Forum/processing_one/tongue.gif" border="0" alt="Tongue" title="Tongue" /> Animated GIF library for Processing num_1199371244.html Processing Discourse/Other Libraries num_1199371244.html Wed, 09 Jun 2010 14:28:37 +0000 hello jacob,<br /><br />unfortunately you deleted parts of your first post, where you described the actual problem (or wasn't i awake completely when i read it first time this morning?  <img src="yabbfiles/Templates/Forum/processing_one/wink.gif" border="0" alt="Wink" title="Wink" /> )<br /><br />i think i understand what you want the library to do... but i don't think that's the way it should work (or, i still don't understand your question entirely).<br /><br />in context of GIF a .speed() method doesn't make sense to me... (well it would be nice, but GIF doesn't know anything like that - and the gifAnimation-lib is a wrapper around gif.<br /><br />if you want full control over the gif animation, just get all of the images using getPImages() and cycle through them however you want in your sketch. Like so you can make the animation dependent on your sketch framerate (or saveFrame-rate). other things to consider: use .jump() to go to a specific frame.<br /><br />also, have you tried to render a &quot;normal&quot; sketch to a movie? i mean without any gifs in it. just to check if you understood the logic of saveFrame and it's connection to the sketch framerate...<br /><br />or.. .just post some code to help me understand. (including your nice gif ani, of course  <img src="yabbfiles/Templates/Forum/processing_one/cheesy.gif" border="0" alt="Cheesy" title="Cheesy" /> ) ControlP5: Buttons that are images num_1275602375.html Processing Discourse/Other Libraries num_1275602375.html peter@lagers.org.uk (Quark) Wed, 09 Jun 2010 06:12:39 +0000 <b>Quote:</b><br /><div class="quote" style="width: 90%; overflow: auto;">And it's working now sorry for the trouble </div><br />It was no trouble at all.<br /> <img src="yabbfiles/Templates/Forum/processing_one/smiley.gif" border="0" alt="Smiley" title="Smiley" /> Social Network Library num_1276019658.html Processing Discourse/Other Libraries num_1276019658.html Tue, 08 Jun 2010 10:54:18 +0000 Hi guys,<br /><br />I've been searching everywhere for a library created by an Indiana grad student (Todd Holloway) called something like &quot;Social Network Library&quot;. It is supposed to be very useful for Node representation and linking but I cannot seem to find it anywhere. I've searched in the processing contributions (where google told me I would find it) but can't seem to locate it. <br /><br />Does anyone know where I can find the library or if there is another similar one that I can use?<br /><br />Thanks!<br /><br />-Alejandro tuioZones - a lot of problems D: num_1274961833.html Processing Discourse/Other Libraries num_1274961833.html Tue, 08 Jun 2010 09:02:47 +0000 oh, for that line, I just commented it out cause I thought I did it wrong.<br /><br />I'm using the tuioZones library for multitouch, there's a getPoints method that can get the x and y of the point I'm touching on the table. The vector problem I was working on is to store the points and draw a line with the points. <br /><br />But somehow even though I can store the line now, the line only displays on screen when my finger is touching the table, when I lift my finger the drawing will be gone D: and when I touch the table again, the previous line is still there, it just doesn't show up when no touch point is found Problem with Pachube feed using EEML Library num_1275750501.html Processing Discourse/Other Libraries num_1275750501.html Sat, 05 Jun 2010 11:20:21 +0000 i would probably use the onReceive method to set your variable (as a global variable, rather than just local) and use the main draw loop to control the arduino. ControlP5 textfield problem with OSX java update? num_1274715770.html Processing Discourse/Other Libraries num_1274715770.html Sat, 05 Jun 2010 08:27:45 +0000 it happen to me<br />the problem was trying to draw outside the limits of the drawing window, once fixed the message disappears.<br />hope it helps null messages in OSCP5 num_1275417699.html Processing Discourse/Other Libraries num_1275417699.html Tue, 01 Jun 2010 11:41:39 +0000 Hi, I'm trying to send a <span style="font-family: Courier New;"><span style="color: #ffcc33;">null</span></span> value in oscP5 object, like this:<br /><br />oscMessage[index][i].clearArguments();<br />oscMessage[index][i].add(null); <br /><br />but processing accuses that this information is ambiguous (because needs a String?). Is there any way to send null values by oscP5? sending string serial port size issue num_1275416596.html Processing Discourse/Other Libraries num_1275416596.html Tue, 01 Jun 2010 11:23:16 +0000 hello all<br /><br />im having a problem with a size limitation on a string which i compse in one processing applet, and send through my serial port to another applet.  <br /><br />I can send the sting of ints and floats and recieve it fine, until the string size passes about 200 ints and floats.     anyone see an issue.  thanks<br /><br />part of code which is sending:<br /><br /><span style="color: #0000ff;">  OscMessage sendData = new OscMessage(&quot;data&quot;);<br /><br />if(frameCount%5 ==0)&#123;<br />  sendData.add(data.length);<br /><br />  for(int n = 0; n &lt; data.length; n += 2)&#123;<br /><br />    float b = data[n];<br />    float c = data[n + 1];<br /><br />    println(&quot;data.size&quot;+data.length);<br />    sendData.add(b);<br />    sendData.add(c);<br />  &#125;<br />  &#125;<br />  oscP5.send(sendData, remoteLoc);<br />    counter = 0;<br />&#125;</span><br /><br /><br />part of code which is recieving:<br /><br /><span style="color: #0000ff;">void oscEvent(OscMessage oscMsg)&#123;<br /><br />  numPts = oscMsg.get(0).intValue();<br />  <br />  for(int i = 1; i &lt; numPts + 1; i ++)&#123;<br /><br />    ptList[i] = oscMsg.get(i).floatValue();<br /><br />  &#125;<br />&#125;</span><br /><br /><br /><br />could it be a serial port limitation?<br />appreciate any help     thanks<br /> voronoi from mesh library num_1274755178.html Processing Discourse/Other Libraries num_1274755178.html Fri, 28 May 2010 07:09:11 +0000 I personally don't like the processing array features (although they do implement stuff like array resizing that is readily available in ruby). So I have no experience of using them....<br />For a pragmatic solution try the following:-<br /> <b>Quote:</b><br /><div class="quote" style="width: 90%; overflow: auto;"><span style="color: #CC6600;">void</span> <span style="color: #006699;">mousePressed</span>() &#123;<br />  <span style="color: #CC6600;">float</span>[][] tmp = <span style="color: #CC6600;">new</span> <span style="color: #CC6600;">float</span>[1][2];<br />  tmp[0][0]=<span style="color: #006699;">mouseX</span>;<br />  tmp[0][1]=<span style="color: #006699;">mouseY</span>;<br />  points[0] = tmp[0];<br />  <span style="color: #CC6600;">redraw</span>();<br />&#125;<br /><br /> </div> <img src="yabbfiles/Templates/Forum/processing_one/smiley.gif" border="0" alt="Smiley" title="Smiley" /><br /><br />I suspect that it is probably dodgy to resize arrays interfaced with external libraries (written in java). My solution seems to be more in line with Tom Cardens voronoicones example from processing hacks that your example reminds me of (worth a look if you haven't seen it). anar and unlekkerLib num_1275029263.html Processing Discourse/Other Libraries num_1275029263.html Thu, 27 May 2010 23:47:43 +0000 I plan to use the anar library, I've discovered that it seems to only export scripts. &nbsp;I want to export object files, preferably STL. &nbsp;I've discovered unlekkerLib library but it doesn't seem compatible with anar. &nbsp;Am I correct? Any suggestions on exporting STLs? Export SVG/Tiff an P3D generated Image num_1274809377.html Processing Discourse/Other Libraries num_1274809377.html Wed, 26 May 2010 12:51:18 +0000 I found the createGraphics(), but I havn´t jet the time to test it.<br />Also up to I have more time <img src="yabbfiles/Templates/Forum/processing_one/smiley.gif" border="0" alt="Smiley" title="Smiley" />.