as the crow flies
|
@ -1,16 +1,16 @@
|
||||||
# oriels
|
# oriels
|
||||||
*a °dof driven dev space*
|
*a °dof driven dev space*
|
||||||
|
|
||||||
<img src='zrc/markberg.png' width="50%">
|
<img src='_/markberg.png' width="50%">
|
||||||
|
|
||||||
**mapped out by:**
|
**mapped out by:**
|
||||||
<a href='https://ethanmerchant.com'>@spatialfree</a> × <a href='https://twitter.com/opendegree'>@opendegree</a>
|
<a href='https://ethanmerchant.com'>@spatialfree</a> × <a href='https://twitter.com/opendegree'>@opendegree</a>
|
||||||
|
|
||||||
<a href='https://dofdev.org'>
|
<a href='https://dofdev.org'>
|
||||||
<img src='zrc/channel-icon-tranparent.png' width="64px">
|
<img src='_/channel-icon-tranparent.png' width="64px">
|
||||||
</a>
|
</a>
|
||||||
<a href='https://stereokit.net'>
|
<a href='https://stereokit.net'>
|
||||||
<img src='zrc/StereoKitLogoLight.svg' width="32px">
|
<img src='_/StereoKitLogoLight.svg' width="32px">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
Before Width: | Height: | Size: 3 KiB After Width: | Height: | Size: 3 KiB |
Before Width: | Height: | Size: 6.3 KiB After Width: | Height: | Size: 6.3 KiB |
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 59 KiB |
Before Width: | Height: | Size: 340 KiB After Width: | Height: | Size: 340 KiB |
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 89 KiB |
Before Width: | Height: | Size: 56 KiB After Width: | Height: | Size: 56 KiB |
|
@ -1,4 +1,4 @@
|
||||||
# 2018.10.06 -> 2022.10.04 ->
|
# 2018.10.06 -> 2023.04.10 ->
|
||||||
|
|
||||||
input
|
input
|
||||||
vTo
|
vTo
|
||||||
|
@ -9,10 +9,11 @@ data
|
||||||
cursor
|
cursor
|
||||||
|
|
||||||
frame
|
frame
|
||||||
mag = (vTo - vFrom).mag
|
delta = vTo - vFrom
|
||||||
|
mag = delta.mag
|
||||||
stretch = max(mag - deadzone, 0)
|
stretch = max(mag - deadzone, 0)
|
||||||
|
|
||||||
dir = v3.dir(vTo, vFrom)
|
dir = nor(delta)
|
||||||
cursor = vTo + dir * stretch * strength
|
cursor = vTo + dir * stretch * strength
|
||||||
|
|
||||||
design
|
design
|
|
@ -21,14 +21,14 @@ class WaveCursor : dof {
|
||||||
float fL = rig.Flexion(hand, FingerId.Little);
|
float fL = rig.Flexion(hand, FingerId.Little);
|
||||||
|
|
||||||
// Biased by finger length
|
// Biased by finger length
|
||||||
float stretch = (fI + fI + fM + fM + fM + fR + fR + fL) / 8f;
|
float wave = (fI + fI + fM + fM + fM + fR + fR + fL) / 8f;
|
||||||
|
|
||||||
Vec3 to = hand.Get(FingerId.Index, JointId.Tip).position;
|
Vec3 to = hand.Get(FingerId.Index, JointId.Tip).position;
|
||||||
Vec3 from = hand.Get(FingerId.Index, JointId.KnuckleMajor).position;
|
Vec3 from = hand.Get(FingerId.Index, JointId.KnuckleMajor).position;
|
||||||
|
|
||||||
Vec3 dir = PullRequest.Direction(to, from);
|
Vec3 dir = Vec3.Direction(to, from);
|
||||||
|
|
||||||
cursor.raw = to + dir * stretch * reach.value;
|
cursor.raw = to + dir * wave * crest.value;
|
||||||
|
|
||||||
Mesh.Sphere.Draw(Mono.inst.matHoloframe, Matrix.TRS(cursor.raw, Quat.Identity, 0.01f), new Color(1, 0, 0));
|
Mesh.Sphere.Draw(Mono.inst.matHoloframe, Matrix.TRS(cursor.raw, Quat.Identity, 0.01f), new Color(1, 0, 0));
|
||||||
Mesh.Sphere.Draw(Mono.inst.matHoloframe, Matrix.TRS(cursor.pos, Quat.Identity, 0.01f), new Color(0, 1, 0));
|
Mesh.Sphere.Draw(Mono.inst.matHoloframe, Matrix.TRS(cursor.pos, Quat.Identity, 0.01f), new Color(0, 1, 0));
|
||||||
|
@ -37,7 +37,7 @@ class WaveCursor : dof {
|
||||||
}
|
}
|
||||||
|
|
||||||
// design
|
// design
|
||||||
public Design reach = new Design { str="1.0", term="0+m", min=0 };
|
public Design crest = new Design { str="1.0", term="0+m", min=0 };
|
||||||
|
|
||||||
|
|
||||||
// demo
|
// demo
|
||||||
|
@ -92,4 +92,18 @@ class WaveCursor : dof {
|
||||||
/*
|
/*
|
||||||
COMMENTS
|
COMMENTS
|
||||||
|
|
||||||
|
!uses a naive flexion method
|
||||||
|
that needs a refactor to
|
||||||
|
to both track for
|
||||||
|
finger & knuckle flexion
|
||||||
|
|
||||||
|
as they are intertwined at the intersection
|
||||||
|
in way that can't be ignored and must be derived!
|
||||||
|
in order to have a principled wave-cursor
|
||||||
|
(let alone a rolls-cursor)
|
||||||
|
|
||||||
|
|
||||||
|
sidetest: may be useful for interactions!
|
||||||
|
where you can use the finger flexion for grabbing
|
||||||
|
and knuckle flexion for cursor extension
|
||||||
*/
|
*/
|
27
src/dofs/wave-cursor/pattern.txt
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
# 2022.10.01 -> 2023.04.10
|
||||||
|
|
||||||
|
# !draft
|
||||||
|
|
||||||
|
input
|
||||||
|
hand
|
||||||
|
|
||||||
|
data
|
||||||
|
cursor
|
||||||
|
|
||||||
|
frame
|
||||||
|
fI = hand.flexion(Index)
|
||||||
|
fM = hand.flexion(Middle)
|
||||||
|
fR = hand.flexion(Ring)
|
||||||
|
fL = hand.flexion(Little)
|
||||||
|
|
||||||
|
wave = (fI+fI + fM+fM+fM + fR+fR + fL) / 8
|
||||||
|
|
||||||
|
vTo = hand.IndexTip
|
||||||
|
vFrom = hand.KnuckleMajor
|
||||||
|
|
||||||
|
dir = nor(vTo - vFrom)
|
||||||
|
|
||||||
|
cursor = vTo + dir * wave * crest
|
||||||
|
|
||||||
|
design
|
||||||
|
crest = 1.0 [0+m]
|