Đầu Vào -- Inputs¶
The inputs of the node are dynamic. Some inputs are only available in certain operations.For instance, the Addend đầu vào is only available in the Multiply Add operator.
Bạn đang xem: Toán math
Input Value. Trigonometric functions read this value as radians.
AddendInput Addend.
BaseInput Base.
ExponentInput Exponent.
EpsilonInput Epsilon.
DistanceInput Distance.
MinInput Minimum.
MaxInput Maximum.
IncrementInput Increment.
ScaleInput Scale.
DegreesInput Degrees.
RadiansInput Radians.
Tính chất -- Properties¶
Thao Tác -- OperationThe mathematical operator khổng lồ be applied to lớn the đầu vào values:
FunctionsAddThe sum of the two values.
SubtractThe difference between the two values.
MultiplyThe product of the two values.
DivideThe division of the first value by the second value.
Multiply AddThe sum of the product of the two values with Addend.
PowerThe Base raised khổng lồ the nguồn of Exponent.
LogarithmThe log of value with a Base as its base.
Square RootThe square root of the value.
Inverse Square RootOne divided by the square root of the value.
AbsoluteThe input value is read with without regard to lớn its sign. This turns negative values into positive values.
ExponentRaises Euler"s number tothe power nguồn of the value.
ComparisonMinimumOutputs the smallest of the input đầu vào values.
MaximumOutputs the largest of two input values.
Less ThanOutputs 1.0 if the first value is smaller than the second value. Otherwise the output is 0.0.
Greater ThanOutputs 1.0 if the first value is larger than the second value. Otherwise the output is 0.0.
SignExtracts the sign of the input đầu vào value. All positive numberswill output 1.0. All negative numbers will output -1.0. And 0.0 will đầu ra 0.0.
CompareOutputs 1.0 if the difference between the two input đầu vào values is less than or equal lớn Epsilon.
Smooth MinimumSmooth Minimum.
Smooth MaximumSmooth Maximum.
RoundingRoundRound the đầu vào value khổng lồ the nearest integer.
FloorRounds the input đầu vào value down lớn the nearest integer.
CeilRounds the input đầu vào value up to the nearest integer.
TruncateOutputs the integer part of the value.
FractionFraction.
ModuloOutputs the remainder once the first value is divided by the second value.
WrapOutputs a value between Min and Max based on the absolute difference betweenthe đầu vào value and the nearest integer multiple of Max less than the value.
SnapRound the input đầu vào value to lớn down to the nearest integer multiple of Increment.
Ping-pongThe output value is moved between 0.0 and the Scale based on the input đầu vào value.
TrigonometricSineThe Sine of the đầu vào value.
CosineThe Cosine of the input đầu vào value.
TangentThe Tangent of the input value.
ArcsineThe Arcsine of the input đầu vào value.
ArccosineThe Arccosine of the input đầu vào value.
ArctangentThe Arctangent of the input đầu vào value.
Arctan2Outputs the Inverse Tangentof the first value divided by the second value measured in radians.
Hyperbolic SineThe Hyperbolic Sine of the đầu vào value.
Hyperbolic CosineThe Hyperbolic Cosine of the input value.
Hyperbolic TangentThe Hyperbolic Tangent of the input value.
ConversionTo RadiansConverts the input đầu vào from degrees khổng lồ radians.
To DegreesConverts the input from radians lớn degrees.
Hạn Định -- ClampLimits the đầu ra to the range (0.0 to 1.0). See clamp.

Minimum và maximum function example.¶
This example has one scene đầu vào by the vị trí cao nhất Render Layers node,which has a cube that is about 10 units from the camera.The bottom Render Layers node inputs a scenewith a plane that covers the left half of the view và is 7 units from the camera.Both are fed through their respective Map Value nodes khổng lồ divide the Z-buffer by 20(multiply by 0.05, as shown in the kích thước field)and clamped to be a min/max of 0.0/1.0 respectively.
For the minimum function,the node selects those Z values where the corresponding pixel is closer khổng lồ the camera;so it chooses the Z values for the plane and part of the cube.The background has an infinite Z value, so it is clamped to lớn 1.0 (shown as white).In the maximum example, the Z values of the cube are greater than the plane,so they are chosen for the left side, but the plane Render Layers Z are infinite(mapped lớn 1.0) for the right side, so they are chosen.

Using sine function example.¶
This example has a Time node putting out a linear sequence from 0 lớn 1 over the course of 101 frames.At frame 25, the output đầu ra value is 0.25.That value is multiplied by 2 × pi (6.28) & converted lớn 1.0 by the Sine function,since (sin(2 × pi/ 4) = sin(pi/ 2) = +1.0).
Since the sine function can put out values between (-1.0 lớn 1.0),the Map Value node scales that to lớn 0.0 lớn 1.0 by taking the input (-1 lớn 1), adding 1(making 0 khổng lồ 2), & multiplying the result by one-half (thus scaling the output between 0 lớn 1).The default Color Ramp converts those values khổng lồ a gray-scale.Thus, medium gray corresponds khổng lồ a 0.0 output by the sine, đen to -1.0,and white to 1.0. As you can see, (sin(pi/ 2) = 1.0). Lượt thích having your own visual màu sắc calculator!Animating this node thiết đặt provides a smooth cyclic sequence through the range of grays.
Use this function lớn vary, for example,the alpha channel of an image to lớn produce a fading in/out effect.Alter the Z channel lớn move a scene in/out of focus.Alter a màu sắc channel value to lớn make a màu sắc "pulse".

Scaling a channel example.¶
This example has a Math (Multiply) node increasing the luminance channel (Y)of the image to make it brighter. Chú ý that you should use a Map Value nodewith min() and max() enabled to lớn clamp the output to valid values.With this approach, you could use a logarithmic function to lớn make a high dynamic range image.For this particular example,there is also a Bright/Contrast node that might give simpler control over brightness.

Posterization example.¶
In this example, we restrict the color values lớn be one of the six values: 0, 0.2, 0.4, 0.6, 0.8, 1.
To split up a continuous range of values between 0 and 1 to certain phối of values,the following function is used: (round(x × n - 0.5) / (n - 1)),where "n" is the number of possible output đầu ra values, and "x" is the input pixel color.Read more about this function.
To implement this function in glaskragujevca.net, consider the node setup above.We string the Math nodes into a function that takes each color (values from 0 lớn 1),multiplies it up by six, the desired number of divisions (values become from 0 to 6),offsets it by 0.5 (-0.5 lớn 5.5),rounds the value lớn the nearest whole number (produces 0, 1, 2, 3, 4, 5),and then divides the image pixel màu sắc by five (0.0, 0.2, 0.4, 0.6, 0.8, 1.0).
Xem thêm: Subject Pronouns Là Gì, Đại Từ Trong Tiếng Anh Dùng Như Thế Nào
In the case of a màu sắc image,you need split it into separate RGB channels using Separate/Combine RGBA nodesand perform this operation on each channel independently.