Monthly Archives: August 2021

Optoelectronics and Photonics

  • Maxwell’s equation
  • Geometrical optics
  • Interference
  • Diffraction
  • Fresnel’s equation
  • Group velocity
  • Group index
  • Quantum mechanical concepts
  • Vectors
  • Complex numbers
  • Partial differentiation
  • Fourier transforms
  • Wave theory
  • Particle theory
  • light
  • Wave theory: wave => interference, diffraction
  • Particle theory: photon

Wave Nature of Light

Light Waves in a Homogeneous Medium

Plane Electromagnetic Wave

  • Electric field Ex
  • Magnetic field By
  • Electromagnetic wave
  • traveling wave
  • time varying
  • perpendicular to each other and the direction of propagation: z
  • position z
  • time t
  • propagation constant, wave number k (2*pi/lambda)
  • wavelength lambda
  • angular frequency omega
  • wave amplitude E0
  • Phase constant phi0
  • Argument (omega*t – k*z + phi0) => phase phi
  • Monochromatic plane wave
  • wavefront
  • Faraday’s law: time varying magnetic field results in time varying electric fields and vice versa
  • optical field
z = a+b\,\mathrm i \\ |z| = \sqrt{a^2 + b^2} \\ z = r \cdot \mathrm{e}^{\mathrm{i}\varphi} = r \cdot (\cos \varphi + \mathrm{i} \cdot \sin \varphi) \\ \phi = \omega t - k z + \phi_0 \\ a^{x+y}=a^x \cdot a^y \\ a^{x\cdot y}=(a^{x})^{y} \\ {\displaystyle a^{-x}={\frac {1}{a^{x}}}=\left({\frac {1}{a}}\right)^{x}} \\ {\displaystyle {\sqrt[{q}]{a^{p}}}=a^{\frac {p}{q}}}

Vulkan: Raytrace / Raytracing

Peter Shirley
Ray Tracing in One Weekend
Ray Tracing: The Next Week
Ray Tracing: The Rest of Your Life

  • eye / camera
  • image
  • 16:9 aspect ratio
  • viewport =
  • viewport’s aspect ratio == rendered image aspect ratio
  • viewport: 2 units in height
  • projection plane
  • projection point
  • distance between plane and point: 1 unit = focal length


difference between global operator and member operator


Ray-triangle intersection (PDF)
Fast Minimum Storage Ray-Triangle Intersection
How to get the intersection point? Ray Triangle Intersection C++
WebGL 2.0 : 044 : Ray to Triangle Intersection

Depends on, stb single-file public domain libraries for C/C++

OpenGL Frameworks

OpenGL Loading Library
An OpenGL Loading Library is a library that loads pointers to OpenGL functions at runtime, core as well as extensions. This is required to access functions from OpenGL versions above 1.1 on most platforms.

  • GLEW (OpenGL Extension Wrangler)
  • GL3W
  • Galogen
  • glad (Multi-Language GL/GLES/EGL/GLX/WGL Loader-Generator)
  • Glatter
  • glsdk (Unofficial OpenGL SDK)
  • glbinding (C++)
  • libepoxy
  • GLee

GLFW, GLFW is an Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan development on the desktop
GLUT (GL Utility Toolkit)
What is the difference between FreeGLUT vs GLFW?


WGSL, WebGPU Shading Language




The OpenGL Utility Toolkit (GLUT) Programming Interface API Version 3
7 Callback Registration

Scratchapixel 2.0

Learn Computer Graphics From Scratch!
The Perspective and Orthographic Projection Matrix
Ray Tracing: Rendering a Triangle – Why Are Triangles Useful?
Ray Tracing: Rendering a Triangle – Ray-Triangle Intersection: Geometric Solution
A Minimal Ray-Tracer: Rendering Simple Shapes – Ray-Sphere Intersection
Rasterization: a Practical Implementation

  • The Rasterization Algorithm
  • Optimizing: 2D Triangles Bounding Box
  • When Two Triangles Overlap the Same Pixel: The Depth Buffer (or Z-Buffer)

Chapter 1: Getting Started

Nikita Voloboev

Ray Tracing – Links

Canvas + WebGL

