Incari Studio
2023.1
2023.1
  • Incari HMI Development Platform
  • Getting Started
    • Overview
    • Requirements
    • What's New
    • Installation
    • First Steps
      • Incari Hub
      • Creating a Project
      • Incari Studio
  • Objects and Types
    • Overview
    • Project Objects
      • Scene
      • Scene2D
      • Screen
      • HMD
    • Scene Objects
      • Audio
      • Camera
      • Group
      • Image Sequence Sprite
      • Label
      • Light
      • List
      • Lottie Sprite
      • Mesh
      • On-Screen Keyboard
      • Overlay
      • Primitives
      • Sprite
      • Text
      • Vector
      • Video
      • Web Sprite
    • Scene2D Objects
      • Camera
      • Frame
      • GUI
        • Button
        • Dropdown
        • List
        • Slider
        • Text
        • Text Area
        • Text Input
        • Toggle
      • Image
      • Vector
    • Prefabs
      • Creating and Using Prefabs
        • Prefabs in Scenes
        • Prefabs in Scene2Ds
      • Logic in Prefabs
      • Nested Prefabs
    • Attributes
      • Attribute Types
        • Asset/Object Attribute
        • Boolean Attribute
        • Color Attribute
        • Numerical Attribute
      • Common Attributes
        • Object
        • Sprite
        • Transformation
          • Global Transformations
          • Local Transformations
        • Tag
    • Data Types
      • Bool
      • Byte
      • Float
      • Int
      • String
      • Vector2
      • Vector3
      • Vector4
    • Terminology
  • Modules
    • Overview
    • Animation Editor
    • Asset Database
    • Asset Manager
    • Attribute Editor
    • Code Editor
    • Console
    • Exporter
    • Image Sequence Editor
    • Logic Editor
    • Global Preferences
    • Material Editor
      • Car Paint Model
      • Custom Shading Model
      • Phong Model
      • Glass Model
      • Extended PBR Model
      • PBR Model
      • Shadeless Model
    • Model Editor
    • Plugins
      • Communication
        • MAVLink
        • Serial
        • Socket.IO
        • TCP
        • UDP
    • Profiler View
    • Project Outliner
    • Project Settings
      • CAN
      • Fonts
      • HTTP
      • Keyboard
      • MAVLink
      • MQTT
      • Profiler
      • Scene Separation
      • Serial
      • Socket.IO
      • Styles
      • TCP
      • UDP
    • Scene Outliner
  • Toolbox
    • Overview
    • Actions
      • Delay Action
      • FadeFromTo Action
      • FadeTo Action
      • MoveBy Action
      • MoveTo Action
      • RotateBy Action
      • RotateTo Action
      • RotateFromTo Action
      • ScaleBy Action
      • ScaleTo Action
    • Array
      • Array Value
      • Clear Array
      • Concat Arrays
      • Get Array Element
      • Insert Array Element
      • Length of Array
      • Pop Array Element
      • Push Array Element
      • Remove Array Element
      • Set Array Element
    • Binary
      • Binary (Hex) Value
      • Concat Binaries
    • Communication
      • CAN
        • CAN Send Packet
        • CAN Start
        • CAN Stop
        • Events
          • On CAN Packet Received
          • On CAN Start
          • On CAN Stop
      • HTTP
        • Events
          • On HTTP Route
          • On HTTP Server Start
          • On HTTP Server Stop
        • HTTP Client
        • HTTP Response
        • HTTP Server Start
        • HTTP Server Stop
      • MAVLink
        • Events
          • On MAVLink Packet Received
          • On MAVLink Start
          • On MAVLink Stop
        • MAVLink Decode
        • MAVLink Start
        • MAVLink Stop
      • MQTT
        • Events
          • On MQTT Start
          • On MQTT Stop
          • On MQTT Topic
        • MQTT Publish
        • MQTT Start
        • MQTT Stop
        • MQTT Subscribe
      • Serial
        • Events
          • On Serial Error
          • On Serial Packet Receive
          • On Serial Start
          • On Serial Stop
        • Serial Send Packet
        • Serial Start
        • Serial Stop
      • Socket.IO
        • Events
          • On Socket.IO Error
          • On Socket.IO Receive
          • On Socket.IO Start
          • On Socket.IO Stop
        • Socket.IO Send
        • Socket.IO Start
        • Socket.IO Stop
        • Socket.IO Subscribe
        • Socket.IO Unsubscribe
      • TCP
        • Events
          • On TCP Error
          • On TCP Packet Receive
          • On TCP Start
          • On TCP Stop
        • TCP Send
        • TCP Start
        • TCP Stop
      • UDP
        • Events
          • On UDP Error
          • On UDP Packet Receive
          • On UDP Start
          • On UDP Stop
        • UDP Send
        • UDP Start
        • UDP Stop
    • DateTime
      • Date Time Formatter
      • Now (UTC)
      • System Time
      • Timezone Value
    • Development
      • Assert
      • Benchmark Get
      • Benchmark Start
      • Benchmark Stop
      • Clear Console
      • Console
      • Profiler Start
      • Profiler Stop
    • Dictionary
      • Clear Dictionary
      • Dictionary Value
      • Erase Dictionary Element
      • Get Dictionary Element
      • Get Dictionary Keys
      • Get Dictionary Values
      • Merge Dictionaries
      • Set Dictionary Element
      • Size of Dictionary
    • Events
      • Custom
        • Event Listener
        • Event Trigger
      • Gestures
        • On Swipe
        • On Tap
      • ImageSequence
        • On ImageSequence Frame Changed
        • On ImageSequence Pause
        • On ImageSequence Play
        • On ImageSequence Stop
      • Input
        • On Text Change
      • Keyboard
        • On Key Press
        • On Key Release
      • Leap Motion
        • On Leap Motion Frame Update
        • On Leap Motion Grab End
        • On Leap Motion Grab Start
        • On Leap Motion Grab Update
        • On Leap Motion Pinch End
        • On Leap Motion Pinch Start
        • On Leap Motion Pinch Update
        • On Leap Motion Swipe Left
        • On Leap Motion Swipe Right
        • XR Position
      • List
        • On List Current Index Change
        • On List Entry Select
        • On List Load
      • List 2D
        • On List Active Index Change
      • Lottie
        • On Lottie Finish
        • On Lottie Pause
        • On Lottie Play
        • On Lottie Stop
      • Media
        • On Media Finish
        • On Media Play
      • Mouse
        • Get Mouse Position
        • Get Mouse Position Delta
        • On Hover Enter
        • On Hover Leave
        • On Mouse Button Down
        • On Mouse Button Up
        • On Mouse Click
        • On Mouse Double Click
        • On Mouse Enter
        • On Mouse Leave
        • On Mouse Move
        • On Mouse Scroll
      • Object
        • On Alpha Change
        • On CheckBox Value Change
        • On Dropdown Active Value Change
        • On Opacity Change
        • On Position Change
        • On Rotation Change
        • On Scale Change
        • On Slider Value Change
        • On Visibility Change
      • On-Screen Keyboard
        • On On-Screen Keyboard Arrow Down Pressed
        • On On-Screen Keyboard Arrow Up Pressed
        • On On-Screen Keyboard Enter Pressed
        • On On-Screen Keyboard Input Changed
        • On On-Screen Keyboard Key Pressed
      • Unsubscribe
      • Screen
        • On Screen Scene Change
      • Variables
        • On Variable Change
        • On Variable Set
      • Web
        • On JavaScript Callback
      • WebSprite
        • On WebSprite Load
        • On WebSprite Remote URL Change
    • Flow Control
      • Branch
      • For Each Loop
      • For Loop
      • Index Switch
      • Is Equal
      • Is Greater Equal
      • Is Less Equal
      • Select Data
      • Sequential
      • Switch
      • Toggle
    • Functions
      • Function
        • Function Input
        • Function Output
    • IO
      • Create File
      • Get Current Directory
      • Get File Extension
      • List Directory Content
      • Load File
      • Remove
      • Save File
      • Set Current Directory
    • Incari
      • Animation
        • Pause Animation
        • Play Animation
        • Stop Animation
      • Asset
        • Add to Asset Database
        • Remove from Asset Database
      • Camera
        • Get Active Camera
        • Get All Cameras
        • Set Active Camera
      • ImageSequence
        • Get Current ImageSequence Frame
        • Get ImageSequence Duration
        • Get ImageSequence FPS
        • Get ImageSequence Total Frames
        • Go To Next ImageSequence Frame
        • Go To Previous ImageSequence Frame
        • Pause ImageSequence
        • Play ImageSequence
        • Resume ImageSequence
        • Show ImageSequence Frame
        • Stop ImageSequence
      • List
        • Generate List
        • Get Selected Item
        • Next List Entry
        • Previous List Entry
        • Select List Entry
        • Set Active
        • Set Current Index
      • List 2D
        • Add List Element
        • Get Active Index
        • Get List Data
        • Get List Element
        • Insert List Element
        • Remove List Element
        • Set Active Index
        • Set List Data
        • Set List Element
      • Lottie
        • Pause Lottie
        • Play Lottie
        • Stop Lottie
      • Material
        • Set Custom Uniform
      • Media
        • Get Volume
        • Is Media Playing
        • Pause Media
        • Play Media
        • Seek Media
        • Set Volume
        • Stop Media
      • Object
        • Add Tag
        • Destroy Object
        • Get Active Dropdown Value
        • Get Alpha
        • Get CSS Property
        • Get CheckBox Value
        • Get Children
        • Get Dropdown Options
        • Get Material
        • Get Name
        • Get Objects By Tag
        • Get Opacity
        • Get Parent
        • Get Position
        • Get Root
        • Get Rotation
        • Get Scale
        • Get Size
        • Get Slider Value
        • Get Sort Index
        • Get Tag
        • Get Text
        • Get Text Color
        • Get Tint
        • Get Visibility
        • Has Children
        • Instantiate Object
        • On List Item Clicked
        • Remove Tag
        • Set Active Dropdown Index
        • Set Active Dropdown Value
        • Set Alpha
        • Set CSS Property
        • Set CheckBox Value
        • Set Dropdown Options
        • Set Mask
        • Set Material
        • Set Opacity
        • Set Position
        • Set Rotation
        • Set Scale
        • Set Size
        • Set Slider Value
        • Set Sort Index
        • Set Stylesheet
        • Set Text
        • Set Text Color
        • Set Texture
        • Set Tint
        • Set Visibility
        • Use Mask
      • Object 2D
        • Add CSS Class Name
        • Get CSS Class Names
        • Remove CSS Class Name
        • Set CSS Class Names
      • On-Screen Keyboard
        • Get Screen Keyboard Layout
        • On-Screen Keyboard Clear Input
        • On-Screen Keyboard Get Input
        • On-Screen Keyboard Move Selection
        • On-Screen Keyboard Press Button
        • Set Screen Keyboard Layout
      • Scene 2D
        • Get Stylesheet
        • Merge To Stylesheet
        • Set Stylesheet
      • This Scene
      • Ultrahaptics
        • Ultrahaptics Play
        • Ultrahaptics Stop
      • Scenes
        • Scene
      • Screen
        • Get Scene
        • Set Scene
      • Screens
        • Screen
      • Vector
        • Arc
          • Get ArcEnd
          • Get ArcStart
          • Set ArcEnd
          • Set ArcStart
        • Get BackgroundColor
        • Get FillColor
        • Get StrokeWidth
        • Label
          • Get LabelText
        • Line
          • Get LineWidth
          • Set LineWidth
        • Pie
          • Get PieEnd
          • Get PieStart
          • Set PieEnd
          • Set PieStart
        • Rectangle
          • Get RectangleCorners
          • Set RectangleCorners
        • Set BackgroundColor
        • Set FillColor
        • Set StrokeWidth
      • WebSprite
        • Get Remote URL
        • Set Remote URL
        • Web Sprite Reload
    • Math
      • Absolute
      • Add
      • Average
      • Boolean
        • AND
        • Bool Value
        • Negate
        • OR
      • Ceil
      • Clamp
      • Decrement
      • Divide
      • Floor
      • Increment
      • Interpolate
      • Logarithm
      • Math Constant
      • Maximum
      • Minimum
      • Modulo
      • Multiply
      • Numerical Value
      • Power
      • Random
      • Range Mapper
      • Root
      • Rotation Matrix
      • Round
      • Subtract
      • Trigonometry
        • Arc Cosine
        • Arc Sine
        • Arc Tangent
        • Arc Tangent 2
        • Cosine
        • Radian-Degree Converter
        • Sine
        • Tangent
      • Vector Value
    • Plugins
      • (JSON) Scale Vector
    • Prefab
      • This Prefab
    • String
      • Capitalize
      • CharCodeAt
      • Compare
      • Concat Strings
      • Contains
      • CryptoHash
      • EndsWith
      • Format
      • FormatArray
      • IndexOf
      • IsLower
      • IsUpper
      • JSON Parse
      • JSON Stringify
      • Join
      • LastIndexOf
      • Length
      • Lower
      • MatchRegex
      • PaddingLeft
      • PaddingRight
      • RandomString
      • RemoveCharacters
      • Replace
      • ReplaceRegex
      • Reverse
      • Split
      • StartsWith
      • String Value
      • Substring
      • Trim
      • TrimLeft
      • TrimRight
      • Upper
    • Transition
      • CrossFade
      • Fade
      • MoveInFromBottom
      • MoveInFromLeft
      • MoveInFromRight
      • MoveInFromTop
      • SlideInFromBottom
      • SlideInFromLeft
      • SlideInFromRight
      • SlideInFromTop
    • Utilities
      • Color Value
      • Conversion
      • Create CustomID
      • Create Object
      • Get Command Line Option
      • Group
      • Interval
        • Reset Interval
        • Start Interval
      • Is Data Type
      • Is Object Type
      • System Call
      • Timeout
        • Cancel Timeout
        • Start Timeout
    • Variables
      • Variable Getter
      • Variable Setter
    • Web
      • Call JavaScript Function
  • Demo Projects
    • Overview
    • 4 Methods of Animation
    • Using APIs to Pull Dynamic Data
    • An Analog Clock
    • Image Sequence Button Animation
    • Prefabs
    • Project Initialization
    • On-Screen Keyboard
