KWLib-3D: 3D Graphics Engine

Wednesday, April 10, 2002
By keiji
Software Rendering 3D graphics engine, developed from scratch
Objective
I have developed this 3D-graphics library "KWLib-3D" by myself to study various 3D-graphics algorithms.
Features are as follows:

  1. All functions are implemented by myself.
    I'm not using any 3D library, such as DirectX-3D or Open-GL.
  2. Uses Z-Buffering as hidden surface removal method.
  3. Based on the KWLib class library.

Functions of KWLib-3D: (as of Apr 10, 2002)
  • Shapes: Point, Line, Triangle, Rectangle, Box, Sphere, Cylinder, Prism, Ring, Circle
  • Various types of Mesh: Mesh, Mesh with color
  • Regular polygon generator.
  • Rendering: Z-Buffer, Flat/Phong shading
  • Only view point can change the location.
  • Translucent. (using Z-Buffer and Z-Sort.)
  • Texture mapping to sphere/plane.
  • Stereo view mode.
  • Volume Rendering.
  • 3D Turtle Graphics.
  • 140,000 polygons per second. (At Celeron 550MHz)


Samples


Mesh
Function: r=sqrt(x*x+y*y)*6, z=(exp(-0.05*r)*cos(sqrt(1-0.01)*r+0))*0.5
Z-Buffering, Phone shading



Polygon sample (regular icosahedron)
Z-Buffering



Polygon sample (Translucent Boxes)
Z-Buffering/Z-Sorting for translucent objects



Texture Mapping to Sphere



Volume Rendering



Turtle Graphics