Last active
January 10, 2025 03:38
-
-
Save wyattowalsh/22e3b9000e61ced43b3bfc308c974c9b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Final Production Version: p5.js sketch for exporting a highly detailed SVG background | |
let svg; | |
function setup() { | |
svg = createGraphics(windowWidth, 300, SVG); | |
noLoop(); | |
} | |
function draw() { | |
// Gradient Background with Complex Color Layers | |
for (let y = 0; y < svg.height; y++) { | |
let inter = map(y, 0, svg.height, 0, 1); | |
let c = lerpColor(color('#6a9fb5'), color('#b5a66a'), inter); | |
svg.stroke(c); | |
svg.line(0, y, svg.width, y); | |
} | |
// Starry effect with varying brightness | |
for (let i = 0; i < 200; i++) { | |
let x = random(svg.width); | |
let y = random(svg.height); | |
let starSize = random(1, 4); | |
svg.noStroke(); | |
svg.fill(255, random(80, 200)); | |
svg.ellipse(x, y, starSize, starSize); | |
} | |
// Dynamic Wave Patterns with Gradient Strokes | |
for (let i = 0; i < 7; i++) { | |
let waveHeight = random(20, 100); | |
let waveOffset = random(-100, 100); | |
svg.strokeWeight(random(0.8, 2)); | |
svg.stroke(lerpColor(color(255, 255, 255, 50), color(255, 255, 255, 100), random())); | |
svg.noFill(); | |
svg.beginShape(); | |
for (let x = 0; x < svg.width; x += 10) { | |
let y = svg.height / 2 + sin((x + waveOffset) * 0.015) * waveHeight; | |
svg.vertex(x, y); | |
} | |
svg.endShape(); | |
} | |
// Radial Gradient Circles for Focal Elements | |
for (let i = 0; i < 30; i++) { | |
let x = random(svg.width); | |
let y = random(svg.height); | |
let maxSize = random(30, 120); | |
for (let r = maxSize; r > 0; r -= 6) { | |
let alpha = map(r, 0, maxSize, 60, 0); | |
svg.fill(255, 255, 255, alpha); | |
svg.noStroke(); | |
svg.ellipse(x, y, r, r); | |
} | |
} | |
// Add Glittering Particles for a Magical Effect | |
for (let i = 0; i < 80; i++) { | |
let px = random(svg.width); | |
let py = random(svg.height); | |
let pSize = random(2, 5); | |
let glitterColor = lerpColor(color(255, 255, 255, 150), color(255, 200, 100, 180), random()); | |
svg.fill(glitterColor); | |
svg.noStroke(); | |
svg.ellipse(px, py, pSize, pSize); | |
} | |
// Subtle Geometric Patterns | |
for (let i = 0; i < 10; i++) { | |
let x = random(svg.width / 4, (svg.width / 4) * 3); | |
let y = random(svg.height / 4, (svg.height / 4) * 3); | |
let size = random(50, 100); | |
svg.noFill(); | |
svg.stroke(255, 150); | |
svg.strokeWeight(0.5); | |
svg.beginShape(); | |
for (let j = 0; j < 6; j++) { | |
let angle = TWO_PI / 6 * j; | |
let vx = x + cos(angle) * size; | |
let vy = y + sin(angle) * size; | |
svg.vertex(vx, vy); | |
} | |
svg.endShape(CLOSE); | |
} | |
// Save SVG file | |
save(svg, "bg.svg"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<svg xmlns="http://www.w3.org/2000/svg" viewBox="1031.03 -313.36 90 89.9948" width="90px" height="89.9948px"><g id="object-0"><path d="M 1057.31 -266.29 C 1061.18 -266.29 1063.14 -261.59 1060.39 -258.85 C 1057.65 -256.11 1052.95 -258.07 1052.95 -261.93 C 1052.95 -264.34 1054.91 -266.29 1057.31 -266.29 L 1057.31 -266.29 Z M 1059.1 -263.72 C 1056.75 -266.07 1053.18 -262.5 1055.53 -260.15 C 1057.88 -257.8 1061.44 -261.37 1059.1 -263.72 Z M 1073.95 -265.01 C 1076.69 -262.27 1074.73 -257.57 1070.87 -257.57 C 1067 -257.57 1065.04 -262.28 1067.79 -265.01 C 1070.74 -267.97 1073.66 -265.01 1073.95 -265.01 L 1073.95 -265.01 Z M 1069.08 -260.15 C 1071.43 -257.8 1075 -261.37 1072.65 -263.72 C 1070.3 -266.07 1066.73 -262.5 1069.08 -260.15 Z M 1053.68 -271.24 C 1052.18 -271.24 1050.82 -270.63 1049.83 -269.64 C 1048.11 -267.92 1048.22 -266.29 1048.22 -264.21 L 1043.81 -263.48 C 1043.34 -263.44 1042.97 -263.05 1042.97 -262.57 L 1042.97 -254.35 C 1042.97 -253.91 1043.3 -253.52 1043.74 -253.45 L 1048.22 -252.72 L 1048.22 -251.15 C 1048.22 -248.14 1050.68 -245.68 1053.68 -245.68 L 1074.5 -245.68 C 1077.5 -245.68 1079.96 -248.14 1079.96 -251.15 L 1079.96 -252.72 L 1084.44 -253.45 C 1084.89 -253.53 1085.21 -253.91 1085.21 -254.35 L 1085.21 -262.57 C 1085.21 -263.05 1084.85 -263.44 1084.38 -263.48 L 1079.96 -264.21 L 1079.96 -265.78 C 1079.96 -268.78 1077.51 -271.24 1074.5 -271.24 L 1065.01 -271.24 L 1065.01 -274.04 C 1067.57 -274.73 1068.48 -277.97 1066.57 -279.89 C 1066.54 -279.89 1065.67 -280.91 1064.09 -280.91 C 1060.01 -280.91 1059.3 -275.09 1063.18 -274.04 L 1063.18 -271.24 L 1053.69 -271.24 L 1053.68 -271.24 Z M 1074.5 -269.41 L 1053.68 -269.41 C 1051.69 -269.41 1050.06 -267.78 1050.06 -265.78 L 1050.06 -251.15 C 1050.06 -249.15 1051.68 -247.52 1053.68 -247.52 L 1074.5 -247.52 C 1076.49 -247.52 1078.13 -249.15 1078.13 -251.15 L 1078.13 -265.78 C 1078.13 -267.78 1076.49 -269.41 1074.5 -269.41 L 1074.5 -269.41 Z M 1079.96 -262.35 L 1083.38 -261.79 L 1083.38 -255.13 L 1079.96 -254.57 L 1079.96 -262.35 Z M 1048.22 -254.57 L 1044.81 -255.13 L 1044.81 -261.79 L 1048.22 -262.35 L 1048.22 -254.57 Z M 1068.86 -254.34 C 1069.64 -255.25 1071.03 -254.06 1070.24 -253.14 C 1067 -249.39 1061.18 -249.39 1057.94 -253.14 C 1057.15 -254.05 1058.54 -255.25 1059.33 -254.34 C 1061.84 -251.44 1066.35 -251.44 1068.86 -254.34 L 1068.86 -254.34 Z M 1062.91 -276.24 C 1061.36 -277.74 1063.7 -280.16 1065.27 -278.59 C 1066.8 -277.06 1064.52 -274.69 1062.91 -276.24 Z M 1073.27 -285.71 L 1040.86 -285.72 C 1035.45 -285.72 1031.03 -281.3 1031.03 -275.89 L 1031.03 -248.18 C 1031.03 -243.1 1034.94 -238.86 1039.95 -238.39 L 1039.95 -224.28 C 1039.95 -223.51 1040.85 -223.08 1041.45 -223.58 L 1059.08 -238.35 L 1087.32 -238.35 C 1092.73 -238.35 1097.15 -242.77 1097.15 -248.18 L 1097.15 -275.89 C 1097.15 -276.98 1096.97 -278.02 1096.64 -279 L 1100.63 -279 L 1113.15 -268.52 C 1113.75 -268.02 1114.66 -268.45 1114.66 -269.22 L 1114.66 -279.06 C 1118.26 -279.52 1121.03 -282.61 1121.03 -286.29 L 1121.02 -306.07 C 1121.02 -310.08 1117.75 -313.36 1113.74 -313.36 L 1080.56 -313.36 C 1076.55 -313.36 1073.27 -310.08 1073.27 -306.07 L 1073.27 -285.72 L 1073.27 -285.71 Z M 1075.14 -285.71 L 1075.11 -306.07 C 1075.11 -309.07 1077.57 -311.52 1080.56 -311.52 L 1113.75 -311.52 C 1116.74 -311.52 1119.2 -309.07 1119.2 -306.07 L 1119.2 -286.28 C 1119.2 -284.79 1118.58 -283.43 1117.6 -282.44 C 1115.14 -279.99 1112.83 -281.6 1112.83 -279.92 L 1112.83 -271.18 L 1101.6 -280.58 C 1101.43 -280.74 1101.21 -280.83 1100.97 -280.83 L 1095.81 -280.83 C 1094.07 -283.79 1090.88 -285.71 1087.32 -285.71 L 1075.14 -285.71 L 1075.14 -285.71 Z M 1087.32 -283.88 L 1040.86 -283.88 C 1036.47 -283.88 1032.87 -280.28 1032.87 -275.88 L 1032.87 -248.18 C 1032.87 -243.78 1036.47 -240.19 1040.86 -240.19 C 1041.37 -240.19 1041.78 -239.78 1041.78 -239.27 L 1041.78 -226.25 L 1058.12 -239.94 C 1058.29 -240.09 1058.51 -240.19 1058.76 -240.19 L 1087.32 -240.19 C 1091.71 -240.19 1095.32 -243.78 1095.32 -248.18 L 1095.32 -275.88 C 1095.32 -280.25 1091.75 -283.88 1087.32 -283.88 L 1087.32 -283.88 Z M 1084.33 -303.19 C 1083.11 -303.19 1083.11 -305.03 1084.33 -305.03 L 1109.98 -305.03 C 1111.19 -305.03 1111.19 -303.19 1109.98 -303.19 L 1084.33 -303.19 Z M 1084.33 -295.26 C 1083.11 -295.26 1083.11 -297.1 1084.33 -297.1 L 1109.98 -297.1 C 1111.19 -297.1 1111.19 -295.26 1109.98 -295.26 L 1084.33 -295.26 Z M 1096.1 -287.33 C 1094.89 -287.33 1094.89 -289.16 1096.1 -289.16 L 1109.98 -289.16 C 1111.19 -289.16 1111.19 -287.33 1109.98 -287.33 L 1096.1 -287.33 Z" fill-rule="evenodd" style="fill: rgb(181, 166, 106);"/></g></svg> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment