0. Getting started (a Processing frame for 2D and 3D rendering)Files to download todayHere is the file to download (and extract to the /src folder of your Eclipse project):
For the computation and drawing of 2D curves:
For the computation and rendering of surfaces:
Java documentation
Here is the javaDoc
concerning the packages and classes used today: |
class drawCurve |
class drawSurface |
|
Class DrawCurve provides
simple methods for drawing (points and segments),
and handling mouse events (for
adding/moving/deleting points). Method setup() allows to select the preferred implementation of B-splines curves. public void setup() { |
Class DrawSurface
provides simple methods for drawing surfaces in a
3D frame (using quad strips); it also provides a
simple trackball (allowing to rotate the 3D scene
with mouse events). Method setup() allows to select the preferred implementation of the surface. public void setup() { |
0 drawing surfaces with Processing: getting started
Class DrawSurface allows to render a a
surface in a 3D frame. You can choose your favourite
implementation (of a parametric surface), by removing/adding
comments in the method setup(). |
Example: 3D rendering of an hyperbolic paraboloid of equations y=zu The rendering is performed by Processing, using quad strips |
You can also use the tensor product (compute
separetely two curves) |
|
1.2 Bézier patches (tensor product surfaces)
You can apply directly the De Casteljau algorithm: where initial points are: |
2.1 Cubic B-Splines
Given a set of n points, we want to implement
the cubic B-splines,
with uniform knot vector [1, 2, 3, ...]. |
2.2 General B-Splines
Given a set of n points, we want to implement
the degree k B-splines (k between 2
and n), with uniform knot vector
[1, 2, 3, ...]. |
Implement the computation
of a Nurbs surface.3.1 Again on Tensor product surfacesRe-use previous exercice 2 in order to design two plane curves (coordinates are computed in 2D), and then use the tensor product to compute the resulting surface
|
Example: computation of a Nurbs surface. Points are taken on a regular grid in the xz plane. Heights are choosen at random. |
Two point clouds corresponding to a sphere |
Point clouds corresponding to cylinder |
Files to download for this section
Remark (important):
please create a new Java project (e.g. TD3b) for this section, in order
to avoid conflicts with the files used in the previous section.Here are some files to download (and extract to the main folder of your Eclipse project):
Libraries to add (project /LIB):
For the implementation of ICP:
TD6 documentation: instructions
|
Suggestion: in order to implement
ICP, we suggest to you to follow the explanation given in this paper
(section 3.1).
Initial point clouds | after 1 iteration | after 3 iterations | after 5 iterations |
1.1 Rigid transformation for corresponded point clouds
|
|
1.2 implement ICP
Now we want to solve the problem above (computing a rigid
transformation), for two point clouds whose points are not
matched. |