colors

this library makes large use of the OO PLaSM extension described in [MMPP02]. In such a context objects are values belonging to classes; classes are sets generated by a CLASS constructor function; this one automatically generates a predicate is[classname] to test set-membership of objects

  • Appearance the appearance property of pol is set by its mat material and fulltex
    Pre/Post conds (pol::ispol; mat::isbasematerial; fulltex::isfulltexture) => (ispol)
    Example appearance:< pol,mat,fulltex> == pol material mat texture fulltex

  • Basecamera full detail definition according to the vrml specs of camera node
    Pre/Post conds (position, orientation::or ~ [isvect, isnull]; fieldofview::or
    ~ [isreal, isnull]; description::isstring) => (isbasecamera)
    Example Basecamera:< < 3,0,0>, < 0,1,0,PI/2>, pi/4, x axis camera >

  • Basedirlight specialization of GenericLight with type == 1 and various defaults
    Pre/Post conds (dirappearance, dirgeometry::isseq) => (isbasedirlight)
    Example see psmlib/colors.psm

  • Basematerial full detail definition according to the vrml specs of material node
    Pre/Post conds (diffuse, specular::isrgbcolor; ambient::isinto:< 0, 1>;
    emissive::isrgbcolor; shininess, transparency::isinto:< 0, 1>) => (isbasematerial)
    Example basematerial:< rgbcolor:< 1,0.85,0.85>,black,0.2,black,0.2,0.0>

  • Basepointlight specialization of GenericLight with type == 0 and defaults
    Pre/Post conds (pointappearance, pointgeometry::isseq) => (isbasepointlight)
    Example see psmlib/colors.psm

  • Basespotlight specialization of GenericLight with type == 0 and defaults
    Pre/Post conds (spotappearance, spotgeometry::isseq) => (isbasespotlight)
    Example see psmlib/colors.psm

  • Basetexture specialization of Fulltexture with no texture transformation
    Pre/Post conds (url::isstring; repeats, repeatt::isbool) => (isbasetexture)
    Example see psmlib/colors.psm

  • Black plasm object of class rgbcolor and value < 0,0,0>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color black

  • Blue plasm object of class rgbcolor and value < 0,0,1>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color blue

  • Brown plasm object of class rgbcolor and value < 3/5,2/5,1/5>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color brown

  • Camera used to associate a camera to pol, to be inserted in a hierarchical graph
    Pre/Post conds (pol::ispol; camera::isbasecamera) => (ispol)
    Example MK:< 0,0,0> CAMERA BaseCamera:< prp, < 0,0,1,0>, PI/4, string >

  • Color returns pol annotated with col value for rgbcolor property
    Pre/Post conds (pol::ispol; col::isrgbcolor) => (ispol)
    Example cuboid:< 1,1,1> color yellow

  • Crease smooths pol by annotating it with angle value for VRMLcrease property
    Pre/Post conds (pol::ispol; angle::isreal) => (ispol)
    Example sphere:1:< 12,24> crease (pi/2)

  • Cyan plasm object of class rgbcolor and value < 0,1,1>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color cyan

  • Fulltexture generator of texture objects, including 2D texture transformations
    Pre/Post conds (url::isstring; repeats, repeatt::isbool; center::ispoint;
    rotation::isreal; scale, translation::isvect) => (isfulltexture)
    Example fulltexture:< img/glass.jpg ,true,true,< 0,0>,0,< 1,1>,< 0,0>>

  • Genericlight used to switch between point, directional and spot lights
    Pre/Post conds (type::isinto:< 0, 2>; appearance, geometry::isgenericlightgeometry)
    => (isgenericlight)
    Example see examples/color/lights.psm

  • Genericlightappearance returns objects embodying common params of light
    types
    Pre/Post conds (color::or ~ [isrgbcolor, isnull]; intensity, ambient::or ~
    [isreal, isnull]; ison::or ~ [isbool, isnull])
    => (isgenericlightappearance)
    Example genericlightappearance:< magenta, 1, 0.4, true>

  • Genericlightgeometry returns objects with common params of light geometries
    Pre/Post conds (location, direction, attenuation::or ~ [isvect, isnull];
    radius, beamwidth, cutoffangle::or ~ [isreal, isnull])
    => (isgenericlightgeometry)
    Example GenericLightGeometry:< < 0,0,0>,< 1,0,0>,< 1,0,0>,10,PI/4,PI/6>

  • Gray plasm object of class rgbcolor and value < 1/2,1/2,1/2>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color gray

  • Green plasm object of class rgbcolor and value < 0,1,0>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color green

  • Isinto predicate to test set-membership of x into the [lower,upper] interval
    Pre/Post conds (lower,upper::isnum)(x::isnum) => (isbool)
    Example isinto:< 0,1>:0.5 == true

  • Light is used to apply a genericlight object to pol complex
    Pre/Post conds (pol::ispol; light::isgenericlight) => (islight)
    Example (sqr ~ q ~ #:10):1 light spot:< red, < 10,15,20>,< 0,0,-1>>

  • Magenta plasm object of class rgbcolor and value < 1,0,1>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color magenta

  • Material annotates pol with mat object value for VRMLmaterial property
    Pre/Post conds (pol::ispol; mat::isbasematerial) => (ispol)
    Example cuboid:< 1,1,1> material Transparentmaterial:< green, 0.4>

  • Orange plasm object of class rgbcolor and value < 1,1/2,0>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color orange

  • Purple plasm object of class rgbcolor and value < 1/2,0,1/2>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color purple

  • Red plasm object of class rgbcolor and value < 1,0,0>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color red

  • Simplecamera specialization of BaseCamera using defaults for common params
    Pre/Post conds (position::or ~ [isvect, isnull]; description::isstring)
    => (issimplecamera)
    Example (@1~cuboid):< 1,1,1> camera simplecamera:< < 0.5,0.5,2.5>, cam >

  • Simplematerial specialization of basematerial using defaults for common params
    Pre/Post conds (color::isrgbcolor) => (issimplematerial)
    Example circle:1:< 32,1> material simplematerial:blue

  • Simpletexture specialization of basetexture with no repetitions
    Pre/Post conds (url::isstring) => (issimpletexture)
    Example cuboid:< 2,3> texture simpletexture: path/monnalisa.jpg

  • Spot function that returns a plasm object of class basespotlight
    Pre/Post conds (color,location,orientation::tt) => (isbasespotlight)
    Example (sqr ~ q ~ #:10):1 light spot:< red, < 10,15,20>,< 0,0,-1>>

  • Texture annotates pol with tex value for the VRMLtexture property
    Pre/Post conds (pol::ispol; tex::isfulltexture) => (ispol)
    Example cuboid:< 2,3> texture simpletexture: path/monnalisa.jpg

  • Transparentmaterial specialization of basematerial with default values
    Pre/Post conds (color::isrgbcolor; transparency::isinto:< 0,1>) =>
    (istransparentmaterial)
    Example ndimsphere:3material transparentmaterial:< red, 0.7>

  • White plasm object of class rgbcolor and value < 1,1,1>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color white

  • Yellow plasm object of class rgbcolor and value < 1,1,0>
    Pre/Post conds => (isrgbcolor)
    Example cuboid:< 1,1,1> color yellow 

PLaSM is Free Software and may be distributed under GNU LGPL