1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-17 12:10:47 +02:00

use vector substractiokn

This commit is contained in:
Justin Lin
2022-04-04 10:55:36 +08:00
parent 659654f533
commit b3289dd55b

View File

@@ -101,13 +101,11 @@ module tail() {
module dragon_and_perl() { module dragon_and_perl() {
function __angy_angz(p1, p2) = function __angy_angz(p1, p2) =
let( let(v = p2 - p1)
dx = p2.x - p1.x, [
dy = p2.y - p1.y, atan2(v.z, norm([v.x, v.y])),
dz = p2.z - p1.z, atan2(v.y, v.x)
ya = atan2(dz, sqrt(pow(dx, 2) + pow(dy, 2))), ];
za = atan2(dy, dx)
) [ya, za];
body_path = bezier_curve(0.02, [ body_path = bezier_curve(0.02, [
[0, 7.5, 15], [0, 7.5, 15],