How to render 3D in 2D canvas


HTML Canvas Graphics
HTML Canvas Reference

MDN Web Docs

Einführung in WebGL
Canvas tutorial


Evaluating Different Spatial Anti Aliasing Techniques


Kantenglättung Anti-Aliasing erklärt – Guide: Wie funktionieren MSAA, TXAA und Co.?
Best Anti-Aliasing | Different Techniques to Get Clear Images
What is Anti-Aliasing: A definitive guide
PC Graphics Settings Explained: MLAA vs MSAA vs FXAA vs TAA vs SMAA

RayTracingInVulkan, Implementation of Peter Shirley’s Ray Tracing In One Weekend book using Vulkan and NVIDIA’s RTX extension.

nvpro-samples, Denoising a Vulkan ray traced image using OptiX denoiser, Ray tracing glTF scene with Vulkan, Vulkan ray tracing examples and tutorials using VK_NV_ray_tracing

Vulkan Tutorial

Vulkan Tutorial



FlyCube, Graphics API wrapper is written in C++ on top of Directx 12 and Vulkan. Provides main features including ray tracing.

Research Unit of Computer Graphics | TU Wien, Powerful low-level C++20 rendering framework for Vulkan 1.2, including Real-Time Ray Tracing (RTX) support, built atop Auto-Vk., Low-level convenience and productivity layer atop Vulkan-Hpp

Window System Integration (WSI)

Qt Graphics
Introducing the Vulkan WSI Layer (PDF)

NamePointer / carl-vbn
Making a 3D Gravity Simulator with OpenGL (Part 1)
Adding Camera movement and User Interface to my 3D Gravity Simulator
LinkedIn: Carl von Bonin

Daniel Elwell / frozein

The First 3 Months Developing My VOXEL RAYTRACING Engine

Dr. Anton Gerdelan

Anton’s OpenGL 4 Tutorials

Foundations of Game Engine Development

Foundations of Game Engine Development
Foundations of Game Engine Development: Figures


Brendan Galea

Vulkan (c++) Game Engine Tutorials

Vulkan vs. OpenGL

GDC 2018 – Getting explicit: How Hard is Vulkan really?
What Is Vulkan & Why Should Gamers CARE?
DirectX 12 & Vulkan as Fast As Possible
DCS: What is Vulkan API?
Vulkan vs OpenGL | Getting into Computer Graphics | OpenGL CUDA Interop | Cuda Education
What is Vulkan?
Should you learn Vulkan(C++)? Can beginners learn it?
Vulkan Tutorials [Deutsch]


OpenGL vs Vulkan
Open GL (Default) VS Open GL (Skia) VS Vulkan (Skia) Antutu Benchmark

Window System Integration (WSI)

XDC 2019 | Introducing the Vulkan WSI Layer – Rosen Zhelev


Intro To Modern OpenGL Tutorial (2014)

Game Dev Academy

What is a Graphics Pipeline? Featuring DirectX 11
hat is a Shader? | Pixel and Vertex Shaders


What Are Shaders?
Writing a Shader in OpenGL
How Shaders Work in OpenGL
Vertex and Fragment Shaders – Interactive 3D Graphics
What Is A Shader? UE4 Materials 101 – Episode 1
1. What is a shader? What is GLSL? Why are they useful in games – Shader Course
Shaders 101 – Intro to Shaders
Shader Basics, Blending & Textures • Shaders for Game Devs [Part 1] (Unity)


Computer Graphics 2.7: Aliasing and Anti aliasing Techniques
Antialiasing – Interactive 3D Graphics


Fun With WebGL 2.0
WebGL 2.0 : 044 : Ray to Triangle Intersection

RuhrJS Conference

RuhrJS 2018 – Martin Splitt – Creative experiments with WebGL shaders in JavaScript


Intro To Modern OpenGL Tutorial (Playlist)


Building Collision Simulations: An Introduction to Computer Graphics

The Cherno

OpenGL (Playlist), last update 2020
Welcome to OpenGL
Vertex Buffers and Drawing a Triangle in OpenGL
ImGui in OpenGL

OpenGL Course – Create 3D and 2D Graphics With C++

Joshua Shucker

