1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-02-12 11:20:48 +01:00
dotSCAD/src/experimental/ptf_circle.scad

8 lines
231 B
OpenSCAD
Raw Normal View History

2020-03-11 09:48:34 +08:00
function ptf_circle(point, offset) =
let(
2020-03-11 14:14:39 +08:00
p = [point[0] + offset[1], point[1] + offset[0]],
2020-03-11 09:48:34 +08:00
n = max(abs(p[0]), abs(p[1])),
r = n * 1.414,
a = atan2(p[0], p[1])
)
[r * cos(a), r * sin(a)];