Powered by GitBook
On this page
  • Overview
  • Attributes
  • Advanced
  • Expert
  • Standard
  • Inputs
  • Outputs
  • External Links

Was this helpful?

  1. Toolbox
  2. Math

Random

PreviousPowerNextRange Mapper

Last updated 1 year ago

Was this helpful?

Overview

The Random Node generates a random outcome, usually a number.

This Node can be set to three different Modes (Advanced, Expert, and Standard). Each of these Modes offers a different set of Attributes that are explained below.

Attributes

Advanced

Generator

This Mode allows the user to choose whether the random generator is deterministic or not, and for the deterministic case, the seed to use.

Attribute
Type
Description

Is Deterministic

Bool

Whether the random generator is deterministic or not.

Seed

Int (only available when Is Deterministic is set to true)

The Seed to use for the deterministic random generator.

Distribution

This Mode has a Drop-down menu from which the probability distribution used for the random generator can be chosen. Each option offers its own set of Attributes with the probability distribution parameters.

Attribute
Type
Description

Distribution

Drop-down

The probability distribution that the random generator will use.

Next, the Attributes for each probability distribution are described. For each probability distribution, the link to its corresponding Wikipedia entry is given.

Probability distribution of a random variable that can take two values: true, with probability p; and false, with probability 1-p. When this distribution is chosen, the outcome of the Node is a Boolean.

