A Pen by Alexius M Wronka I I
How do I make an a pen by alexius m wronka i i?
What is a a pen by alexius m wronka i i? How do you make a a pen by alexius m wronka i i? This script and codes were developed by Alexius M Wronka I I on 19 September 2022, Monday.
A Pen by Alexius M Wronka I I - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Alexius M Wronka I I</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
A Pen by Alexius M Wronka I I - Script Codes CSS Codes
body { background: #000;
}
ellipse { fill: #fff;
}
path { fill: none; stroke: #fff; stroke-linecap: square;
}
.mid { stroke-width: 4px;
}
.tail { stroke-width: 2px;
}
A Pen by Alexius M Wronka I I - Script Codes JS Codes
var width = 960, height = 500;
var n = 100, m = 12, degrees = 180 / Math.PI;
var spermatozoa = d3.range(n).map(function() { var x = Math.random() * width, y = Math.random() * height; return { vx: Math.random() * 2 - 1, vy: Math.random() * 2 - 1, path: d3.range(m).map(function() { return [x, y]; }), count: 0 };
});
var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height);
var g = svg.selectAll("g") .data(spermatozoa) .enter().append("g");
var head = g.append("ellipse") .attr("rx", 6.5) .attr("ry", 4);
g.append("path") .datum(function(d) { return d.path.slice(0, 3); }) .attr("class", "mid");
g.append("path") .datum(function(d) { return d.path; }) .attr("class", "tail");
var tail = g.selectAll("path");
d3.timer(function() { for (var i = -1; ++i < n;) { var spermatozoon = spermatozoa[i], path = spermatozoon.path, dx = spermatozoon.vx, dy = spermatozoon.vy, x = path[0][0] += dx, y = path[0][1] += dy, speed = Math.sqrt(dx * dx + dy * dy), count = speed * 10, k1 = -5 - speed / 3; // Bounce off the walls. if (x < 0 || x > width) spermatozoon.vx *= -1; if (y < 0 || y > height) spermatozoon.vy *= -1; // Swim! for (var j = 0; ++j < m;) { var vx = x - path[j][0], vy = y - path[j][1], k2 = Math.sin(((spermatozoon.count += count) + j * 3) / 300) / speed; path[j][0] = (x += dx / speed * k1) - dy * k2; path[j][1] = (y += dy / speed * k1) + dx * k2; speed = Math.sqrt((dx = vx) * dx + (dy = vy) * dy); } } head.attr("transform", headTransform); tail.attr("d", tailPath);
});
function headTransform(d) { return "translate(" + d.path[0] + ")rotate(" + Math.atan2(d.vy, d.vx) * degrees + ")";
}
function tailPath(d) { return "M" + d.join("L");
}
Developer | Alexius M Wronka I I |
Username | awronka |
Uploaded | September 19, 2022 |
Rating | 3 |
Size | 2,375 Kb |
Views | 30,360 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
React Test | 1,232 Kb |
Guage | 3,480 Kb |
D3 Dot Graph | 4,139 Kb |
Angular 2 forms | 1,244 Kb |
Animated Drop Down | 3,066 Kb |
List React | 3,155 Kb |
Transition button | 4,112 Kb |
React Calc | 6,046 Kb |
Angular Calc | 3,707 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Responsive slide | Thorien | 2,400 Kb |
Wave Lines | Mikehobizal | 4,023 Kb |
Birthday Party Starter | Aussieyang | 1,629 Kb |
Mario | Takaneichinose | 3,902 Kb |
Pruebas de d3.js | Juanmanuelcarnerero | 2,485 Kb |
RollOver Effect 2 | Lmack90 | 2,162 Kb |
React Template | Isac | 1,241 Kb |
Header Line Issue | Charlie-volpe | 1,768 Kb |
Direction-icon | Alexandremasy | 3,323 Kb |
A Pen by Matt Popovich | Mpopv | 3,349 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!