coordinate_math


Synopsis

coordinate_math performs mathematical operations on fields coordinates using V expressions.

Input Ports

in_field1

Mesh

in_field2

Mesh

in_field3

Mesh

in_field4

Mesh

ui_parent

user interface parent object

 

Parameters

output nspace

UIslider

number of coordinate dimensions in the output mesh

X operation

UItext

expression for X coordinate of output mesh

Y operation

UItext

expression for Y coordinate of output mesh

Z operation

UItext

expression for Z coordinate of output mesh

 

Output Ports

out_fld

output mesh

out_obj

output renderable object

 

Description

coordinate_math performs mathematical operations on one to four input meshes. You can select the number of output coordinates (out nspace) and type in any valid V expression for each of X, Y and Z coordinates

Input Ports

in_field n

The input field(s) must be any type of mesh. You can use from 1 to 4 inputs. When typing the expression, you refer to them as #1, #2, #3, and #4. You refer to individual coordinates in the expression as x, y or z. For example if you want to refer to X coordinate of the first input you would use #1x in the expression, if you want to refer to Z coordinate of the second input you should use #2z in the expression.

Operations involving two or more meshes require that their coordinates be the same length (nnodes must be equal).

ui_parent

A port for connecting to a user interface object that contains the macro's widgets. By default, it is connected to the default user interface object in the application in which the macro is instanced. (This default connection is not drawn.)

Parameters

X, Y, Z operations

UItext. Any valid V mathematical expression. Do not enclose in quotes or terminate with a semi-colon (that is, ";"). For example, the following expression converts input coordinates specified in the Polar coordinate system into output Cartesian coordinates:

X #1x*cos(#1y)

#1x*sin(#1y)

Output

out_fld

The output mesh containing coordinates that are a result of the computation.

out_obj

This is a renderable version of the output field.

File

v/modules.v