private final BasicParameter basePairsOn = new BasicParameter("BPON", 1);
private static final float helixCoilPeriod = 100;
- private static final float helixCoilRadius = 45;
- private static final float helixCoilGirth = 20;
- private static final float helixCoilRotationPeriod = 10000;
+ private static final float helixCoilRadius = 50;
+ private static final float helixCoilGirth = 30;
+ private static final float helixCoilRotationPeriod = 5000;
private static final float spokePeriod = 40;
- private static final float spokeGirth = 10;
+ private static final float spokeGirth = 20;
private static final float spokePhase = 10;
- private static final float spokeRadius = 35; // helixCoilRadius - helixCoilGirth*.5f;
+ private static final float spokeRadius = helixCoilRadius - helixCoilGirth*.5f;
private static final float tMin = -200;
private static final float tMax = 200;
}
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);
}