repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
34d4954
)
[Helix][perf] Reduce number of point calculations.
author
Shaheen Gandhi
<shaheen@fb.com>
Mon, 19 Aug 2013 03:50:27 +0000
(20:50 -0700)
committer
Shaheen Gandhi
<shaheen@fb.com>
Tue, 20 Aug 2013 07:18:30 +0000
(
00:18
-0700)
ShaheenGandhi.pde
patch
|
blob
|
blame
|
history
diff --git
a/ShaheenGandhi.pde
b/ShaheenGandhi.pde
index dcdb90800a84c754aa4bbb9a2f20a327d6ab0b24..d562e3bd3fed0b12357611d46d4bb8072c76ebd6 100644
(file)
--- 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, axis
Point
) - radius) > girth*.5f) {
return color(0,0,0);
}