# Geometrical calculations : points, lines, planes : intersections, distances, angles

 Thread Tools Search this Thread Display Modes
 11 November 2014 #61 ricozone Veteran   portfolio Eric Bellanger CG artist Nantes, France   Join Date: Dec 2002 Posts: 81 Hi Klvnk, very interesting functions. As i'm not familiar with geometry data structure, can you please give a usage example ? How to build a struct vertex for any given mesh ? I was thinking about that : ``````- sm = snapshotasmesh (Teapot()) - loop through each vert and get : p = meshop.getvert sm v n = getnormal sm v col = -- vertex color ? uvw1 = getTVert sm -- how to get tvert from current vert ? - build array of faces indices : fi = for f=1 to sm.numfaces collect ((meshop.getVertsUsingFace sm f) as array) - once i got my vertex array struct, i can call your functions : ComputeTangents myVertStruct fi`````` Sorry if i bother with noob question __________________ Rico) ===================== share quote
 11 November 2014 #62 Klvnk Expert   portfolio Klunk United Kingdom   Join Date: Feb 2014 Posts: 725 yep that kind of thing will do it, I'll start a new thread with an example. Last edited by Klvnk : 11 November 2015 at 06:41 PM. share quote
 11 November 2014 #63 ricozone Veteran   portfolio Eric Bellanger CG artist Nantes, France   Join Date: Dec 2002 Posts: 81 HTML Code: `yep that kind of thing will do it, I'll start a new thread with an example.` thanks ! http://forums.cgsociety.org/showthr...?f=98&t=1233324 __________________ Rico) ===================== share quote
 09 September 2015 #64 Klvnk Expert   portfolio Klunk United Kingdom   Join Date: Feb 2014 Posts: 725 randomize a normal.... Last edited by Klvnk : 11 November 2015 at 06:43 PM. share quote
 11 November 2015 #65 Klvnk Expert   portfolio Klunk United Kingdom   Join Date: Feb 2014 Posts: 725 simple but was quite tricky to find... pos is the position of the base of the cone and pnt is the position of the point on the cone, r & h are the radius and height respectively Last edited by Klvnk : 11 November 2015 at 06:43 PM. share quote
 03 March 2016 #66 dottob New Member   portfolio dottob China   Join Date: Apr 2013 Posts: 15 So useful!Thanks guys! share quote

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts vB code is On Smilies are On [IMG] code is On HTML code is Off CGSociety Society of Digital Artists www.cgsociety.org Powered by vBulletinCopyright ©2000 - 2006, Jelsoft Enterprises Ltd.