Attribute
Type
Description

Probability of 'true'

Float (between 0 and 1)

The probability that the outcome will be true.

Probability distribution of the number of successes in a sequence of independent experiments, each one with two possible outcomes: success and failure. The parameters for this probability distribution are the number of experiments and the probability of a successful outcome in each one.

Attribute
Type
Description

Data Type

Drop-down

Whether the outcome will be an Int or Byte.

Probability of 'true'

Float

The probability that the outcome of each trial is true.

Number of trials

Int

The number of independent experiments, each one with probability of success Probability of 'true'.

Symmetric probability distribution, with half its values less than the mean and half greater than the mean. The parameters are the mean, which equals the median and the mode, and the standard deviation.

Attribute
Type
Description

Mean

Float

The mean value of the distribution.

Standard deviation

Float

The standard deviation of the distribution.

Discrete probability distribution that expresses the probability of a given number of events occurring in a specified time period. Its parameter is the mean value.

Attribute
Type
Description

Data Type

Drop-down

Wheter the outcome will be an Int or Byte.

Mean

Float

The mean value of the distribution.

  • Uniform

Attribute
Type
Description

Data Type

Drop-down

Whether an Int, Float, or Byte will be generated.

Minimum

Defined in the Data Type Attribute

The lower bound of the interval from which the random number will be extracted.

