{
abs number
This is a mathematical function used to express the absolute
value of the number.

	eg.  abs (-2.6)=2.6

}

{
acos number
This is a trigonometric mathematical function used to express
the arccosine value of the number.

	eg.  acos (0)=90

}

{
arclen SOP prim_num ustart ustop
Computes the length of the curve specified by prim_num in the range
[ustart, ustop]. ustart and ustop are unit values, defined in the [0,1]
interval.

Note: the primitive must be either a NURBS, Bezier, or Polygon curve.

For example:
	arclen("/obj/geo1/model1", 12, 0, 1)
Will compute the length of the entire curve whose index is 12.

See also: surflen, normal, curvature, unituv

}

{
arg line argNum
This function extracts an argument from a line. The example
below will extract the time out of the date string returned
by the system function.

	eg.  arg (system(date), 3)=20:17:46

}

{
argc line
Returns the number of arguments in the line. Counts the number
of arguments in the line.  Standard parsing is done, no variable
expansion is done on the line.

	eg.  argc("This has four arguments")=4

}

{
arm sop_path ret_type
This function will extract inverse kinematic rotations from an arm sop.
This is useful for creating hierarchical systems that mimic the arm.
The sop_path is the full path of the arm sop.
The ret_type is one of: srx, sry, arx, ury, hrx, hry, hrz,
                        Hrx, Hry, Hrz, Htx, Hty, Htz
The ret_type is the returned rotation, where:
	s=shoulder, a=humerus, u=ulna, h=hand, H=hand relative to shoulder
    eg.  arm ("/obj/geo1/arm1", "arx")

Note: the shoulder oxorder should be yx, hand should be xyz

}

{
asin number
This is a trigonometric mathematical function used to express
the arcsine value of the number.

	eg.  asin (.866025)=60

}

{
atan number
This is a trigonometric mathematical function used to express
the arctangent value of the number.

	eg.  atan (1.73205)=60

}

{
atan2 y x
Compute the arctangent of y/x.  This is more stable than atan() since
it can use the signs of y and x to determine the quadrant the angle
is in.  It also handles the case where x is zero correctly, returning
90 or -90.

	eg.  atan2(1, 0) = 90
	     atan2(0, 1) = 0
	     atan2(0, -1) = 180

}

{
bbox SOP type
This function will return bounding box information for a SOP.  The
type can be one of D_XMIN, D_YMIN, D_ZMIN, D_XMAX, D_YMAX, D_ZMAX,
D_XSIZE, D_YSIZE, or D_ZSIZE for the corresponding values of the
bounding box.

}

{
bezier
This is a channel expression that yields a Bezier interpolation spline.

}

{
ceil
Returns the smallest integer not less than the value passed in.

See also: floor, round, int, trunc, frac
}

{
centroid SOP type
This function will return centroid information for a SOP.  The
type can be one of D_X, D_Y, D_Z for the corresponding components
of the centroid.
}

{
clamp value minimum maximum
This is a Houdini expression function that will clamp the value
between the minimum and maximum numbers. It is used to prevent
the value from going outside the specified range.

	i.e. If the value is less than the minimum number, the
	minimum number will be returned. If the value is greater
	than the maximum number, the maximum number will be returned.

}

{
ch channel
Will evaluate the channel specified.

see also: chf, cht, chs, chsraw

}

{
chf channel frame
Will evaluate the channel at the frame specified.

see also: ch, cht, chs, chsraw

}

{
cht channel time
Will evaluate the channel at the time specified.

see also: ch, chf, chs, chsraw

}

{
chs channel
Will evaluate the channel as a string.  This is useful for evaluating
filenames in parameters.  The string will be expanded automatically by
this function (at the current time).

see also: ch, chf, cht, chsop, chsraw

}

{
chsop channel
Will evaluate the channel as a string.  This string is assumed to be a path
to one or more nodes, node groups, or bundle names.  If the nodes or groups
are specified as relative paths, they are converted to absolute paths
using the referenced node as the source for the relative paths.

see also: ch, chf, chs, chsraw, cht

}

{
chsraw channel
This function returns the raw string expression from a parameter or
channel as a string. Variables will NOT be expanded. If the given
path is a channel, then it returns the expression of the channel
that is evaluated at the current time.

see also: ch, chf, chs, chsop, cht

}

{
chexist channel_name
This function returns 1 if the specified channel exists, 0 if it doesn't.

	eg.  echo `chexist("/obj/geo1/tx")`
}

{
chgroup group_name
This will return a string containing all of the channels contained
in the group specified.  It is useful in the command language
for traversing all channels in a group:
	eg. 	%  foreach channel ( `chgroup("group_name")` )
		%     echo $channel is in group_name
		%  end
}

{
chop channel
Evaluates the channel within a CHOP at the current time.
	eg.	chop("/ch/ch1/wave1/chan1")

see also: chopi, chopt, chopf, chopstr

}

{
chopcf CHOP channel_index frame
Evaluates the channel at index 'channel_index' within the specified CHOP 
at the specified frame.
	eg.	chopcf("/ch/ch1/wave1", 0, 11)

see also: chopf, chopct, chopci

}

{
chopci CHOP channel_index index
Evaluates the channel at index 'channel_index' within the specified CHOP 
at the specified sample index.
	eg.	chopci("/ch/ch1/wave1", 0, 10)

see also: chopi, chopct, chopcf

}

{
chopct CHOP channel_index time
Evaluates the channel at index 'channel_index' within the specified CHOP 
at the specified time.
	eg.	chopct("/ch/ch1/wave1", 0, 0.5)

see also: chopt, chopcf, chopci

}

{
chope CHOP
Returns the end index of the channels in the specified CHOP.
	eg.	chope("/ch/ch1/wave1")

see also: chops, chopl, chopn, chopr

}

{
chopf channel frame
Evaluates the channel within a CHOP with at the specified frame.
	eg.	chopf("/ch/ch1/wave1/chan1", 1)

see also: chopi, chopt, chop

}

{
chopi channel index
Evaluates the channel within a CHOP with at the specified sample index.
	eg.	chopi("/ch/ch1/wave1/chan1", 10)

see also: chopf, chopt, chop

}

{
chopl CHOP
Returns the length of the channels in the specified CHOP, in samples.
	eg.	chopl("/ch/ch1/wave1")

see also: chops, chope, chopn, chopr

}

{
chopn CHOP
Returns the number of data channels within the specified CHOP.
	eg.	chopn("/ch/ch1/wave1")

see also: chops, chope, chopl, chopr

}

{
chopr CHOP
Returns the sample rate of the specified CHOP.
	eg.	chopr("/ch/ch1/wave1")

see also: chops, chope, chopl, chopn

}

{
chops CHOP
Returns the start index of the specified CHOP.
	eg.	chops("/ch/ch1/wave1")

see also: chops, chope, chopl, chopn, chopr

}

{
chopstr channel
Returns the value of the channel within a CHOP at the current time
as a text string.
	eg.	chopstr("/ch/ch1/wave1/chan1")

see also: chop, chopf, chopt, chopi

}

{
chopt channel time
Returns the value of the channel within a CHOP at the time specified.
	eg.	chopt("/ch/ch1/wave1/chan1", 0.5)

see also: chopct, chopi, chopf, chopt

}

{
constant
This is a channel expression for a constant value.

}

{
cos number
This is a trigonometric mathematical function used to express
the cosine value of the number.

        eg.  cos (60)=0.5

}

