Writing (or coding) waveshapes

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Audio Spectrograph II - rewrite

Post by jerohm »

There should be a couple of earlier attempts at this, on this thread. While playing around with WC, I saw someone else's stab at it. I have to admit that I liked the shading, so I rewrote/updated this version. The truth is Flowfields can obscure the effect, so I don't know if the presentation is all that much different/better... BUT it should be wickedly efficient. Reactivity can be adjusted by tweaking 'Amp'. I tested it using WinAmp.

enjoy, or dismiss.

Code: Select all

/*  Audio Spectrograph II  jrm
        *** With *** Peak Hold Presentation
                     & WC style shadow depth.
        Flowfield: (Empty) and others

NCap=1                          // SQUARE ends ... documented???
*/

Scal=1.1
Amp=2.6                         // Good for WinAmp
VOff=.01                        // Vertical Offset,  1/100
HOff=.00625                     // Horizonal Offset, 1/160

ConB=1
Stps=2
Num=20
A0="Num/2"

A1="vectorLR(A0, 0, A0-1)"      // B8/B9 Index (bit tricky!)
B0="Id % A0"
B1="(Id>=A0)"

A2=".125"                       // Y Axis Vertical Spacing
A3=".95"                        // Y Axis Shift

A4="2-(1/A0)"
A5="vectorLR(Num_S_Steps, 0, A2/Scal)"

A6="A5 + &#40;&#40;.04*Scal&#41; + transpose&#40;A4*&#40;A1/A0&#41;&#41; - &#40;A4/2&#41;&#41;" // X, where Id <  A10
A7="A6-HOff"                                            // X, where Id >= A10

A8="A2 * vectorLR&#40;15, 0, 14&#41;"
A9="vectorLR&#40;A0, 0, 1&#41;"       // fft&#40;&#41; index

B2="row&#40;select&#40;B1, A7, A6&#41;, B0&#41;"
Pen="   select&#40;B1, 1, 127/128&#41;"


B3="select&#40;Id, B3, transpose&#40;fft&#40;A9&#41; * Amp&#41;&#41;"           // Scaled
B4="select&#40;Id, select&#40;&#40;Id!=A0&#41;, B4, B4+VOff&#41;, &#40;&#40;B3 > A8 &#41; * A8&#41; - A3&#41;"
B5="row&#40;B4,B0&#41;"

 X0="B2"
 Y0="col&#40;B5, 0&#41;"                // "&#40;B3 > A2 *  0 &#41; * A2 *  0  - A3"

 X1="B2"
 Y1="col&#40;B5, 1&#41;"                // "&#40;B3 > A2 *  1 &#41; * A2 *  1  - A3"

 X2="B2"
 Y2="col&#40;B5, 2&#41;"                // "&#40;B3 > A2 *  2 &#41; * A2 *  2  - A3"

 X3="B2"
 Y3="col&#40;B5, 3&#41;"                // "&#40;B3 > A2 *  3 &#41; * A2 *  3  - A3"

 X4="B2"
 Y4="col&#40;B5, 4&#41;"                // "&#40;B3 > A2 *  4 &#41; * A2 *  4  - A3"

 X5="B2"
 Y5="col&#40;B5, 5&#41;"                // "&#40;B3 > A2 *  5 &#41; * A2 *  5  - A3"

 X6="B2"
 Y6="col&#40;B5, 6&#41;"                // "&#40;B3 > A2 *  6 &#41; * A2 *  6  - A3"

 X7="B2"
 Y7="col&#40;B5, 7&#41;"                // "&#40;B3 > A2 *  7 &#41; * A2 *  7  - A3"

 X8="B2"
 Y8="col&#40;B5, 8&#41;"                // "&#40;B3 > A2 *  8 &#41; * A2 *  8  - A3"

 X9="B2"
 Y9="col&#40;B5, 9&#41;"                // "&#40;B3 > A2 *  9 &#41; * A2 *  9  - A3"

X10="B2"
Y10="col&#40;B5, 10&#41;"               // "&#40;B3 > A2 * 10 &#41; * A2 * 10  - A3"

X11="B2"
Y11="col&#40;B5, 11&#41;"               // "&#40;B3 > A2 * 11 &#41; * A2 * 11  - A3"

X12="B2"
Y12="col&#40;B5, 12&#41;"               // "&#40;B3 > A2 * 12 &#41; * A2 * 12  - A3"

X13="B2"
Y13="col&#40;B5, 13&#41;"               // "&#40;B3 > A2 * 13 &#41; * A2 * 13  - A3"

X14="B2"
Y14="col&#40;B5, 14&#41;"               // "&#40;B3 > A2 * 14 &#41; * A2 * 14  - A3"

// &#40; Not 100% correct, but close enuff... ;0&#41;
//
B6="max&#40;col&#40;B8, B0&#41;, min&#40;15*A2, trunc&#40;row&#40;B3,B0&#41;/A2&#41;*A2&#41;&#41;"
B7="select&#40;&#40;B6 > col&#40;B8, B0&#41;&#41;, 30, max&#40;0, col&#40;B9, B0&#41;-1&#41;&#41;"

X15="B2"
Y15="&#40;trunc&#40;B6/A2&#41;*A2&#41; - A3 + B1*VOff"      // Peak Hold

B8="select&#40;&#40;A1 != Id&#41;, B8, select&#40;B7, B6, max&#40;&#40;B6-A2/2&#41;, 0&#41;&#41;&#41;"
B9="select&#40;&#40;A1 != Id&#41;, B9, B7&#41;"

LWdt=12
Meta="reactive=5 detail=5 density=5 morphable=3"
Vers=400

Updated 'morphable' 4/11/2014
Last edited by jerohm on Fri Apr 11, 2014 7:11 am, edited 1 time in total.

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

Hello jerohm

This config is throwing up some text about insufficient meta data. Would this be due to some of us who are still using version 4.3.2
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

Try changing to:

Code: Select all

Meta="reactive=5 detail=5 density=5 morphable=3"
I don't think I have a machine with 4.32 anymore... I will check my XP installation.

MY issue is that the thick lines don't necessary Morph well with other configs... just the nature of the beast. I was hoping that setting it lower would have it just "exit, stage left... (or right)" instead of an actual Morph... which is a GOOD :idea: !! Alas, not all good ideas come to fruition.

If you are creating Themes (5.x), and run a lot of personal Sprites, It works pretty good as the ONLY WaveShape, ALL(most) Particles, and Flow In, Flow Out, or (None) Flowfields ... and BTT colormaps (of course :wink: )

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

Hello jerohm

NOW it's working. Best new original WaveShape for G-Force for a long time. I recommend everyone to download this to add to your WaveShapes folder. Fantastic job.
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

totally Unremarkable...

Post by jerohm »

... except for those A0 values... :wink:

Native support of SVG ('d') path descriptions would have made my life a whole lot simpler...

Code: Select all

// Pitcher This II - jrm 

Aspc=1 
ConB=1 
Num=12 
Stps=512 

