﻿ Grasshopper Maths - Addon for Grasshopper | Grasshopper Docs
We are a free, community-supported website! 🥰
We only display small unobtrusive ads which help us stay online! 💯
 Domain
 Matrix
 Operators
 Polynomials
 Script
 Time
 Trig
 Util

# Grasshopper Maths

### Operators

 Negative (Neg)Compute the negative of a value. Absolute (Abs)Compute the absolute of a value. Factorial (Fac)Returns the factorial of an integer. Division (A/B)Mathematical division Integer Division (A\B)Mathematical integer division Addition (A+B)Mathematical addition Subtraction (A-B)Mathematical subtraction Multiplication (A×B)Mathematical multiplication Modulus (Mod)Divides two numbers and returns only the remainder. Power (Pow)Raise a value to a power. Mass Addition (MA)Perform mass addition of a list of items Mass Multiplication (MM)Perform mass multiplication of a list of items Relative Differences (RelDif)Compute relative differences for a list of data Smaller Than (Smaller)Smaller than (or equal to) Larger Than (Larger)Larger than (or equal to) Equality (Equals)Test for (in)equality of two numbers Similarity (Similar)Test for similarity of two numbers Gate And (And)Perform boolean conjunction (AND gate). Gate Or (Or)Perform boolean disjunction (OR gate). Gate Not (Not)Perform boolean negation (NOT gate). Gate Xor (Xor)Perform boolean exclusive disjunction (XOR gate). Gate Nand (Nand)Perform boolean alternative denial (NAND gate). Gate Nor (Nor)Perform boolean joint denial (NOR gate). Gate Xnor (Xnor)Perform boolean biconditional (XNOR gate). Gate Majority (Vote)Calculates the majority vote among three booleans.

### Util

 Smooth Numbers (Smooth)Smooth out changing numbers over time ClampRestrict a number between two numeric extremes. PiReturns a factor of Pi. Golden Ratio (Phi)Returns a factor of the golden ratio (Phi). Epsilon (Eps)Returns a factor of double precision floating point epsilon. Minimum (Min)Return the lesser of two items. Maximum (Max)Return the greater of two items. Extremes (Extrz)Find the extremes in a list of values RoundRound a floating point value. Blur Numbers (NBlur)Blur a list of numbers by averaging neighbours Truncate (Trunc)Perform truncation of numerical extremes Average (Avr)Solve the arithmetic average for a set of items Weighted Average (Wav)Solve the arithmetic weighted average for a set of items Create Complex (Complex)Create a complex number from a Real and an Imaginary component Complex Components (Complex)Extract the Real and Imaginary components from a complex number Complex Conjugate (z*)Create the conjugate of a Complex number Complex Argument (Arg)Get the argument of a Complex number Complex Modulus (CMod)Get the modulus of a Complex number Interpolate data (Interp)Interpolate a collection of data.

### Trig

 Sine (Sin)Compute the sine of a value SincCompute the sinc (Sinus Cardinalis) of a value. Cosine (Cos)Compute the cosine of a value Tangent (Tan)Compute the tangent of a value ArcSine (ASin)Compute the angle whose sine is the specified value. ArcCosine (ACos)Compute the angle whose cosine is the specified value. ArcTangent (ATan)Compute the angle whose tangent is the specified value. Secant (Sec)Compute the secant (reciprocal of the Cosine) of an angle. CoSecant (Csc)Compute the co-secant (reciprocal of the Sine) of an angle. CoTangent (Cot)Compute the co-tangent (reciprocal of the Tangent) of an angle. Degrees (Deg)Convert an angle specified in radians to degrees Radians (Rad)Convert an angle specified in degrees to radians Right Trigonometry (RTrig)Right triangle trigonometry Triangle Trigonometry (Trig)Generic triangle trigonometry Circumcentre (CCentre)Generate the triangle circumcentre from perpendicular bisectors. Incentre (ICentre)Generate the triangle incentre from angle bisectors. Orthocentre (OCentre)Generate the triangle orthocentre from altitudes. CentroidGenerate the triangle centroid from medians.

### Domain

 Construct Domain (Dom)Create a numeric domain from two numeric extremes. Deconstruct Domain (DeDomain)Deconstruct a numeric domain into its component parts. Consecutive Domains (Consec)Create consecutive domains from a list of numbers Bounds (Bnd)Create a numeric domain which encompasses a list of numbers. Bounds 2D (Bnd)Create a numeric two-dimensional domain which encompasses a list of coordinates. Includes (Inc)Test a numeric value to see if it is included in the domain Remap Numbers (ReMap)Remap numbers into a new numeric domain Construct Domain² (Dom²)Create a two-dimensional domain from two simple domains. Deconstruct Domain² (DeDom2)Deconstruct a two-dimensional domain into its component parts Divide Domain (Div)Divide a domain into equal segments. Divide Domain² (Divide)Divides a two-dimensional domain into equal segments. Find Domain (FDom)Find the first domain that contains a specific value

### Polynomials

 Square (Sqr)Compute the square of a value Square Root (Sqrt)Compute the square root of a value CubeCompute the cube of a value Cube Root (Cbrt)Compute the cube root of a value Logarithm (Log)Compute the Base-10 logarithm of a value. Natural logarithm (Ln)Compute the natural logarithm of a value. Power of E (Eº)Raise E to the power of N. Power of 2 (2º)Raise 2 to the power of N. Power of 10 (10º)Raise 10 to the power of N. One Over X (1/x)Compute one over x. Log N (LogN)Return the N-base logarithm of a number.

### Time

 Construct Date (Date)Construct a date and time instance. Construct Exotic Date (DateEx)Construct a date using a specific calendar Construct Time (Time)Construct a time instance Construct Smooth Time (SmTime)Construct a time instance from smooth components Deconstruct Date (DDate)Deconstruct a date into years, months, days, hours, minutes and seconds Combine Date & Time (CDate)Combine a pure date and a pure time into a single date Interpolate Date (IntDate)Interpolate between two dates or times. Date Range (RDate)Create a range of successive dates or times

### Matrix

 Construct Matrix (Matrix)Construct a matrix from initial values Deconstruct Matrix (DeMatrix)Deconstruct a matrix into its component parts Invert Matrix (MInvert)Invert a matrix Transpose Matrix (Transpose)Transpose a matrix (swap rows and columns) Swap Rows (SwapR)Swap two rows in a matrix Swap Columns (SwapC)Swap two columns in a matrix Display Matrix (Matrix)Display a matrix

### Script

 Evaluate (Eval)Evaluate an expression with a flexible number of variables. ExpressionEvaluate an expression

Site design © Robin Rodricks.   Grasshopper Maths and associated data © 2024 Robert McNeel & Associates.
Rhinoceros and Grasshopper are registered trademarks of Robert McNeel & Associates.  Hosted by GitHub