{
cosh number
This is a mathematical function used to express the hyperbolic
cosine value of the number.

        eg.  cosh (2) = 3.7622

}

{
cubic
A channel interpolation function which uses the slopes at either
end to solve the differential equation to give a smooth curve between
the end points.

}

{
cycle f1 f2
A channel interpolation function which repeats the motion between
frames f1 and f2. Each repeated portion will have its first value set
to the last value of the previous cycle. If you wish to repeat motion
exactly, use the repeat function instead.

If f1 is less than f2, then it will cycle forwards from f1 to f2.
If f2 is less than f1, then it will cycle backwards from f2 to f1.

see also: cyclet repeat repeatt

}

{
cyclet t1 t2
A channel interpolation function which repeats the motion between
times t1 and t2. Each repeated portion will have its first value set
to the last value of the previous cycle. If you wish to repeat motion
exactly, use the repeatt function instead.

If t1 is less than t2, then it will cycle forwards from t1 to t2.
If t2 is less than t1, then it will cycle backwards from t2 to t1.

see also: cycle repeat repeatt

}

{
deg radians
Converts the radians value to a value measured in degrees.

}

{
detail SOP attrib_name attrib_index
This function can be used to get infromation about the specified SOP's
detail attributes.

For example:
	detail("/obj/geo1/attribpromote1", "area", 0)
Would return the total area of the geometry, if the geometry had first
been measured and then AttribPromote had promoted the area primitive
attribute to a detail attribute with Add as the promotion method.

}

{
details SOP attribute
This function will return the value of a string attribute for a given
SOP.

For example:
	details("/obj/geo1/attribcreate1", "varmap")
Will return the currently bound index attribute's value.

}

{
ease
This is a channel expression function which will slowly ease in to
and out of any change. It will start at rest and slowly increase the
amount of change then, near the end of the function gradually reduce
the amount of change until it is at rest.

}

{
easein
This is a channel expression function which will slowly ease in to
any change.

}

{
easeinp
This is a channel expression function which will slowly increase
the motion of the model to its maximum value. This is similar to
the motion of an object accelerating due to gravity.

}

{
easeout
This is a channel expression function which will slowly ease out
of any change and come to rest.

}

{
easeoutp number
This is a channel expression function which is similar to the easeinp
expression only reversed. The change starts rapidly and begins to slow
until it comes to rest.  The number determines the inflection point of
the curve.  Increasing the number will shift the inflection point
to the right.  Fractional numbers will towards zero will shift the
inflection point to the right.  

}

{
easep number
This is a channel expression which will gradually ease in to the 
motion and gradually ease out. The ease out is faster than the 
ease in.

}

{
eval expression
This function will evaluate the string passed in as an expression.
It's primary use is for evaluating variables which contain more
complex expressions.  This function returns a floating point value.

    e.g.	set foo = 1+2
		echo `eval($foo)`

}

{
evals expression
This function will evaluate the string passed in as an expression.
It's primary use is for evaluating variables which contain more
complex expressions.  This function returns a string value.

    e.g.	set foo = system("ls")
		echo `evals($foo)`

}

{
execute command
This expression will execute the given houdini command (enclosed in 
quotes)
eg. execute("list") is the same as typing list in the text port

}

{
exp number
This is a logarithmic exponentiation function.

	eg.  exp (2)= 7.3338906

}

{
findfile filename
This function will search the houdini path for a specified file.  The
filename specified should be relative to the houdini directory.  For
example:
	findfile("scripts/123.cmd")
	findfile("config/Audio/Error.aiff")

}

{
fit num oldmin oldmax newmin newmax
Return a number between newmin and newmax that is relative 
to num in the range between oldmin and oldmax.  If the value is
outside the old range, it will be clamped to the new range.

	eg.  fit(3,1,4,5,20)=15

see also:  fit01 fit11 fit10

}

{
fit01 num newmin newmax
Return a number between newmin and newmax that is relative to num in
the range between 0 and 1.  If the value is outside the 0 to 1 it
will be clamped to the new range.

	eg.  fit01(.3,5,20)=9.5

see also:  fit fit11 fit10
}

{
fit10 num newmin newmax
Return a number between newmin and newmax that is relative to num in
the range between 1 and 0.  If the value is outside the 1 and 0 it
will be clamped to the new range.

	eg.  fit(.3,5,20)=15.5

see also:  fit fit01 fit11
}

{
fit11 num newmin newmax
Return a number between newmin and newmax that is relative to num in
the range between -1 and 1.  If the value is outside the -1 to 1 it
will be clamped to the new range.

	eg.  fit(.3,5,20)=14.75

see also:  fit fit01 fit10
}

{
noise X Y Z
This function can be used to apply noise to geometry.
For example to make a bumpy grid you could append a point SOP and
use the following in the pos Z field:

noise($TX, $TY, $TZ) 

see also:  snoise, turb, sturb

}

{
turb X Y Z depth
This function generates spatially coherent noise (i.e. random numbers
which are close to each other when the X, Y, Z points are close to
each other).  The depth passed in is the amount of fractalization
which is done to the noise.

see also:  sturb, noise, snoise

}

{
ftoa number
This expression will convert a number to a string. Type conversion
is usually done automatically, however, you may wish to use this to
force the conversion.

}

{
atof source
Will forcibly convert a string into a float.

}

{
haspoint group_name sop point_num
This function can be used to determine whether a given point is a member
of a given group.  For example:
	haspoint("ears", "/obj/geo1/facet1", 4)
Will return 1 if the group "ears" contains point number 4, otherwise it
will return 0.

The function will return 0 if the group specified is a primitive group.

see also: hasprim, pointlist, primlist

}

{
hasprim group_name sop prim_num
This function can be used to determine whether a given primitive is a member
of a given group.  For example:
	hasprim("ears", "/obj/geo1/facet1", 3)
Will return 1 if the group "ears" contains primitive number 3, otherwise it
will return 0.

The function will return 0 if the group specified is a point group.

see also: haspoint, pointlist, primlist

}

{
pointgrouplist sop_path
This function returns a string containing all the point groups in the
given SOP. The returned string is a space separated list of group names.

see also: haspoint, pointlist, hasprim, primlist, primgrouplist

}

{
pointlist sop group_name
This function returns a string containing all the points in the point
group specified.  The string is a space separated list of numbers.

see also: haspoint, pointgrouplist, hasprim, primlist, primgrouplist

}

{
primgrouplist sop_path
This function returns a string containing all the primitive groups in
the given SOP. The returned string is a space separated list of group
names.

see also: haspoint, pointlist, pointgrouplist, hasprim, primlist

}

{
primlist sop group_name
This function returns a string containing all the primitives in the
primitive group specified.  The string is a space separated list of
numbers.

see also: haspoint, pointlist, pointgrouplist, hasprim, primgrouplist

}

{
hsv red green blue component
Converts the RGB value to one of the HSV values based on component
specified.  The component should be one of "h", "s" or "v".

Example:   hsv(.3, .6, .4, "h")

}

{
if expression true_value false_value
If the expression is true, the function evaluates to the
true_value, otherwise the false_value is returned. The following
example shows that if the frame number is less than 12, the resulting
number equals the frame number. When the frame number reaches 12 or
greater, the resulting number is always 75.

	eg.  if ($F<12, $F, 75)

Note:  This is a function, which means all parameters to the function
are evaluated.  So something like
    if($F > 1, system('echo 1'), system('echo 2'))
will result in both system calls being run regardless of the result of
the expression.

}

