ChaosPro Home
Introduction
What's New
Palettes
Using Formulas
Layering in ChaosPro
Rendering
Fractal Parameter Windows
Windows
Menu
3D Transformations
Animations
Formula Compiler
Writing Formulas
Language Reference
Introduction
Basic Syntax
Datatypes
Constants
Variables
Expressions
Operators
Precedence
Arithmetic Operators
+
-
*
/
%
^
- (neg)
|a|
Assignment Operator
Comparison Operator
Logical Operators
Functions
Control Structures
Compiler Directives
Functions
Interface to ChaosPro
Special Features, Notes...
Compatibility
Fractal Type Reference
Tutorials
Appendix
CHAOSPRO 4.0
Release 4.0
.

Operators - *

Operator :* - multiplication
Unary / binary: Binary
Prefix / infix: Infix
Input data type Output data type Description
real*real real Calculates a*b
real*complex complex 3*(1+2i)=3+6i
real*vector vector 2*(4,4,1)=(8,8,2)
real*quaternion quaternion 2*(4,4,1,1)=(8,8,2,2)
complex*real complex (2+3i)*2=(4+6i)
complex*complex complex complex multiplication
complex*quaternion quaternion complex will be converted to quaternion, then quaternion multiplication
vector*real vector (2,2,3)*3=(6,6,9)
vector*vector real scalar vector multiplication, i.e. (2,2,3)*(1,2,3) = 2*1+2*2+3*3 = 2+4+9 = 15
quaternion*real quaternion (1,2,3,4)*2=(2,4,6,8)
quaternion*complex quaternion complex will be converted to quaternion, then quaternion multiplication
quaternion*quaternion quaternion standard quaternion multiplication
real*color color 3*(0.2,0.3,0.3)=(0.6,0.9,0.9)
color*real color (0.2,0.3,0.3)*3=(0.6,0.9,0.9)

Notes:


This operator multiplicates the two operands. The data type of the result is real, if both operands are either int or real. If at least one operand is complex, the result is stored as a complex number. If at least one operand is a quaternion number, the result is stored as a quaternion number. An exception is the datatype vector: If two vectors are multiplied, the scalar product is calculated.

This operator can also multiply a color with a real number: In that case each component of the color is multiplied with the number.

Examples:


  • 3*4
  • x*y
  • 2*rgba(0.2, 0.4, 0.5, 1.0) = rgba(0.4, 0.8, 1.0, 2.0)
  • rgba(0.2, 0.4, 0.5, 1.0)*2 = rgba(0.4, 0.8, 1.0, 2.0)