PhotoGENius V1.0.0
A basic library for generating photorealistic images, developed for the course Numerical techniques for photorealistic image generation.
Package List
Here are the packages with brief descriptions (if available):
[detail level 12]
 NPGENLib
 CBRDFAn abstract class representing a Bidirectional Reflectance Distribution Function (BRDF).
 CCheckeredPigmentA checkered pigment. The number of rows/columns in the checkered pattern is tunable, but you cannot have a different number of repetitions along the u/v directions. The parameters defined in this dataclass are the following:

Col1 first Color
Col2 second Color
NumStep int number of repetition
 CColor
 CCylinderClass to represent a cylinder.
 CDiffuseBRDFA class representing an ideal diffuse BRDF.
 CExpectParse
 CFlatRendererThis renderer estimates the solution of the rendering equation by neglecting any contribution of the light. It just uses the pigment of each surface to determine how to compute the final radiance.
 CGrammarErrorExceptionAn error found by the lexer/parser while reading a scene file. The fields of this type are the following:

Message a user-frendly error message
sourceLocation a sourceLocation object pointing out the name of the file, the line number and the column number where the error occured
 CHdrImageA High-Dynamic-Range 2D image. This class has 3 members:

Width number (int) of columns in the 2D matrix of colors
Height number (int) of rows in the 2D matrix of colors
Pixel the 2D matrix (array of Color), represented as a 1D array
 CHitRecordA class holding information about a ray-shape intersection. The parameters defined in this dataclass are the following:

WorldPoint a Point object holding the world coordinates of the hit point
Normal a Normal object holding the orientation of the normal to the surface where the hit happened
SurfacePoint a Vec2d object holding the position of the hit point on the surface of the object
t a floating-point value specifying the distance from the origin of the ray where the hit happened
Ray a Ray object that hit the surface
Material the parameter Material of the Shape object hit by the ray
 CICameraAn interface representing an observer. Interface for camera: the method FireRay will be implemented in two different ways by OrthogonalCamera and PerspectiveCamera.
 CIdentifierTokenA token containing an identifier.
 CImagePigmentThe texture is given through a PFM image. The parameters defined in this dataclass are the following:

Image HdrImageobject
 CImageTracerSend rays from the Camera (observer) to corresponding pixels of an HdrImage (screen), converting "u-v" Camera coordinates to "column-raw" index of the HdrImage.

Image must be a :class:.HdrImage object that has already been initialized
Camera must be a descendeant of the :class:.Camera object
Pcg random number generator
SamplePerSize If SamplesPerSide is larger than zero, stratified sampling will be applied to each pixel in the image, using the random number generator pcg
 CInputStreamThis class implements a wrapper around a stream, with the following additional capabilities:

  1. It tracks the line number and column number;
  2. It permits to "un-read" characters and tokens.
 CInvalidPfmFileFormat
 CKeywordTokenA token containing a keyword. Parameters:

Location a SourceLocation object holding informations about token location in the file (filename, number of column, number of rows)
Keyword a KeywordList object holding the possible Keyword options
 CLiteralNumberTokenA token containing a literal number.
 CMaterialA class representing a Material. The parameters defined in this dataclass are the following:

Brdf
EmittedRadiance
 CNormalA normal vector in 3D space. This struct has three floating-point fields: x, y, and z.
 COnOffRendererA on/off renderer, produces black and white images and is useful for debugging purposes. Other than Renderer's member it has the third member

Color type Color
 COrthogonalCameraThis struct implements an observer seeing the world through an orthogonal projection.
 CPathTracerThe algorithm implemented here allows the caller to tune number of rays thrown at each iteration, as well as the maximum depth. It implements Russian roulette to reduce the number of recursive calls.

Pcg Random number generator
NumbOfRays Number of rays to be fired at each iteration
MaxDepth Maximum number of reflections for any ray
RussianRouletteLimit Minimum number of reflections for the Russian Roulette algorith to start
 CPCGPCG Uniform Pseudo-random Number Generator.
 CPerspectiveCameraThis class implements an observer seeing the world through a perspective projection.
 CPigmentThis abstract class represents a pigment with a function that associates a color with each point on a parametric surface (u,v).
 CPointA point in 3D space. This struct has three floating-point fields: x, y, and z.
 CPointLightThe class holds information about a pointlight (a Dirac's delta in the rendering equation) used by the PointLight Renderer. The fields are the following:

Position a Point object holding the position of the point light in 3D space
Color a Color object being the color of the point light
LinearRadius a float number used to compute the solid angle subtended by the light at a given distance d (r/d)^2
 CPointLightRendererClass that implements a Point Light renderer. The solid angle integral of the rendering equations can be simplified, because the integrand contains some localized Dirac deltas.
 CRay
 CRendererA class implementing a solver of the rendering equation. This is an abstract class; you should use a derived concrete class. This class has 2 members:

World type World
BackGroundColor type Color
 CRuntimeError
 CSceneA scene read from a scene file.
 CShapeInterface for a generic 3D shape: the method RayIntersection is implemented in different concrete shapes.
 CSourceLocationThe class points out a specific location in a source file. The fields are:

FileName name of the file or empty string;
LineNum number of line;
ColNum number of column;
 CSpecularBRDFA class representing an ideal mirror BRDF.
 CSphereA 3D unit sphere centered on the axes origin.
 CStopTokenA token representing the end of a file.
 CStringTokenA token containing a literal string.
 CSymbolTokenA token containing a symbol (i.e., a variable name).
 CTokenA lexical token, used when parsing a scene file.
 CTransformationAn affine transformation. This class encodes an affine transformation. It has been designed with the aim of making the calculation of the inverse transformation particularly efficient.
 CTuple
 CUniformPigmentA uniform pigment.
 CVecA 3D vector. This class has three floating-point fields: x, y, and z.
 CVec2dA 2D vector, with two floating point fields u and v.
 CWorld
 CXyPlaneA 2D plane that you can put in the scene. Unless transformations are applied, the z=0 plane is constructed.