Maximum

Defined in the Data Type Attribute

The upper bound of the interval from which the random number will be extracted.

Expert

Generator

This Mode allows to choose from a list of several types of random generators.

Attribute
Type
Description

Generator

Drop-down

The type of random generator to use.

Seed

Int (not available for non_deterministic Generator)

The Seed to use for the random generator.

Distribution

This Mode has a Drop-down menu from which the probability distribution to be used for the random generator can be chosen. Each option offers its own set of Attributes with the probability distribution parameters.

Attribute
Type
Description

Distribution

Drop-down

The probability distribution that the random generator will use.

Next, the Attributes for each probability distribution are described. For each probability distribution, the link to its corresponding Wikipedia entry is given.

Probability distribution of a random variable that can take two values: true, with probability p; and false, with probability 1-p. When this distribution is chosen, the outcome of the Node is a Boolean.

Attribute
Type
Description

Probability of 'true'

Float (between 0 and 1)

The probability that the outcome will be true.

Probability distribution of the number of successes in a sequence of independent experiment, each one with two possible outcomes: success and failure. The parameters for this probability distribution are the number of experiments and the probability of a successful outcome in each one.

Attribute
Type
Description

Data Type

Drop-down

Whether the outcome will be an Int or Byte.

Probability of 'true'

Float

