1
$\begingroup$

intro: I'm translating a manual for some 3D graphic utility which modifies set of vertices for a provided set of meshes. So basically it works with sets of sets of vectors.

And the thing is - the original manual written very poorly, and also misues some terms (according to my knowledge), so i need not to simply translate but actually to reinvent or write from a scratch some parts of the manual, and even tho i'm a programmer, i'm pretty bad at 3D calculations, Topology and Math in general, and especially English terminology.

I will use next letters to refer to things:

  • $I$ for input set of meshes
  • $O$ for an output set of meshes
  • $M_i$ for a mesh (meant as a set of vectors)
  • $V_i$ for a vertex (a vector, set of numbers composed of x/y/z coordinates to be precise, also it has information about edges linking it with other vertices, but i guess it's outside the scope of the current topic)
  • $V_i[x]$ for a particular coordinate

So there is 3 different types of operations which tool can perform:

1) originally called "functional operation"

basically it just performs a sequence of actions on the numbers inside an input data-set: $O[M_i] = f(I[M_i])$

Important difference from other two types is that it works with each mesh separately, one at a time. Also every operation of this type outputs one mesh for each mesh in a given set of meshes. So if there was, let's say, 7 meshes in an input - there will be 7 meshes in an output.

e.g.: $$ \text{if } (V_i[x]<0)\; V_i[y] = V_i[y]+5 $$ it's just a dumb example, but i come up with it just to give better idea of what i meant, in most cases such operations are way more complex and involve some trigonometry...

More real example:

a Shrink operation which shrinks each mesh by moving each point along the polar vector aiming towards the mesh's center mass via specified distance.

a Wobble operation which applies sinusoidal offset of a specified amount (along every specified coordinate) to each point according to it's 3D-position relative to the specified pivot point.

2) originally called "combinatory operation"

it performs a sequence of operations on all the meshes inside an input set: $O[M_0,M_1,M_n] = f(I)$

Operations of this type may output a single mesh or a set of $n$ meshes, but amount is fixed, based on a particular operation and most importantly it's not dependant on amount of meshes in an input set.

Some operations of this type require all input meshes to have exact same number of vertices (points), some don't (i guess meshes with lesser point number extrapolated in some way, ns how exactly it works tbh)... But from what i understood algorithmically it's same iteration thru the points in the same way like in a 1st type operations, difference is that formulas use vertices from all the meshes in a given set.

e.g: $$ O[M_0[V_i[x]]] = avg(I[M_{[0..\max]}[V_i[x]]]);\\ O[M_0[V_i[y]]] = avg(I[M_{[0..\max]}[V_i[y]]]);\\ O[M_0[V_i[z]]] = avg(I[M_{[0..\max]}[V_i[z]]]); $$ i tried to formulate the next operation (ns if it actually works like that, but it doesn't matter, im sure the concept is very similar):

a Set Average operation which produces a single averaged mesh from all the input meshes. All input meshes should have exact same number of points.

More examples:

a MinMax Bounds operation which outputs 2 cube meshes: smallest and biggest bounding boxes with coordinates calculated among all input meshes. Input meshes may have any number of points.

a Set Centroid Calculation operation which outputs a set of centers (of each input mesh) connected to center of the centers with an edges, linking the center of centers with each of centers composing it via single edge. Input meshes may have any number of points. (the best i was able to formulate it =)

3) originally called "cumulative operation"

from what i grasped it's the same as 2d type - it outputs fixed amount of meshes regardless of amount of meshes inside an input set, but it differs in the way that instead of utilizing each input mesh only once it uses recursion to perform a sequence of mathematical operations on all the input meshes with all the input meshes... Well, i'm trying, but it's rly hard to formulate (and even understand, tbh =). But i guess it is something like a cycle inside a cycle:

for each n {
  var t = 0;
  for( i=0; i<=max; i++ ){
    for( j=0; j<=max; j++ ){
      if( i != j ) t += perform_some_action( I.M[i].V[n], I.M[j].V[n] );
    }
  }
  O.M[0].V[n] = some_action( t );
}

At least it seem so from a programming point of view. Anyways, examples are:

a Weighted Surface Deform Composition operation which supposed to take a set of 3D-deformed plane surfaces and output a weighted average 3D-deformed plane surface mesh. (from pictures it looks like a set of animated height-maps to me)

a Dynamic Deformation Pivot Generation operation which supposed to take a sequence of meshes representing discrete steps of a morph-animated mesh and output a set of deform-pivotal points connected to sequences of interpolated step-points (with a single edge each) assembling a movement curves in a 3D space relevant to each of this deform-pivotal points. This operation may be used to convert morph-animations into skeletal-animations with a variable success depending on a complexity and a given operation parameters. (i rly did my best to translate the description here =)


