Notifications
Clear all

[Closed] Geometrical calculations : points, lines, planes : intersections, distances, angles

Ok this should be simple but clearly not this afternoon.

  1. if we have a sphere with radius r
  2. N# points evenly distributed across the sphere
  3. What is the average distance between the points?

Thanks

-Michael

as a reminder…

just found this useful post from Enrico Gullotti about screen coords, view space, world space :
http://forums.cgsociety.org/showpost.php?p=5165612&postcount=3

This helped me understanding how to draw freeform nodes on viewport.
Thanks a lot to him !

@All – Wonderful thread! Thank you CGTalk for keeping it open!

@ricozone – Thanks for sharing this link! Great addition to my collection and actually giving me some inspiration to tackle few scripting tasks that i got at work!

not a geometrical calc but a useful bit of math for export/import writers, posting it because it doesn’t seem to be published anywhere on the web.

converting 3ds max glossiness to specular power

if glossiness in the 0-100 range (mxs)

if glossiness in the 0-1 range (sdk)
in reverse it would be…

if glossiness in the 0-100 range

thought i’d put this one here too, given an array of verts with a structure some thing like

and an array of face indices where there are 3 indices per face the following code will generate Tangents and Binormals

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

yep that kind of thing will do it, I’ll start a new thread with an example.

yep that kind of thing will do it, I'll start a new thread with an example.

thanks !

http://forums.cgsociety.org/showthread.php?f=98&t=1233324

randomize a normal…

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

Page 6 / 7