The probability that the outcome of each trial is true.

Number of trials

Int

The number of independent experiments performed, each one with probability of success Probability of 'true'.

Probability distribution that resembles a normal distribution but with a taller peak, whose tails decay slower. Its parameters are the location of the peak and the scale - the latter defines its width.

Attribute
Type
Description

Location

Float

Defines where the peak is.

Scale

Float

Half the width of the probability density function at half the maximum height.

Probability distribution of a sum of the squares of a number of independent normal random variables. The number of normal random variables is called the degrees of freedom of the Chi-squared distribution.

Attribute
Type
Description

Degrees of freedom

Float

Number of independent normal random variables that are summed.

Attribute
Type
Description

Rate

Float

Rate at which the events in the Poisson process occur.

Limit distribution of properly normalized maxima of a sequence of independent and identically distributed random variables.

Attribute
Type
Description

Location

Float

Defines where the peak is.

Scale

Float

Defines how spread out the values are.

Ratio of two independent random variables with chi-squared distributions, each one divided by its corresponding number of degrees of freedom for scaling.

Attribute
Type
Description

Denominator Dof

Float

Degrees of freedom of the chi-squared random variable in the denominator.

Numerator DoF

Float

Degrees of freedom of the chi-squared random variable in the numerator.

Maximum entropy probability distribution for a random variable, whose mean is the product between the shape and scale, which are the two parameters of the Gamma distribution.

Attribute
Type
Description

Shape

Float

Modifies the shape of the probability distribution.

Scale

Float

Defines how spread out are the values.

The probability distribution of the number of experiments with a Bernoulli distribution needed to get one success.

