repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9cdbec1
)
[Helix] Fade edges of base pairs
author
Shaheen Gandhi
<shaheen@fb.com>
Wed, 21 Aug 2013 06:28:07 +0000
(23:28 -0700)
committer
Shaheen Gandhi
<shaheen@fb.com>
Wed, 21 Aug 2013 06:28:07 +0000
(23:28 -0700)
ShaheenGandhi.pde
patch
|
blob
|
blame
|
history
diff --git
a/ShaheenGandhi.pde
b/ShaheenGandhi.pde
index f94e5e4992c2e519fcef2a71a1e6ffeb83470f3e..a4b5532d57055a1611943b31d68ff8c2b5292192 100644
(file)
--- a/
ShaheenGandhi.pde
+++ b/
ShaheenGandhi.pde
@@
-222,7
+222,8
@@
class HelixPattern extends SCPattern {
}
Line spokeLine = basePairs[spokeIndex];
PVector pointOnSpoke = spokeLine.projectPoint(pt);
}
Line spokeLine = basePairs[spokeIndex];
PVector pointOnSpoke = spokeLine.projectPoint(pt);
- float b = ((PVector.dist(pt, pointOnSpoke) < spokeGirth) && (PVector.dist(pointOnSpoke, spokeLine.getPoint()) < spokeRadius)) ? 100.f : 0.f;
+ float d = PVector.dist(pt, pointOnSpoke);
+ float b = (PVector.dist(pointOnSpoke, spokeLine.getPoint()) < spokeRadius) ? constrain(100*(1 - ((d-.5*spokeGirth)/(spokeGirth*.5))), 0, 100) : 0.f;
return color(100, 80.f, b);
}
return color(100, 80.f, b);
}