Zeitpunkt Nutzer Delta Tröts TNR Titel Version maxTL Mi 03.07.2024 00:00:12 61.917 +2 3.513.906 56,8 Fosstodon 4.2.9 500 Di 02.07.2024 00:01:44 61.915 -2 3.510.479 56,7 Fosstodon 4.2.9 500 Mo 01.07.2024 00:00:33 61.917 0 3.507.420 56,6 Fosstodon 4.2.9 500 So 30.06.2024 00:00:34 61.917 +2 3.504.671 56,6 Fosstodon 4.2.9 500 Sa 29.06.2024 00:01:13 61.915 +2 3.501.982 56,6 Fosstodon 4.2.9 500 Fr 28.06.2024 00:01:07 61.913 +3 3.498.459 56,5 Fosstodon 4.2.9 500 Do 27.06.2024 00:00:32 61.910 0 3.495.444 56,5 Fosstodon 4.2.9 500 Mi 26.06.2024 00:00:07 61.910 +1 3.494.703 56,4 Fosstodon 4.2.9 500 Di 25.06.2024 00:00:06 61.909 +1 3.491.246 56,4 Fosstodon 4.2.9 500 Mo 24.06.2024 00:00:01 61.908 0 3.488.299 56,3 Fosstodon 4.2.9 500
(@dcz) · 11/2021 · Tröts: 2.843 · Folger: 503
Mi 03.07.2024 20:09
#SDF #CAD keeps progressing.
Half of the reason I even started is because #OpenSCAD can't bend shapes to the side of a cylinder.
And here we go! Despite the projection being inexact, bending actually plays well with other shapes.
#glsl :
/// Bends object at positive x.
/// Distance is where the bend preserves length in the y dimension.
vec2 bend(vec2 pos, float distance) {
return vec2(length(pos), atan(pos.y, pos.x) * distance);
}
#graphics #programming #shaders
An inexact signed distance function, showing a bent rectangle. There's a mess near the center of the bend.
Same bent rectangle hugging a square. No messy distances.
The square with the bent rectangle removed. No mess. The text area to the right reads: /// Bends object at positive x. /// Distance is where the bend preserves length in the y dimension. vec2 bend(vec2 pos, float distance) { return vec2(length(pos), atan(pos.y, pos.x) * distance); } float sdf(vec2 pos) { pos = pos * 20.0; float box1 = sdBox2(pos - vec2(0.0, 0.), vec2(7.0, 7.0)); pos = bend(pos, 20.0); pos.x -= 20.0; return opUnion( box1, sdBox2(pos, vec2(1.0, 7.0)) ) ; //sdPlane2(pos); //sdSegment2(pos, vec2(0., 1.0), vec2(0., 0.)); }
[Öffentlich] Antw.: 0 Wtrl.: 1 Fav.: 0