• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
A graphic library and an application for simple curve manipolation
 

A graphic library and an application for simple curve manipolation

on

  • 801 views

The project consists in a software that uses a developed library in the Intermediate project to construct complex functionalities....

The project consists in a software that uses a developed library in the Intermediate project to construct complex functionalities.
The functional asked requisites are:
1. Load a picture in background.
2. Generate different kinds of curves using points generated by mouse:


a. Hermite Spline,
b. Bezier Spline,
c. BSpline,
d. Lagrange.
In this way we can isolate the perimeter of the previous loaded picture.


3. Move single points using the mouse drag property.
4. Select multi points and move them together.
5. Curves must be connected to each other.
6. Save the composition of curves in a file.
7. Load the composition of curves saved before.
8. Load a point file ad interpolate the points using the available curves. In this way we can observe the differences generated when same points are interpolated by different kind curves.
9. Change in real time the kind of curve that interpolates a set of points.

Statistics

Views

Total Views
801
Views on SlideShare
796
Embed Views
5

Actions

Likes
0
Downloads
1
Comments
0

1 Embed 5

http://www.graphitech.it 5

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    A graphic library and an application for simple curve manipolation A graphic library and an application for simple curve manipolation Presentation Transcript

    • Facoltà di Scienze Matematiche, Fisiche e Naturali
      Corso di Laurea Magistrale in Informatica
      Principles of Computer Graphics- Projects slides -
      Student: Umberto Di Staso 142685
      Professor: Raffaele de Amicis
      2009/2010
    • Context
      Study of the principles of Computer Graphics: basic knowledge,
      basic tools to develop computer graphics applications,
      mathematics in Computer Graphics
      Context and Objectives
      Objectives
      Create a set of softwares that includes the concepts that we have
      learned during the lessons.
    • Summary
      • JOGL
      • Intermediate Project
      • Paint
      • Panzer
      • Collision detection
      • Inclined Plane
      • Demo
      • Final Project
      • GUI
      • Demo
    • JOGL
      Java OpenGL (JOGL) is a wrapper library that
      allows Java programmers to use OpenGL
      features.
      JOGL makes possible the access to almost all
      the available features,
      to C programming language programmers.
      JOGL has achieved notable successes in the
      applications of Geo - Viewers .
      In fact, NASA World Wind project has been
      released with JOGL .
    • Intermediate Project
      Intermediate project consists in
      providing a set of functionalities (a
      java library) used to generate
      simple JOGL applications in
      which we use them.
    • Intermediate Project
      Functionalities are divided in six categories:
      Vectors: this category contains all the operations about vectors, like the sum between two of them, normalization, dot product, cross product and distance.
      Matrices: this category contains all the operations about matrices, like product between two matrices, determinant up 4x4 matrix, check and calculation of the inverse given a matrix.
      2D Geometry: this category contains all the operations about simple 2D geometry, like lines, squares, rectangles, triangles, polygons and circles.
      3D Polygon Generation: it is the same as the category before, but in three dimensional space.
      Curves: this category contains all the curves we have seen during the course, like Bezier, Hermite, Hermitesplines and B-Splines.
      Physics: this category contains some operations about physics.
    • Intermediate Project
      I have created three different applications (based on a single java library) in which I have used all the functionalities that I have implemented.
      Paint: the first application contains all about 2D geometry, 3D polygon generation and curves. Obviously to do this, I have used also vectors and matrices.
      Panzer: the second application contains some functionalities about physics.
      Inclined plane: the last application contains the physics functionalities that I have never used in the previous applications.
    • Paint
      As we can see, users can draw figures
      belonging to three macro categories:
      2D figures:
      Draw a simple line given 2 points.
      Draw a square given center and edge length.
      Draw an equilateral triangle given center and edge length.
      Draw a circle given 3 non-aligned points.
      Draw a polygon given center and number of edges, center and radius.
      Ability to center the figures.
      3D polygon:
      Draw a cube given center and edge length.
      Draw regular pyramid given edge length.
      Draw cone given radius and height.
      Draw sphere given radius and center.
      Curves:
      Draw Hermite given p0, p1 and the 2 vectors.
      Draw Bezier given 4 control points.
      Draw Hermitespline given a set of points and 2 vectors.
      Draw BSpline given a set of points and the degree.
    • Panzer
      Key points:
      Panzer: little tank designed using a tree structure: each element that composes the panzer is drawn around the root point. In this way, I can move the tank simply by using a translation of the root point.
      Bullet: little polygon with 8-16 edges.
      Trajectory: trajectory of the bullet. This particular kind of parabola is calculated using the formula of parabolic motion of projectiles.
      World: set of segments that composes the impact surface.
      Informations: words that explain the angle of the gun, initial speed of the bullet, range of the shoot and finally, the max height of the bullet.
    • Collision Detection
      The core of this application is, obviously, the
      algorithm that tells us when a bullet impacts on a
      surface. To understand properly how this
      algorithm works, is surely useful to look at the
      image on the right.
      As we can see, the bullet is basically a little
      polygon with 8-16 edges. The number of edges
      influences the precision of our collision detection.
      The algorithm works in this way:
      For each radius (in red) of the bullet it checks if one of these intersects a component of the impact surface (in green).
    • Inclined Plane
      The application consists in a simple inclined
      surface with a corpus on it. Using the “Spacebar”
      we release the object and we can see how the
      physics phenomenon called “uniform
      acceleration” (it depends on the gravitational
      acceleration and the angle of the inclined plane)
      brings changes on the motion of the corpus.
    • Demo
      Intermediate Project demo
    • Final Project
      The project consists in a software that uses the library developed in the
      Intermediate project to construct complex functionalities.
      The asked functionality requisites are:
      Load a picture in background.
      Generate different curves using points setted by the mouse.
      HermiteSpline,
      Bezier Spline,
      BSpline,
      Lagrange.
      In this way we can isolate the perimeter of the previous loaded picture.
      Move single points using the mouse drag property.
      Select multi points and move them together.
      Curves must be connected to each other.
      Save the composition of curves in a file.
      Load the composition of curves saved before.
      Load a point file ad interpolate the points using the available curves. In this way we can observe the differences generated when the same points are interpolated by different kind of curves
      Change in real time the kind of curve that interpolates a set of points.
    • Final Project - GUI
      As we can see in the image on the right,
      the software gives us a large set of choices
      used for different kinds of operations:
      Picture canvas
      Clear button
      Delete last point
      Move points
      Change curve
      Curve select
      Load image
      Load a blank image
      Restore default image:
      Load point file
      Load a curve
      Save curve
      Hide points over the screen
    • Demo
      Final Project demo
    • Questions