So the question is: how to properly name these different types of operations?

I think the 1st "functional operation" term makes some sense, but still rly far from being intuitive or elegant in any aspect.

As to 2d and 3d - i think both of em use terms "combinatory" and "cumulative" respectively in an absolutely wrong way, but i personally have zero clues how to correctly call them...

P.S. i know, it may seem like too much for an insignificant matter of naming, but after some thinking i came to a conclusion that it's a much bigger question than i originally thought and it's a decent question outside my particular task, because it applies to many other practical and theorethical areas of computation. I think it could be useful for other people looking for a math specification or widely-used naming convention of some sorts.



UPD: after more general analysis i've realized that this particular differentiation in the end comes to a separation of set (any set) operations into 3 different kinds. I will try to show most simple examples i was able to put together using set of integers: $S = [5; 13; 24; 3; 10]$

1)

So first one type of set operations will be basic action made on each element of the set individually: $$ S*2 = S_i*2 = [10; 26; 48; 6; 20] $$ $$ S+5 = S_i+5 = [10; 18; 29; 8; 15] $$ $$ S^2 = S_i^2 = [25; 169; 576; 9; 100] $$ any of these operations over the set could be easily represented as an iteration thru every element of the set

e.g. multiplying by 2:

var S = [5, 13, 24, 3, 10];
var max = 4;
for( var i=0; i<=max; i++ ){
  S[i] = S[i] * 2;
} S
// one may copy/paste the above code into browser console

Regardless of operation resulting set will always have same number of elements. Also operations of this type could be easily vectorized (as in parallel computing) because they used on each element exclusively and from inside the iteration step there's no need to interact with other elements.

2)

This type of set operations is an action (or sequence of actions) made on a set as a whole: $$ avg(S) = \sum_{i=0}^{\max}S_i/(\max+1) = (S_0+S_1+\cdots+S_{\max})/5 = (5+13+24+3+10)/5 = 11 $$ I guess arithmetic average is a perfect exemplar of this type of set operation.

Also good examples are calculations of minimal and maximal values in a set, both of which could be combined in a single MinMax operation, because programatically we can calculate both these values "at the same time" during single cycle (instead of 2):

var S = [ 5, 13, 24, 3, 10 ];
var max = 4;
var MinMax = [ S[0], S[0] ];
for( var i=1; i<=max; i++ ){
  if( S[i] < MinMax[0] ){
    MinMax[0] = S[i];
  }else if( S[i] > MinMax[1] ){
    MinMax[1] = S[i];
  }
} MinMax

$$ \text{MinMax}(S) = [3; 24] $$ In the case of MinMax operation we have result as a set of 2 numbers, but the key point is that in the contrast to 1st type of set operation result can be even the single element, and the number of elements in the initial set is irrelevant to the number of resulting elements.

3)

Third type of set operations is the trickiest, but i guess it could be divided from other two by the fact that result of such operations will take in account the relativity between every element of the set with each other.

I was able to come up with such example: the calculation of a maximal difference between elements. To calculate it we need to compare each element of the set with each other, while determining that it's a maximal difference value.

var S = [ 5, 13, 24, 3, 10 ];
var max = 4;
var Diff = 0;
var MaxDiff = 0;
for( var i=0; i<=max; i++ ){
  for( var j=i; j<=max; j++ ){
    //if( i == j ) continue; //not relevant, and may actually slow the algorithm
    Diff = Math.abs( S[i] - S[j] );
    if( Diff > MaxDiff ) MaxDiff = Diff;
  }
} MaxDiff

I'm not sure how to properly write this operation using math-markup, but i believe it's a decent example because i actually used it in a real practice in a CUDA shader i've coded to be used on a sequences of frames from a video-feed of statically positioned camera to determine "most dynamic" parts of a video-screen during the specified time-intervals. So in that particular case it was used on a set of pixels of every frame-image from video-part sequence. Speaking formally, it was used on a set of matrices of set of 3 integers (RGB representation of each pixel). $$ \text{ MaxDiff$(S) = $ MaxDiff$(S_i[x,y][$ch$_j]); $ ch $= [r,g,b]$ } $$ Or something like that... Anyways the point is that all 3 types of such set operations are widely used in real life in a lot of different computational algorithms utilizied in multiple practical applications, used in a variety of scientific and production fields.

So the question remains the same: which math specification or naming convention to use to call these 3 types of set operations with names which will emphasize their difference from each other?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.