{
trunc number
The integer value of the number by truncating the number.  The number
is rounded toward 0.  That is, for positive numbers, the largest
integer less than the number will be returned.  For negative numbers,
the smallest integer greater than the number will be returned.

	eg.  trunc(2.6)=2
	eg.  trunc(-2.6)=-2

see also: int, floor, ceil, round, frac

}

{
int number
The integer value of the number by truncating the fractional parts off.
	
	eg.  int(2.501)=2
	     int(-2.501)=-2

	     int(0.2)=0
	     int(-.2)=0

see also: trunc, floor, ceil, round

}

{
frac number
The fractional component of the floating point number.  The fractional
component is computed using the expression (number - floor(number)),
which may result in unexpected values for negative numbers.  If
negative numbers are an issue, you may want to call frac(abs(number)).

	eg.  frac(2.501) = 0.501

see also: trunc, floor, ceil, round, int

}

{
floor number
Returns the largest integer not greater than the number

	eg.  floor(10.2)=10
	     floor(-10.2)=-11

see also: ceil, trunc, int, round, frac

}

{
ic input_index channel_index index
Evaluates a CHOP's input channel at the specified index.
	eg. ic(0, 2, 10)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
icmin input_index channel_index 
Evaluates a CHOP's input channel's minimum value.
	eg. icmin(0, 2)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc
}

{
icmax input_index channel_index 
Evaluates a CHOP's input channel's maximum value.
	eg. icmax(0, 2)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc
}

{
ice input_index
Returns the end index of a CHOP's input.
	eg. ice(0)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
icl input_index
Returns the length of a CHOP's input, in samples.
	eg. icl(0)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
icn input_index
Returns the number of channels in a CHOP's input.
	eg. icn(0)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
icr input_index
Returns the sample rate of a CHOP's input.
	eg. icr(0)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
ics input_index
Returns the start index of a CHOP's input.
	eg. ics(0)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
oc output_channel_index index
Returns the value of a CHOP's output at the specified sample index.
	eg. oc(0, 10)

see also: ics, ic, ice, icr, icn, icmin, icmax, icl, oc

}

{
ishvariable variable_name
Checks only houdini variables to see if variable_name exists.
Returns a 1 if the variable exists and a 0 if it does not.  System
variables are not checked.

see also: isvariable

}

{
isvariable variable_name
Is there an houdini or system variable named "variable_name"? Returns
1 if the variable is defined, and 0 if it doesn't.

see also: ishvariable

}

{
length x y z
Returns sqrt(x*x + y*y + z*z), the length of the vector

}

{
distance x1 y1 z1 x2 y2 z2
Returns sqrt((x2-x1)^2 + (y2-y1)^2 + (z2-z1)^2), the distance between the
given points.

See also: pointdist uvdist
}

{
limb sop_path ret_type
This function will extract inverse kinematic rotations from a limb sop.
This is useful for creating hierarchical systems that mimic the limb.
The sop_path is the full path of the limb sop.
The ret_type is one of: 
     HIP_RX0, HIP_RX, HIP_RY, HIP_RZ, KNEE_RX, ANKLE_RX, ANKLE_RY, ANKLE_RZ
     FOOT_TX, FOOT_TY, FOOT_TZ, FOOT_RX, FOOT_RY, FOOT_RZ
where
     HIP_RX0 is the x rotation of a null above the thigh
     HIP_RX, HIP_RY, HIP_RZ  are the rotations of the thigh
     KNEE_RX is the x rotation of the shin
     ANKLE_R* are the rotations of the foot relative to the shin
     FOOT_R*, FOOT_T* are the world rotates/translates of the foot

Note: the limb SOP should use +/-Y for its model axis.  All rotation orders
      are xyz

    eg.  limb("/obj/geo1/limb1", "KNEE_RX")
}

{
linear
This is a channel interpolation function which will do linear
interpolation of the end points.

}

{
lock float
This function simply returns the value of its argument. However, it is
special in that if an expression is enclosed in a lock function, then
its values cannot be changed, till the lock expression is removed.
}

{
log number
This is the natural logarithm of the number.

	eg.  log (2.718281828)= 1

}

{
log10 number
This is the logarithm base 10 of the number.

	eg.  log10 (10) = 1
	     log10(100) = 2

}

{
match
This is a channel expression which will match the in coming and
out going slope.  The curve will move smoothly from the in coming
value to the out going value.

}

{
matchin
This is a channel expression which will match the in coming slope and
extend the previous segment in a straight line from where it completes.

}

{
matchout
This is a channel expression which will compute a straight line which
has the same slope as the in coming slope of the next segment.  It will
compute this straight line so that the value will have a smooth
transition into the next segment.

}

{
vmatch
This is a channel expression which will match the in coming and
out going slope.  However, the values at each end of the segment
will be determined by the values specified.

}

{
vmatchin
This is a channel expression which will match the in coming slope.
The segment will be a straight line matching the slope of the previous
segment, but using the starting value specified

}

{
vmatchout
This is a channel expression which will compute a straight line which
has the same slope as the in coming slope of the next segment.  The
straight line will end at the value specified.

}

{
max value1 value2
Returns the larger of value1 or value2.

	eg.  max (5,3)=5

}

{
min value1 value2
Returns the smaller of value1 or value2.

	eg.  min (5,3)=3


}

{
oldrand value
Gives a pseudo-random number between 0 and 1 depending on the value.
If the same value  is used the same number will result each time. A
different number is returned if fractional values are different.

	eg.  oldrand(12.1) gives a different result than oldrand(12.2)

NOTE:  It is a good idea to use non-integer values as the argument
       to oldrand().
       This function is similar to rand() but uses a different
       algorithm for generating the random numbers

see also: rand

}

{
oppwf
This is a short form for execute("oppwf")

}

{
oppwd
This is a short cut for execute("oppwf")

}

{
opblist bundle_name
This function returns a string containing the full paths to all
operators contained in the bundle.
}

{
opisloading
This function returns 1 if Houdini is currently in the process of loading
a hip file, otherwise it will return 0.
}

{
opisquitting
This function returns 1 if Houdini is currently in the process of shutting
down, otherwise it will return 0. This information is particularly useful
in node deletion scripts to determine if the node is being deleted because
Houdini is quitting rather than because the user chose to delete it.
}

{
opfullpath op
This function will return the full path to the operator specified.

see also: opfullpathfrom, opname, opsubpath
}

{
opfullpathfrom op fromop
This function will return the full path to the operator op, which is
specified relative to the operator fromop. The fromop operator is specified
relative to the current node.

see also: opfullpath, opname, opsubpath
}

{
opsubpath op
This function will return the path of the specified operator including
any containing subnets.

see also: opfullpath, opname
}

{
oplightmask geometry
This function returns a list of the lights which match the light mask
of the object specified.  The list of lights is a space separated
string of path names.  For example:
	oplightmask("/obj/geo1")
might return the string "/obj/ambient1 /obj/light1 /obj/subnet1/light1".

This function is equivalent to: objlightmask(geometry, "f")

see also: objlightmask
}

{
objlightmask geometry options
This function returns a list of the lights which match the light mask
of the geometry object specified.  The list of lights is a space
separated string of path names.  The options allow some control over
how the light names are generated.  Currently, options include:
    f - Generate full path names for the lights.  If this option is
        excluded, the path names will be generated relative to /obj
    a - Exclude matching ambient lights
    A - Only include ambient lights in the expansion
For example:
	objlightmask("/obj/geo1", "fa")
will return all the lights in /obj/geo1's light-mask.  Any ambient
lights will be excluded from the expanded string, and the paths
generated will be the full path name of the light.  The string might
look something like "/obj/light1 /obj/light2 /obj/subnet1/light1".

This is a slightly more general form of the oplightmask command.

see also: oplightmask
}


