Zum Hauptinhalt springen
LIVE
CVSS 4.8CVE-2026-137621 | A weakness has been identified in RT-Thread up to 5.3.0. Affected by this vulnerability is the function bl_adc_get_value of the file bsp/bouffalo_lab/libraries/rt_drivers/drv_adc.c of the component Bouffalo ADC Driver. This manipulation of the argument channel causes improper validation of array index. The attack requires local access. Patch name: b3a0eb5e12c6dca8145fc49d76c4785478c9e55b. It is suggested to install a patch to address this issue.CVSS 6.7CVE-2026-137620 | A security flaw has been discovered in RT-Thread up to 5.3.0. Affected is the function davinci_spi_get_prescale of the file bsp/dm365/drivers/spi-davinci.c of the component DM365 SPI Driver. The manipulation of the argument max_hz results in divide by zero. The attack requires a local approach. The exploit has been released to the public and may be used for attacks. The patch is identified as e12183f7b87eddf182b95bf8b400acd626880306. Applying a patch is adviCVSS 4.8CVE-2026-137618 | A vulnerability was identified in RT-Thread up to 5.3.0. This impacts the function hpm_adc_enabled of the file bsp/hpmicro/libraries/drivers/drv_adc.c of the component HPM ADC Driver. The manipulation of the argument channel leads to improper validation of array index. The attack needs to be performed locally. The exploit is publicly available and might be used. The identifier of the patch is fc64f78669b42b35981f97c23c7e952832f3b48b. It is recommended to appCVSS 8.5CVE-2026-137506 | ezdxf through 1.4.5 contains a code injection vulnerability in the dxf2code add-on that allows attackers to inject Python code via unescaped single quotes in DXF table entry names. Attackers can craft a DXF file whose layer, linetype, style, or appid names break out of quoted strings in generated scripts, executing code with the privileges of the user running them.CVSS 7.1CVE-2026-137507 | torchvision before 0.29.2 contains a path traversal vulnerability in _extract_tar() that allows attackers to write files outside the extraction directory by supplying crafted tar archives. Attackers controlling archives passed to extract_archive() or download_and_extract_archive() can use .. paths, absolute paths, or symlinks to overwrite Python modules and achieve code execution.CVSS 8.5CVE-2026-137518 | pyfda through 0.9.5 contains an insecure deserialization vulnerability in load_filter() that allows attackers to execute code by supplying crafted .npz or .pkl filter files. Attackers can embed a __reduce__ gadget that runs via np.load with allow_pickle=True or pickle.load before validation, executing code with the user's privileges.CVSS 8.5CVE-2026-137529 | JAL (Just Another Ledger) through 2026.11.3 contains an arbitrary file overwrite vulnerability in backup restore that allows attackers to write files by supplying a crafted .tgz backup with a symlink member. Attackers can include a jal.sqlite symlink to an absolute path followed by a regular jal.sqlite member, overwriting files such as shell startup scripts for code execution.CVSS 8.7CVE-2026-137539 | lastversion before 3.6.20 contains a path traversal vulnerability in extract_tar() that allows attackers to write files outside the extraction directory via tar symlink members. Attackers controlling a project's release assets can craft a tarball with a symlink followed by a file beneath it, writing files like usercustomize.py to achieve code execution.
Alle im Drawer
Intelligence View
⚡ tsecurity.de Intelligence

同樣是 50 行程式碼,為什麼做出來的東西像藝術品?

先玩再說 這是做出來會長這樣——看到那些「會呼吸」的漸層了嗎?不是漸變,是雜訊。但看起來像是有生命的流體。 為什麼? 別人做出來像藝術品,你做出來像數學作業 p5.js 有兩個 noise(): // 壞掉的 noise(直線) ellipse(x, noise(x)*height, 10, 10); // 看起來像鋸…

Beitrag
0
Seite
0
↗ Quelle (dev.to)
Quelle & Fakten · 3 Min. Lesezeit
Quelle: dev.to
Rubrik: Sichere Programmierung