A0="&#123; choice&#40;&#123;-1,1&#125; &#41;
    * map1D&#40; &#123; -340, -412, -487, -559, -620, -658, -693, -725, -754, -779, -799, -814, -819, -823, -826, -827, -829, -827, -823, -820, -820
             , -822, -839, -874, -924, -971,-1016,-1056,-1094,-1129,-1161,-1189,-1214,-1236,-1255,-1271,-1284,-1294,-1301,-1304,-1305,-1303
             ,-1299,-1293,-1284,-1274,-1262,-1247,-1233,-1219,-1203,-1184,-1161,-1133,-1057,-1028,-1004, -985, -971, -960, -952, -946, -940
             , -938, -936, -937, -938, -940, -944, -949, -955, -961, -969, -978, -988, -999,-1011,-1023,-1036,-1048,-1058,-1068,-1079,-1090
             ,-1102,-1117,-1134,-1155,-1163,-1169,-1173,-1177,-1178,-1179,-1176,-1169,-1158,-1145,-1105,-1086,-1066,-1047,-1028,-1009, -990
             , -970, -950, -930, -909, -888, -865, -842, -818, -798, -774, -719, -661, -634, -611, -550, -492, -437, -411, -387, -346, -288
             , -234, -189, -148, -102,  -38,  -10,   15,   40,   64,   88,  112,  171,  267,  377,  480,  527,  553,  566,  574,  581,  586
             ,  589,  590,  589,  587,  577,  560,  553,  548,  544,  541,  538,  537,  539,  545,  555,  563,  571,  581,  592,  604,  618
             ,  633,  650,  672,  694,  720,  754,  787,  810,  826,  840,  868,  892,  895,  898,  903,  909,  917,  928,  959,  985,  995
             , 1005, 1014, 1024, 1047, 1070, 1098, 1125, 1145, 1166, 1187, 1207, 1225, 1234, 1241, 1246, 1251, 1254, 1255, 1257, 1256, 1251
             , 1248, 1243, 1238, 1231, 1224, 1215, 1205, 1194, 1182, 1168, 1153, 1136, 1108, 1075, 1038, 1019, 1000,  980,  959,  939,  919
             ,  899,  879,  859,  840,  811,  790,  776,  768,  766,  766,  766,  767,  773,  781,  801,  822,  830,  836,  838,  838,  836
             ,  826,  814,  801,  786,  771,  755,  739,  723,  706,  691,  675,  661,  648,  636,  626,  618,  611,  608,  606,  607,  610
             ,  614,  621,  629,  639,  650,  662,  675,  689,  704,  719,  735,  752,  771,  791,  811,  832,  854,  898,  943,  988, 1009
             , 1031, 1051, 1071, 1101, 1135, 1168, 1198, 1217, 1236, 1255, 1274, 1292, 1310, 1327, 1343, 1359, 1374, 1387, 1400, 1411, 1422
             , 1431, 1438, 1446, 1453, 1459, 1463, 1467, 1469, 1471, 1471, 1470, 1468, 1464, 1460, 1455, 1448, 1440, 1428, 1414, 1397, 1379
             , 1359, 1338, 1316, 1294, 1275, 1253, 1200, 1142, 1083, 1056, 1029, 1002,  975,  947,  919,  890,  860,  833,  816,  805,  792
             ,  743,  695,  648,  604,  565,  520,  483,  472,  466,  465,  465,  470,  474,  476,  476,  474,  470,  463,  453,  441,  424
             ,  402,  378,  351,  322,  294,  268,  243,  189,  111,   23,  -62, -125, -202, -279, -340, -340 &#125;/2000 -0, s, 0&#41;

    , map1D&#40;-&#123; 1575, 1569, 1561, 1551, 1540, 1531, 1521, 1509, 1497, 1484, 1470, 1457, 1450, 1444, 1438, 1430, 1410, 1387, 1362, 1339, 1334
             , 1330, 1316, 1291, 1253, 1214, 1172, 1130, 1085, 1040,  992,  943,  892,  840,  786,  730,  673,  614,  553,  490,  442,  394
             ,  347,  302,  257,  215,  174,  135,  102,   72,   40,    7,  -29,  -73, -186, -230, -268, -300, -330, -358, -387, -419, -456
             , -482, -511, -540, -569, -600, -631, -662, -693, -723, -754, -784, -813, -841, -868, -894, -919, -938, -954, -966, -976, -983
             , -989, -994, -998,-1003,-1006,-1010,-1014,-1019,-1025,-1032,-1045,-1062,-1083,-1105,-1160,-1185,-1208,-1229,-1248,-1266,-1281
             ,-1296,-1308,-1319,-1329,-1338,-1345,-1351,-1356,-1359,-1361,-1362,-1360,-1357,-1354,-1342,-1327,-1308,-1298,-1288,-1264,-1228
             ,-1193,-1167,-1144,-1121,-1092,-1081,-1072,-1065,-1060,-1056,-1053,-1051,-1050,-1049,-1051,-1051,-1051,-1049,-1045,-1040,-1035
             ,-1029,-1022,-1012, -999, -961, -896, -867, -839, -810, -781, -715, -665, -624, -581, -527, -494, -461, -428, -395, -362, -329
             , -295, -261, -219, -180, -137,  -87,  -36,    1,   32,   63,  143,  216,  225,  232,  237,  241,  244,  245,  246,  246,  244
             ,  242,  238,  233,  218,  200,  173,  145,  121,   87,   47,    3,  -44,  -70,  -94, -117, -141, -167, -194, -260, -329, -391
             , -420, -447, -473, -498, -522, -545, -567, -587, -608, -627, -646, -665, -692, -721, -748, -761, -772, -783, -792, -799, -804
             , -807, -807, -805, -800, -789, -778, -769, -761, -757, -754, -750, -747, -741, -735, -725, -716, -712, -708, -704, -701, -699
             , -690, -681, -673, -666, -659, -654, -651, -648, -647, -647, -648, -652, -657, -663, -672, -683, -695, -708, -722, -736, -750
             , -764, -778, -792, -805, -818, -831, -843, -854, -865, -874, -883, -890, -897, -903, -908, -912, -916, -919, -919, -915, -911
             , -907, -902, -895, -883, -867, -848, -830, -816, -800, -783, -764, -744, -723, -701, -678, -654, -629, -604, -579, -553, -528
             , -502, -476, -444, -413, -380, -347, -313, -278, -241, -202, -126,  -90,  -56,  -22,   11,   46,   82,  129,  176,  224,  271
             ,  317,  361,  403,  442,  470,  502,  572,  643,  710,  740,  767,  791,  815,  836,  857,  877,  895,  912,  923,  935,  952
             , 1017, 1079, 1134, 1183, 1220, 1259, 1290, 1301, 1307, 1313, 1321, 1351, 1373, 1392, 1407, 1421, 1432, 1442, 1452, 1462, 1473
             , 1485, 1497, 1508, 1519, 1529, 1537, 1543, 1552, 1561, 1569, 1575, 1577, 1578, 1577, 1575, 1575 &#125;/2000 + .065, s, 0&#41;
&#125;" 

A1="sign&#40;col&#40;row&#40;A0, 0&#41;, 0&#41;&#41;/2" 
B0="Pi*Id/Num*sin&#40;pos&#40;t-5&#41;/6&#41; - A1*t" 

X0="row&#40;A0, 0&#41; + cos&#40;B0&#41;/4" 
Y0="row&#40;A0, 1&#41; + sin&#40;B0&#41;/4" 

Lwdt="1.2" 
Pen="1" 

Meta="reactive=3 detail=3 density=3 morphable=5"   // Comment out >= v5 ... &#40;reactive == 0&#41; REALLY, but you lose morphing effects 
Vers=500 

just for fun...

Code: Select all

Aspc=1
ConB=1
Num="round&#40;1+rnd&#40;5&#41;&#41;"


