mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-22 14:23:23 +02:00
add px_surround_demo
This commit is contained in:
27
src/experimental/demo/px_surround_demo.scad
Normal file
27
src/experimental/demo/px_surround_demo.scad
Normal file
@@ -0,0 +1,27 @@
|
||||
use <pixel/px_circle.scad>;
|
||||
use <pixel/px_polyline.scad>;
|
||||
use <shape_pentagram.scad>;
|
||||
use <hull_polyline2d.scad>;
|
||||
use <experimental/px_surround.scad>;
|
||||
|
||||
pts = px_circle(10, true);
|
||||
for(p = pts) {
|
||||
translate(p)
|
||||
square(1, center = true);
|
||||
}
|
||||
#hull_polyline2d(px_surround(pts), width = .1);
|
||||
|
||||
|
||||
pentagram = [
|
||||
for(pt = shape_pentagram(15))
|
||||
[round(pt[0]), round(pt[1])]
|
||||
];
|
||||
pts2 = px_polyline(concat(pentagram, [pentagram[0]]));
|
||||
translate([30, 0]) {
|
||||
for(pt = pts2) {
|
||||
translate(pt)
|
||||
linear_extrude(1, scale = 0.5)
|
||||
square(1, center = true);
|
||||
}
|
||||
#hull_polyline2d(px_surround(pts2), width = .1);
|
||||
}
|
Reference in New Issue
Block a user