Hi,
I’m currently trying to get my program running well on jruby rather than
MRI, to see if it can solve some issues I’m having with MRI (primarily
to do with garbage collection, but having real threads may turn out to
be very useful too). Part of the program involves perlin noise, and I
have been using a ruby c gem that runs very fast. The perlin_noise gem
based on pure ruby is very slow. Someone recommended I try this:
http://code.j3d.org/javadoc/org/j3d/texture/procedural/PerlinNoiseGenerator.html
However, being unfamiliar with both java and jruby, I don’t know how to
get this working. I’ve tried:
require ‘java’
module Java3D
include_package “org.j3d.texture.procedural”
end
class Generator
include Java3D
def initialize
@test = Java3D::PerlinNoiseGenerator.noise2(4,4)
@test = Java3D::PerlinNoiseGenerator(4,4,4)
end
end
Neither of these @test assignments work (I did not try both at once, of
course). Is there something I might be missing?
I’m running this on mac osx, and installed jruby via rvm (jruby-1.7.1).
Thanks!