A0="&#123;   map1d&#40; &#123;  -178,  -309,  -438,  -568,  -696,  -823,  -950, -1075, -1198, -1321, -1441, -1561, -1678, -1793, -1907, -2018, -2127, -2207
	       , -2284, -2361, -2435, -2508, -2579, -2648, -2715, -2781, -2844, -2906, -2966, -3023, -3079, -3132, -3183, -3238, -3290, -3339
	       , -3385, -3427, -3467, -3504, -3537, -3567, -3595, -3619, -3639, -3657, -3672, -3683, -3691, -3694, -3695, -3693, -3689, -3679
	       , -3664, -3645, -3622, -3595, -3563, -3527, -3487, -3443, -3394, -3341, -3284, -3223, -3158, -3089, -3015, -2959, -2901, -2840
	       , -2777, -2711, -2643, -2574, -2502, -2429, -2354, -2277, -2199, -2120, -2040, -1958, -1876, -1764, -1650, -1535, -1419, -1302
	       , -1184, -1064,  -943,  -822,  -699,  -575,  -450,  -324,  -198,   -70,    57,   245,   417,   586,   762,   870,   976,  1081
	       ,  1185,  1288,  1389,  1488,  1586,  1683,  1778,  1871,  1963,  2053,  2141,  2227,  2311,  2393,  2473,  2551,  2627,  2700
	       ,  2772,  2841,  2907,  2971,  3033,  3092,  3149,  3203,  3254,  3303,  3348,  3393,  3435,  3473,  3508,  3540,  3568,  3592
	       ,  3612,  3628,  3641,  3650,  3655,  3656,  3654,  3648,  3638,  3620,  3598,  3570,  3538,  3500,  3458,  3410,  3358,  3300
	       ,  3238,  3172,  3100,  3024,  2944,  2859,  2769,  2699,  2628,  2554,  2478,  2401,  2322,  2241,  2158,  2074,  1988,  1901
	       ,  1812,  1722,  1631,  1538,  1444,  1349,  1253,  1156,  1057,   958,   858,   757,   656,   553,   450,   346,   242,   137
	       ,    32,   -72,  -178,  -178 &#125;/5000, s, 1&#41;

      ,	map1d&#40; &#123;   233,   339,   444,   548,   651,   754,   856,   956,  1056,  1154,  1252,  1348,  1442,  1536,  1628,  1718,  1807,  1894
	       ,  1980,  2064,  2146,  2226,  2304,  2381,  2455,  2527,  2597,  2665,  2730,  2793,  2854,  2912,  2967,  3044,  3114,  3178
	       ,  3234,  3284,  3328,  3364,  3394,  3406,  3416,  3425,  3432,  3437,  3441,  3443,  3443,  3441,  3438,  3432,  3425,  3416
	       ,  3406,  3393,  3379,  3361,  3341,  3319,  3295,  3268,  3239,  3209,  3176,  3141,  3105,  3066,  3025,  2983,  2938,  2892
	       ,  2844,  2742,  2633,  2517,  2394,  2265,  2129,  1987,  1839,  1686,  1529,  1369,  1205,  1038,   869,   697,   523,   348
	       ,   172,    -4,  -182,  -359,  -536,  -713,  -889, -1032, -1172, -1311, -1446, -1579, -1709, -1836, -1959, -2079, -2196, -2309
	       , -2418, -2523, -2623, -2719, -2811, -2864, -2915, -2963, -3010, -3054, -3097, -3137, -3176, -3212, -3246, -3277, -3307, -3334
	       , -3359, -3382, -3403, -3425, -3444, -3459, -3472, -3478, -3480, -3479, -3475, -3464, -3449, -3430, -3406, -3378, -3346, -3310
	       , -3269, -3224, -3176, -3123, -3065, -3004, -2939, -2869, -2795, -2694, -2587, -2474, -2356, -2233, -2106, -1974, -1837, -1697
	       , -1553, -1405, -1255, -1101,  -945,  -786,  -625,  -520,  -415,  -308,  -201,   -92,    15,   124,   233,   233 &#125;/5000, s, 1&#41;

      ,	map1d&#40; &#123;   -26,   -61,   -96,  -131,  -166,  -202,  -237,  -273,  -309,  -341,  -374,  -407,  -439,  -472,  -506,  -539,  -572,  -606
	       ,  -639,  -673,  -707,  -741,  -775,  -808,  -842,  -886,  -929,  -973, -1017, -1061, -1104, -1147, -1188, -1215, -1220, -1231
	       , -1267, -1323, -1380, -1437, -1494, -1551, -1608, -1665, -1722, -1768, -1807, -1847, -1892, -1949, -1968, -1988, -2012, -2034
	       , -2055, -2074, -2093, -2110, -2125, -2140, -2152, -2164, -2174, -2183, -2190, -2196, -2204, -2205, -2201, -2191, -2176, -2155
	       , -2129, -2098, -2061, -2037, -2048, -2075, -2162, -2262, -2341, -2435, -2525, -2610, -2689, -2764, -2834, -2899, -2958, -3013
	       , -3062, -3105, -3143, -3176, -3203, -3225, -3241, -3247, -3252, -3254, -3254, -3251, -3247, -3240, -3230, -3219, -3206, -3190
	       , -3172, -3152, -3129, -3105, -3078, -3032, -2981, -2925, -2864, -2798, -2727, -2650, -2568, -2500, -2428, -2353, -2273, -2191
	       , -2105, -2016, -1924, -1798, -1655, -1509, -1378, -1320, -1319, -1321, -1338, -1372, -1404, -1433, -1459, -1481, -1500, -1515
	       , -1527, -1533, -1536, -1533, -1527, -1517, -1504, -1489, -1471, -1451, -1428, -1403, -1375, -1346, -1314, -1280, -1245, -1207
	       , -1168, -1128, -1086, -1034,  -973,  -913,  -863,  -816,  -771,  -728,  -688,  -650,  -614,  -581,  -550,  -521,  -495,  -472
	       ,  -451,  -433,  -417,  -404,  -394,  -385,  -376,  -368,  -361,  -354,  -348,  -332,  -257,  -179,  -165,  -134,   -91,   -25
	       ,    94,   126,   142,   213,   291,   309,   316,   318,   319,   323,   332,   343,   352,   359,   369,   380,   393,   408
	       ,   424,   443,   463,   484,   508,   533,   560,   588,   618,   649,   682,   723,   765,   809,   853,   898,   943,   988
	       ,  1033,  1078,  1121,  1164,  1205,  1245,  1283,  1318,  1352,  1386,  1416,  1441,  1461,  1477,  1489,  1495,  1498,  1495
	       ,  1488,  1477,  1461,  1440,  1415,  1385,  1351,  1296,  1281,  1279,  1281,  1332,  1455,  1575,  1692,  1805,  1914,  2020
	       ,  2122,  2219,  2313,  2403,  2488,  2569,  2646,  2718,  2785,  2848,  2907,  2962,  3011,  3055,  3094,  3127,  3155,  3178
	       ,  3191,  3202,  3209,  3213,  3214,  3212,  3207,  3199,  3189,  3175,  3158,  3138,  3116,  3090,  3062,  3031,  2997,  2961
	       ,  2922,  2880,  2835,  2788,  2738,  2686,  2631,  2573,  2513,  2451,  2386,  2318,  2248,  2176,  2055,  2014,  1998,  2016
	       ,  2064,  2085,  2104,  2120,  2134,  2146,  2155,  2159,  2162,  2163,  2161,  2159,  2155,  2142,  2125,  2104,  2079,  2050
	       ,  2018,  1982,  1944,  1901,  1850,  1797,  1749,  1685,  1620,  1555,  1489,  1423,  1359,  1295,  1232,  1188,  1179,  1175
	       ,  1148,  1111,  1073,  1035,   996,   957,   918,   880,   842,   811,   779,   746,   714,   682,   650,   619,   588,   544
	       ,   503,   461,   416,   380,   346,   313,   280,   248,   215,   183,   149,   106,    69,    35,     0,   -19,   -26,   -26
		&#125;/5000, s, 1&#41;
&#125;"

