sghr / iGeo

iGeo: Computational Design and 3D Modeling Library for Processing
http://igeo.jp
GNU Lesser General Public License v3.0
146 stars 34 forks source link

Field strength of IAttractor is always zero #3

Open sketch34 opened 10 years ago

sketch34 commented 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)

sghr commented 10 years ago

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.