CG course

Damien Lejosne

2026 - 01 - 26

Lesson 1 - Motion Planning

Objective

Application

Piano Mover Problem : Given an environment with obstacles and a piano, is it possible to move the piano from a point \(A\) to a point \(B\).

Extensions : moving obstacles, objects, multiple robots, deformable robots, partial knowledge, sensing uncertainty, contraintes non holonomiques, optimisation, …

Approaches

Evalutation criteria

Definitions

A configuration specifies the position of all points of a mechanical system in relation to a given coordinate system. Expressed using a vector in generalized coordinates.

A path is a continuous sequence of configurations.

A trajectory is a path with parametrisation of the time.

RQ : thus we can do various kind of planning : motion, path, trajectory…

(state : pos + velocity at a time, motion : change of state).

Exact approaches

Visibility graph

A visibility graph for a set of polygonal (convex) obstacles is the set of unblocked lines between the vertices of the obstacles + \(q_s\) and \(q_f\).

Thus :

Limitations : Difficult for d > 2, object = points (minkowsky distances to mitigate), Computationally exensive with lot of vertices (naive : \(O(n^3)\), efficient (sweep line) \(O(n^2 log(n))\)).

Ref : CGAL (computational geometry library).

Voronoy Diagram

Given a set of points \(P\), we partitionate the space using the following metric : a point \(p\) in the space is of class \(i\) if its closests neighbough in \(P\) is \(P_i\).

The points on the edges of the voronoy diagram are the furthest from the obstacles.

\(\rightarrow\) Idea : Construct a path between \(q_s\) and \(q_f\) following the edges of the voronoi diagram.

RQ : We can reduce the length of the path by smoothing.

Limitation :

Sampling approaches

Approximate cell decomposition

Define a discrete grid of the \(C-space\), and mark any cell of the grid colliding with an obstacle

Limitations :

Exact cell decomposition

TODO

Limitation : Slow in practice (high dimensionality)

Potential field

Idea :

But : Potential well (local minima) \(\rightarrow\) very difficult to tune / use of stochastic algorithm

High dimension C Space

Multy query : solved using preliminary C-space exploration (\(\rightarrow\) preprocess once).

Probabilistic Roadmap Method (PRM)

Probabilistic Roadmap Method (PRM)

Learning :

It uses an iterative algorithm :

  1. Compute random conf
  2. Connect configuration if possible
  3. Loop

Query :

  1. Connect initial & final conf
  2. If the nodes belong to the same connected component, a solution exists
  3. Graph shortest path

But : No optimality, no completeness (however proba comp). However, works well in practice, even though not for every pb (narrow passages).

OBPRM : Modifies PRM the following way :

If a point is in collision :

One can also improves things by using a nice sampling strategy :

Visbility PRM :

Take point outside of visibility.

When the whole space is covered, connect all points using points in zones of common visibility.

Rapid exploring Random Trees (RRT)

Single query : solved without preliminary C-space exploration.

RRT Construction idea :

Double RRT : Construct two RRT in parallel from \(q_i\) and \(q_f\) and connect them.

Biblio

Extensions

Dynamic environment : Motion Predictive Planning (MPC).

Lesson 2 : Shaders

A shader (in this case, a pixel shader) is a code executed by the GPU on each pixel of an image (for instance, the screen texture).

Bases du raytracing : CF TIPE.

Qu’est ce que le rendu ?

À partir de primitives, afficher une image.

Il y a plusieurs types de rendus :

Ici : on va faire de la rasterisation, et utiliser OpenGL

Étapes du rendu (en italique : partie non programmable) :

On appelle BRDF (Bidirectional Reflectance and Diffusion Function) une fonction qui définit la manière dont la lumière est réfléchie sur une surface opaque.

Exemples :

MAIN WEBPAGE