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
  11 November 2014
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)
=====================
 
  11 November 2014
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.
 
  11 November 2014
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)
=====================
 
  09 September 2015
randomize a normal....

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

 
  3 Weeks Ago
I apparently annoyed the wrong people on stackoverflow so perhaps i'll get more joy here. If I have a plane in the YZ plane and want to project it onto a sphere, what equation do I use for the X axis?
 
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 05:04 PM.


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