Planet Vulkan (Playlist)
Episode 7.5 – Graphics Pipeline Overview


I created my own Ray Tracing Engine from scratch

NVIDIA Developer

Arun Ravindran ArunRocks

Building a Ray Tracer in Python – Part 1 (Points in 3D Space)

First Principles of Computer Vision

Radiometry and Reflectance | Photometric Stereo | Shape from Shading (Playlist)

Introduction to OpenGLES and GLSL programming
NOT in this talk:

  • Clipping
  • Vendor Extensions
  • Geometry Shaders
  • Lightning
  • Stencils
  • Framebuffer Objects
  • Culling
  • Framerate
  • Tesselation Shaders
  • Quaternions
  • Shading
  • Blending


  • API for rendering 2D and 3D Computer Graphics
  • Developed by SGI in 1992
  • Open Standard, now maintained by Khronos Group consortium
  • Used in CAD, Games, VR/AR, etc…


  • OpenGL for Embedded Systems
  • Implementations by nvidia, AMD, etc.
  • Available on Windows, MacOSX, Linux, iOS, Android, etc.
  • Bindings for C, C++, Java, C#, Python, Ruby, Go, etc.
  • Latest version OpenGL ES 3.2 (2019)
  • … but anything from OpenGL ES 2.0 onwards is cool!


  • Native Platform Interface
  • Creates & Configures OpenGL ES Context (view/window/fullscreen)
  • Your platform might come with something else (Mesa, WGL, CGL, GLX, etc.)


  • Describe our geomentry in world coordinates (3D)
  • Rasterizer projects it onto a projection plane (2D) => your screen
  • Geometry in projection plane are now called fragments
  • For each of the triangles, we figure out how we wan to color them
  • If we have a triangle on that surface with 3 colors, the rasterizer will interpolate the values between the colors (pixel by pixel)
  • Vertex- and Fragment-Shader go the projection and the texture mapping
  • When you render a scene, the vertex shader is responsible for taking all your geometry and transforms/moves/scales it. Then it’s passed to the Rasterizer stage that does the real projection, figuring out which vertices end up on the 2D surface (plane) => output: fragments.

GLSL Shader Language

  • C-like syntax
  • Vector and Matrix types (float, vec2, vec3, vec4, mat4, etc.)
  • Built-in math functions (sin, cos, exp, sqrt, dot, cross, etc.)
  • No recursion
  • Limited loops

Vertex Shader

  • Runs once for each vertex of each triangle of the geometry
  • Get per-vertex input from attribute
  • Global parameters: get parameters from uniform: projection from camera
  • Pass output to fragment shader in varying
  • Pass position vector to rasierizer pipeline in gl_Position (magic variable)

Fragment Shader

  • Runs once for each fragment of each rasterized triangle
  • Sets the final color for each fragment
  • Get per-vertex input from varying
  • Get parameters from uniform: get texture data from uniform sample2D
  • Pass color vector to fragment pipeline in gl_FragColor


  • Vectors describe coordinates
  • Matrices describe transformations

Vector Operations

  • Scalar Multiplication / dot-product: alpha = acos(dot(u,v))
  • Vector Multiplication / cross-product: n = cross(u,v)

Transformation Matrices

  • Translate
  • Rotate
  • Scale

Projection Matrix (perspective vs. orthographic)

Matrix Operations

  • Multiplication of a vector with a matrix: transformed vector
  • Multiplication of a matric with a matrix: chained transformation, Raspberry PI OpenGL Epics Toolkit
Experimental Physics and
Industrial Control System, EPICS Home at Argonne

EPICS – Experimental Physics and Industrial Control System


OpenGL with C++ (Playlist)
Vulkan with C++ (Playlist)
OpenGL with Python (Playlist)
OpenGL with Python – Vertex Buffer Objects and Vertex Array Objects

OGLdev – Modern OpenGL Tutorials