先玩再說



這是做出來會長這樣——看到那些「會呼吸」的漸層了嗎?不是漸變,是雜訊。但看起來像是有生命的流體。



為什麼?






別人做出來像藝術品,你做出來像數學作業



p5.js 有兩個 noise():




// 壞掉的 noise(直線)
ellipse(x, noise(x)*height, 10, 10); // 看起來像鋸齒

// 會呼吸的 noise(加時間)
ellipse(x, noise(x, frameCount*0.01)*height, 10, 10); // 看起來像海草






差別只有一個維度:時間。



加上 frameCount 這件事,多數教學都有講。但多數教學沒講的是:同樣是 50 行,為什麼做出來像藝術品而不是像「證明我會用 noise 函式」?






秘密一:視覺幻覺——你的大腦在幫視覺「加工」



看這張圖:




●●●●●●●●●●●●●●●●●●●●
●●●●○○○○●●●●●●●●●●●●
●●●●●●●●●●●●●●●●●●●●






你看到什麼?



多數人說「一條線」。但實際上那只是一群各自獨立的點,大腦自動幫你連起來了。



這叫視覺幻覺——沒有意義的訊號,大腦自動幫你補上結構和意圖。



TeamLab 就是用這個原理:500 個各自輕微不同步的簡單元素,大腦把它們當成「一片會呼吸的森林」。






秘密二:讓變化「慢一點開始」——看起來自然多了



「慢慢亮」「慢慢暗」比「立刻亮立刻暗」感覺自然,為什麼?



因為現實世界裡東西改變速度很少是均勻的。一盞燈關掉的時候,是先快後慢——不是線性勻速。



不是線性的:




  • ❌ brightness = distance(線性:均勻變化,感覺像機器)

  • ✅ brightness = t * (2 - t)(快開始,慢結束,感覺像真的)



人眼對「一開始快、然後慢下來」的速度變化特別有感覺,因為這跟我們在物理世界遇到的情況一致。




function easeOutQuad(t) {
return t * (2 - t); // 簡單的緩出公式
}









做出來(一):基礎流體場






let particles = [];

function setup() {
createCanvas(windowWidth, windowHeight);
for (let i = 0; i < 300; i++) {
particles.push({
x: random(width),
y: random(height),
speed: random(0.8, 1.5)
});
}
}

function draw() {
background(255, 253, 250); // 暖白,不是純白

for (let p of particles) {
// 正確的 flow field:用粒子真實位置算 noise
let noiseScale = 0.005;
let angle = noise(p.x * noiseScale, p.y * noiseScale, frameCount * 0.004) * TWO_PI * 2;

p.x += cos(angle) * p.speed;
p.y += sin(angle) * p.speed;

// 繞圈回來
if (p.x < 0) p.x = width;
if (p.x > width) p.x = 0;
if (p.y < 0) p.y = height;
if (p.y > height) p.y = 0;

// 日系啞色
let col = noise(p.x * 0.01, p.y * 0.01, frameCount * 0.008);
fill(60 + col*40, 80 + col*30, 100 + col*60, 150);
noStroke();
ellipse(p.x, p.y, 4, 4);
}
}






為什麼看起來像藝術品?





  1. 暖白底色:background(255, 253, 250) 不是純白,是紙張的顏色


  2. 啞色粒子:RGB(60-100, 80-110, 100-160) 不是鮮豔的藍或紅,是日本寺廟感的光


  3. 300 個粒子:數量夠多,大腦就會開始「出戲」——把機械過程詮釋成生命






做出來(二):加分項——滑鼠互動






function mouseMoved() {
for (let p of particles) {
let d = dist(mouseX, mouseY, p.x, p.y);
if (d < 100) {
// 滑鼠靠近時,粒子被推開
let angle = atan2(p.y - mouseY, p.x - mouseX);
p.x += cos(angle) * (100 - d) * 0.05;
p.y += sin(angle) * (100 - d) * 0.05;
}
}
}






