Open sketch34 opened 10 years ago
How to I access the field strength of an IAttractorField? Using the get() method doesn't seem to work. It is zero strength at every point.
import processing.opengl.; import igeo.;
IAttractor attr = null; void setup() { size(480, 360, IG.GL); attr = new IAttractor(0,0,0, 20.f).noDecay(); IVecI f = attr.get(new IVec(20, 30, 40)); println(f); }
Output: (0.0,0.0,0.0)
The previous update was having a new bug around point-based fields making all force outputs zero. I fixed it and posted a new version. Thanks for letting me know.
How to I access the field strength of an IAttractorField? Using the get() method doesn't seem to work. It is zero strength at every point.
import processing.opengl.; import igeo.;
IAttractor attr = null; void setup() { size(480, 360, IG.GL); attr = new IAttractor(0,0,0, 20.f).noDecay(); IVecI f = attr.get(new IVec(20, 30, 40)); println(f); }
Output: (0.0,0.0,0.0)