{
origin obj1 obj2 constant_type
This function will return one of TX, TY, TZ, RX, RY, RZ, SX, SY, SZ
value necessary to transform obj1 to obj2, depending on the type argument
("TX", "TY", "TZ", "RX", "RY", "RZ", "SX", "SY" or "SZ" ).

This can also be thought of as the position of obj2 relative to
obj1. It will compute the position of obj1 relative to obj2 and returns
one of TX, TY, TZ, RX, RY, RZ, SX, SY, SZ based on the type argument.

If obj1 is the empty string (""), then the world space position of obj2
is returned.

See also: vorigin, vtorigin, vrorigin, originoffset
}

{
originoffset obj1 pos1 obj2 pos2 constant_type
This function will return one of TX, TY, TZ, RX, RY, RZ value necessary
to transform the point pos1 in the space of object obj1 to point pos2
in the space of object obj2, depending on the type argument
("TX", "TY", "TZ", "RX", "RY" or "RZ").

This can also be thought of as the position of pos2 in obj2 relative to
pos1 in obj1.

If obj1 is the empty string (""), then the world space position of pos2
in obj2 is returned.

See also: origin, vorigin, vtorigin, vrorigin
}

{
vorigin obj1 obj2
This function will return a vector with 6 values in it.  The values
are set to "[TX, TY, TZ, RX, RY, RZ]" for the position of obj1
relative to obj2.

This can also be thought of as the position of obj2 relative to obj1.

If obj1 is the empty string (""), then the world space position of obj2
is returned.

See also: origin, vtorigin, vrorigin, originoffset
}

{
vtorigin obj1 obj2
This function will return a vector containing the translates required
to transform obj1 to the space of obj2.

This can also be thought of as the position of obj2 relative to obj1.

If obj1 is the empty string (""), then the world space position of obj2
is returned.

See also: origin, vorigin, vrorigin, originoffset
}

{
vrorigin obj1 obj2
This function will return a vector containing the rotates required
to transform obj1 to the space of obj2.

This can also be thought of as the orientation of obj2 relative to obj1.

If obj1 is the empty string (""), then the world space rotation of obj2
is returned.

See also: origin, vorigin, vtorigin, originoffset
}

{
padzero number value
Returns a string containing value preceded by enough zeros to make up
'number' digits

	eg.  padzero(5, 126) = 00126
	     padzero(5, 23) = 00023
	     padzero(1, 23) = 23

}

{
param token value
Returns the global parameter value associated with the token,
or 'value' if not defined. This function is used with stamping
operators (eg. Copy SOP, LSystem SOP).

	eg.  param("sides", 5)
	     param("fuzzy", 0.5)
}

{
pic copname U V color_type
This function will lookup a single pixel from a COP and return the color
of the pixel.  The color_type parameter can be one of the following:
    D_CR, D_CG, D_CB, D_CA, D_CHUE, D_CSAT, D_CVAL, D_CLUM
for the red, green, blue, alpha, hue, saturation, value, or luminance of
the pixel.  The color returned will be interpolated smoothly between
adjacent pixels.

	eg.  pic("/img/img1/color1", .5, .5, D_CLUM)

See also:  picni, tex, texni, res
}

{
picni copname U V color_type
This function will lookup a single pixel from a COP and return the color
of the pixel.  The color_type parameter can be one of the following:
    D_CR, D_CG, D_CB, D_CA, D_CHUE, D_CSAT, D_CVAL, D_CLUM
for the red, green, blue, alpha, hue, saturation, value, or luminance of
the pixel.  The color returned will not be interpolated.  That is, it
will be the exact color of the pixel.

	eg.  picni("/img/img1/color1", .5, .5, D_CLUM)

See also:  pic, tex, texni, res
}

{
res copname res_type
This function will return the natural resolution of the specified
COP.  The res_type can be either D_XRES or D_YRES.

	eg.  res("/img/img1/color1", D_XRES)
}

{
tex diskfile U V color_type
This function will access a texture map stored on disk and return the
color of the pixel specified by the U and V coordinates.  The
color_type parameter can be one of the following:

    r, R, or D_CR	= Red channel
    g, G, or D_CG	= Green channel
    b, B, or D_CB	= Blue channel
    a, A, or D_CA	= Alpha channel
    h, H, or D_CHUE	= Color hue
    s, S, or D_CSAT	= Color saturation
    v, V, or D_CVAL	= Color value
    l, L, or D_CLUM	= Color luminance

The color returned will be interpolated smoothly between pixels.
Textures can be 1, 3 or 4 channel images containing 8-bit, 16-bit or
floating point data.  When the color component asked for doesn't match
the format of the image, some default behaviour will be taken.

    e.g. tex("Mandril.pic", $BBX, $BBY, r).

See also: texni, pic, picni

}

{
texni diskfile U V color_type
This function will access a texture map stored on disk and return the
color of the pixel specified by the U and V coordinates.  The
color_type parameter can be one of the following:

    r, R, or D_CR	= Red channel
    g, G, or D_CG	= Green channel
    b, B, or D_CB	= Blue channel
    a, A, or D_CA	= Alpha channel
    h, H, or D_CHUE	= Color hue
    s, S, or D_CSAT	= Color saturation
    v, V, or D_CVAL	= Color value
    l, L, or D_CLUM	= Color luminance

The color returned will be not be interpolated between pixels.  That
is, the color returned will be the exact color of the pixel specified.
Textures can be 1, 3 or 4 channel images containing 8-bit, 16-bit or
floating point data.  When the color component asked for doesn't match
the format of the image, some default behaviour will be taken.

    e.g. tex("Mandril.pic", $BBX, $BBY, r).

See also: tex, pic, picni

}

{
npoints name
This function returns the number of points in the SOP.  -1 is returned
if the SOP cannot be cooked.

}

{
nprims name
This function returns the number of polygons in the SOP.  -1 is returned
if the SOP cannot be cooked.

}

{
haspointattrib SOP attribute
This function will return 1 if the specified attribute is in the given
sop, 0 otherwise.
}

{
hasvertexattrib SOP attribute
This function will return 1 if the specified attribute is in the given
sop, 0 otherwise.
}

{
hasprimattrib SOP attribute
This function will return 1 if the specified attribute is in the given
sop, 0 otherwise.
}

{
hasdetailattrib SOP attribute
This function will return 1 if the specified attribute is in the given
sop, 0 otherwise.
}

{
point SOP point_number attribute index
This function will extract information from a point in a sop.  The
attribute parameter is the name of the attribute (eg.  "Cd" for
diffuse color).  Two special attributes exist "P" and "Pw" which
represent the position of the point in space ("Pw" allows you to
access the W component of the position).

For example:
	point("/obj/geo1/facet1", 3, "P", 0)
Will return the X component of point 3 of the facet1 SOP in geo1.

	point("/obj/geo1/facet1", 3, "N", 2)
Will return the Z component of the normal attribute of point 3 in the
facet1 SOP of object geo1.

Note: This function will interpolate between point values if the point
number is fractional, such as 3.35

}

{
points SOP point_number attribute
This function will return the value of a string attribute for a given
point of a SOP.

For example:
	points("/obj/geo1/facet1", 3, "instance")
Will return the string associated with the string attribute "instance"
for point 3 in the facet1 SOP in geo1.

}

