[Closed] Geometrical calculations : points, lines, planes : intersections, distances, angles
Ok this should be simple but clearly not this afternoon.
- if we have a sphere with radius r
- N# points evenly distributed across the sphere
- 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 !
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 !
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