I'm looking at updating a library (SurfaceMapper) that currently only works with Processing 1.5.1, and I'm curious about what is necessary to make it work with 2.0+? I haven't been able to track down any good articles about what needs to be done, so I'm curious if someone can give me some tips about what needs to be done in general.
I've been working with Geomerative to generate some SVG files, but I can't seem to figure out how to change the actual canvas size of the SVG that is outputted. When I use an RSVG object to output my shapes, I always get a canvas that is 8000x2000 pixels, with the shapes I outputted up in the upper left. I haven't yet located any relevant methods in the documentation about canvas size operations.
Does anyone know how Geomerative comes up with it's canvas sizes for outputting, and how to change it?
I've been trying to make a simple sketch that draws a parameterized 3D supershape, but am having a hard time actually making the 3D surface render correctly. I think I've got the math correct - I started with
this cool 2D example from Form+Code, then extended it into 3D using
these tips from Paul Bourke (with a few ControlP5 sliders to play with the variables).
What I ended up with is a small point cloud of seemingly ordered points. One can easily see the shape of the 3D form, so I think that part is working OK. However, I wanted to create a 3D model out of these points by connecting each of the vertices together with either a triangle strip or a quad strip. Trouble is, every time I try to do so, the result is extremely jagged, with tons and tons of overlapping and criss-crossing.
My investigation so far tells me that the points as they exist in my data structure (ArrayList) do not match up with the intuitive picture you see when you run the app (i.e., points that appear close to each other in the app running are not close together in the data structure).
I was hoping to end up with a model that I could export as an STL file for some 3D printing fun, but I'm stuck with making the model out of these points. Does anyone have any ideas?
I'm curious if anyone has some advice about how to perform a boolean subtract using two 3D objects in Processing. Let's say I wanted to be able to make molds (for glass, for example) out of arbitrary 3D models - I imagine taking that 3D object and 'subtracting' it from the center of a solid box, leaving the negative of that 3D object embedded in the box. Eventually I'd like to print this mold on a 3D printer, but I can handle that myself.
Does anyone know of any libraries that enable this kind operation? If not, have any theories about how to code it?
Hi! I'm working on converting a simple sketch to utilize Geomerative to render graphics, instead of the built-in Processing functions, but have hit a little snag. Its easy enough to draw lines and shapes using Geomerative, but I'm struggling with drawing curves.
The original code I'm using uses the curveVertex method nested inside a pair of beginShape/endShape calls, but Geomerative utilizes bezier curves, which require explicit definition of control points. Here is the relevant snippet from my sketch that I'm having a hard time porting over to Geomerative:
I've been trying to get a sketch running in Eclipse that can communicate with Arduino via Serial, and have run into a problem that I can't figure out myself. In particular, when I load my sketch and ask it to list available serial devices (Serial.list()), I receive the following error:
java.lang.UnsatisfiedLinkError: no rxtxSerial in java.library.path thrown while loading gnu.io.RXTXCommDriver
To get to this point, I have set up my Eclipse environment to utilize the core.jar file from my Processing installation, then followed the same procedure to add the libraries I wanted to use. I then added "RXTXcomm.jar" and "serial.jar" from my Processing's modes/java/libraries/serial/library folder.
I suspect I need to add some sort of file to my Eclipse project's Build Path, but I do not know what that file is or where I can find it on my file system. Another thread (
http://forum.processing.org/topic/serial-library-in-eclipse) seems to support this idea, but they only refer to the MacOSX file system, rather than the Ubuntu file system, so I'm lost on the particulars.
I know variations of this question has been asked many, many times, and that everyone is aware of the various limitations with Processing / Java's ability to output videos, but I was hoping to get some pointers and advice based on what I've already tried.
The program I am wanting to capture is an audio visualizer I developed for a musician friend of mine, so I need in particular to get the video to sync up with the audio. I am using Minim to play (and analyze) audio in real-time to make an icosohedron respond to music in various ways.
I have already tried:
- Using saveFrame() to output image sequences, then importing these into virtualdub to make a video. I tried using jpg and bmp images, but still the quality was too low (too many artifacts and ghosting).
- Using an external screen capture program. In particular, I tried virtualdub (never got it to work), CamStudio (horrible discoloration issues, not meant for high quality vids) and a couple really obscure and terrible apps. None of them would output decent quality videos, even with all the configuration / settings maxed out.
- Using MovieMaker to output a .mov file, then converting this into an .avi and importing to Windows Live Movie Maker (I know, I feel dirty too). The quality seems OK, but the video is much shorter than the audio file being used (about 1/4 the duration). I am using the following parameters to instantiate MoveiMaker:
mm = new MovieMaker(this, width, height, "ico.mov", 30, MovieMaker.ANIMATION, MovieMaker.HIGH);
By the way, I am limiting my sketch to 30fps by using frameRate()
Honestly, I am not biased towards any particular method of getting videos made of my sketches,so anything is acceptable! I use Win7 64-bit, and do not have access to a Mac.
Does anyone have any advice about how I can create videos of my work to share on sites like YouTube or Vimeo (HD would be fantastic, but SD would be OK, as long as the quality isn't too bad and the audio + video matches up).
So I've got a 3D model, I put it into my data folder and copied an example from the OBJLoader website and integrated it into my Processing sketch. However I keep getting a constant stream of NullPointerException errors when I try to call the draw method on my model object. Why?
OBJModel model;
setup() {
// Load the 3D model
model = new OBJModel(this, "Old_Key.obj");
model.enableDebug();
model.translateToCenter();
}
void loop() {
model.draw();
}
And here is the error that I keep getting every frame:
java.lang.NullPointerException
at java.util.Hashtable.get(Hashtable.java:334)
at saito.objloader.OBJModel.drawModel(OBJModel.java:506)
at saito.objloader.OBJModel.draw(OBJModel.java:485)
at Chronos_Interface.draw(Chronos_Interface.java:218)
at processing.core.PApplet.handleDraw(Unknown Source)
Hey! I'm working on a project where I want to basically control the rotation of a sphere using my hand. Sort of like Minority Report meets Google Earth. However the project is turning out to be seem more complicated than I originally thought so I wanted to see what help I could get.
Originally I was thinking of using the ez430 Chronos Wristwatch from TI and using its accelerometer to control my sphere. But the more I got into that idea the more I realized how hard this must be.
I thought I could track a hand's position just by using an accelerometer but I've heard that in order to get actual position data you have to take a double integral of the accelerometer data which causes errors (drift) to come up exponentially over time.
Then I read about using an IMU which pairs a gyro with an accelerometer to get more accurate readings, but is that overkill?
Essentially I'd like to create the illusion for a user that when they move their hand around a spherical model would spin around, like a virtual 'globe' that you can physically manipulate to see different sides of. Does anyone have some good ideas for an electronics interface that can help me do this?
I've been trying for the last few days to get a texture to load into my processing sketch in Eclipse. I had it working at some point and for the life of me can't figure out what the problem is. I am using loadImage() to load an image into a PImage variable, then use that PImage as the parameter for texture. It does NOT break on loading the image but I keep getting this error regarding the texture call:
Exception in thread "Animation Thread" java.lang.NullPointerException
at processing.core.PApplet.texture(PApplet.java:7006)
at particleplayground.Emitter.render(Emitter.java:44)
at particleplayground.Particle_Playground.draw(Particle_Playground.java:30)
at processing.core.PApplet.handleDraw(PApplet.java:1425)
at processing.core.PApplet.run(PApplet.java:1327)
at java.lang.Thread.run(Unknown Source)
Its starting to drive me crazy, especially since I did have it working at one time....and theres only two lines to screw up :S Here is my Eclipse project, I hope someone can help!