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

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

REPLY TO THREAD
 
Thread Tools Search this Thread Display Modes
Old 11 November 2014   #61
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 <tvert_index_integer> -- 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)
=====================
 
Old 11 November 2014   #62
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.
 
Old 11 November 2014   #63
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)
=====================
 
Old 09 September 2015   #64
randomize a normal....

Last edited by Klvnk : 11 November 2015 at 06:43 PM.
 
Old 11 November 2015   #65
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.
 
Old 03 March 2016   #66
So useful!Thanks guys!

 
reply share thread



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 vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 11:06 AM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.