Skip to content

Instantly share code, notes, and snippets.

@manhha00
Created December 9, 2017 10:01
Show Gist options
  • Save manhha00/f0a4098b68ef17385ee0f9238b2e905f to your computer and use it in GitHub Desktop.
Save manhha00/f0a4098b68ef17385ee0f9238b2e905f to your computer and use it in GitHub Desktop.
angle between 2 edges
float $o[]= (`pointPosition -w polySurface70.vtx[120]`);
vector $O= << $o[0] , $o[1] , $o[2] >>; // start
float $u[]= (`pointPosition -w polySurface70.vtx[122]`);
vector $U= << $u[0] , $u[1] , $u[2] >>; // end0
$U = $U - $O;
float $v[]= (`pointPosition -w locator1`);
vector $V= << $v[0] , $v[1] , $v[2] >>; // end1
$V = $V - $O;
float $a=rad_to_deg (`angle $U $V`);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment