New convenient syntax for triangle and quad

17 views
Skip to first unread message

Bruce Sherwood

unread,
May 30, 2016, 1:13:17 PM5/30/16
to Glowscript Users
The standard syntax for triangle and quad objects is this:

     triangle( v0=vertex, v1=vertex, v2=vertex, ....)

     quad( v0=vertex, v1=vertex, v2=vertex, v3=vertex, ....)

You can now alternatively write the following, which is sometimes more convenient, where "vs" is a list of vertex objects:

     triangle( vs=[vertex, vertex, vertex], ....)

     quad( vs=[vertex, vertex, vertex. vertex], ....)

Here is the relevant Help page:




Reply all
Reply to author
Forward
0 new messages