{
vertex SOP primitive_number vertex_number attribute index
This function will extract information from a vertex of a primitive in
a sop.  The attribute parameter is the name of the attribute (eg.
"Cd" for diffuse color).  Two special attributes exist "P" and "Pw"
which represent the position of the point in space ("Pw" allows you to
access the W component of the position).

For example:
	vertex("/obj/geo1/facet1", 2, 3, "P", 0)
Will return the X component of vertex 3 of primitive2 in the facet1
SOP of geo1.

	point("/obj/geo1/facet1", 2, 3, "Cd", 2)
Will return the Z component of the color attribute of vertex 3 of
primitive 2 in the facet1 SOP of object geo1.

Note: This function will interpolate between point values if the
vertex number is fractional, such as 3.35

}

{
vertexs SOP primitive_number vertex_number attribute
This function will return the value of a string attribute for a given
vertex (of a given primitive) in a SOP.

For example:
	vertexs("/obj/geo1/facet1", 1, 3, "instance")
Will return the string associated with the string attribute "instance"
for vertex 3 of primitive 0 in the facet1 SOP in geo1.

}

{
pointavg SOP attribute index
This function works much like the point function, except that it
returns the average value of the attribute for all points in the
specified sop.
}

{
prim SOP prim_num attrib_name attrib_index
This function can be used to get information about a specified primitive.
When given the "P" or "Pw" attribute, the centroid of the primitive will
be returned.

For example:
	prim("/obj/geo1/facet1", 3, "P", 0)
Will evaluate the X component of the centroid of primitive 3 in the sop
specified.
	prim("/obj/geo1/facet1", 3, "Cd", 1)
Will evaluate the green color of the "Cd" attribute of primitive 3.

See also: primuv, point
}

{
prims SOP primitive_number attribute
This function will return the value of a string attribute for a given
primitive in a SOP.

For example:
	prims("/obj/geo1/facet1", 3, "texturemap")
Will return the string associated with the string attribute
"texturemap" for primitive 3 in the facet1 SOP in geo1.

}

{
primuv SOP prim_num attrib_name attrib_index u v
Evaluates the specified attribute at a parametric (u,v) position on the
primitive. u and v are unit values, defined in the [0,1] interval. When given
the "P" or "Pw" attribute, the x, y, or z image of the (u,v) domain point will
be returned. If the primitive is a face type or a circle, v is ignored.

Note: if the primitive is a polygon or a mesh, u and v are defined in terms of
the number of vertices, or rows or columns respectively. Currently, only the
positional attribute of quadric primitives can be evaluated.

For example:
	primuv("/obj/geo1/tube1", 0, "Cd", 1, 0.7, 0.3)
Will evaluate the Green component of the diffuse color attribute at a location
on primitive 0 given by the parametric coordinates (0.7,0.3).

See also: primduv, normal, curvature, unituv

}

{
primduv SOP prim_num attrib_name attrib_index u v du dv
Evaluates the (partial) derivatives of a face or hull attribute at a
parametric (u,v) position. u and v are unit values, defined in the [0,1]
interval. When given the "P" or "Pw" attribute, the positional derivative of
(u,v)'s image on the primitive will be returned. If the primitive is a face
type, v and dv are ignored. If both du and dv are 0, primduv becomes 
equivalent to primuv.

Note: if the primitive is a polygon or a mesh, u and v are defined in terms of
the number of vertices, or rows or columns respectively.

For example:
	primduv("/obj/geo1/tube1", 12, "P", 2, 0.4, 0.5, 1, 0)
Will evaluate the Z component of the first-order partial derivative of 
primitive 12 with respect to u, at the parametric location (0.4,0.5).

See also: primuv, normal, curvature, unituv

}

{
normal SOP prim_num u v index
Evaluates the X, Y, or Z component of the surface normal at the parametric 
(u,v) location. u and v are unit values, defined in the [0,1] interval.

Note: if the primitive is a mesh, u and v are defined in terms its number of
rows and columns.

See also: unituv, primuv, primduv, curvature

}

{
curvature SOP prim_num u v
Evaluates the curvature of the surface at the parametric (u,v) location. u and
v are unit values, defined in the [0,1] interval.

Note: if the primitive is a mesh, u and v are defined in terms its number of
rows and columns.

See also: unituv, primuv, primduv, normal

}

{
spknot SOP prim_num knot_index D_U|D_V
This spline-specific function returns the floating-point knot value, given the
knot index in the U or V knot sequence. The first valid knot index is 0. If the
primitive is a Bezier curve or surface, the values returned are those of its
breakpoints. If the primitive is a curve, D_U and D_V are irrelevant.

}

{
surflen SOP prim_num ustart vstart ustop vstop
Given a surface and two parametric points in its domain ( [ustart,vstart]
and [ustop,vstop] ) surflen computes the length of the 3D curve that
stretches between the two points. This curve is the 3D image of the line
in the surface domain, whose end-points are [ustart,vstart] and [ustop,vstop].
If either u or v is kept constant, the 3D curve coincides with an isoparm.

All four uv numbers are unit values, defined in the [0,1] interval.

Note: the primitive must be either a NURBS surface or a Bezier surface. A
polygonal mesh can be simulated by a bi-linear Bezier surface (u and v order 2).

For example:
	surflen("/obj/geo1/grid1", 12, 0, 1, 0.2, 0.8)
Will compute the length of the curve on surface #12, defined parametrically
by the surface domain points [0,1] and [0.2, 0.8].

See also: arclen, normal, curvature, unituv

}

{
realuv SOP prim_num uv_unit D_U|D_V
Returns the real u or v parametric value, given the unit value of the same
parameter. The unit value is defined in the [0,1] interval. The real value
is defined in the valid interval of the primitive's domain if the primitive
is a spline type. If the primitive is a polygon or a mesh, the size of its
domain is given by the number of vertices, or rows or columns respectively.
If the primitive is a polygon or a curve, D_U and D_V are irrelevant.

Note: the result is undefined if the primitive is neither a face nor a hull.

See also: unituv

}

{
unituv SOP prim_num uv_real D_U|D_V
Returns the unit u or v parametric value, given the real value of the same
parameter. The unit value is defined in the [0,1] interval. The real value
is defined in the valid interval of the primitive's domain if the primitive
is a spline type. If the primitive is a polygon or a mesh, the size of its
domain is given by the number of vertices, or rows or columns respectively.
If the primitive is a polygon or a curve, D_U and D_V are irrelevant.

Note: the result is undefined if the primitive is neither a face nor a hull.

See also: realuv

}

{
pointdist SOP point_num SOP prim_num return_type 
Given a point and a primitive, this function finds the distance between 
the point and the closest spot on the primitive.  If prim_num is minus
one, the closest distance to any primitive is found.
return_type 0 yields the minimum distance.
return_type 1 yields the u parametric value at the point of minimum distance.
return_type 2 yields the v parametric value at the point of minimum distance.
return_type 3 yields the primitive number that was closest.

For example:
	pointdist("/obj/geo1/add1", 0, "/obj/geo1/grid1", 0, 0)
Will return the distance between point 0 of add1 and the closest spot from
the surface of grid1 primitive number 0.  If the return_type were 1, the u
parametric value that is closest to the point would be returned.

See also: primdist, xyzdist, nearpoint

}

