0x18b75119…b783sent to0x381233d5…7acd·#19,667,718·view on Etherscan
[1 ,()=>{console.log("Artist 31. Holger Lippmann -- platform 1 ");/* RadarScope (B&W/Junk), Holger Lippmann 2024, for Brightmoments VENEZIA
https://www.e-art.co
https://twitter.com/wowgreat
### NFT Art License ###
https://www.nftlicense.org/
### Code License ###
Copyright © 2018 - 2024
CC 4.0 BY-NC-ND
https://creativecommons.org/licenses/by-nc-nd/4.0/
*/
////////////////////////////////// my code here
//let isHeadless = (/headless/).test(navigator.userAgent);
let counter = 0;
let isPaused = false;
let pauseStartTime;
let randnumb ;
let ranSeeds = [];
let ranSeedIndex = -1;
let temp, schalt ;
let startDiam;
let diam,diam2;
let arcStep,arcStep2;
let speedGrow,speedGrow2;
let maxAngle = 360 ;
let cx, cy;
let startingTime ;
let dim, rr , rrr, ra, ra2, ra3, ra4 ;
let changeMap = false ;
let hoch ;
let count ;
let shiftX, shiftY ;
let rot ;
let rotVal ;
let diamRaduis ;
let doneRendering,isLoop = false;
document.addEventListener('click', ()=>{
isLoop = !isLoop;
if(isLoop&&doneRendering){
setup();
}
})
document.addEventListener('keyup',e=>{
if(e.keyCode==32){
isLoop = !isLoop;
if(isLoop&&doneRendering){
setup();
}
}else if(e.keyCode==83&&doneRendering){
save('RadarScope_#'+tokenData.tokenId)
}
})
setup = function () {
if(!ranSeeds.length){
for(let i=0;i<3;i++)
ranSeeds.push(int(R.random_int(0,9999999)));
}
ranSeedIndex++;
if(ranSeedIndex>2)ranSeedIndex=0;
randomSeed(ranSeeds[ranSeedIndex]);
let windowAspectRatio = windowWidth / windowHeight;
let canvasWidth, canvasHeight;
if (windowAspectRatio > 9 / 16) {
canvasHeight = windowHeight;
canvasWidth = windowHeight * 9 / 16;
} else {
canvasWidth = windowWidth;
canvasHeight = windowWidth * 16 / 9;
}
createCanvas(canvasWidth, canvasHeight);
frameCount= 0 ;
count= 0 ;
shiftX= random( - width/3, width/3 ) ;
shiftY= random( - height/3, height/3 ) ;
rotVal= random( 0.05, 0.2) ;
rot= rotVal;
frameRate( 5 ) ;
dim= height*1.2 ;
startDiam= height*1.8 ;
diam= startDiam;
diam2= startDiam;
//speedGrow= 12 ;
maxAngle= 360 ;
// ra= random( 4, 30 ) ;
// ra2= random( 4, 30 ) ;
// ra3= random( 4, 40 ) ;
// ra4= random( 4, 20 ) ;
// arcStep= random( 2, 22 ) ;
//speedGrow= random( 5, 12 ) ;
// rrr= random( 2, 4 ) ;
//hoch= random( 500, 2922 ) ;
// randnumb= int ( R.random_int( 99999 ) ) ;
diam= startDiam;
background(0);
loop();
doneRendering = false;
}
/*
function setup2 ( ) {
randomSeed(ranSeed);
frameCount= 0 ;
count= 0 ;
shiftX= random( - width/3, width/3 ) ;
shiftY= random( - height/3, height/3 ) ;
rotVal= random( 0.05, 0.2) ;
rot= rotVal;
frameRate( 5 ) ;
dim= height*1.2 ;
startDiam= height*1.8 ;
diam= startDiam;
diam2= startDiam;
//speedGrow= 12 ;
//speedGrow2= 12 ;
maxAngle= 360 ;
ra= random( 4, 30 ) ;
ra2= random( 4, 30 ) ;
ra3= random( 4, 40 ) ;
ra4= random( 4, 20 ) ;
// arcStep= random( 2, 22 ) ;
// speedGrow= random( 4, 9 ) ;
rrr= random( 2, 4 ) ;
//hoch= random( 500, 2922 ) ;
randnumb= int ( R.random_int( 99999 ) ) ;
diam= startDiam;
background(0);
}
*/
draw = function () {
rot= rot+ rotVal;
//temp= diam-= speedGrow;
//temp= temp- 5 ;
hoch= random( width, height );
/*
rr= random( 0,100 ) ;
if ( rr< 40 ) {
arcStep= random( 10, 50);
arcStep2= random( 1, 4);
} else {
speedGrow= random( 10, 30 );
speedGrow2= random( 10, 30 );
}
*/
arcStep= random( 10, 150);
speedGrow= random(1,222)*width/800;
arcStep2= random( 2, 11);
speedGrow2= random(1,222)*width/800;
translate( shiftX, shiftY) ;
arcCircle( width/ 2, height/ 2, diam-= speedGrow, arcStep) ;
if(random(0,100)<28 && frameCount<20) arcCircle2 ( width/ 2, height/ 2, diam2-= speedGrow2, arcStep2) ;
if(random(0,100)<30){
noStroke();
fill([255,0][int(2*random())]);
}else{
stroke([255,0][int(2*random())]);
noFill( ) ;
}
noStroke();
fill([255,0][int(2*random())]);
ellipse( width/ 2, height/ 2, 22*width/800, 22*width/800 ) ;
}
function arcCircle ( cirlX, cirlY, diamRaduis, arcStep ) {
rot= rot+ rotVal;
if ( count< 2 ) startDiam= ( height* 4 ) ;
if ( count> 1 ) startDiam= width* 4 - 10*width/800 ;
let angle = 0 ;
let speed = arcStep;
// let arcRadius = diamRaduis/ 2 ;
//let x, y, x2, y2, x3, y3, x4, y4, x5, y5 ;
noStroke( ) ;
fill( 255 ) ;
while ( angle< maxAngle) {
/*
x= int ( cirlX+ cos( radians( angle) ) * arcRadius) ;
y= int ( cirlY+ sin( radians( angle) ) * arcRadius) ;
x2= int ( cirlX+ cos( radians( angle) ) * arcRadius) ;
y2= int ( cirlY+ sin( radians( angle) ) * arcRadius) ;
x5= int ( cirlX+ cos( radians( angle) ) * arcRadius) ;
y5= int ( cirlY+ sin( radians( angle) ) * arcRadius) ;
*/
arcStep= random( 2, 111) ;
strokeCap( SQUARE) ;
stroke( random(0,255)) ;
strokeWeight( random(0,5)*width/800 ) ;
if ( diamRaduis> width- 150*width/800 ) {
arcStep= 5 ;
} else {
arcStep= random( 1, 20 ) ;
}
if ( count== 3 ) arcStep= 1 ;
let radSrt = radians( angle) ;
let radEnd = radians( angle+ arcStep) ;
if (frameCount>3) fill( random(0,255) ) ;
if ( frameCount< 2 ) arc( cirlX, cirlY, diamRaduis* 2, diamRaduis* 2, radSrt+ rot, radEnd+ rot -random( - 55, 55) ) ;
arc( cirlX, cirlY, diamRaduis* 0.6, diamRaduis* 0.6, radSrt+ rot, radEnd+ rot -random( - 55, 55) ) ;
noFill();
arc( cirlX, cirlY, diamRaduis* 0.6, diamRaduis* 0.6, radSrt+ rot, radEnd+ rot) ;
arc( cirlX, cirlY, diamRaduis* 0.7, diamRaduis* 0.7, radSrt, radEnd- random( - 55, 55) );
angle+= speed;
rr= random( 0,100 ) ;
if ( rr< 24 ) {
for ( let i = 0; i< diamRaduis; i+= 30*width/800 ) {
noFill( ) ;
stroke( [255,0][int(2*random())] ) ;
strokeWeight( (1 + diamRaduis/ 400)*width/800 ) ;
rr= random( 0,100 ) ;
if ( rr< 33 ) {
stroke( random(0,255) ) ;
if(random(0,100)<30){
noStroke();
fill([255,0][int(2*random())]);
}else{
stroke([255,0][int(2*random())]);
noFill( ) ;
}
arc( cirlX, cirlY, i, i, radSrt , radEnd+ random( - 55, 55) ) ;
arc( cirlX, cirlY, i, i, radSrt , radEnd+ random( - 55, 55) ) ;
} else {
arc( cirlX, cirlY, i, i, radSrt- random( - 0.03, 0.03), radEnd+ random( - 0.03, 0.03) ) ;
arc( cirlX, cirlY, i, i, radSrt- random( - 0.03, 0.03), radEnd+ random( - 0.03, 0.03) ) ;
}
}
}
}
if ( diamRaduis<= 10*width/800 ) {
count= count+ 1 ;
console.log( count) ;
if ( count>= 2) {
fill(0);
ellipse( width/ 2, height/ 2, 22*width/800, 22*width/800 ) ;
//noLoop(); //setup( ) ;
}
noLoop();
doneRendering = true;
if(isLoop)
setTimeout(setup, 6000);
//setTimeout(setup, isHeadless?250000:6000);
}
}
/*
function resumeLoop() {
count = 0;
setup2();
loop();
}
*/
function arcCircle2 ( cirlX, cirlY, diamRaduis2, arcStep2 ) {
rot= rot+ rotVal;
if ( count< 2 ) startDiam= ( height* 4 ) ;
if ( count> 1 ) startDiam= width* 4 - 10*width/800 ;
let angle = 0 ;
let speed2 = arcStep2;
//let arcRadius2 = diamRaduis2/ 2 ;
// let x, y, x2, y2, x3, y3, x4, y4, x5, y5 ;
while ( angle< maxAngle) {
/*
x= int ( cirlX+ cos( radians( angle) ) * arcRadius2) ;
y= int ( cirlY+ sin( radians( angle) ) * arcRadius2) ;
x2= int ( cirlX+ cos( radians( angle) ) * arcRadius2) ;
y2= int ( cirlY+ sin( radians( angle) ) * arcRadius2) ;
x5= int ( cirlX+ cos( radians( angle) ) * arcRadius2) ;
y5= int ( cirlY+ sin( radians( angle) ) * arcRadius2) ;
*/
arcStep2= random( 1, 2) ;
strokeCap( SQUARE) ;
if ( diamRaduis> width- 150*width/800 ) {
arcStep= 1 ;
} else {
arcStep= random( 1, 2 ) ;
}
if ( count== 3 ) arcStep= 1 ;
let radSrt = radians( angle) ;
let radEnd = radians( angle+ arcStep2) ;
noFill();
angle+= speed2*2;
rr= random( 0,100 ) ;
if ( rr< 15) {
for ( let i = 0; i< diamRaduis2; i+= 33*width/800 ) {
stroke( random(0,255) ) ;
strokeWeight( (1 + diamRaduis2/400)*width/800 ) ;
if ( random( 0,100 )< 66 ) {
arc( cirlX, cirlY, i, i, radSrt, radEnd+ random(0,0.00003) ) ;
}
}
}
}
}
////////////////////////////////// my code here END
}],[1 ,()=>{console.log("Artist 35. Casey REAS -- platform 1 ");
const headless = /HeadlessChrome/.test(window.navigator.userAgent);
let myR;
let pg;
let nodes = [];
let nodesToDraw = 1;
let nodeOrder = [];
let cblack = [0, 0, 0];
let cgray1 = [0, 0, 0.16];
let cgray2 = [0, 0, 0.33];
let cgray3 = [0, 0, 0.50];
let cgray4 = [0, 0, 0.67];
let cgray5 = [0, 0, 0.83];
let cwhite = [0, 0, 0.96];
let cnode = [cblack, cgray1, cgray2, cgray3, cgray4, cgray5, cwhite];
let _backDir;
let _rotate;
let _weightFactor;
let xydivs = 11;
let wonk = 0.35;
let speedScalar = 0.2;
let maxDistance;
let xygap;
let bigdim;
let sameWeight;
let sameThinWeight;
let newBackground = true;
setup = function () {
createCanvas(window.innerWidth, window.innerHeight, WEBGL);
pg = createGraphics(width, height, WEBGL);
pixelDensity();
pg.colorMode(HSB, 360, 1, 1, 1);
pg.setAttributes('alpha', false);
defineNetwork(true);
}
draw = function () {
if (newBackground) {
defineBackground();
newBackground = false;
}
if (nodesToDraw < nodes.length - 1 && frameCount % 10 == 0) {
nodesToDraw++;
}
pg.push();
pg.rotate(_rotate);
for (let i = 0; i < nodesToDraw; i++) {
nodes[i].displayNetwork();
}
pg.pop();
beginShape();
texture(pg);
vertex(-width / 2, -height / 2, 0, 0);
vertex(width / 2, -height / 2, pg.width, 0);
vertex(width / 2, height / 2, pg.width, pg.height);
vertex(-width / 2, height / 2, 0, pg.height);
endShape();
}
keyPressed = function () {
if (key == ' ') {
defineNetwork(false);
}
}
windowResized = function () {
if (!headless) {
resizeCanvas(window.innerWidth, window.innerHeight);
pg.resizeCanvas(window.innerWidth, window.innerHeight);
defineNetwork(true);
}
}
function rollDice() {
_backDir = myR.random_num(0, 1);
_weightFactor = 0.12;
_rotate = myR.random_num(0, TWO_PI);
}
function defineNetwork(bbb) {
myR = Random();
//print(myR.random_num(0,1));
rollDice();
if (bbb) {
newBackground = true;
}
nodesToDraw = 1;
bigdim = max(width, height);
xygap = bigdim / float(xydivs);
maxDistance = dist(0, 0, bigdim, bigdim);
sameWeight = xygap * _weightFactor;
sameThinWeight = map(bigdim, 1920, 3840, 1.0, 2.0);
sameThinWeight = max(0.5, sameThinWeight);
nodes = [(xydivs + 7) * (xydivs + 7)];
nodeOrder = [nodes.length];
for (let i = 0; i < nodeOrder.length; i++) {
nodeOrder[i] = i;
}
let nodeCount = 0;
for (let x = -3; x <= xydivs + 3; x++) {
for (let y = -3; y <= xydivs + 3; y++) {
let xoff = 0;
if (y % 2 == 0) {
xoff = -xygap / 2.0;
}
let xx = myR.random_num(-xygap * wonk, xygap * wonk);
let yy = myR.random_num(-xygap * wonk, xygap * wonk);
let nx = map(x * xygap, 0, bigdim, -bigdim / 2 - xygap / 2, bigdim / 2 + xygap / 2);
let ny = map(y * xygap, 0, bigdim, -bigdim / 2 - xygap / 2, bigdim / 2 + xygap / 2);
nodes[nodeCount] = new Node(nx + xoff, ny, xx, yy);
nodeCount++;
}
}
//shuffle(nodes, true);
fyshuffle();
buildConnections();
}
function fyshuffle() {
for (let x = nodes.length - 1; x > 0; x--) {
let y = Math.floor(myR.random_num(0, x));
let temp = nodes[x];
nodes[x] = nodes[y];
nodes[y] = temp;
}
};
function defineBackground() {
pg.noStroke();
pg.beginShape();
if (_backDir >= 0.5) {
pg.fill(cblack);
} else {
pg.fill(cgray5);
}
pg.vertex(-width / 2, -height / 2);
pg.vertex(width / 2, -height / 2);
if (_backDir >= 0.5) {
pg.fill(cgray5);
} else {
pg.fill(cblack);
}
pg.vertex(width / 2, height / 2);
pg.vertex(-width / 2, height / 2);
pg.endShape();
}
function buildConnections() {
for (let i = 0; i < nodes.length; i++) {
nodes[i].setID(i);
}
for (let i = 0; i < nodes.length; i++) {
nodes[i].buildNetwork(nodes);
}
}
class Node {
constructor(_x, _y, _xoff, _yoff) {
this.x = _x + _xoff;
this.y = _y + _yoff;
this.newX = this.x;
this.newY = this.y;
this.centerDist = dist(0, 0, this.x, this.y);
this.minimDist = dist(0, 0, xygap / 2, xygap / 2);
this.totalConnections = 0;
this.currentNet = 0;
this.speed = [];
this.weights = [];
this.baseDist = dist(0, 0, xygap + (xygap / xydivs), xygap + (xygap / xydivs));
this.id = 0;
this.otherNodes = [];
this.connections = [];
this.alphaLines = [];
this.sending = [];
this.c = cnode;
this.easing = 0.04;
this.currentC = [];
this.nextC = [];
}
setID(_id) { this.id = _id; }
buildNetwork(_others) {
let potentialConnections = [_others.length];
let count = 0;
for (let i = 0; i < _others.length; i++) {
if (i != this.id) {
let d = dist(this.x, this.y, _others[i].x, _others[i].y);
if (d < this.baseDist) {
potentialConnections[count] = _others[i];
count++;
this.totalConnections++;
}
}
}
this.connections = subset(potentialConnections, 0, count);
this.alphaLines = [this.connections.length];
this.sending = [this.connections.length];
this.speed = [this.connections.length];
this.currentC = [this.connections.length];
this.nextC = [this.connections.length];
this.weights = [this.connections.length];
this.currentNet = int(myR.random_num(0, this.connections.length));
let sharedColor = this.c[int(myR.random_num(0, this.c.length))];
for (let i = 0; i < this.connections.length; i++) {
this.alphaLines[i] = 1.0;
this.sending[i] = true;
let distance = dist(this.x, this.y, this.connections[i].x, this.connections[i].y);
this.speed[i] = map(distance, this.baseDist, this.minimDist, 0.02, 0.05);
this.currentC[i] = sharedColor;
this.h = hue(this.currentC[i]);
this.s = saturation(this.currentC[i]);
this.b = brightness(this.currentC[i]);
this.nextC[i] = this.c[int(R.random_num(0, this.c.length))];
this.nh = hue(this.currentC[i]);
this.ns = saturation(this.currentC[i]);
this.nb = brightness(this.currentC[i]);
this.weights[i] = sameWeight;
}
}
displayNetwork() {
if (this.connections.length > 0 && this.currentNet >= 0) {
let i = this.currentNet;
if (this.alphaLines[i] > 0.0) {
this.x += (this.newX - this.x) * this.easing;
this.y += (this.newY - this.y) * this.easing;
let nextx = map(this.alphaLines[i], 0, 1, this.connections[i].x, this.x);
let nexty = map(this.alphaLines[i], 0, 1, this.connections[i].y, this.y);
let sw = map(this.alphaLines[i], 0, 1, this.weights[i], 1);
if (abs(nextx - this.x) > 1.0) {
pg.push();
pg.translate(xygap * 0.25, xygap * 0.25);
pg.strokeWeight(sameThinWeight);
pg.stroke(this.currentC[i][0], this.currentC[i][1], this.currentC[i][2], 0.01);
pg.line(this.x, this.y, nextx, nexty);
pg.pop();
pg.push();
pg.translate(this.x, this.y);
let angle = atan2(nexty - this.y, nextx - this.x);
pg.rotate(angle);
let d = dist(this.x, this.y, nextx, nexty);
let wide = sw * 0.5;
let halfWide = wide;
pg.beginShape();
pg.noStroke();
pg.fill(this.currentC[i][0], this.currentC[i][1], this.currentC[i][2], 0.05);
pg.vertex(0, 0);
pg.vertex(halfWide, wide);
pg.fill(this.nextC[i][0], this.nextC[i][1], this.nextC[i][2], 0.05);
pg.vertex(d - halfWide, wide);
pg.vertex(d, 0);
pg.endShape();
pg.pop();
}
} else {
this.alphaLines[i] = 1.0;
this.currentC[i] = this.c[int(myR.random_num(0, this.c.length))];
this.nextC[i] = this.c[int(myR.random_num(0, this.c.length))];
this.currentNet = int(myR.random_num(0, this.alphaLines.length));
if (this.currentNet < 0) {
this.currentNet = 0;
}
}
this.alphaLines[i] -= this.speed[i] * speedScalar;
}
}
};
}],