X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=ShaheenGandhi.pde;fp=ShaheenGandhi.pde;h=d562e3bd3fed0b12357611d46d4bb8072c76ebd6;hb=b8f61125ba62e4d775afff07ce1cf6ca2b6dd394;hp=dcdb90800a84c754aa4bbb9a2f20a327d6ab0b24;hpb=34d49545ede09567a0dd866a9d105ce48d9c1fc9;p=SugarCubes.git diff --git a/ShaheenGandhi.pde b/ShaheenGandhi.pde index dcdb908..d562e3b 100644 --- a/ShaheenGandhi.pde +++ b/ShaheenGandhi.pde @@ -117,11 +117,12 @@ class HelixPattern extends SCPattern { } color colorOfPoint(final PVector p) { - float t = axis.getTValue(p); + final float t = axis.getTValue(p); + final PVector axisPoint = axis.getPointAt(t); // For performance reasons, cut out points that are outside of // the tube where the toroidal coil lives. - if (abs(PVector.dist(p, axis.getPointAt(t)) - radius) > girth*.5f) { + if (abs(PVector.dist(p, axisPoint) - radius) > girth*.5f) { return color(0,0,0); }