OGLdev – Modern OpenGL Tutorials

  • World Coordinate System
  • Local Coordinate System
  • Object Coordinate System
  • Object Space
  • View Transformation
  • Camera Transformation
  • Eye Transformation
  • Camera Coordinate System
  • View Coordinate System
  • Camera Space
  • View Space
  • Eye Space
  • Perspective Projection
  • Perspective Projection Matrix
  • = Clip Coordinate System
  • = Clip Space
  • Perspective Division
  • Range -1 ro +1 on all axes
  • = Normalized Device Coordinates (NDC)
  • Viewport Transformation
  • = Window coordinates (ex. 1920 x 1080)
  • Multiply all matrices to a single matrix
  • = WVP / MVP
  • UVN camera
  • Location / Position (x, y, z)
  • Orientation in UVN axis system
  • N vector = eye to world
  • V vector = up-vector/li>
  • U vector = right-vector/li>

David Parker (2011 – 2013)

OpenGL Screencasts and Tutorials


How to Code Minecraft (GLFW & Glad)

Dustin Biser

Quaternion Camera Demo – (C++, OpenGL)
Shadow Mapping Demo
GPU Smoke Simulations


LinkedIn Dustin Biser (Arcball)

Victor Gordan

OpenGL Tutorials, 13.08.2021 (Playlist)


LinkedIn Victor Gordan

Michael Grieco

C++ OpenGL Tutorial (Playlist)
2D Pong (C++ OpenGL) (Playlist)

LinkedIn Michael Grieco

Thomas Sheppard (Galway-Mayo Institute of Technology, Ireland)

Introduction to perspective projection

Build Succeeded (Direct2D)

C++ Win32 Direct2D



Math for Game Developers: Perspective Projection Matrix


Projection in Computer Graphics



How to make a 3D projection in Python | Rendering a cube in 2D! (No OpenGL)



Parallelizing GPU-intensive Workloads via Multi-Queue Operations using Kompute & Vulkan


GPU computing in Vulkan, The ultimate way to parallel computing using Vulkan API.
Learn the Vulkan API with C++, Learn the fundamentals of the popular Vulkan API for modern graphics rendering using C++!

Learn OpenGL

Advanced Lightning

Normal Mapping

TBN matrix

  • Tangent,
  • Bitangent and
  • Normal vector


GLEW linking

1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol __imp__glewGetErrorString@4
1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol __imp__glewInit@0
1>C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe : fatal error LNK1120: 2 unresolved externals

1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol _glewGetErrorString@4
1>OpenGLBook_Chapter1.obj : error LNK2001: unresolved external symbol _glewInit@0
1>C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe : fatal error LNK1120: 2 unresolved externals

>dumpbin -headers glew-2.1.0\lib\Release\Win32\glew32.lib | findstr /c:"  Symbol name  : _glewInit"
  Symbol name  : _glewInit@0

Tools for inspecting .lib files?
Problems with glew library and glewinit() function
About the use of glew library (unresolved external symbol __imp__glewInit @ 0)
Glew in VS 2010: unresolved external symbol __imp__glewInit
OpenGL: How to compile glew32.dll from source file

Build started...
1>------ Build started: Project: FreeGLUT_example2, Configuration: Release Win32 ------
1>Generating code
1>Previous IPDB not found, fall back to full compilation.
1>All 16 functions were compiled because no usable IPDB/IOBJ from previous compilation was found.
1>Finished generating code
1>FreeGLUT_example2.vcxproj -> C:\Users\bacr\source\repos\FreeGLUT_example2\Release\FreeGLUT_example2.exe
1>        1 Datei(en) kopiert.
1>        1 Datei(en) kopiert.
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========



io7m-r1 0.10.0 Documentation
Normal Mapping


com.io7m.r2 0.3.0-SNAPSHOT Documentation, Aggressively minimalist deferred renderer


Framebuffer Object (FBO)
Vertex Buffer Object (VBO)
Immediate Mode
Retained Mode
Z-Buffering (auch Depth Buffering, Tiefenpuffer)
Rasterung von Polygonen

Microsoft Docs

Retained Mode Versus Immediate Mode

OpenGL Documentation


gluPerspective — set up a perspective projection matrix
gluLookAt — define a viewing transformation


docs.GL (only OpenGL, no utility functions!)


OpenGL Programming/Modern OpenGL Tutorial Arcball
How to implement a simple Arcball Camera
Arcball Controller
User controlled rotation with arcBall
arcball controls with Qt, and OpenGL