A1="-&#123;  map1d&#40; &#123;  2059,  2055,  2048,  2038,  2025,  2010,  1993,  1973,  1950,  1925,  1897,  1867,  1835,  1800,  1763,  1723,  1681,  1648
	       ,  1614,  1579,  1543,  1505,  1467,  1427,  1386,  1345,  1302,  1258,  1213,  1168,  1121,  1074,  1025,   970,   913,   856
	       ,   798,   740,   680,   620,   559,   498,   436,   373,   310,   246,   181,   116,    51,    -4,   -74,  -143,  -201,  -277
	       ,  -352,  -426,  -499,  -572,  -644,  -715,  -785,  -854,  -922,  -989, -1056, -1121, -1185, -1249, -1311, -1355, -1399, -1442
	       , -1484, -1525, -1566, -1605, -1644, -1682, -1718, -1753, -1787, -1820, -1851, -1881, -1910, -1946, -1979, -2010, -2039, -2066
	       , -2090, -2111, -2130, -2147, -2161, -2173, -2183, -2190, -2194, -2196, -2196, -2192, -2183, -2169, -2149, -2135, -2119, -2101
	       , -2081, -2060, -2037, -2013, -1986, -1958, -1929, -1898, -1865, -1831, -1796, -1759, -1720, -1680, -1639, -1597, -1553, -1508
	       , -1461, -1413, -1364, -1314, -1263, -1210, -1157, -1102, -1046,  -989,  -932,  -870,  -806,  -741,  -676,  -609,  -542,  -474
	       ,  -406,  -338,  -268,  -197,  -125,   -53,    18,    88,   157,   239,   319,   399,   478,   556,   633,   708,   783,   856
	       ,   928,   998,  1067,  1134,  1200,  1264,  1327,  1372,  1416,  1459,  1500,  1540,  1579,  1616,  1652,  1686,  1719,  1751
	       ,  1781,  1810,  1837,  1863,  1887,  1910,  1931,  1951,  1969,  1985,  2000,  2014,  2025,  2035,  2044,  2051,  2056,  2059
	       ,  2061,  2061,  2059,  2059 &#125;/5000, s, 1&#41;

      ,	map1d&#40; &#123;  1846,  1841,  1834,  1825,  1815,  1803,  1789,  1774,  1756,  1738,  1717,  1695,  1672,  1647,  1620,  1592,  1562,  1531
	       ,  1499,  1465,  1429,  1392,  1354,  1315,  1274,  1232,  1189,  1144,  1098,  1051,  1003,   953,   903,   826,   749,   669
	       ,   589,   507,   424,   340,   256,   213,   170,   127,    84,    41,    -1,   -45,   -88,  -131,  -175,  -218,  -262,  -305
	       ,  -349,  -392,  -435,  -483,  -531,  -578,  -625,  -672,  -717,  -763,  -808,  -852,  -896,  -940,  -982, -1024, -1066, -1107
	       , -1147, -1226, -1301, -1374, -1443, -1510, -1572, -1632, -1687, -1738, -1785, -1827, -1864, -1896, -1923, -1946, -1964, -1976
	       , -1984, -1987, -1985, -1978, -1966, -1948, -1926, -1904, -1878, -1849, -1817, -1782, -1743, -1702, -1658, -1610, -1560, -1507
	       , -1452, -1393, -1332, -1269, -1203, -1162, -1121, -1078, -1036,  -992,  -948,  -903,  -858,  -812,  -766,  -719,  -671,  -624
	       ,  -575,  -527,  -477,  -414,  -352,  -287,  -219,  -159,   -74,     2,    55,   125,   195,   264,   332,   399,   466,   531
	       ,   596,   659,   722,   784,   845,   905,   963,  1021,  1078,  1150,  1219,  1285,  1348,  1407,  1463,  1516,  1565,  1611
	       ,  1653,  1691,  1725,  1755,  1782,  1804,  1822,  1831,  1839,  1844,  1848,  1850,  1850,  1849,  1846,  1846 &#125;/5000, s, 1&#41;

      ,	map1d&#40; &#123;  1418,  1326,  1239,  1157,  1081,  1009,   942,   880,   822,   775,   731,   690,   654,   620,   591,   565,   543,   524
	       ,   509,   498,   490,   486,   486,   489,   496,   511,   532,   560,   593,   633,   679,   730,   786,   825,   823,   814
	       ,   781,   729,   681,   638,   600,   566,   536,   512,   492,   480,   472,   468,   467,   469,   472,   477,   484,   492
	       ,   502,   513,   526,   540,   555,   571,   588,   607,   627,   648,   671,   694,   745,   796,   850,   908,   968,  1030
	       ,  1094,  1160,  1226,  1273,  1270,  1258,  1217,  1168,  1127,  1072,  1015,   957,   897,   835,   772,   708,   642,   575
	       ,   506,   437,   366,   295,   223,   149,    76,    31,   -13,   -58,  -103,  -147,  -192,  -237,  -281,  -325,  -370,  -413
	       ,  -457,  -500,  -543,  -586,  -628,  -693,  -756,  -818,  -879,  -939,  -998, -1055, -1112, -1155, -1198, -1240, -1281, -1321
	       , -1360, -1398, -1434, -1480, -1528, -1573, -1609, -1624, -1623, -1617, -1594, -1546, -1498, -1448, -1398, -1348, -1298, -1249
	       , -1201, -1149, -1090, -1031,  -982,  -944,  -907,  -871,  -837,  -805,  -774,  -745,  -717,  -692,  -668,  -647,  -628,  -611
	       ,  -596,  -584,  -574,  -567,  -565,  -567,  -574,  -586,  -601,  -620,  -641,  -666,  -693,  -724,  -758,  -794,  -833,  -875
	       ,  -920,  -968, -1018, -1071, -1126, -1206, -1322, -1467, -1634, -1754, -1746, -1718, -1581, -1438, -1413, -1416, -1418, -1419
	       , -1417, -1415, -1441, -1571, -1714, -1744, -1752, -1740, -1714, -1591, -1418, -1251, -1145, -1099, -1055, -1012,  -971,  -932
	       ,  -894,  -858,  -824,  -792,  -762,  -733,  -707,  -682,  -660,  -640,  -622,  -604,  -589,  -577,  -570,  -565,  -564,  -567
	       ,  -573,  -582,  -594,  -609,  -628,  -649,  -674,  -702,  -732,  -770,  -810,  -852,  -896,  -942,  -989, -1037, -1087, -1139
	       , -1191, -1244, -1298, -1353, -1408, -1463, -1519, -1597, -1619, -1624, -1625, -1611, -1577, -1542, -1504, -1464, -1423, -1379
	       , -1334, -1288, -1239, -1189, -1137, -1084, -1029,  -973,  -916,  -857,  -795,  -732,  -668,  -602,  -536,  -469,  -401,  -333
	       ,  -280,  -228,  -175,  -123,   -70,   -17,    34,    86,   138,   190,   242,   293,   344,   394,   444,   494,   543,   591
	       ,   639,   686,   733,   779,   824,   869,   912,   955,   997,  1038,  1078,  1117,  1155,  1192,  1249,  1267,  1273,  1237
	       ,  1148,  1104,  1061,  1018,   977,   936,   897,   873,   849,   782,   717,   698,   680,   642,   607,   576,   548,   524
	       ,   504,   487,   475,   469,   466,   469,   475,   492,   515,   544,   579,   620,   667,   720,   778,   819,   824,   823
	       ,   785,   735,   688,   646,   609,   576,   548,   526,   509,   498,   491,   487,   486,   488,   493,   502,   514,   536
	       ,   562,   596,   639,   676,   717,   760,   806,   856,   912,   972,  1038,  1126,  1209,  1293,  1384,  1435,  1418,  1418
		&#125;/5000, s, 1&#41;
&#125;"

B0="t*clamp&#40;&#40;t-5*Id&#41;/30&#41;^2"
B1="A0*B0"
B2="A1*B0"

X0="row&#40;B1,2&#41;", Y0="row&#40;B2,2&#41;"
X1="row&#40;B1,1&#41;", Y1="row&#40;B2,1&#41;"
X2="row&#40;B1,0&#41;", Y2="row&#40;B2,0&#41;"

A2="choice&#40;&#123;127/128, 1&#125;&#41;"
Pen="A2"
Lwdt="select&#40;&#40;A2 == 1&#41;, .6, 1&#41;"

Meta="reactive=0 detail=3 density=3"      // Particle, Comment out >= v5 ...
Vers=500

( you can lead a horse to water... blah blah blah )
enjoy or ignore...
Last edited by jerohm on Sat Nov 08, 2014 9:36 am, edited 1 time in total.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Trick or Treat: Modifying other's work...

Post by jerohm »

Code: Select all

// "Spinning Plane" by Andy O

Aspc=1

/*

See Generator.txt for relevent equations.

*/

Stps="&#40; 10 + round&#40; rnd&#40; 7 &#41; &#41; &#41;^2"
At least on Win7, there seems to be a problem here.
When [ Stps < (13^2) ], some Dots seem to be missing...

Without trying to debug someone else's code, I might suggest:

Code: Select all

Stps="&#40; 13 + round&#40; rnd&#40; 4 &#41; &#41; &#41;^2"
Now here are some 'thoughts' that you might want to try:

Code: Select all

Num="choice&#40;&#123;2,2&#125;&#41;"             // change to "choice&#40;&#123;1,2&#125;&#41;" after you are done playing
Stps="&#40; 13 + round&#40; rnd&#40; 4 &#41; &#41; &#41;^2"
Change:

Code: Select all

// Perform perspective transformation
X0=" A3 * A4 * C10 / C12"
Y0=" A3 * A4 * C11 / C12"
to:

Code: Select all

A11="5+rnd&#40;3&#41;"
B6="&#40;Num == 2&#41;/30 * &#40;-1^Id&#41; * t*clamp&#40;pos&#40;t-A11&#41;/15&#41;"   // 15->30, maybe??