{
xyzdist x y z SOP prim_num return_type
Finds the distance between the point (x, y, z) and the specified sop's
primitive.  If the prim_num is -1, it finds the closest distance to
any primitive in the mentioned sop.
return_type 0 yields the minimum distance.
return_type 1 yields the u parametric value at the point of minimum distance.
return_type 2 yields the v parametric value at the point of minimum distance.
return_type 3 yields the primitive number that was closest.

For example:
	xyzdist(1, 2, 3, "/obj/geo1/grid1", 0, 0)
Will return the distance between (1, 2, 3) and the closest spot from
the surface of grid1 primitive number 0.  If the return_type were 1, the u
parametric value that is closest to the point would be returned.

See also: primdist, nearpoint, pointdist

}

{
nearpoint SOP x y z
Finds the nearest point in the SOP to the given point (x, y, z).  The
return value is the number of the point which its closest to.

For example:
        nearpoint("/obj/geo1/grid1", 1, 2, 3)
Will return the point in the grid closest to the (1, 2, 3) point.

See also: xyzdist, primdist, pointdist

}

{
primdist SOP prim1_num SOP prim2_num return_type 
This expression finds the minimum distance between two primitives.
return_type 0 yields the minimum distance.
return_type 1 yields prim1's u value at the point of minimum distance.
return_type 2 yields prim1's v value at the point of minimum distance.
return_type 3 yields prim2's u value at the point of minimum distance.
return_type 4 yields prim2's v value at the point of minimum distance.

Currently, primdist() will return 0 unless given face types (polygons and/or
curves) or spline surfaces.

For example:
	primdist("/obj/geo1/sphere1", 0, "/obj/geo1/grid1", 0, 0)
Will return the distance between the first primitives in both sphere1 and
grid1.

See also: pointdist, xyzdist, nearpoint

}

{
mindist SOP point_num SOP prim_num return_type 
Given a point and a primitive, this function will find the distance between 
the point and the closest spot on the primitive. This expression is an alias
for pointdist().

See also: pointdist, primdist, distance, uvdist

}

{
uvdist SOP prim1_num u1 v1 SOP prim2_num u2 v2 
This expression finds the distance between two primitives at two parametric
locations. Valid u and v values are between 0 and 1.

Any primitive type is allowed.

For example:
	uvdist("/obj/geo1/sphere1", 0, 0.1, 0.8, "/obj/geo1/grid1", 2, 1, 0.5)
Will return the distance between point (0.1, 0.8) on the first primitive in
sphere1 and point (1, 0.5) on the third primitive in grid1.

See also: distance, primdist, pointdist, unituv

}

{
degree SOP prim_num D_U|D_V
Returns the degree of the polynomial defining the face or hull whose primitive
number is specified. Polygons and meshes are expressed as linear functions,
so their degree is 1. Spline types -- NURBS and Bezier curves and surfaces --
have degrees ranging from 1 to 10.

Note: If the primitive is a polygon or a curve, D_U and D_V are irrelevant.

}

{
isspline SOP prim_num
Returns 1 if the primitive is a spline, i.e. a NURBS or Bezier curve or surface.
Otherwise, the value returned is 0.

}

{
isclosed SOP prim_num
Returns 1 if the primitive is closed.  This is the same as iswrapu,
and as such works on both polygonal, NURBS, and Bezier curves and
surfaces.

See also: iswrapu, iswrapv

}

{
iswrapu SOP prim_num
Returns 1 if the primitive is wrapped in the u direction.  For curves,
this is the same as isclosed.  

See also: isclosed, iswrapv

}

{
iswrapv SOP prim_num
Returns 1 if the primitive is wrapped in the v direction.  Curves,
circles, etc, are always consisdered to be unwrapped in this direction
as they are only parameterized in u.

See also: isclosed, iwrapu

}

{
pow base exponent
This computes the base to the power given.

	eg.   pow(2, 3) = 8

}

{
pulse value start end
This function creates an on/off pulse. If the value is less than start
or greater than end, pulse returns a 0. Otherwise, it returns 1. 
Frequently, start and end are frame numbers and val is the current
frame, $F.

}

{
qlinear
A channel interpolation function which uses quaternions to interpolate
between the keyframes.  This function requires that it has two
neighbouring channels named appropriately.  This means they should end
with x, y, and z, or be three consecutive numbers starting from 0
(such as 0, 1, 2, or 6, 7, 8).

Because the interpolation is done in quaternion space, the
orientations will blend smoothly with no gimbal lock or unexpected
spins.  However, the rotation values may appear to jump suddenly.
This is because different rotation values can represent the same
orientation.

Note in the graph editor a segment using this expression will show as
a dashed straight line.  This does not represent the actual
intermediate channel values, but does give an accurate visual feel for
the behaviour of the interpolation.

}


{
quintic
A channel interpolation function which uses the slopes and
accelerations to smoothly interpolate the segment.
}

{
rad number
Converts the number to radians assuming that the number is measured in
degrees.

	eg.  rad (180)=3.1415926

}

{
rand value
Gives a pseudo-random number between 0 and 1 depending on the value.
If the same value  is used the same number will result each time. A
different number is returned if fractional values are different.

	i.e. rand(12.1) gives a different result than rand(12.2)

NOTE:  It is a good idea to use non-integer values as the argument
to rand().

}

{
raw
This is a channel interpolation function for raw channels.

}

{
repeat f1 f2
A channel interpolation function which repeats the exact motion between
frames f1 and f2. If you wish to repeat the motion cumulatively, use
the cycle function instead.

see also: repeatt cycle cyclet

}

{
repeatt t1 t2
A channel interpolation function which repeats the motion between
times t1 and t2. If you wish to repeatt the motion cumulatively, use
the cyclet function instead.

see also: repeat cycle cyclet

}

{
rint
Will round to the nearest integer.  When the fractional component is .5
exactly, the function will round to the nearest even integer.

see also: round
}

{
round
Will round to the nearest integer.  When the fractional component is .5
exactly, the function will round to the nearest even integer.

        eg.  round(2.501)=3
	     round(-2.501)=-3

	     round(0.2)=0
	     round(-.2)=0

see also: trunc, int, ceil, floor, frac
}

{
rgb hue saturation value component
Converts the color specified by hue/saturation/value to RGB.
The component is a string which should be one of "r", "g", or "b".

For example:   rgb(270, .5, 1, "b")

}

{
run command
This is a short form for the execute function.  The command specified
will be executed and string returned will be the output of the command.
The command is a houdini command.

}

{
sign value
The sign of the value. For example, it returns 1 if the value is any
positive number, -1 if the value is a negative number and 0 if the
value is 0.

}

{
sin
This is a trigonometric mathematical function used to express
the sine value of the number.

        eg.  sin (60)=0.866025

}

{
sinh number
The hyperbolic sine of the number.

}

{
smooth value minimum maximum
The return value is a smooth interpolation between 0 and 1. When the 
value is less than the minimum, the return value is 0. If the value
is greater than the maximum, the return value is 1.

	eg.  smooth ($F, 12, 55)

This will generate an ease-type curve between values 0 and 1, starting 
at frame 12 and ending at frame 55. Dig it!

}

{
snoise X Y Z
This function applies noise based on sparse convolution. 

noise($TX, $TY, $TZ) 

see also:  noise, turb, sturb

}

{
sturb X Y Z depth
This function generates spatially coherent noise based on 
sparse convolution.   The depth passed in is the amount of fractalization
which is done to the noise.

see also:  turb, noise, snoise

}

{
spline t1 t2 tension
A channel interpolation function which runs a spline through the
timemarks specified by t1 and t2 (including all the timemarks between
t1 and t2).  The tension specifies the tension of the spline.

}

