@automovie/human 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -3
- package/lib/generation/AutoMovieHumanDigitJoints.d.ts +8 -26
- package/lib/generation/AutoMovieHumanDigitJoints.js +9 -37
- package/lib/generation/AutoMovieHumanDigitJoints.js.map +1 -1
- package/lib/generation/conic/AutoMovieHumanConicLoft.d.ts +154 -0
- package/lib/generation/conic/AutoMovieHumanConicLoft.js +430 -0
- package/lib/generation/conic/AutoMovieHumanConicLoft.js.map +1 -0
- package/lib/generation/conic/AutoMovieHumanConicPose.d.ts +92 -0
- package/lib/generation/conic/AutoMovieHumanConicPose.js +202 -0
- package/lib/generation/conic/AutoMovieHumanConicPose.js.map +1 -0
- package/lib/generation/conic/AutoMovieHumanConicRelief.d.ts +52 -0
- package/lib/generation/conic/AutoMovieHumanConicRelief.js +88 -0
- package/lib/generation/conic/AutoMovieHumanConicRelief.js.map +1 -0
- package/lib/generation/conic/AutoMovieHumanConicSection.d.ts +252 -0
- package/lib/generation/conic/AutoMovieHumanConicSection.js +567 -0
- package/lib/generation/conic/AutoMovieHumanConicSection.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1.d.ts +265 -0
- package/lib/generation/f1/AutoMovieHumanF1.js +1254 -0
- package/lib/generation/f1/AutoMovieHumanF1.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Antihelix.d.ts +23 -0
- package/lib/generation/f1/AutoMovieHumanF1Antihelix.js +65 -0
- package/lib/generation/f1/AutoMovieHumanF1Antihelix.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Arm.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Arm.js +82 -0
- package/lib/generation/f1/AutoMovieHumanF1Arm.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Axilla.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Axilla.js +91 -0
- package/lib/generation/f1/AutoMovieHumanF1Axilla.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Breast.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Breast.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1Breast.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Concha.d.ts +40 -0
- package/lib/generation/f1/AutoMovieHumanF1Concha.js +81 -0
- package/lib/generation/f1/AutoMovieHumanF1Concha.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerIndex.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerIndex.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerIndex.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerMiddle.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerPinky.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerPinky.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerPinky.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerRing.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerRing.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerRing.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerThumb.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerThumb.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1FingerThumb.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Frames.d.ts +97 -0
- package/lib/generation/f1/AutoMovieHumanF1Frames.js +160 -0
- package/lib/generation/f1/AutoMovieHumanF1Frames.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Hand.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Hand.js +81 -0
- package/lib/generation/f1/AutoMovieHumanF1Hand.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Helix.d.ts +20 -0
- package/lib/generation/f1/AutoMovieHumanF1Helix.js +64 -0
- package/lib/generation/f1/AutoMovieHumanF1Helix.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Joints.d.ts +231 -0
- package/lib/generation/f1/AutoMovieHumanF1Joints.js +249 -0
- package/lib/generation/f1/AutoMovieHumanF1Joints.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Landmarks.d.ts +86 -0
- package/lib/generation/f1/AutoMovieHumanF1Landmarks.js +89 -0
- package/lib/generation/f1/AutoMovieHumanF1Landmarks.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Leg.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Leg.js +82 -0
- package/lib/generation/f1/AutoMovieHumanF1Leg.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Nose.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Nose.js +82 -0
- package/lib/generation/f1/AutoMovieHumanF1Nose.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Nostril.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Nostril.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1Nostril.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Placement.d.ts +75 -0
- package/lib/generation/f1/AutoMovieHumanF1Placement.js +151 -0
- package/lib/generation/f1/AutoMovieHumanF1Placement.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Placing.d.ts +45 -0
- package/lib/generation/f1/AutoMovieHumanF1Placing.js +301 -0
- package/lib/generation/f1/AutoMovieHumanF1Placing.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Plate.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Plate.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1Plate.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeBig.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeBig.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeBig.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeIndex.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeIndex.js +59 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeIndex.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeLittle.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeLittle.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeLittle.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeMiddle.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeRing.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeRing.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1ToeRing.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Trunk.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Trunk.js +79 -0
- package/lib/generation/f1/AutoMovieHumanF1Trunk.js.map +1 -0
- package/lib/generation/f1/AutoMovieHumanF1Vault.d.ts +18 -0
- package/lib/generation/f1/AutoMovieHumanF1Vault.js +75 -0
- package/lib/generation/f1/AutoMovieHumanF1Vault.js.map +1 -0
- package/lib/generation/frame/AutoMovieHumanSegmentFrame.d.ts +149 -0
- package/lib/generation/frame/AutoMovieHumanSegmentFrame.js +290 -0
- package/lib/generation/frame/AutoMovieHumanSegmentFrame.js.map +1 -0
- package/lib/index.d.ts +11 -0
- package/lib/index.js +11 -0
- package/lib/index.js.map +1 -1
- package/lib/skeleton/AutoMovieHumanCanonicalBody.d.ts +7 -3
- package/lib/skeleton/AutoMovieHumanCanonicalBody.js +31 -3
- package/lib/skeleton/AutoMovieHumanCanonicalBody.js.map +1 -1
- package/lib/skeleton/AutoMovieHumanCanonicalProfile.d.ts +22 -31
- package/lib/skeleton/AutoMovieHumanCanonicalProfile.js +112 -172
- package/lib/skeleton/AutoMovieHumanCanonicalProfile.js.map +1 -1
- package/lib/skeleton/AutoMovieHumanCanonicalSolids.d.ts +65 -0
- package/lib/skeleton/AutoMovieHumanCanonicalSolids.js +105 -0
- package/lib/skeleton/AutoMovieHumanCanonicalSolids.js.map +1 -0
- package/lib/skeleton/index.d.ts +1 -0
- package/lib/skeleton/index.js +1 -0
- package/lib/skeleton/index.js.map +1 -1
- package/package.json +21 -13
- package/src/generation/AutoMovieHumanDigitJoints.ts +12 -47
- package/src/generation/conic/AutoMovieHumanConicLoft.ts +566 -0
- package/src/generation/conic/AutoMovieHumanConicPose.ts +213 -0
- package/src/generation/conic/AutoMovieHumanConicRelief.ts +94 -0
- package/src/generation/conic/AutoMovieHumanConicSection.ts +609 -0
- package/src/generation/f1/AutoMovieHumanF1.ts +1448 -0
- package/src/generation/f1/AutoMovieHumanF1Antihelix.ts +64 -0
- package/src/generation/f1/AutoMovieHumanF1Arm.ts +82 -0
- package/src/generation/f1/AutoMovieHumanF1Axilla.ts +90 -0
- package/src/generation/f1/AutoMovieHumanF1Breast.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1Concha.ts +80 -0
- package/src/generation/f1/AutoMovieHumanF1FingerIndex.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1FingerMiddle.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1FingerPinky.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1FingerRing.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1FingerThumb.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1Frames.ts +191 -0
- package/src/generation/f1/AutoMovieHumanF1Hand.ts +81 -0
- package/src/generation/f1/AutoMovieHumanF1Helix.ts +63 -0
- package/src/generation/f1/AutoMovieHumanF1Joints.ts +319 -0
- package/src/generation/f1/AutoMovieHumanF1Landmarks.ts +101 -0
- package/src/generation/f1/AutoMovieHumanF1Leg.ts +82 -0
- package/src/generation/f1/AutoMovieHumanF1Nose.ts +82 -0
- package/src/generation/f1/AutoMovieHumanF1Nostril.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1Placement.ts +148 -0
- package/src/generation/f1/AutoMovieHumanF1Placing.ts +313 -0
- package/src/generation/f1/AutoMovieHumanF1Plate.ts +59 -0
- package/src/generation/f1/AutoMovieHumanF1ToeBig.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1ToeIndex.ts +58 -0
- package/src/generation/f1/AutoMovieHumanF1ToeLittle.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1ToeMiddle.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1ToeRing.ts +74 -0
- package/src/generation/f1/AutoMovieHumanF1Trunk.ts +79 -0
- package/src/generation/f1/AutoMovieHumanF1Vault.ts +74 -0
- package/src/generation/frame/AutoMovieHumanSegmentFrame.ts +309 -0
- package/src/index.ts +11 -0
- package/src/skeleton/AutoMovieHumanCanonicalBody.ts +53 -3
- package/src/skeleton/AutoMovieHumanCanonicalProfile.ts +153 -358
- package/src/skeleton/AutoMovieHumanCanonicalSolids.ts +175 -0
- package/src/skeleton/index.ts +1 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoMovieHumanF1Nostril = void 0;
|
|
4
|
+
const AutoMovieHumanConicSection_1 = require("../conic/AutoMovieHumanConicSection");
|
|
5
|
+
const AutoMovieHumanF1Joints_1 = require("./AutoMovieHumanF1Joints");
|
|
6
|
+
const AutoMovieHumanF1Placement_1 = require("./AutoMovieHumanF1Placement");
|
|
7
|
+
/**
|
|
8
|
+
* f1's nostril tape wall on the +Z side; the other side is its mirror image in the median plane z = 0, which f1's reference satisfies exactly.
|
|
9
|
+
*
|
|
10
|
+
* Frame: the figure's absolute reference pose, millimetres, forward +X, up +Y, +Z the reference's left. The course runs
|
|
11
|
+
* through `centres` with a turn of half length `halves` at each joint; stations are arclength from the first centre and each
|
|
12
|
+
* section lies in the plane normal to the course, charted by `u` (carried from `up` by the course's rotations) and `v`.
|
|
13
|
+
*
|
|
14
|
+
* Every row of `values` is one section field of `AutoMovieHumanConicSection` at the shared `knots`, a natural cubic between
|
|
15
|
+
* them: the section is a chain of conics through its four extremes, fitted to the convex hull of the reference skin
|
|
16
|
+
* (the path of a taut tape).
|
|
17
|
+
*
|
|
18
|
+
* Source: the f1 reference head cut by this course's own planes over stations 9 to 13 mm, 17 sections 0.25 mm apart, every
|
|
19
|
+
* second one withheld from the fit. Fitted offline by `test/src/reference-conics/FamilyConicBody.ts` (joint least squares over
|
|
20
|
+
* all sections). Regenerated through the engine's view loft from these numbers alone, the vertices of each section's hull lie
|
|
21
|
+
* 0.19 mm from it on average and at most 1.46 mm; what lies inside that hull is not modelled. 39 independent numbers.
|
|
22
|
+
*/
|
|
23
|
+
exports.AutoMovieHumanF1Nostril = {
|
|
24
|
+
name: "nostril",
|
|
25
|
+
centres: [AutoMovieHumanF1Joints_1.AutoMovieHumanF1Joints.nostrilRoot, AutoMovieHumanF1Joints_1.AutoMovieHumanF1Joints.nostrilTip],
|
|
26
|
+
halves: [],
|
|
27
|
+
up: AutoMovieHumanF1Placement_1.AutoMovieHumanF1Placement.direction("nostril.up"),
|
|
28
|
+
layout: AutoMovieHumanConicSection_1.AutoMovieHumanConicSection.limb(0),
|
|
29
|
+
knots: [0, 3, 6, 9, 11, 13],
|
|
30
|
+
values: [
|
|
31
|
+
// front (+u) extreme: u, mm
|
|
32
|
+
[8.24, 8.24, 8.24, 8.24, 5.14, 5.09],
|
|
33
|
+
// front (+u) extreme: v, mm
|
|
34
|
+
[4.86, 4.86, 4.86, 4.86, -1.62, -2.06],
|
|
35
|
+
// side (+v) extreme: u, mm
|
|
36
|
+
[3.07, 3.07, 3.07, 3.07, -3.12, -4.01],
|
|
37
|
+
// side (+v) extreme: v, mm
|
|
38
|
+
[6.11, 6.11, 6.11, 6.11, 3.84, 3.72],
|
|
39
|
+
// back (-u) extreme: u, mm
|
|
40
|
+
[-6.08, -6.08, -6.08, -6.08, -6.49, -5.87],
|
|
41
|
+
// back (-u) extreme: v, mm
|
|
42
|
+
[2.57, 2.57, 2.57, 2.57, 2.04, 1.12],
|
|
43
|
+
// side (-v) extreme: u, mm
|
|
44
|
+
[2.4, 2.4, 2.4, 2.4, 4.09, 3.07],
|
|
45
|
+
// side (-v) extreme: v, mm
|
|
46
|
+
[-3.59, -3.59, -3.59, -3.59, -4.59, -4.43],
|
|
47
|
+
// shoulder rho of the arc after anchor 0, share
|
|
48
|
+
[0.3156, 0.3156, 0.3156, 0.3156, 0.3172, 0.3193],
|
|
49
|
+
// shoulder rho of the arc after anchor 1, share
|
|
50
|
+
[0.4296, 0.4296, 0.4296, 0.4296, 0.4779, 0.4724],
|
|
51
|
+
// shoulder rho of the arc after anchor 2, share
|
|
52
|
+
[0.317, 0.317, 0.317, 0.317, 0.3855, 0.3368],
|
|
53
|
+
// shoulder rho of the arc after anchor 3, share
|
|
54
|
+
[0.3321, 0.3321, 0.3321, 0.3321, 0.283, 0.4845],
|
|
55
|
+
],
|
|
56
|
+
// The part closes in a point at `tip`, a station placed by anatomy; its cap starts at `from`.
|
|
57
|
+
tips: [null, { from: 13, tip: 16 }],
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=AutoMovieHumanF1Nostril.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoMovieHumanF1Nostril.js","sourceRoot":"","sources":["../../../src/generation/f1/AutoMovieHumanF1Nostril.ts"],"names":[],"mappings":";;;AACA,oFAAiF;AACjF,qEAAkE;AAClE,2EAAwE;AAExE;;;;;;;;;;;;;;;GAeG;AACU,QAAA,uBAAuB,GAAoC;IACtE,IAAI,EAAE,SAAS;IACf,OAAO,EAAE,CAAC,+CAAsB,CAAC,WAAW,EAAE,+CAAsB,CAAC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AAE,MAAM,EAAE,MAAM,CAAC;QAChD,gDAAgD;QAChD,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;QAChD,gDAAgD;QAChD,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAC5C,gDAAgD;QAChD,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC;KAChD;IAED,8FAA8F;IAC9F,IAAI,EAAE,CAAC,IAAI,EAAE,EAAC,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,EAAE,EAAC,CAAC;CAClC,CAAC"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { AutoMovieHumanConicLoft } from "../conic/AutoMovieHumanConicLoft";
|
|
2
|
+
import { AutoMovieHumanSegmentFrame as F } from "../frame/AutoMovieHumanSegmentFrame";
|
|
3
|
+
/**
|
|
4
|
+
* f1's placing read at a pose: the stored local tables (`AutoMovieHumanF1Placing`) mapped through the chain of segment frames into the
|
|
5
|
+
* figure's frame.
|
|
6
|
+
*
|
|
7
|
+
* A pose is one rotation per joint (`AutoMovieHumanSegmentFrame.world`); a joint the pose leaves undefined keeps its reference rotation,
|
|
8
|
+
* so no pose at all is the reference pose, the pose f1 was traced in. A point of the table is `o + A q` in its segment's posed frame and a
|
|
9
|
+
* direction `A q`, so a rotation of a joint moves every datum of the segments past it rigidly and leaves every stored value as it was.
|
|
10
|
+
*
|
|
11
|
+
* A family is placed by three kinds of field and no other: its course's `centres`, each a datum of the segment it stands in; its `up`, a
|
|
12
|
+
* direction of its course's first segment; and each relief's `axis` and `turn`, directions of the segment its window lies on. Its section
|
|
13
|
+
* table is local to that course already (`AutoMovieHumanConicLoft.axis`), so `place` carries it untouched. Where a pose changes a course's
|
|
14
|
+
* joint angles, the family is carried by `AutoMovieHumanConicPose`: its turns keep their set-backs, its stations are mapped and its chart
|
|
15
|
+
* takes the roll its joints' twists ask for, each an exact no-op at the reference pose.
|
|
16
|
+
*/
|
|
17
|
+
export declare namespace AutoMovieHumanF1Placement {
|
|
18
|
+
/** A pose: a joint's rotation `A_parent^T A_child` by its segment's name, or undefined to keep its reference rotation. */
|
|
19
|
+
type IPose = (name: string) => F.M3 | undefined;
|
|
20
|
+
/** Every segment's frame in the figure's frame, by name. */
|
|
21
|
+
type IFrames = ReadonlyMap<string, F.IFrame>;
|
|
22
|
+
/** The frames of the reference pose: the chain at its own rotations. */
|
|
23
|
+
const REFERENCE: IFrames;
|
|
24
|
+
/**
|
|
25
|
+
* The rigid parts of the tree: the ear and the nose stand on the head and the breast on the thorax. They are not joints: a rigid
|
|
26
|
+
* part's rotation says how the part stands on its parent and is a constant of the body, at every pose.
|
|
27
|
+
*/
|
|
28
|
+
const RIGID: readonly string[];
|
|
29
|
+
/**
|
|
30
|
+
* The articulated joints, each by the segment it moves: the shoulder (`humerus`), the elbow (`forearm`), the wrist (`hand`), every
|
|
31
|
+
* finger's and the thumb's three joints, the hip (`femur`), the knee (`tibia`), the ankle (`foot`) and every toe's two. The pelvis is
|
|
32
|
+
* the root, and the thorax and the head stand on it without a joint for now (the trunk is one family on one straight course).
|
|
33
|
+
*/
|
|
34
|
+
const ARTICULATED: readonly string[];
|
|
35
|
+
/**
|
|
36
|
+
* The neutral pose: every articulated joint (`ARTICULATED`) at the identity, its segment's axes parallel to its parent's. The root,
|
|
37
|
+
* the trunk's frames and the rigid parts (`RIGID`) keep their reference rotations, since none of them is a joint's angle.
|
|
38
|
+
*/
|
|
39
|
+
const NEUTRAL: IPose;
|
|
40
|
+
/** The frames of a pose; absent, the reference pose. */
|
|
41
|
+
function frames(pose?: IPose): IFrames;
|
|
42
|
+
/** One segment's frame; a name the tree lacks is refused. */
|
|
43
|
+
function frame(name: string, at?: IFrames): F.IFrame;
|
|
44
|
+
/** A stored point in the figure's frame, mm: `o + A q` in its segment's frame. */
|
|
45
|
+
function point(name: string, at?: IFrames): F.V3;
|
|
46
|
+
/** A stored polyline in the figure's frame: the points `<name>.0`, `<name>.1` and so on. */
|
|
47
|
+
function points(name: string, at?: IFrames): F.V3[];
|
|
48
|
+
/** A stored direction in the figure's frame: `A q` in its segment's frame. */
|
|
49
|
+
function direction(name: string, at?: IFrames): F.V3;
|
|
50
|
+
/** A family's course in the figure's frame: the centres `AutoMovieHumanF1Placing.COURSES` names for it. */
|
|
51
|
+
function course(family: string, at?: IFrames): F.V3[];
|
|
52
|
+
/**
|
|
53
|
+
* The segment each straight run of a family's course lies on, run `k` between centres `k` and `k + 1`: the bone that ends at the run's
|
|
54
|
+
* far centre, which is that centre's segment, or that segment's parent when the centre is the segment's own origin (the elbow centre
|
|
55
|
+
* ends the humerus's run and is the forearm's origin).
|
|
56
|
+
*/
|
|
57
|
+
function runs(family: string): string[];
|
|
58
|
+
/**
|
|
59
|
+
* A family placed at a pose: its `centres`, its `up` and each relief's `axis` and `turn` read from the table through the posed frames,
|
|
60
|
+
* by the family's and the reliefs' own names, and every other field as given. A family derived from a stored one (other tips, a phase
|
|
61
|
+
* rule) keeps its name and is placed the same; a twin is the reflection of the placed family, never placed itself. A family whose
|
|
62
|
+
* course has another count of centres than the table names for it was laid on another course and is refused.
|
|
63
|
+
*/
|
|
64
|
+
function place(family: AutoMovieHumanConicLoft.IFamily, at?: IFrames): AutoMovieHumanConicLoft.IFamily;
|
|
65
|
+
/**
|
|
66
|
+
* `place` with the map of the family's stations from the reference pose to the pose, null where it is the identity: a station
|
|
67
|
+
* constant read along a posed family (where a band lands, where a face ends) goes through it.
|
|
68
|
+
*
|
|
69
|
+
* @param family A stored family, or one derived from it that keeps its name, course and stations.
|
|
70
|
+
*/
|
|
71
|
+
function repose(family: AutoMovieHumanConicLoft.IFamily, at?: IFrames): {
|
|
72
|
+
family: AutoMovieHumanConicLoft.IFamily;
|
|
73
|
+
station: ((station: number) => number) | null;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AutoMovieHumanF1Placement = void 0;
|
|
4
|
+
const AutoMovieHumanConicPose_1 = require("../conic/AutoMovieHumanConicPose");
|
|
5
|
+
const AutoMovieHumanSegmentFrame_1 = require("../frame/AutoMovieHumanSegmentFrame");
|
|
6
|
+
const AutoMovieHumanF1Placing_1 = require("./AutoMovieHumanF1Placing");
|
|
7
|
+
/**
|
|
8
|
+
* f1's placing read at a pose: the stored local tables (`AutoMovieHumanF1Placing`) mapped through the chain of segment frames into the
|
|
9
|
+
* figure's frame.
|
|
10
|
+
*
|
|
11
|
+
* A pose is one rotation per joint (`AutoMovieHumanSegmentFrame.world`); a joint the pose leaves undefined keeps its reference rotation,
|
|
12
|
+
* so no pose at all is the reference pose, the pose f1 was traced in. A point of the table is `o + A q` in its segment's posed frame and a
|
|
13
|
+
* direction `A q`, so a rotation of a joint moves every datum of the segments past it rigidly and leaves every stored value as it was.
|
|
14
|
+
*
|
|
15
|
+
* A family is placed by three kinds of field and no other: its course's `centres`, each a datum of the segment it stands in; its `up`, a
|
|
16
|
+
* direction of its course's first segment; and each relief's `axis` and `turn`, directions of the segment its window lies on. Its section
|
|
17
|
+
* table is local to that course already (`AutoMovieHumanConicLoft.axis`), so `place` carries it untouched. Where a pose changes a course's
|
|
18
|
+
* joint angles, the family is carried by `AutoMovieHumanConicPose`: its turns keep their set-backs, its stations are mapped and its chart
|
|
19
|
+
* takes the roll its joints' twists ask for, each an exact no-op at the reference pose.
|
|
20
|
+
*/
|
|
21
|
+
var AutoMovieHumanF1Placement;
|
|
22
|
+
(function (AutoMovieHumanF1Placement) {
|
|
23
|
+
/** The frames of the reference pose: the chain at its own rotations. */
|
|
24
|
+
AutoMovieHumanF1Placement.REFERENCE = AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.world(AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.CHAIN, () => undefined);
|
|
25
|
+
/**
|
|
26
|
+
* The rigid parts of the tree: the ear and the nose stand on the head and the breast on the thorax. They are not joints: a rigid
|
|
27
|
+
* part's rotation says how the part stands on its parent and is a constant of the body, at every pose.
|
|
28
|
+
*/
|
|
29
|
+
AutoMovieHumanF1Placement.RIGID = ["ear", "nose", "breast"];
|
|
30
|
+
/**
|
|
31
|
+
* The articulated joints, each by the segment it moves: the shoulder (`humerus`), the elbow (`forearm`), the wrist (`hand`), every
|
|
32
|
+
* finger's and the thumb's three joints, the hip (`femur`), the knee (`tibia`), the ankle (`foot`) and every toe's two. The pelvis is
|
|
33
|
+
* the root, and the thorax and the head stand on it without a joint for now (the trunk is one family on one straight course).
|
|
34
|
+
*/
|
|
35
|
+
AutoMovieHumanF1Placement.ARTICULATED = [
|
|
36
|
+
"humerus", "forearm", "hand",
|
|
37
|
+
...["index", "middle", "ring", "pinky"].flatMap((finger) => ["proximal", "middle", "distal"].map((bone) => finger + "." + bone)),
|
|
38
|
+
"thumb.metacarpal", "thumb.proximal", "thumb.distal",
|
|
39
|
+
"femur", "tibia", "foot",
|
|
40
|
+
...["bigtoe", "indextoe", "middletoe", "ringtoe", "littletoe"].flatMap((toe) => ["proximal", "distal"].map((bone) => toe + "." + bone)),
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* The neutral pose: every articulated joint (`ARTICULATED`) at the identity, its segment's axes parallel to its parent's. The root,
|
|
44
|
+
* the trunk's frames and the rigid parts (`RIGID`) keep their reference rotations, since none of them is a joint's angle.
|
|
45
|
+
*/
|
|
46
|
+
AutoMovieHumanF1Placement.NEUTRAL = (name) => (AutoMovieHumanF1Placement.ARTICULATED.includes(name) ? AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.IDENTITY : undefined);
|
|
47
|
+
/** The frames of a pose; absent, the reference pose. */
|
|
48
|
+
function frames(pose) {
|
|
49
|
+
return pose === undefined ? AutoMovieHumanF1Placement.REFERENCE : AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.world(AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.CHAIN, pose);
|
|
50
|
+
}
|
|
51
|
+
AutoMovieHumanF1Placement.frames = frames;
|
|
52
|
+
/** One segment's frame; a name the tree lacks is refused. */
|
|
53
|
+
function frame(name, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
54
|
+
const found = at.get(name);
|
|
55
|
+
if (found === undefined)
|
|
56
|
+
throw new Error("f1 has no segment " + name);
|
|
57
|
+
return found;
|
|
58
|
+
}
|
|
59
|
+
AutoMovieHumanF1Placement.frame = frame;
|
|
60
|
+
/** A stored point in the figure's frame, mm: `o + A q` in its segment's frame. */
|
|
61
|
+
function point(name, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
62
|
+
const placed = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.POINTS[name];
|
|
63
|
+
if (placed === undefined)
|
|
64
|
+
throw new Error("f1 has no point " + name);
|
|
65
|
+
return AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.toWorld(frame(placed.frame, at), placed.local);
|
|
66
|
+
}
|
|
67
|
+
AutoMovieHumanF1Placement.point = point;
|
|
68
|
+
/** A stored polyline in the figure's frame: the points `<name>.0`, `<name>.1` and so on. */
|
|
69
|
+
function points(name, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
70
|
+
const out = [];
|
|
71
|
+
while (AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.POINTS[name + "." + out.length] !== undefined)
|
|
72
|
+
out.push(point(name + "." + out.length, at));
|
|
73
|
+
if (out.length === 0)
|
|
74
|
+
throw new Error("f1 has no polyline " + name);
|
|
75
|
+
return out;
|
|
76
|
+
}
|
|
77
|
+
AutoMovieHumanF1Placement.points = points;
|
|
78
|
+
/** A stored direction in the figure's frame: `A q` in its segment's frame. */
|
|
79
|
+
function direction(name, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
80
|
+
const placed = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.DIRECTIONS[name];
|
|
81
|
+
if (placed === undefined)
|
|
82
|
+
throw new Error("f1 has no direction " + name);
|
|
83
|
+
return AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.toWorldDirection(frame(placed.frame, at), placed.local);
|
|
84
|
+
}
|
|
85
|
+
AutoMovieHumanF1Placement.direction = direction;
|
|
86
|
+
/** A family's course in the figure's frame: the centres `AutoMovieHumanF1Placing.COURSES` names for it. */
|
|
87
|
+
function course(family, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
88
|
+
const names = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.COURSES[family];
|
|
89
|
+
if (names === undefined)
|
|
90
|
+
throw new Error("f1 has no course for " + family);
|
|
91
|
+
return names.map((name) => point(name, at));
|
|
92
|
+
}
|
|
93
|
+
AutoMovieHumanF1Placement.course = course;
|
|
94
|
+
/**
|
|
95
|
+
* The segment each straight run of a family's course lies on, run `k` between centres `k` and `k + 1`: the bone that ends at the run's
|
|
96
|
+
* far centre, which is that centre's segment, or that segment's parent when the centre is the segment's own origin (the elbow centre
|
|
97
|
+
* ends the humerus's run and is the forearm's origin).
|
|
98
|
+
*/
|
|
99
|
+
function runs(family) {
|
|
100
|
+
const names = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.COURSES[family];
|
|
101
|
+
if (names === undefined)
|
|
102
|
+
throw new Error("f1 has no course for " + family);
|
|
103
|
+
return names.slice(1).map((name) => {
|
|
104
|
+
const far = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.POINTS[name];
|
|
105
|
+
const parent = AutoMovieHumanF1Placing_1.AutoMovieHumanF1Placing.CHAIN.find((joint) => joint.name === far.frame)?.parent ?? null;
|
|
106
|
+
return far.local.every((x) => x === 0) && parent !== null ? parent : far.frame;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
AutoMovieHumanF1Placement.runs = runs;
|
|
110
|
+
/**
|
|
111
|
+
* A family placed at a pose: its `centres`, its `up` and each relief's `axis` and `turn` read from the table through the posed frames,
|
|
112
|
+
* by the family's and the reliefs' own names, and every other field as given. A family derived from a stored one (other tips, a phase
|
|
113
|
+
* rule) keeps its name and is placed the same; a twin is the reflection of the placed family, never placed itself. A family whose
|
|
114
|
+
* course has another count of centres than the table names for it was laid on another course and is refused.
|
|
115
|
+
*/
|
|
116
|
+
function place(family, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
117
|
+
return repose(family, at).family;
|
|
118
|
+
}
|
|
119
|
+
AutoMovieHumanF1Placement.place = place;
|
|
120
|
+
/**
|
|
121
|
+
* `place` with the map of the family's stations from the reference pose to the pose, null where it is the identity: a station
|
|
122
|
+
* constant read along a posed family (where a band lands, where a face ends) goes through it.
|
|
123
|
+
*
|
|
124
|
+
* @param family A stored family, or one derived from it that keeps its name, course and stations.
|
|
125
|
+
*/
|
|
126
|
+
function repose(family, at = AutoMovieHumanF1Placement.REFERENCE) {
|
|
127
|
+
const centres = course(family.name, at);
|
|
128
|
+
if (centres.length !== family.centres.length)
|
|
129
|
+
throw new Error("f1's table names " + centres.length + " centres for " + family.name + ", whose course has " + family.centres.length);
|
|
130
|
+
const segments = runs(family.name);
|
|
131
|
+
const carried = (run, d) => AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.toWorldDirection(frame(segments[run], at), AutoMovieHumanSegmentFrame_1.AutoMovieHumanSegmentFrame.toLocalDirection(frame(segments[run]), d));
|
|
132
|
+
const posed = AutoMovieHumanConicPose_1.AutoMovieHumanConicPose.repose(family, centres, direction(family.name + ".up", at), carried);
|
|
133
|
+
return {
|
|
134
|
+
station: posed.station,
|
|
135
|
+
family: {
|
|
136
|
+
...posed.family,
|
|
137
|
+
...(posed.family.reliefs === undefined
|
|
138
|
+
? {}
|
|
139
|
+
: {
|
|
140
|
+
reliefs: posed.family.reliefs.map((relief) => ({
|
|
141
|
+
...relief,
|
|
142
|
+
axis: direction(relief.name + ".axis", at),
|
|
143
|
+
...(relief.turn === undefined ? {} : { turn: direction(relief.name + ".turn", at) }),
|
|
144
|
+
})),
|
|
145
|
+
}),
|
|
146
|
+
},
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
AutoMovieHumanF1Placement.repose = repose;
|
|
150
|
+
})(AutoMovieHumanF1Placement || (exports.AutoMovieHumanF1Placement = AutoMovieHumanF1Placement = {}));
|
|
151
|
+
//# sourceMappingURL=AutoMovieHumanF1Placement.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoMovieHumanF1Placement.js","sourceRoot":"","sources":["../../../src/generation/f1/AutoMovieHumanF1Placement.ts"],"names":[],"mappings":";;;AACA,8EAA2E;AAC3E,oFAAsF;AACtF,uEAAyE;AAEzE;;;;;;;;;;;;;GAaG;AACH,IAAiB,yBAAyB,CAgIzC;AAhID,WAAiB,yBAAyB;IAOxC,wEAAwE;IAC3D,mCAAS,GAAY,uDAAC,CAAC,KAAK,CAAC,iDAAC,CAAC,KAAK,EAAE,GAAc,EAAE,CAAC,SAAS,CAAC,CAAC;IAE/E;;;OAGG;IACU,+BAAK,GAAsB,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAElE;;;;OAIG;IACU,qCAAW,GAAsB;QAC5C,SAAS,EAAE,SAAS,EAAE,MAAM;QAC5B,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,MAAc,EAAY,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,GAAG,CAAC,CAAC,IAAY,EAAU,EAAE,CAAC,MAAM,GAAG,GAAG,GAAG,IAAI,CAAC,CAAC;QAClK,kBAAkB,EAAE,gBAAgB,EAAE,cAAc;QACpD,OAAO,EAAE,OAAO,EAAE,MAAM;QACxB,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC,CAAC,OAAO,C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CAAC,MAAM,CAAC,IAAI,GAAG,OAAO,EAAE,EAAE,CAAC,EAAE,CAAC;yBACrF,CAAC,CAAC;qBACJ,CAAC;aACP;SACF,CAAC;IACJ,CAAC;IArBe,0BAAA,MAAM,SAqBrB,CAAA;AACH,CAAC,EAhIgB,yBAAyB,aAAzB,yBAAyB,GAAzB,yBAAyB,QAgIzC"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { AutoMovieHumanSegmentFrame } from "../frame/AutoMovieHumanSegmentFrame";
|
|
2
|
+
/**
|
|
3
|
+
* f1's placing, re-based: the chain of its segment frames and every quantity that places a part, each in the frame of the segment it
|
|
4
|
+
* belongs to. This table is the one source of where f1's parts stand; `AutoMovieHumanF1Placement` maps it through the chain to the
|
|
5
|
+
* figure's frame at a pose, and `AutoMovieHumanF1Joints`, `AutoMovieHumanF1Landmarks` and every family's placing fields read it at the
|
|
6
|
+
* reference pose.
|
|
7
|
+
*
|
|
8
|
+
* Generated data, never edited by hand: `test/src/reference-conics/FamilyConicRebase.ts` (from `test/`: `pnpm conic:build`, then
|
|
9
|
+
* `node .shots/esbuild/FamilyConicRebase.cjs --tables`) wrote it from the world tables of step 1 (`2ad771f825`): the chain is
|
|
10
|
+
* `AutoMovieHumanSegmentFrame.chain` of the frames `AutoMovieHumanF1Frames.segments` builds by its written rules, a point is
|
|
11
|
+
* `A^T (p - o)` and a direction `A^T d` in its segment's reference frame. Which segment each belongs to is declared, with its basis,
|
|
12
|
+
* in that tool (`frameOf`, `LEGS`, `TRUNK`); a `note` says how a relief's window lies on its course when it crosses a joint.
|
|
13
|
+
*
|
|
14
|
+
* Every number is written at full double precision, JavaScript's shortest form that reads back the same double, because the round
|
|
15
|
+
* trip to the reference pose must be exact within rounding and a shortened number would add its own error: the tool enters a value
|
|
16
|
+
* only when it returns through the chain within 1e-12 mm of its world value for a point and 1e-14 for a direction, and its
|
|
17
|
+
* receipt lists each return. The reference pose is the chain's rotations and nothing else; identity rotations give the neutral body.
|
|
18
|
+
*
|
|
19
|
+
* A component under 1e-9 mm (a point, a chain offset) or 1e-12 (a direction, a rotation entry) is written as 0 and nothing else is
|
|
20
|
+
* rounded: a number that is zero by its definition, such as a joint centre in the segment whose origin it is, leaves the formula as
|
|
21
|
+
* rounding noise, and step 3 reads its laws here. The thresholds stand far below any datum's resolution (0.01 mm; 1e-5 for a
|
|
22
|
+
* relief's axis) and far above the double rounding of a 2,000 mm figure (about 4e-13 mm), and a zeroed entry is accepted only
|
|
23
|
+
* while it still returns within the bounds above.
|
|
24
|
+
*
|
|
25
|
+
* Millimetres; directions are as their sources wrote them (a relief's `axis` is rounded to 1e-5, so it is unit only to that).
|
|
26
|
+
*/
|
|
27
|
+
export declare namespace AutoMovieHumanF1Placing {
|
|
28
|
+
/** One placed quantity. */
|
|
29
|
+
interface IPlaced {
|
|
30
|
+
/** The segment whose frame holds it. */
|
|
31
|
+
frame: string;
|
|
32
|
+
/** The point, mm, or the direction in that frame. */
|
|
33
|
+
local: [number, number, number];
|
|
34
|
+
/** How a relief's window lies on its course, when it crosses a joint. */
|
|
35
|
+
note?: string;
|
|
36
|
+
}
|
|
37
|
+
/** The chain, parent first: each segment's origin in its parent's frame, mm, and its reference rotation `A_parent^T A_child` by rows. */
|
|
38
|
+
const CHAIN: AutoMovieHumanSegmentFrame.IJoint[];
|
|
39
|
+
/** Every datum and course centre: a joint centre reads `[0, 0, 0]` in the segment whose origin it is; a polyline's centres are `<name>.<index>`. */
|
|
40
|
+
const POINTS: Record<string, IPlaced>;
|
|
41
|
+
/** Every placing direction: a family's `<family>.up` in its course's first segment, a relief's `<relief>.axis` and `<relief>.turn` in its window's segment. */
|
|
42
|
+
const DIRECTIONS: Record<string, IPlaced>;
|
|
43
|
+
/** Every family's course as the names of its centres in `POINTS`. */
|
|
44
|
+
const COURSES: Record<string, string[]>;
|
|
45
|
+
}
|