Attribute
Type
Description

Data Type

Drop-down

Whether the output is an Int or Byte.

Probability of 'true'

Float (between 0 and 1)

The probability of success in the Bernoulli trials.

Probability distribution of a random variable whose logarithm has a normal distribution.

Attribute
Type
Description

Mean

Float

The mean value of the logarithm of the distribution.

Standard deviation

Float

The standard deviation of the logarithm of the distribution.

Probability distribution of the number of successes in a sequence of independent experiments, each with two possible outcomes: success and failure, before a specified non-random number of failures occur. The parameters for this probability distribution are the probability of a successful outcome in each experiment and the number of failures until the experiments stop.

Attribute
Type
Description

Data Type

Drop-down

Whether the outcome is an Int or Byte.

Probability of 'true'

Float (between 0 and 1)

The probability that the outcome of each trial is true.

Number of trials

Int

The number of failures to occur until the experiments stop.

Symmetric probability distribution, with half its values less than the mean and half greater than the mean. The parameters are the mean, which equals the median and the mode, and the standard deviation.

Attribute
Type
Description

Mean

Float

The mean value of the distribution.

Standard deviation

Float

The standard deviation of the distribution.

Discrete probability distribution that expresses the probability of a given number of events occurring in a specified time period. Its parameter is the mean value.

Attribute
Type
Description

Data Type

Drop-down

Wheter the outcome will be an Int or Byte.

Mean

Float

The mean value of the distribution.

Probability distribution that arises when estimating the mean of a normally-distributed statistical population with a small sample size and unknown standard deviation. Its parameter is the number of degrees of freedom, which is the number of observations taken from a normal distribution minus one.

Attribute
Type
Description

Degrees of freedom

Float

The number of observations taken from a normal distribution minus one. As it grows, the Student-t distribution approaches a normal distribution.

  • Uniform

Attribute
Type
Description

Data Type

Drop-down

Whether an Int, Float, or Byte will be generated.

Minimum

Defined in the Data Type Attribute

The lower bound of the interval from which the random number will be extracted.

Maximum

Defined in the Data Type Attribute

The upper bound of the interval from which the random number will be extracted.

Attribute
Type
Description

Shape

Float

Defines the shape of the probability distribution.

Scale

Float

Defines how spread out the values of the probability distribution are.

Standard

Distribution

Attribute
Type
Description

Data Type

Drop-down

Whether an Int, Float, or Byte will be generated.

Minimum

Defined in the Data Type Attribute

The lower bound of the interval from which the random number will be extracted.

Maximum

Defined in the Data Type Attribute

The upper bound of the interval from which the random number will be extracted.

Inputs

Input
Type
Description

Pulse Input (â–º)

Pulse

A standard Input Pulse, to trigger the execution of the Node.

Outputs

Output
Type
Description

Pulse Output (â–º)

Pulse

A standard Output Pulse, to move onto the next Node along the Logic Branch, once this Node has finished its execution.

Output

Depends on the Mode and Distribution

The random outcome that was generated.

External Links

: Project, Scene, Function, Prefab.

Each Mode has a different set of Attributes. The Modes are: , , and .

Probability distribution in which all the values in an interval are equally likely to be drawn. It can either be or .

Probability distribution of the time between events in a . Its parameter is the rate at which the events in the Poisson process occur.

Probability distribution in which all the values in an interval are equally likely to be drawn. It can either be or .

This Mode only uses a uniform distribution. It can either be or .

on Wikipedia.

on Wikipedia.

on Wikipedia.

Bernoulli
Binomial
Normal
Poisson
continuous
discrete
Bernoulli
Binomial
Cauchy
Chi_Squared
Exponential
Poisson process
Extreme_Value
Fisher_F
Gamma
Geometric
Lognormal
Negative_Binomial
Normal
Poisson
Student_T
continuous
discrete
Weibull
discrete
continuous
Random number generation
Pseudorandom number generator
List of probability distributions
Advanced
Expert
Standard
The Random Node.
The Random Node Attributes.
Scope