repositories
/
SugarCubes.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac6b3e4
)
get dpat
author
bb3dan
<gitdan@citopia.com>
Wed, 23 Oct 2013 18:56:18 +0000
(14:56 -0400)
committer
bb3dan
<gitdan@citopia.com>
Wed, 23 Oct 2013 18:56:22 +0000
(14:56 -0400)
DanHorwitz.pde
patch
|
blob
|
blame
|
history
diff --git
a/DanHorwitz.pde
b/DanHorwitz.pde
index a645489790e2e9f3ccffc451fc3b5da461cc47cc..4f0c41b03ec422375facb9ae8feb3ac6a226013e 100644
(file)
--- a/
DanHorwitz.pde
+++ b/
DanHorwitz.pde
@@
-168,14
+168,12
@@
public class Play extends DPat
a3 = new rAngle(), a4 = new rAngle();
xyz cPrev = new xyz(), cRand = new xyz(),
cMid = new xyz(), V = new xyz(),
a3 = new rAngle(), a4 = new rAngle();
xyz cPrev = new xyz(), cRand = new xyz(),
cMid = new xyz(), V = new xyz(),
-
Theta = new xyz(), T
Sin = new xyz(),
-
T
Cos = new xyz(), cMidNorm = new xyz(),
+
theta = new xyz(), t
Sin = new xyz(),
+
t
Cos = new xyz(), cMidNorm = new xyz(),
Pn = new xyz();
float LastBeat=3, LastMeasure=3;
Pn = new xyz();
float LastBeat=3, LastMeasure=3;
- int CurRandTempo = 1, CurRandTPat = 1;
-
+ int curRandTempo = 1, curRandTPat = 1;
Pick pTimePattern, pTempoMult, pShape;
Pick pTimePattern, pTempoMult, pShape;
- int RandCube;
Play(GLucose glucose) {
super(glucose);
Play(GLucose glucose) {
super(glucose);
@@
-227,17
+225,17
@@
public class Play extends DPat
bnc = pBounce .getValuef();
zTheta += deltaMs*(val(pSpin)-.5)*.01;
bnc = pBounce .getValuef();
zTheta += deltaMs*(val(pSpin)-.5)*.01;
-
T
heta .set(val(pRotX)*PI*2, val(pRotY)*PI*2, val(pRotZ)*PI*2 + zTheta);
-
TSin .set(sin(Theta.x), sin(Theta.y), sin(T
heta.z));
-
TCos .set(cos(Theta.x), cos(Theta.y), cos(T
heta.z));
+
t
heta .set(val(pRotX)*PI*2, val(pRotY)*PI*2, val(pRotZ)*PI*2 + zTheta);
+
tSin .set(sin(theta.x), sin(theta.y), sin(t
heta.z));
+
tCos .set(cos(theta.x), cos(theta.y), cos(t
heta.z));
if (t<LastMeasure) {
if (t<LastMeasure) {
- if (random(3) < 1) {
CurRandTempo = int(random(4)); if (CurRandTempo == 3) C
urRandTempo = int(random(4)); }
- if (random(3) < 1) {
C
urRandTPat = pShape.Cur() > 6 ? 2+int(random(5)) : int(random(7)); }
+ if (random(3) < 1) {
curRandTempo = int(random(4)); if (curRandTempo == 3) c
urRandTempo = int(random(4)); }
+ if (random(3) < 1) {
c
urRandTPat = pShape.Cur() > 6 ? 2+int(random(5)) : int(random(7)); }
} LastMeasure = t;
} LastMeasure = t;
- int nTempo = pTempoMult .Cur(); if (nTempo == 5) nTempo =
C
urRandTempo;
- int nTPat = pTimePattern.Cur(); if (nTPat == 7) nTPat =
C
urRandTPat ;
+ int nTempo = pTempoMult .Cur(); if (nTempo == 5) nTempo =
c
urRandTempo;
+ int nTPat = pTimePattern.Cur(); if (nTPat == 7) nTPat =
c
urRandTPat ;
switch (nTempo) {
case 0: t = t; break;
switch (nTempo) {
case 0: t = t; break;
@@
-283,9
+281,9
@@
public class Play extends DPat
}
color CalcPoint(xyz Px) {
}
color CalcPoint(xyz Px) {
- if (
Theta.x != 0) Px.rotateX(mCtr, TSin.x, T
Cos.x);
- if (
Theta.y != 0) Px.rotateY(mCtr, TSin.y, T
Cos.y);
- if (
Theta.z != 0) Px.rotateZ(mCtr, TSin.z, T
Cos.z);
+ if (
theta.x != 0) Px.rotateX(mCtr, tSin.x, t
Cos.x);
+ if (
theta.y != 0) Px.rotateY(mCtr, tSin.y, t
Cos.y);
+ if (
theta.z != 0) Px.rotateZ(mCtr, tSin.z, t
Cos.z);
Pn.set(Px); Pn.setNorm();
Pn.set(Px); Pn.setNorm();