{
sqrt number
The Square root of the number.

	eg.  sqrt (144)=12

}

{
strcat s1 s2
This will concatenate two strings.

        eg.  strcat("Current motion file is; ", $MOTNAME)
             Current motion file is job1.bmot

}

{
strcmp s1 s2
Returns a negative number if s1 is lexicographically less than s2
Returns a positive number if s1 is lexicographically greater than s2
Returns a zero if s1 is equal to s2
	eg.  strcmp("abc", "xyz")=-23
	strcmp("xyz, "abc")=23
	strcmp("abc", "abc")=0

}

{
strdup count s2
Returns s2 duplicated count number of times.
	eg. strdup(3, "abc") = "abcabcabc"
	strdup(0, "Foobar") = ""
	strdup(3, "/(120)[B]") = "/(120)[B]/(120)[B]/(120)[B]"
}

{
strcasecmp s1 s2
String comparison which ignores case of string.  Return codes are:
    negative if s1 < s2
    positive if s1 > s2
    zero if s1 == s2
}

{
strmatch pattern s
Does pattern matching comparison for a string.  If the string matches
the pattern, then the return code will be 1, otherwise it will be 0.
Multiple patterns may be specified using a comma separated list.

Example:	strmatch("foo*", "foobar")	returns 1
		strmatch("?bar", "fred")	returns 0
		strmatch("foo*,bar*", "bar")	returns 1

See Also:  strcmp, strcasecmp, strcasematch
}

{
strcasematch pattern s
Does pattern matching comparison for a string ignoring case
sensitivity.  If the pattern matches the string, the return code will
be 1 otherwise, the return code will be 0.
Multiple patterns may be specified using a comma separated list.

Example:	strmatch("FOO*", "foobar")	returns 1
		strmatch("?baR", "fred")	returns 0
		strmatch("FoO*,bAr*, "bar")	returns 1

See Also:  strcmp, strcasecmp, strcasematch
}

{
strlen
Returns the number of characters in the string.
	eg.  strlen("abcde")=5

}

{
stripmatrix mat
This function will strip out all non-essential characters from the
string representation of a matrix or vector.  This is useful when you
want to interpret the values of the matrix (i.e. to pass to a VEX
function).  A string containing the floating point numbers (and only
the numbers) which make up the matrix will be returned.
	eg.  stripmatrix(identity(3)) = "1 0 0  0 1 0  0 0 1"
	     stripmatrix(vector3(1,2,3)) = "1 2 3"
}

{
substr
This will extract a sub-string of the first argument.
	eg.   hscript-> echo `substr("abcdefghijklm", 3, 4)`
              defg
        Note:  The first character is specified by a start of 0

}

{
toupper s
Converts all the characters in the string to upper case
}

{
tolower s
Converts all the characters in the string to lower case
}

{
system
Returns the output of a unix command.
	eg.  system("finger")`
	mark     Mark Elendt           q1    45 Fri 14:46

}

{
systemES
Returns the exit status of a unix command.
	eg.  hscript-> echo `systemES("test -r $HOME/houdini/123.cmd")`
        0

}

{
tan
This is a trigonometric mathematical function used to express
the tangent value of the number.

        eg.  tan (60)=1.73205

}

{
tanh number
The hyperbolic tangent of the number.

}

{
wrap
Similar to the clamp expression in that the resulting value will always
fall between the specified minimum and maximum value. It will, however,
create a sawtooth wave for continuously increasing or decreasing values
of the value.

	eg.  wrap ($F, 5, 10)
	This will create a sawtooth function between 5 and 10.

}

{
index source pattern
Finds the first occurrence of pattern in source and returns the number
of characters before the pattern occurs.  If the pattern is not found
-1 is returned.

	eg.   hscript -> echo `index("Testing index", "sting")`
	      2
	      hscript -> echo `index("Testing index", "i")`
	      4

See also: rindex

}

{
rindex source pattern
Finds the last occurrence of pattern in source and returns the number
of characters before the pattern occurs.  If the pattern is not found
-1 is returned.

	eg.   hscript -> echo `rindex("Testing rindex", "sting")`
	      2
	      hscript -> echo `rindex("Testing rindex", "i")`
	      8

See also: index
}

{
isstuck sopname pointnumber
Will return if the point specified is used by a particle system
and the point is stuck.  Warning, this function can be slow.

    eg.   isstuck("../particle1", $PT)
}

{
execute command
Executes command as an Houdini keyboard command.  Returns a string containing
the output of the command.
}

{
print message
Prints the value of the expression into the textport and returns
the same expression value.  This can be used to diagnose
parameters in SOPs or channels.  For example:
    printf("Value = ", 32.3)
will return 32.3.
}

{
opname name
This function will print the name of the node given.  It's main use is
to find out the name of the network containing the node.  For example,
if used in a SOP, opname("..") will give the name of the object
containing the SOP.

see also:  opfullpath, opsubpath
}

{
opdigits name
This function will return the numeric value of the last set of 
consecutive digits in a node's name. It is used when building several 
similar networks.

    eg.   opdigits("/obj/geo1")  = 1
          opdigits("..") = 1             (at the sop level of geo1)
}

{
opexist op_name
This function returns 1 if the specified node exists, 0 if it doesn't.

	eg.  echo `opexist("../box1")`
}

{
optype name
This function will print the type of operator that the node specified
is.  For example:  optype("/obj/geo1") would most likely return "geo",
indicating that object geo1 is a geometry object.

See also:  optypeinfo
}

{
optypeinfo name pattern
This function will return type information from the specified
operator.  Unlike optype which just returns the optype, this allows
you to specify a string of parameters which will cause different
things to be output.  The possible characters in the string which
correspond to output are, and examples for "/obj/geo1":
	N - The name of the node, ie "geo1"
	t - The type of the node, same as optype, or "geo"
	e - The label of the node, or "Geometry"
	n - The network type of the node, or "OBJ"
	s - The script path of the node, or "obj"
	i - The index of the node, a number corresponding to the
	    network type.
	T - The table name of the node, or "Object"	
Thus, optypeinfo("/obj/geo1", "NtT") will return "geo1 geo Object".

See also:  optype
}

{
oppinput name index
This function has been replaced with opinput
}

{
opinput name index
Will print the name of the operator that is connected to the input of
the given index.  For example:
    point("../" + opinput(".", 0), $PT, "P", 0)

See also:  opinputpath, opninputs, opoutput, opoutputpath, opnoutputs

}

{
opinputpath name index
Will print the full path of the operator that is connected to the input
of the given index.  For example:
    point(opinputpath(".", 0), $PT, "P", 0)

See also:  opinput, opninputs, opoutput, opoutputpath, opnoutputs

}

{
opoutput name index
Will print the name of the operator which connects to the given node.
Multiple operators can connect and the order is arbitrary.

See also:  opinput, opinputpath, opninputs, opoutputpath, opnoutputs

}

{
opoutputpath name index
Will print the full path of the operator which connects to the given
node.  Multiple operators can connect and the order is arbitrary.

See also:  opinput, opinputpath, opninputs, opoutput, opnoutputs

}

{
opninputs name
Returns the maximum number of inputs that the node has connected.  It
is possible to have blank inputs (i.e. that aren't connected).

See also: opinput, opoutput, opnoutputs

}

{
opnoutputs name
Returns the number of nodes which are connected to the output of the
specified node.

See also: opinput, opoutput, opninputs

}

{
opnchildren name
Returns the number of nodes contained in the specified node.  This
will return the number of nodes in a sub-network or the number of
SOPs in an Object.  It is non-recursive in that only the direct
contents of the node are counted, not all of their nodes as well.

}

{
opselect network
This function builds a string of all the selected nodes in a network.
Example:

    hscript -> echo `opselect("/obj")`
    geo1 geo2

See Also:  opflag
}

{
opflag network flag
This function builds a string of all the nodes which have the
particular flag set.  Currently the flags recognized are:
    "d"	= Display Flag
    "r" = Render Flag
    "t" = Template Flag
    "l" = Locked Flag
    "s" = Selected Flag
    "c" = Current Flag

Example:
    List all displayed objects
	hscript -> echo `opflag("/obj", "d")`

    List all locked SOPs in object geo1
	hscript -> echo `opflag("/obj/geo1", "l")`

See Also:  opselect
}

{
vpname viewer viewport_quadrant_number
This function will return the name of the viewport in the given
quadrant of a viewer.
}

{
boneangle bone1 bone2
This function will return the angle at the joint between the two given
bone objects.
}

{
clamptosphere x y z min_radius max_radius constant_type
This function computes a vector R that is  parallel to the 
given (x,y,z) vector.  R is adjusted so that its magnitude 
is always between the min and max radii 
(i.e min_radius <= |R| <= max_radius)

This function returns one of the components of the vector 
R according to the value of constant_type: "X", "Y" or "Z".
}


#
#-------- Vector Functions ------
#

{
dot v0 v1
Computes the dot product between two vectors.
}

{
normalize v
Returns the normalized vector
}

{
vangle v0 v1
Returns the angle between the two vectors specified.
}

{
vector pattern
The pattern passed in will be converted to a vector.  The pattern
should consist of a leading square bracket followed by a comma
separated list of values and a closing square bracket.

Example:  vector("[1,2,3,4,5]")
}

{
vector3 x y z
Creates a 3 vector with the x, y, and z components specified.
}

{
vector4 x y z w
Creates a 4 vector with the x, y, z, and w components specified.
}

{
vlength vec
Computes the length of the vector specified.  This is equivalent to:
    sqrt(dot(vec, vec))
}

{
vlength2 vec
Compute the square of the length of the vector specified.  This is
equivalent to:
    dot(vec, vec)
}

{
vscale vec scale
Multiplies the vector by the scale.  This is equivalent to vec*scale
}

{
vset size value
Creates a vector of the size specified.  Each component of the vector
will be set to the value given.
}

{
vsize vec
Returns the number of elements in the vector
}

#
#-------- Matrix Functions ------
#

{
determinant mat
Returns the determinant of the matrix specified.  This is only valid
if the matrix is a 4x4 or 3x3 matrix.  If the matrix is larger than
4x4, the 4x4 determinant will be returned.  If the matrix is smaller
than 3x3, the matrix will be converted to a 3x3 before the determinant
is computed.  The results of the upward conversion are not guaranteed.
}

{
dihedral v0 v1
Computes the dihedral matrix between v0 and v1.  This is a rotation
matrix which will rotate vector v0 to vector v1.
}

{
identity size
Creates an identity matrix of the size specified.  That is, the
resulting matrix will have size rows and size columns.
}

{
invert mat
Inverts the matrix given.  This is only valid if the matrix is a 4x4
or 3x3 matrix.  If the matrix is larger than 4x4, the matrix will be
converted to a 4x4 matrix before it is inverted.  If the matrix is
smaller than 3x3, the matrix will be enlarged to a 3x3 matrix before
it is inverted.  The results of enlarging the matrix to a 3x3 are not
guaranteed.
}

{
matrix pattern
Converts a string pattern to a matrix.  The pattern should start with
a square bracket, followed by a series of rows (specified as vector
patterns - see the vector() function), followed by a trailing square
bracket.  For example:
    matrix("[[1,2,3][2,3,5][-3,2,-3]]")
}

{
mlookat from to
Computes a transform matrix specifying a lookat from the from point to
the to point.  The from and to vectors are converted to 3 vectors for
this computation.  The resulting matrix will be a 3x3 matrix.
}

{
morient zaxis yaxis
Computes the transform matrix to rotate the x,y,z axes such that the
specified zaxis is the new zaxis and yaxis the new yaxis.  The
resulting matrix is a 3x3 matrix.
}

{
explodematrix mat trs xyz component
This explodes a 3x3 or 4x4 matrix into the euler rotations required to
rebuild it.  These components can be stuffed directly into Houdini
rotation, scale, and translate channels.

mat is the matrix to transform.  trs and xyz give the order of the
expansion.  In trs, a "t" represents translation, "r" rotation, and
"s" scale.  The xyz refers to the order of the rotations.  The
component is a string describing which channel to extract.  It is
"[trs][xyz]", where the trs chooses the channel between translate,
rotate, and scale, and the xyz chooses the dimmension.

For example:
    explodematrix(mlookat(vector("[1,0,0]"),vector("[0,1,0]")),
		  "RST", "XYZ", "RZ")
    explodematrix(identity(3)*2, "RST", "XYZ", "SZ")
}

{
mzero mat
Sets all values of the matrix to 0.
}

{
rotate angle axis
Computes a 4x4 rotation matrix of a rotation specified by the angle
(in degrees) around an axis.  The axis should be a string which is one
of "x", "y", or "z".

See also: rotaxis, scale, translate
}

{
rotaxis angle axis
Computes a 4x4 rotation matrix of a rotation specified by the angle
around the axis specified by the vector.  The vector is converted to a
3 vector for the purposes of this computation.

See also: rotate, scale, translate
}

{
scale sx sy sz
Computes a scale matrix given by the three scale values.

See also:  rotate, rotaxis, translate
}

{
translate tx ty tz
Computes a translation matrix given the three translate values.

See also:  rotate, rotaxis, scale
}

{
transpose mat
Computes the transpose of the matrix specified.
}

{
mrows mat
Returns the number of rows in a matrix
}

{
mcols mat
Returns the number of columns in a matrix
}

{
optransform object_name
Returns the matrix specifying the transform of the object at the
current time.
}

{
popevent event_name
Returns whether a POP event is occurring or not. This function should only
be used from within a POP.
}

{
popeventtime event_name
Returns the time at which a POP event is occurring. This function should only
be used from within a POP.
}

{
poppoint point_number attribute index
Returns the value of an attribute for a specific particle within a POP. This
function should only be used from within a POP.
}

{
print label expression
Prints the value of the expression to stdout and returns the same 
expression value.  This can be used to diagnose parameters in OPs or channels.

Example: print("wheel:", sin($T))
}

{
modblend val1 val2 length weight
Blends the two modular values. This function can be used to correctly
blend two angles or other cyclic values.

Example: modblend(355, 5, 360, 0.5) will evaluate to 0. Simple linearly
blending of the two values would result in an incorrect value of 180.
}

{
cross v1 v2
Computes the cross product between v1 and v2
}

{
iscollided sopname pointnumber
Returns 1 if the point specified has collided with something

    eg.  iscollided("../particle1", $PT)
}

{
cucwc
Returns the name of the current working container (for custom panels).
}

{
cudatatype gadget_path
Returns the type of data manipulated by the specified gadget.  Possible
values are float, int, and string.
}

{
cumenuadd gadget_path menu_entry
Adds the specified menu entry to the given gadget if it is a menu.  Returns
the entry if added.
}

{
cuquery panel_path value_name
Returns the specified value from the specified panel.
}

{
cutype gadget_path
Returns the type of the specified gadget.
}
