You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does anyone have experience with it? The learning curve seems quite steep, but then it also creates "easy" unique/short solutions to hard problems, once somebody understands it.
E.g. as a concrete example, it could help quickly developing dual quat skinning (under 50 lines of code):
// Create a Clifford Algebra with 3,0,1 metric. Algebra(3,0,1,()=>{// We demonstrate dual quaternion skinning in the PGA3D framework, and show// how it resolves the candywrapping artefacts known from linear blend skinning.// Specify a point directly (trivectors specified with overloaded e-notation.)varpoint=(x,y,z)=>1e123-x*1e012+y*1e013+z*1e023;varrotor=(P,a)=>Math.cos(a/2)+Math.sin(a/2)*P;varmotor=(d,V)=>(1+d*V);// our point and edge listsvarsides=4,points=[],points_orig,items=[''];// vertices and edges for a square rod.for(vari=0;i<15;i++)for(varj=0;j<sides;j++)points.push(rotor(1e13,(Math.PI*2/sides)*j)>>>point(-0.5,-1+i/7.5,0));for(vari=0;i<15;i++)for(varj=0;j<sides;j++)items.push([points[i*sides+j],points[i*sides+((j+1)%sides)]]);for(vari=0;i<14;i++)for(varj=0;j<sides;j++)items.push([points[i*sides+j],points[(i+1)*sides+j]]);points_orig=points.map(x=>x.slice());// Graph the 3D itemsdocument.body.appendChild(this.graph(()=>{vartime=performance.now()/4000;// two bones, one at the top, one at the bottomvarb1=rotor(-1e13,Math.PI*.6*Math.sin(time*10))*motor(Math.sin(time),.2e01);varb2=rotor(1e13,Math.PI*.6*Math.sin(time*10))*motor(Math.sin(time/2),.2e01);// Transform all points.for(variinpoints){// Weights for both bones.varw1=(points[i].e013+1)/2,w2=1-w1;// Alternate between DQS and LBS if((time%2)<1){items[0]='Dual Quaternion Skinning';points[i].set((w1*b1+w2*b2).Normalized>>>points_orig[i]);}else{items[0]='Linear Blend Skinning';points[i].set(w1*(b1>>>points_orig[i])+w2*(b2>>>points_orig[i]));}}returnitems;},{animate:true}));});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The last days I am looking into Geometric Algebra and it seems to solve a lot of problems:
https://www.youtube.com/watch?v=&feature=youtu.be
Does anyone have experience with it? The learning curve seems quite steep, but then it also creates "easy" unique/short solutions to hard problems, once somebody understands it.
E.g. as a concrete example, it could help quickly developing dual quat skinning (under 50 lines of code):
https://enkimute.github.io/ganja.js/examples/coffeeshop.html#pga3d_skinning
Beta Was this translation helpful? Give feedback.
All reactions