Mario Konrad

OpenGL: Tutorial 8 – ArcBall
Tutorial: OpenGL



C# vs. OpenGL (Tao.Framework) – Arcball Rotation with zoom and pan
OpenGL Arcball Test
Arcball Test in C++ and OpenGL with a custom math library

Focal length

FocalLength to Fov formula in OpenGl
How to set focal length in OpenGL^_^
is focal length equal to the distance from the optical center to the near clipping plane- openGL
P2 vs projection plane

Notebook Vergleich


EliteBook 850 G8


Fujitsu LIFEBOOK U7511 i5 16/512GB NB
Lenovo ThinkPad T15 i5 16/256 GB
HP EliteBook 850 G8 i5 16/512 GB


Dell Preci 3561/i9-11950H/16GB/512GB
Lenovo ThinkPad P15s Gen 2


Notebook ThinkPad P15s Gen. 2 (Intel) LTE
Notebook ThinkPad P15s Gen. 2 (Intel)
ThinkPad P1 Gen 3

EliteBook 840 G8 358R5EA
Notebook Latitude 9420-1R1VD
Notebook Latitude 5420-FXD04


Lenovo ThinkPad P15s G2 i7 16/512GB Top
Lenovo ThinkPad P15s G2 i7 1TB 4K Top


DELL Latitude 7420 14″
Lenovo ThinkPad T14s 14″

DCM900 Digital Camera for Microscope

OpenCV Enumerate Cameras

C++ OpenCV 2.4.11: List all cameras
Add API to enumerate cameras #4269

VLC DirectShow

Python DirectShow
Capturing Images from Camera using Python and DirectShow

List Capture Devices for Python OpenCV on Windows


What ctypes types to use with WORD and DWORD definitions

Python OpenCV

import numpy as np
import cv2

def show_pic():

    i: int = 0

    while True:
        cap = cv2.VideoCapture(i)

        if not cap.isOpened():
            print(f"Cannot open camera {i}")

            while True:
                ret, frame =

                if not ret:
                    print(f"Can't receive frame (stream end?) from camera {i}. Exiting ...")
                    print(f"Frame receive from camera {i}")

        i += 1

        if i > 20:

if __name__ == '__main__':

Cannot open camera 0
Cannot open camera 1
Cannot open camera 2
Cannot open camera 3
Cannot open camera 4
Cannot open camera 5
Cannot open camera 6
Cannot open camera 7
Cannot open camera 8
Frame receive from camera 9
Cannot open camera 10
Cannot open camera 11
Cannot open camera 12
Cannot open camera 13
Frame receive from camera 14
Cannot open camera 15
Cannot open camera 16
Cannot open camera 17
Cannot open camera 18
Cannot open camera 19
Cannot open camera 20
  0: 'ScopeTek DCM130BW',
  1: 'ScopeTek DCM130E',
  2: 'ScopeTek DCM200',
  3: 'ScopeTek DCM310', 
  4: 'ScopeTek DCM35E',
  5: 'ScopeTek DCM500',
  6: 'ScopeTek DCM500BW',
  7: 'ScopeTek DCM510',
  8: 'ScopeTek DCM800',
  9: 'ScopeTek DCM900',
 10: 'ScopeTek MDC140BW',
 11: 'ScopeTek MDC200',
 12: 'ScopeTek MDC320',
 13: 'ScopeTek MDC560',
 14: 'OBS Virtual Camera'


idVendor=0547 idProduct=4d90

0547  Anchor Chips, Inc.
	4d90  AmScope MD1900 camera

AmScope/TopuTek/ScopeTek does provide libusb drivers though, so you could make a custom application.


python v4l2 webcam capture test
Linux Video4Linux2 API (v4l2)
How to get a list of video capture devices (web cameras) on linux ( ubuntu )? (C/C++)
How to Capture Frames from Camera with OpenCV in Python


conda install -c conda-forge keyboard


Camera Module Introduction

Installation of pygame with Anaconda

Conda Support for 1.9.6 and 2.0.0.dev10 #1953

python -m pip install -U pygame --user
python -m pip uninstall pygame