// Perform perspective transformation
X0=" A3 * A4 * C10 / C12"
Y0="&#40;A3 * A4 * C11 / C12&#41; + B6"
and...

Code: Select all

LWdt="min&#40; 10, 2.7 / &#40; C12 - A3 + 1.7 &#41; + .3  &#41;"
to:

Code: Select all

A12="choice&#40;&#123;2,2&#125;&#41;"             // change to "choice&#40;&#123;0,2&#125;&#41;" after you are done playing
B7="1+&#40;A12*&#40;fft&#40;s&#41;+fft&#40;1-s&#41;&#41;&#41;"
LWdt="B7 * min&#40; 10, 2.7 / &#40; C12 - A3 + 1.7 &#41; + .3  &#41;"   // jrm
2014Nov08
decided this is a better A12...

Code: Select all

A12="choice&#40;&#123;0,2*&#40;Num == 1&#41;&#125;&#41;"
 &#58;
MAKE SURE to edit the two 'choice' reference in order to preserve the author's original intention as one of the random presentation... after all, the original intent deserves to be persevered.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

THESE FORUMS ARE TOTALLY DEAD!!!

Post by jerohm »

soooo.... here is a little something.

( my staunchest critic tells me this is too similiar to other stuff I have already written,
but you guys haven't seen it yet. )

Code: Select all

//  yin-yang - jrm 2015Jan09
//  Single task/XYCoordinate Set ;0&#41;
//
Aspc=1
ConB=1

Num=1

Stps=1024
Coil=9
WSRR=3

A0="&#40;end_time < 1e30&#41;"			// &#91;Particle == true&#93;; &#40; O'Mearagic ;0&#41;
A1="choice&#40;&#123;1,-1&#125;&#41;/&#40;WSRR+rnd&#40;1&#41;&#41;"	// WS Rotation

A2=".8 + A0*.4"                                // 1 or LESS
A3="A2 * &#123; sin&#40;Coil*2*Pi*s&#41;
         , cos&#40;Coil*2*Pi*s&#41;
         &#125;"

B0="select&#40;Id, B0, &#40;t-B1&#41;&#41;"	// Weight Factor &#40;33*B0&#41;	
B1="t"

B2="&#40;select&#40;log10&#40;1+Bass/2&#41; > B2, B2 + .01*B0*&#40;1-B2&#41;
                                , B2 * &#40;.992^&#40;1/B0&#41;&#41; &#41; + B2&#41;/2"
B3="B3 + B2"

A4="select&#40;&#40;s<1&#41;, sign&#40;s -.5&#41;, sign&#40;0 -.5&#41;&#41;"		// Pay Attention!
A5="flip&#40;4*s-1&#41;"

A6="Pi/choice&#40;&#123;4,6,8&#125;&#41;"          	// z

A7="A3 * sqrt&#40;1-A5^2&#41;"
A8="A2 * A5"

B4="t/10"
B5="&#40;A1*A4&#41; * &#40;B4+B3&#41;"

C0="cos&#40; B5 &#41; * row&#40;A7,0&#41; + sin&#40; B5 &#41; * A8"           // x'
C1="cos&#40; B5 &#41; * A8        - sin&#40; B5 &#41; * row&#40;A7,0&#41;"    // y'

A9="33"
A10="select&#40;A0, .8 + rnd&#40; .5 &#41;, 1.2 + rnd&#40; .03 &#41;&#41;" 	// Size scale

B6="&#40;Bass + B6*&#40;A9-1&#41;&#41;/A9"
B7="&#40;A10+atan&#40;B6&#41;^2&#41;"

X0="B7 * C0"
Y0="B7 * &#40; cos&#40; A6 &#41; * row&#40;A7,1&#41; + sin&#40; A6 &#41; * C1 &#41; * A4"            // z'

A11="choice&#40;&#123;0, .05&#125;&#41;"
B8="abs&#40;cos&#40;B5+8*Pi*s&#41;&#41;"
Pen="select&#40;A0, B8-A11, 1&#41;"
Lwdt="B8*2 + .7"


Meta="reactive=3 detail=3 density=3 morphable=5"	// Comment out for >GF5.x
Vers=500

Make sure to edit "_package.py" and add an entry to "alsoParticles = { ... }"

FrankN
Posts: 316
Joined: Thu Mar 07, 2013 11:19 pm

Post by FrankN »

Jerohm, you've done it again! You guys should check this out!

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Moved from wrong thread... do'h!

Post by jerohm »

Moved from wrong thread... nothing new here...

Code: Select all

// Rex, >> Particle Only <<<  Nothing special, but ... - jrm, 2015Apr15
// &#40; Rex play on 'Rects', as in Rectangles
//   kinda of a Pop Circles ripoff with angles... whatever
// ;0&#41;
//
//  'choice&#40;&#41;' does NOT operate on each Row independently!?! - by design, AOM?????

Aspc=1
ConB=1
PDur=40

Stps="5"

Num="8 + rnd&#40;7&#41;"

A0="2*Pi*s+&#40;Pi/4&#41;"
A1="transpose&#40; &#123; rnd&#40;vector&#40;Num,2&#41;&#41; -1
               , rnd&#40;vector&#40;Num,2&#41;&#41; -1
               , rnd&#40;vector&#40;Num,124/128&#41;&#41; + &#40;2/128&#41;
               ,&#40;rnd&#40;vector&#40;Num,1.5&#41;&#41; +1&#41; *10
               , select&#40;&#40;rnd&#40;vector&#40;Num,1&#41;&#41; <= choice&#40;&#123;0, .2, 1&#125;&#41;&#41;, 1, rnd&#40;vector&#40;Num,1.75&#41;&#41; +.25&#41;
               , rnd&#40;vector&#40;Num,1&#41;&#41; +1
               &#125; &#41;"

B0="row&#40;A1,Id&#41;"

A2="choice&#40;&#123; PDur, 0&#125;&#41;"
B1="&#40;abs&#40;A2-t&#41;/col&#40;B0,3&#41;&#41;^3"
B2="B1/col&#40;B0,4&#41;"


X0="B1*cos&#40;A0&#41; + col&#40;B0,0&#41;"
Y0="B2*sin&#40;A0&#41; + col&#40;B0,1&#41;"

B3="B1*col&#40;B0,5&#41;"
LWdt="B3"

Pen="col&#40;B0,2&#41;"
// Meta="reactive=0 detail=3 density=3"		// Comment out 5.x or greater

Vers=500

BTW - It STILL would be really neat/useful to have :idea: 'Shuffle()' !! :idea:

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

.
Originally posted by Frank that somehow ended up in the wrong thread (NOT Frank's fault).

-------------------------------------------------------------------
.
Great work again, Jerohm! I'll email you about a shuffle function.
_________________
Regards,

FrankN
SoundSpectrum, Inc.
www.soundspectrum.com

-------------------------------------------------------------------
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

Hello jerohm

Do you have anymore configs you wish to share?
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

FrankN
Posts: 316
Joined: Thu Mar 07, 2013 11:19 pm

Post by FrankN »

Thanks for your help, you guys!

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Pacman-esque [SIC] Particle

Post by jerohm »

This is a totally unspectacular (Particle) EFFECT, but a cute programming paradigm. I won't mind a bit, if you make it worthwhile and your own.
:roll:

Code: Select all

Aspc=1
ConB=1
Num=12

A0="choice&#40;&#123;-1,1&#125;&#41;/4"

A1="&#123; .6, .2, .2 &#125;"     // Segment weights, Must&#40;/SHOULD&#41; Sum to 1

A2="&#123; clamp&#40;                  s/col&#40;A1, 0&#41;&#41;
    , clamp&#40;&#40;s-dot&#40;A1,&#123;1,0,0&#125;&#41;&#41;/col&#40;A1, 1&#41;&#41;
    , clamp&#40;&#40;s-dot&#40;A1,&#123;1,1,0&#125;&#41;&#41;/col&#40;A1, 2&#41;&#41;
    &#125;"

B0=".8 * X_Extents/Y_Extents"

B1="A0*t + Id*&#40;&#40;2*Pi&#41;/Num&#41; + &#40;Pi/2&#41;"    // &#40;positional&#41; rotation rate
B2="A0*t + B1"                          // &#40;individual&#41; rotational rate

B3="abs&#40;sin&#40;t/2 + Id*&#40;&#40;2*Pi&#41;/Num&#41;&#41; &#41; * Pi/15"

B4="&#40; &#123; cos&#40; 2 * Pi * row&#40;A2, 0&#41; * &#40;1-B3&#41; + Pi*B3&#41;
      , sin&#40; 2 * Pi * row&#40;A2, 0&#41; * &#40;1-B3&#41; + Pi*B3&#41;
      &#125;
    +
      &#123;-row&#40;A2, 1&#41; * cos&#40;-Pi*B3&#41;
      ,-row&#40;A2, 1&#41; * sin&#40;-Pi*B3&#41;
      &#125;
    +
      &#123; row&#40;A2, 2&#41; * cos&#40; Pi*B3&#41;
      , row&#40;A2, 2&#41; * sin&#40; Pi*B3&#41;
      &#125;
    &#41; / 6"

B5="&#123; row&#40;B4,0&#41;*cos&#40;B2&#41; + row&#40;B4,1&#41;*sin&#40;B2&#41;
    , row&#40;B4,1&#41;*cos&#40;B2&#41; + row&#40;B4,0&#41;*sin&#40;B2&#41;
    &#125;"

X0="row&#40;B5,0&#41; + B0*cos&#40;B1&#41;"
Y0="row&#40;B5,1&#41; + .8*sin&#40;B1&#41;"             // " * sin&#40;Pi/8&#41;"

Pen="1"                                                 // 127/128

// Meta="reactive=3 detail=3 density=3 morphable=5"     // &#40;< 5.0&#41; WS
// Meta="reactive=0 detail=3 density=3"                 // &#40;< 5.0&#41; Particle

Vers=500


jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Neat Modification... Spinning Cube.txt

Post by jerohm »

Spinning Cube.txt :

Code: Select all

/*
Spinning Cube

the sequel to Spinning Tetraeder

This config was created by Thomas Geier &#40;ziggystar&#40;at&#41;gmx.de&#41;, who made the programming

and Aaron Pinsker, who had the idea for this.

It shows a spinning cube
Feel free to change some parameters, but include this header please
*/
This particle was written by someone else, but I wrote an alternative version several posts back. I revisited this distribution version because I was attempting to draw 3D images with a single stroke (i.e., single X/Y pair) ... which IS HARD... or I am not thinking straight (more on this later ... maybe :? )

I accidentally discovered that if you COMMENT OUT:

Code: Select all

// Stps="2" 	//We only need two steps for starting and ending point of each drawn line
you get a rather mind bending shape (kind of an inverted cube), as a result of how the code was written. Actually, any 'Stps' value greater than 2 will have the same results.

If you LIKE what you see, I would recommend changing to:

Code: Select all

Stps="choice&#40;&#123;2,3&#125;&#41;" 	//We only need two steps for starting and ending point of each drawn line - modified JRM
This will randomly execute as the author's original intention (a GOOD thing), or our new particle.
(Thanks Thomas & Aaron - I hope you like/approve!)

===================================================


Okay, back to my ORIGINAL efforts. Thomas & Aaron calculate the ( 8 ) corner point coordinates of the cube, and connect them with (12) individual lines (X/Y pairs). If I wanted to move the cube around the screen, I would have to apply any transformation, 12 times (yech!).

The SS drawing engine is fully capable of connecting (ConB=1) each Step. If you think about it, you can't 'draw' a cube with a single stroke without doing some backtracking (over previously connected paths).
I think it minimally takes 16 Steps (Stps=16) ... but if you can think of a way to do it in less, SPEAK UP!.

Typically 's' is defined as {0, ... 1} over 'Stps' number of steps; each (step) value of 's' being used to calculate coresponding plot coordinate.

In this case however, each plot coordinate is calculated by its own individual equation (B2-B18; Ignore B16, it makes things messy). I took each of the calculated coordinate values, and 'built' a single unique vector.
NOTE, 's' is not even used in this exercise (, but 'Stps' IS)!

ASSUMING you start with a copy of Thomas & Aaron's ORIGINAL distributed "Spinning Cube.txt" :
(Note: The trick outlined above, WILL NO LONGER WORK!!)

Code: Select all

/*
Spinning Cube

the sequel to Spinning Tetraeder

This config was created by Thomas Geier &#40;ziggystar&#40;at&#41;gmx.de&#41;, who made the programming

and Aaron Pinsker, who had the idea for this.

It shows a spinning cube
Feel free to change some parameters, but include this header please
*/
 &#58;
 &#58;
 &#58;
<--- Replace Following Lines --- >
//These are two switches, I use to draw lines from point a to point b
//Only one of these is 1, while the other is 0, depending on  s

 &#58;
 &#58;
 &#58;

Stps="2" 	//We only need two steps for starting and ending point of each drawn line

<--- through here, with this&#58; --->

X0="A0 * &#123; B17, B2, B4, B6, B17, B8, B10, B12, B14, B8, B14, B6, B4, B12, B10, B2 &#125;"
Y0="A0 * &#123; B18, B3, B5, B7, B18, B9, B11, B13, B15, B9, B15, B7, B5, B13, B11, B3 &#125;"

Pen="a2"

Stps=16                         // Single stroke &#40;albeit w/backtracks&#41; Cube Coordinates

<--- End of JRM Edit --->
you should end up with identical output, as the original, in a form, more easily manipulated. Using the properties of 'VectorC', you can do some neat tricks calculating the B2-B18 values, but that is outside the scope of this example. Running this as a WS (instead of Particle), may provide additional insight during a morph to another WS.

Code: Select all

/* Spinning Cube &#40;VectorC version - jrm&#41;

The ORIGINAL config was created by Thomas Geier &#40;ziggystar&#40;at&#41;gmx.de&#41;, who made the programming
and Aaron Pinsker, who had the idea for this.

*/

Aspc=1          //We want the tetraeder to look like one
ConB=1          //Let G-Force draw the lines &#40;connect the two points&#41;


A0=".8"                         // This is the size of the cube
A1="1 + rnd&#40; 4 &#41;"               // Cube line width
A2="clip&#40; .5 + rnd&#40; 1 &#41; &#41;"      // Cube intensity

/*
 X  Y  Z  Cube Coordinates
=========
-1, 1, 1
-1,-1, 1
 1,-1, 1
 1, 1, 1
-1, 1,-1
-1,-1,-1
 1,-1,-1
 1, 1,-1

or transposed&#58;

Coor      0   1   2   3   4   5   6   7
=========================================
X      &#123; -1, -1,  1,  1, -1, -1,  1,  1 &#125;
Y      &#123;  1, -1, -1,  1,  1, -1, -1,  1 &#125;
Z      &#123;  1,  1,  1,  1, -1, -1, -1, -1 &#125;

*/

Stps=16

// Coordinates&#58;

A3=" &#123; &#123; -1, -1,  1,  1, -1, -1,  1,  1 &#125;
     , &#123;  1, -1, -1,  1,  1, -1, -1,  1 &#125;
     , &#123;  1,  1,  1,  1, -1, -1, -1, -1 &#125; &#125; *.5"    // X, Y, Z; Cube

// Plot Path &#40;order&#41;&#58;

A4="A0 * &#123; col&#40;A3,0&#41;, col&#40;A3,1&#41;, col&#40;A3,2&#41;, col&#40;A3,3&#41;, col&#40;A3,0&#41;
         , col&#40;A3,4&#41;, col&#40;A3,5&#41;, col&#40;A3,6&#41;, col&#40;A3,7&#41;, col&#40;A3,4&#41;
         , col&#40;A3,7&#41;, col&#40;A3,3&#41;, col&#40;A3,2&#41;, col&#40;A3,6&#41;, col&#40;A3,5&#41;, col&#40;A3,1&#41; &#125; "   // X, Y, Z


B0=".4 * t"
B1="A4 * cos&#40; B0 &#41;"
B2="A4 * sin&#40; B0 &#41;"

// X'= &#40;X  * cos&#40;t0&#41; - Y * sin&#40;t0&#41;&#41;
// Y'= &#40;X  * sin&#40;t0&#41; + Y * cos&#40;t0&#41;&#41;
// Y"= &#40;Y' * sin&#40;t1&#41; + Z * cos&#40;t1&#41;&#41;, assumes &#40;t0 == t1&#41;
//   OR
// Y"= &#40;X * sin&#40;t0&#41; + Y * cos&#40;t0&#41;&#41; * sin&#40;t1&#41; + Z * cos&#40;t1&#41;

X=0     // Yes, this is valid, but I really only did it for you guys
Y=1
Z=2

B3="              row&#40;B1,X&#41;   - row&#40;B2,Y&#41;"     // X'
B4="sin&#40; B0 &#41; * &#40; row&#40;B2,X&#41;
                + row&#40;B1,Y&#41; &#41; + row&#40;B1,Z&#41;"     // Y"
X0="B3"
Y0="B4"

Pen="a2"
LWdt="a1"       //The line width &#40;I made changing. Looks good&#41;

Vers=500

Have fun! 8)

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Triskele

Post by jerohm »

okay... nobody is gonna learn much from this, but it IS something new to watch...

Code: Select all

/* &#40;#&#41; Triskele III... jrm
    WaveShape AND/OR Particle
*/
Aspc=1
ConB=1
Num="choice&#40;&#123;2, 1, 2&#125;&#41;"

Stps="12*35"

A0="!&#40;end_time < 1e30&#41;"		// &#91;Waveshape == 1&#93;; &#40; O'Mearagic ;0&#41;
A1="&#40;127 + A0&#41;/128"		// Pen &#40;Assumes BTT maps&#41;
A2="  .7 + A0 * .3"		// Lwdt

A3="choice&#40;&#123; !A0*2-1, 1&#125;&#41;"
A4="select&#40;&#40;A3 == 1&#41;, .03, .06&#41;"
A5="&#40;Num == 2&#41; * choice&#40;&#123; A4, 0, A4 &#125;&#41;"

A6="&#123;   map1d&#40; &#123; -0.1834, -0.1769, -0.1769, -0.1654, -0.1522, -0.1376, -0.1222, -0.1065, -0.0910, -0.0762, -0.0692, -0.0626
               , -0.0626, -0.0516, -0.0430, -0.0367, -0.0332, -0.0324, -0.0345, -0.0368, -0.0398, -0.0437, -0.0484, -0.0484
               , -0.0571, -0.0675, -0.0790, -0.0911, -0.1032, -0.1148, -0.1252, -0.1299, -0.1340, -0.1340, -0.1392, -0.1422
               , -0.1433, -0.1423, -0.1394, -0.1345, -0.1278, -0.1192, -0.1191, -0.1124, -0.1055, -0.0990, -0.0936, -0.0899
               , -0.0886, -0.0890, -0.0903, -0.0926, -0.0958, -0.0960, -0.0962, -0.1007, -0.1052, -0.1093, -0.1126, -0.1148
               , -0.1154, -0.1140, -0.1103, -0.1103, -0.1040, -0.0971, -0.0899, -0.0828, -0.0763, -0.0705, -0.0661, -0.0633
               , -0.0633, -0.0633, -0.0612, -0.0623, -0.0661, -0.0722, -0.0802, -0.0895, -0.0999, -0.1108, -0.1108, -0.1227
               , -0.1339, -0.1440, -0.1530, -0.1604, -0.1662, -0.1700, -0.1715, -0.1715, -0.1716, -0.1709, -0.1669, -0.1602
               , -0.1510, -0.1399, -0.1271, -0.1131, -0.0983, -0.0983, -0.0824, -0.0672, -0.0528, -0.0397, -0.0281, -0.0185
               , -0.0111, -0.0063, -0.0018,  0.0047,  0.0130,  0.0231,  0.0347,  0.0477,  0.0619,  0.0773,  0.0867,  0.0962
               ,  0.1058,  0.1153,  0.1247,  0.1339,  0.1428,  0.1513,  0.1594,  0.1669,  0.1738,  0.1800,  0.1855,  0.1900
               ,  0.1937,  0.1963,  0.1963,  0.1983,  0.1993,  0.1994,  0.1986,  0.1945,  0.1873,  0.1773,  0.1713,  0.1648
               ,  0.1578,  0.1502,  0.1422,  0.1338,  0.1337,  0.1207,  0.1077,  0.0950,  0.0831,  0.0724,  0.0634,  0.0564
               ,  0.0518,  0.0518,  0.0497,  0.0502,  0.0532,  0.0584,  0.0657,  0.0748,  0.0854,  0.0974,  0.0975,  0.1066
               ,  0.1155,  0.1237,  0.1308,  0.1364,  0.1402,  0.1418,  0.1408,  0.1408,  0.1388,  0.1344,  0.1283,  0.1216
               ,  0.1149,  0.1093,  0.1071,  0.1055,  0.1047,  0.1046,  0.1046,  0.1048,  0.1092,  0.1123,  0.1141,  0.1147
               ,  0.1139,  0.1119,  0.1086,  0.1038,  0.1038,  0.0962,  0.0899,  0.0848,  0.0812,  0.0791,  0.0787,  0.0800
               ,  0.0833,  0.0833,  0.0833,  0.0891,  0.0964,  0.1049,  0.1141,  0.1236,  0.1330,  0.1418,  0.1497,  0.1497
               ,  0.1548,  0.1591,  0.1655,  0.1689,  0.1695,  0.1674,  0.1626,  0.1552,  0.1506,  0.1454,  0.1454,  0.1454
               ,  0.1393,  0.1328,  0.1188,  0.1041,  0.0892,  0.0746,  0.0611,  0.0490,  0.0391,  0.0391,  0.0341,  0.0300
               ,  0.0267,  0.0242,  0.0215,  0.0220,  0.0253,  0.0314,  0.0402,  0.0515,  0.0515,  0.0635,  0.0733,  0.0808
               ,  0.0858,  0.0883,  0.0880,  0.0848,  0.0786,  0.0786,  0.0723,  0.0723,  0.0672,  0.0614,  0.0548,  0.0476
               ,  0.0399,  0.0317,  0.0144,  0.0054, -0.0038, -0.0130, -0.0221, -0.0312, -0.0400, -0.0486, -0.0568, -0.0568
               , -0.0698, -0.0807, -0.0894, -0.0955, -0.0990, -0.0997, -0.0972, -0.0947, -0.0914, -0.0914, -0.0859, -0.0789
               , -0.0706, -0.0613, -0.0513, -0.0406, -0.0297, -0.0186, -0.0186, -0.0075,  0.0028,  0.0118,  0.0195,  0.0253
               ,  0.0292,  0.0306,  0.0294,  0.0294,  0.0266,  0.0214,  0.0145,  0.0061, -0.0031, -0.0127, -0.0223, -0.0314
               , -0.0314, -0.0372, -0.0408, -0.0423, -0.0417, -0.0392, -0.0349, -0.0320, -0.0287, -0.0250, -0.0210, -0.0207
               , -0.0208, -0.0212, -0.0189, -0.0149, -0.0099, -0.0048, -0.0006,  0.0019,  0.0017,  0.0017, -0.0010, -0.0062
               , -0.0131, -0.0213, -0.0302, -0.0390, -0.0473, -0.0543, -0.0544, -0.0615, -0.0665, -0.0694, -0.0702, -0.0691
               , -0.0661, -0.0613, -0.0546, -0.0546, -0.0447, -0.0335, -0.0214, -0.0089,  0.0036,  0.0157,  0.0268,  0.0365
               ,  0.0451,  0.0516,  0.0560,  0.0584,  0.0587,  0.0569,  0.0530,  0.0471,  0.0384,  0.0277,  0.0154,  0.0020
               , -0.0123, -0.0271, -0.0419, -0.0564, -0.0701, -0.0841, -0.0982, -0.1121, -0.1258, -0.1389, -0.1513, -0.1628
               , -0.1628, -0.1701, -0.1766, -0.1824, -0.1874, -0.1917, -0.1951, -0.1996, -0.2008, -0.2002, -0.1986, -0.1962
               , -0.1928, -0.1886, -0.1834, -0.1834 &#125;, s, 1&#41; + .004


      , map1d&#40; &#123;  0.1489,  0.1568,  0.1568,  0.1677,  0.1763,  0.1823,  0.1857,  0.1863,  0.1841,  0.1789,  0.1752,  0.1707
               ,  0.1707,  0.1610,  0.1493,  0.1360,  0.1219,  0.1074,  0.0931,  0.0863,  0.0797,  0.0734,  0.0676,  0.0675
               ,  0.0588,  0.0524,  0.0484,  0.0467,  0.0476,  0.0511,  0.0573,  0.0614,  0.0661,  0.0662,  0.0739,  0.0827
               ,  0.0920,  0.1012,  0.1099,  0.1176,  0.1237,  0.1278,  0.1278,  0.1298,  0.1290,  0.1261,  0.1216,  0.1161
               ,  0.1101,  0.1071,  0.1042,  0.1014,  0.0990,  0.0989,  0.0991,  0.1029,  0.1040,  0.1030,  0.1002,  0.0963
               ,  0.0916,  0.0868,  0.0822,  0.0822,  0.0778,  0.0757,  0.0757,  0.0777,  0.0812,  0.0861,  0.0921,  0.0990
               ,  0.0990,  0.0990,  0.1099,  0.1206,  0.1306,  0.1395,  0.1471,  0.1527,  0.1562,  0.1570,  0.1571,  0.1560
               ,  0.1525,  0.1467,  0.1391,  0.1299,  0.1196,  0.1084,  0.0967,  0.0967,  0.0891,  0.0817,  0.0675,  0.0543
               ,  0.0427,  0.0329,  0.0254,  0.0204,  0.0183,  0.0183,  0.0187,  0.0221,  0.0282,  0.0367,  0.0474,  0.0598
               ,  0.0737,  0.0887,  0.1039,  0.1184,  0.1320,  0.1442,  0.1550,  0.1640,  0.1709,  0.1755,  0.1775,  0.1784
               ,  0.1783,  0.1773,  0.1754,  0.1727,  0.1691,  0.1647,  0.1596,  0.1538,  0.1472,  0.1401,  0.1323,  0.1239
               ,  0.1150,  0.1056,  0.1056,  0.0973,  0.0888,  0.0803,  0.0718,  0.0553,  0.0399,  0.0262,  0.0201,  0.0147
               ,  0.0101,  0.0062,  0.0032,  0.0012,  0.0012, -0.0004,  0.0005,  0.0038,  0.0093,  0.0168,  0.0261,  0.0371
               ,  0.0494,  0.0495,  0.0613,  0.0733,  0.0849,  0.0957,  0.1051,  0.1127,  0.1179,  0.1202,  0.1202,  0.1203
               ,  0.1182,  0.1141,  0.1084,  0.1014,  0.0933,  0.0845,  0.0752,  0.0752,  0.0685,  0.0632,  0.0593,  0.0571
               ,  0.0570,  0.0591,  0.0611,  0.0637,  0.0671,  0.0711,  0.0713,  0.0713,  0.0727,  0.0753,  0.0785,  0.0821
               ,  0.0855,  0.0886,  0.0908,  0.0918,  0.0918,  0.0912,  0.0882,  0.0833,  0.0771,  0.0700,  0.0626,  0.0554
               ,  0.0488,  0.0488,  0.0488,  0.0410,  0.0352,  0.0314,  0.0294,  0.0294,  0.0311,  0.0347,  0.0400,  0.0400
               ,  0.0446,  0.0498,  0.0613,  0.0741,  0.0874,  0.1005,  0.1130,  0.1241,  0.1289,  0.1331,  0.1332,  0.1332
               ,  0.1377,  0.1415,  0.1466,  0.1486,  0.1477,  0.1441,  0.1377,  0.1289,  0.1176,  0.1176,  0.1108,  0.1035
               ,  0.0959,  0.0880,  0.0717,  0.0552,  0.0388,  0.0233,  0.0092, -0.0030, -0.0031, -0.0159, -0.0304, -0.0462
               , -0.0630, -0.0803, -0.0977, -0.1149, -0.1314, -0.1314, -0.1426, -0.1426, -0.1503, -0.1575, -0.1640, -0.1699
               , -0.1750, -0.1795, -0.1861, -0.1881, -0.1893, -0.1897, -0.1891, -0.1876, -0.1851, -0.1815, -0.1769, -0.1769
               , -0.1683, -0.1574, -0.1445, -0.1303, -0.1152, -0.0998, -0.0846, -0.0772, -0.0701, -0.0700, -0.0605, -0.0519
               , -0.0446, -0.0387, -0.0342, -0.0314, -0.0304, -0.0314, -0.0314, -0.0341, -0.0390, -0.0458, -0.0542, -0.0638
               , -0.0744, -0.0856, -0.0971, -0.0971, -0.1067, -0.1151, -0.1222, -0.1276, -0.1310, -0.1320, -0.1303, -0.1256
               , -0.1256, -0.1210, -0.1146, -0.1072, -0.0998, -0.0932, -0.0885, -0.0871, -0.0866, -0.0870, -0.0884, -0.0885
               , -0.0887, -0.0959, -0.1005, -0.1028, -0.1028, -0.1008, -0.0970, -0.0913, -0.0840, -0.0840, -0.0754, -0.0686
               , -0.0636, -0.0607, -0.0596, -0.0607, -0.0638, -0.0690, -0.0690, -0.0767, -0.0855, -0.0952, -0.1054, -0.1156
               , -0.1254, -0.1344, -0.1423, -0.1423, -0.1504, -0.1560, -0.1592, -0.1600, -0.1585, -0.1547, -0.1487, -0.1406
               , -0.1306, -0.1193, -0.1071, -0.0942, -0.0812, -0.0682, -0.0557, -0.0440, -0.0319, -0.0217, -0.0135, -0.0074
               , -0.0035, -0.0018, -0.0025, -0.0057, -0.0093, -0.0112, -0.0113, -0.0098, -0.0066, -0.0017,  0.0050,  0.0134
               ,  0.0134,  0.0195,  0.0263,  0.0338,  0.0417,  0.0502,  0.0589,  0.0773,  0.0961,  0.1055,  0.1148,  0.1238
               ,  0.1326,  0.1410,  0.1489,  0.1489 &#125;, s, 1&#41; - .027

     &#125; * 5"

A7="&#123;-row&#40;A6, 1&#41;
    , row&#40;A6, 0&#41;
&#125;"

AVRG=11, DCAY=.7
B0="A0 * select&#40;Id, B0, &#40;sin&#40;atan&#40;Bass&#41;&#41;^2 + B0*&#40;AVRG-1&#41;&#41;/AVRG&#41;"

B1="A5   * &#40;-A3 ^ Id&#41; * &#40;1+5*B0&#41;"
B2="t/2  *  &#40;A3 ^ Id&#41;"
B3="B2/3 + &#40;&#40;A5 == 0&#41; * Id&#41; * &#40;Pi/2&#41;"

/***
B4="&#123; row&#40;A6,0&#41;*cos&#40;B2&#41; - row&#40;A6,1&#41;*sin&#40;B2&#41;
    , row&#40;A6,1&#41;*cos&#40;B2&#41; + row&#40;A6,0&#41;*sin&#40;B2&#41;
    &#125; * &#40;1+B0&#41;"
***/
B4="&#40;A6*cos&#40;B2&#41; + A7*sin&#40;B2&#41;&#41; * &#40;1+B0&#41;"       // Smarter???


// Rotate around the y axis
B5="row&#40;B4,0&#41; * cos&#40; B3 &#41; + B1 * sin&#40; B3 &#41;"	// x'
B6="B1 * cos&#40; B3 &#41; - row&#40;B4,0&#41; * sin&#40; B3 &#41;"	// z'

// Rotate around the x axis
B7="row&#40;B4,1&#41; * cos&#40; B3 &#41; + B6 * sin&#40; B3 &#41;"

X0=" B5"
Y0=" B7"

Pen= "A1"
LWdt="A2"

Meta="reactive=3 detail=3 density=3 morphable=3"	// Comment out 5.0 or greater.
Vers=400

:?
Last edited by jerohm on Thu Dec 10, 2015 8:53 am, edited 1 time in total.

Post Reply