Jump to content

Alternative operator in VEX


Arthur Spooner

Recommended Posts

matrix3 cr = indent();
vector axis = {0,0,1};
float angle = radians(ch('amount'));
rotate(cr,angle,axis);
@P *= cr;

One other question; functions are written as follows; (word of warning, this code example will have missing code, hoping someone can fill in the voids ?)

surface
noise_surf() {
} 

?

Link to comment
Share on other sites

Just means 'a matrix that does nothing'. Ie, translate and rotation are all 0 0 0, and scale is  1 1 1.

 

There's probably (read: definitely) a more mathematically pure definition of it, but think of it as making an empty transform, ready for you to do stuff with. In this case, you use it to do the rotation.

 

https://en.wikipedia.org/wiki/Identity_matrix

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...