這段加上去,畫面從「動態壁布」變成「活的空間」——滑鼠變成一種存在感。






做出來(三):再加一個維度——顏色也跟著變



把以下函式加到前面的程式碼下面,就能在同一個粒子系統裡同時控制位置和顏色:




function displayParticle(p) {
// 用粒子的真實位置算 noise(與上方 flow field 共用同一套三維 noise 空間)
let n = noise(p.x*0.01, p.y*0.01, frameCount*0.008);

// 日系啞色系:低對比、有灰度
let r = 80 + n * 80; // 80-160
let g = 100 + n * 60; // 100-160
let b = 120 + n * 60; // 120-180
let a = 100 + n * 100; // 透明度也有漸層

fill(r, g, b, a);
noStroke();

// 粒子大小也呼吸
let size = 3 + sin(frameCount*0.05 + p.x * 0.1) * 2;
ellipse(p.x, p.y, size, size);
}






然後在 draw() 迴圈裡,每次畫完位置呼叫 displayParticle(p) 就能著色。



為什麼日系美學做出來的東西看起來比較貴?



因為低對比、灰階、有「餘韻」的顏色,大腦不會覺得被「攻擊」,反而願意停留在上面。這就是 TeamLab 每個展都排隊的原因之一——視覺不疲勞。






完整程式碼






// p5.js Noise Flow Field — 日系啞光版本
// 50行以內,做出像藝術品的流體視覺效果

let particles = [];
const NUM = 300;

function setup() {
createCanvas(windowWidth, windowHeight);
colorMode(RGB, 255, 255, 255, 255);

for (let i = 0; i < NUM; i++) {
particles.push({
x: random(width),
y: random(height),
speed: random(0.8, 1.5)
});
}
}

function draw() {
// 暖白底(紙張色,不是純白)
background(255, 253, 250);

for (let p of particles) {
// noise 三維:x, y, time — 用粒子真實位置算
let noiseScale = 0.005;
let angle = noise(p.x * noiseScale, p.y * noiseScale, frameCount * 0.004) * TWO_PI * 2;

p.x += cos(angle) * p.speed;
p.y += sin(angle) * p.speed;

// 從左邊出去的從右邊回來
if (p.x < 0) p.x = width;
if (p.x > width) p.x = 0;
if (p.y < 0) p.y = height;
if (p.y > height) p.y = 0;

// 日系啞色(低對比、灰藍調)
let n = noise(p.x * 0.01, p.y * 0.01, frameCount * 0.008);
let c = 90 + n * 70;
fill(c + 10, c + 30, c + 60, 120);
noStroke();

// 大小也呼吸
let sz = 3 + sin(frameCount * 0.03 + p.x * 0.1) * 1.5;
ellipse(p.x, p.y, sz, sz);
}
}

function mouseMoved() {
for (let p of particles) {
let d = dist(mouseX, mouseY, p.x, p.y);
if (d < 120) {
let angle = atan2(p.y - mouseY, p.x - mouseX);
let force = (120 - d) * 0.04;
p.x += cos(angle) * force;
p.y += sin(angle) * force;
}
}
}









為什麼這個做起來「貴」?





  1. 視覺幻覺:300 個各自輕微不同步的粒子 = 大腦說「這是活的」


  2. 日系啞光:不是RGB(0,0,255),是 RGB(90,120,180) 這種「看得到情緒」的藍


  3. 讓變化有節奏:大小變化用 sin(),不是線性——看起來像呼吸,不像閃爍


  4. 滑鼠存在:不是點擊,是「靠近就離開」的空間感






下一步



想更有 Fu?試試:




  1. 把 NUM 從 300 改成 800——數量多到一個程度,視覺會從「一群點」變成「一種物質」

  2. 把顏色從「灰藍」改成「暖橙→深褐」漸層——馬上從「北歐極簡」變成「昭和復古」

  3. 加入超聲波感測器——讓實際的「人在空間中移動」驅動粒子方向



最後一個方向,就是我們下一篇文章的主題。

Information ergänzen Fachhinweis, Update, Korrektur oder Quelle zur Meldung beitragen
Gäste-Hinweise werden kurz redaktionell geprüft und danach hier angezeigt.

Community-Hinweise zur Meldung

0 freigegeben
Social ReaktionenReagiere als Erste:r — dein Feedback zählt!
Informations-Bewertung:

💬 Community-Diskussion & Kommentare

🌐 Zum Hauptchat

Starte die Diskussion im Social-Chat Broadcast Stream oder reiche oben über „Information ergänzen“ einen Fachbeitrag ein.

Community Rating &amp; Social Proof
⭐ Leser-Wertung
–
Ø / 5.0
Noch keine Leser-Bewertungen
War dieser Artikel hilfreich?
0
Jetzt Bewertung abgeben
Detail-Bewertung (optional)
Inhalt & Qualität
Quelle & Glaubwürdigkeit
Aktualität
Security Briefing Kostenlos · 1-Klick-Abmeldung

Intelligence Digest — kostenlos

Täglich die wichtigsten Security-News · jederzeit abbestellbar

Verwandte Story-Cluster & Quellen (Vektor-KI)

6 Cluster
15 Quellen
Dyson may have just won Black Friday with a 59% discount on the V8 Cyclone — now just AU$268
Latest from TechRadar vor 43 Min.
14 weitere Quellen
Latest from TechRadarvor 1 Std.These are the best Nintendo Switch 2 Black Friday deals in Australia right now — save up to AU$142 on the latest console Latest from TechRadarvor 1 Std.Want the best bang for your buck? Tune in to our Black Friday livestream for the best deals in tech — from Apple and Samsung to LG, Nintendo and beyond Giga.devor 2 Std.Black-Friday-Sale bei Teufel: bis zu 500 Euro Rabatt auf die beliebten Sound-Bestseller PC-WELTvor 2 Std.Amazon startet Glücksrad am Black Friday: 10 Gutscheine im Wert von 2.000 Euro zu gewinnen PC-WELTvor 2 Std.Amazon startet Glücksrad am Black Friday: 10 Gutscheine im Wert von 2.000 Euro zu gewinnen Latest from TechRadarvor 2 Std.Black Friday Pre-sale checklist – do these 5 things before you start shopping Latest from TechRadarvor 2 Std.The Breville coffee machine we rely on in the TechRadar Australia kitchen is now AU$1,100 off for Black Friday Latest from TechRadarvor 2 Std.Black Friday US smartwatch deals 2026 — all picked by a wearable tech expert CNETvor 2 Std.I Found a Black Friday Deal That Takes $1,500 Off CNET’s Top-Rated 4K Laser Projector Latest from TechRadarvor 3 Std.Stop guessing which PS5 accessory to buy and take our Black Friday deal quiz Latest from TechRadarvor 4 Std.The only thing not affected by AI this Black Friday? Gaming monitors! Here's how to bag yourself a bargain OS X Dailyvor 4 Std.Black Friday Deals: $400 Off M5 MacBook Air! AirPods Pro 3 for $149! Latest from TechRadarvor 4 Std.The 2TB Samsung T9 portable SSD is $170 off this Black Friday CNETvor 4 Std.Buying a Kindle on Black Friday? We Compare Amazon’s E-Readers to Help You Choose the Best One
Ähnliche Beiträge
🔍 Verwandte News

Auch interessante Nachrichten 同樣是 50 行程式碼,為什麼做出來的東西像藝術品?

Thematisch verwandte Begriffe: 行程式碼為什麼做出來的東西像藝術品 · 6 Treffer

Laden...

Videos werden geladen ...

Laden...

Beiträge werden geladen ...

Laden...

Videos werden geladen ...

💬 Kommentare werden geladen…
Zum Aktualisieren ziehen
Widgets & Themen
Widgets werden geladen…
Nächster Beitrag