Descriptions and Examples for the POV-Ray Raytracer by Friedrich A. Lohmüller
    About Variables in POV-Ray
Deutsch Deutsch

Home
- POV-Ray Tutorial

  - POV-Ray Details

  - About Variables
      Built-in Identifiers
      #declare, #local
  > Expressions

  - A short
    Include File Tutorial


                                       

Mathematical Expressions
...

In the scenery description language (SDL) of POV-Ray we can use a bundle of
mathematical and logical operators for calculations in POV-Ray.
Operators in POV-Ray:

Math Operators
(  )  *  /  +  -    and logical NOT:  ! 
#declare Result = -0.45*A + (B*B - 4)*C; //
#local Angle_1 = degrees( atan ( 2.5 / sqrt(2)); // angle value in degrees

Relational Operators. < <= = != >= > #declare Green_or_Red = pigment{ rgb<(clock <= 0.5),(clock > 0.5),0;>,}
Logical Operators & // = AND | // = OR &! // = AND NOT // Note: The Arguments A and B are not handled bitwise but logical! #if (A & B) ... // do this if both A and B are true #end #if (A | B) ... // do this if either A or B is true #end
Note:
- All #declare or #local of a float, vector or color require semicolon at the end.



top

© Friedrich A. Lohmüller, 2011
www.f-lohmueller.de