- Render 2D text shapes
- GUI translation (locales: de, ru, cz on the way)
$fa = 2; $fs = 0.2; | |
r = 4; | |
w = 50; | |
h = 155; | |
cnt = 7; | |
steps = 8; | |
space = 12; | |
function weave(x) = [ |
function d(a) = a % 360 < 180 ? 30 + 5 * sin(3 * a) : 30; | |
points = [ for (a = [0 : 359]) let(t = a + $t * 360) [ | |
d(t) * -sin(a), | |
d(t) * cos(a) | |
] ]; | |
polygon(points); | |
translate([-d($t * 360 + 90) - 10, 0]) { | |
color("blue") square([20, 1], center = true); |
// Enable animation, e.g. FPS = 20, Steps = 500 | |
$fa = 1; | |
$fs = 1; | |
$vpd = 600; // fixed distance, comment to scale the viewport | |
size = 20; | |
// --- helper functions for animation ---------------------------------------- |
size = 20; | |
step = 0.5; | |
function f0(x, y) = sin(sqrt(pow(x, 2) + pow(y, 2)) * 180 / PI) + 2; | |
function f1(x, y) = sqrt(pow(x, 2) + pow(y, 2) + 3); | |
function f(x, y) = 20 * f0(x, y) / f1(x, y) + 4; | |
// see https://github.com/openscad/scad-utils | |
function flatten(list) = [ for (i = list, v = i) v ]; |
#!/bin/bash | |
CNT=0 | |
WINID=$(xwininfo -name "OpenSCAD - test.scad" | grep "Window id:" | awk '{ print $4; }') | |
NUM=${1-50} | |
echo "Using ${NUM}x${NUM} cube area..." | |
while true | |
do |
Image link: | |
![My Image](https://gist.github.com/t-paul/7171783#file-openscad-freetype-4-png) |