Innovation ?

L’homme n’atteindra jamais la Lune, en dépit de toutes les futures avancées de la science. — Dr Lee de Forrest, un des inventeurs de la radio, 1957

Pro-G

Accélérateur d’Innovation

Pro-G theme for Wordpress

9 juin 2008 par Philippe Guglielmetti

The theme used on this website is made freely available, provided that you keep a link to pro-g.ch with a “Pro-G” text on each page (as in the footer)

Download: Pro-G (98) – 56.96 KB

History:

Dans graphisme, web 2.0 | Pas de commentaire »

Strenght of a spaghetti bridge.

3 juin 2008 par Philippe Guglielmetti

Spaghetti Bridges help students to understand materials and structures resistance with fun and at low cost. Richard Williams from Las Vegas, Nevada designed the “Barilla Fettucini Bridge ” with SolidWorks, and we calculated its strenght with CosmosWorks.

Dry pasta material data can be found in [1] :

  • density : 1.5 kg/dm³
  • Young modulus 3600 N/mm²
  • elasticity and yield limit : 16.778 N/mm²

Using CosmosWorks, we made a statics study of the bridge under a load of 10N (~1Kg) on 0.1m x 0.1m square placed on the center of the deck, and obtained the safety factor which gives the maximal load of the bridge as well as the location of maximal stresses, which indicates the points to reinforce

Référence:

  1. Luis Alberto Segovia González, Inácio Benvegnu Morsch, João Ricardo Masuero, “Didactic Games in Engineering Teaching – Case : Spaghetti Bridges and Building Contest “, 2005, Proceedings of COBEM 2005 18th International Congress of Mechanical Engineering

Dans FEA | Comments Off

Processing WordPress plugin.

14 avril 2008 par Philippe Guglielmetti

This addin enables integration of Processing applets in a Wordpress website/blog.

Installation and usage:

  1. Download wp-processing (127) – 1.46 KB , unzip and and upload the full wp-processing folder to your server it in folder wp-content/plugins
  2. Activate the “Processing” plugin in WordPress admin console
  3. Copy your Processing content on sur votre serveur in a folder named /processing, preserving the file structure used by Processing’s IDE. While looking for application “AppName”, the plugin will search for file “/processing/AppName/applet/AppName.jar”
  4. Insert a Processing applet in a page or article by using the following syntax : [ processing=AppName ]

History:

  • 2008/04/13 0.1 alpha

ToDo / A Faire:

  • paramètres pour taille et path

Dans graphisme, programmation, web 2.0 | Pas de commentaire »

Spiral Galaxy with Processing

4 avril 2008 par Philippe Guglielmetti

Usage:

  • press [up] and [left] cursor keys to alter the ellipses ratio
  • press [left] and [right] cursor keys to alter the ellipses tilt angle

This browser does not have a Java Plug-in.
Get the latest Java Plug-in here.

Source code: Galaxy

Built with Processing

Dans physique, temps réel | Pas de commentaire »

GLua library.

21 mars 2008 par Philippe Guglielmetti

GLua is an open source library which provides LUA programmers with classes and functions that mimic those available in GLSL, the OpenGL Shading Language.

GLua was especially designed as a base library for the Demoniak3D real-time engine, as it provides a consistent framework with GLSL shaders.
Lire la suite »

Dans 3D, programmation | Comments Off

GLua library

20 mars 2008 par Philippe Guglielmetti

Contents:

  • vec3.lua : 3D vectors and arithmetic
  • mat3.lua : 3D matrix and arithmetic
  • vec4.lua : 4D vectors and arithmetic
  • glsl.lua : generic functions following glsl prototypes as defined in book “OpenGL Shading Language” by Randi J. Rost
  • test.X.lua : unit test of module X

Usage & Samples:

Usage of the classes and functions is pretty straightforward.

Check the test.X.lua modules for more details or examples

Download:

GLua is available on http://luaforge.net/projects/glua/ under LGPL licence.

Implementation details:

  • the classes are based on class.lua, described on http://lua-users.org/wiki/SimpleLuaClasses
  • glsl.lua offers generic function that work on LUA numbers and tables, and therefore all vector / matrix classes. It makes extensive use of functional programming to achieve this:
    • the “apply” function is defined as follows:
      --- applies a function to a table of parameters
      -- @param f : function to apply to each element in v
      -- @param v : (vector of) parameter(s) to f function
      -- @return : (vector of) result(s) of f(v)
      function apply(f,v)
      if type(v)=="number" then return f(v) end
      if type(v)=="table" then
      local res={}
      for i,x in ipairs(v) do res[i]=f(x) end
      return res
      end
      error("apply "..f.."("..type(v)..") not implemented")
      end
    • then, functions can easily be defined to support numbers, vectors, or matrices:
      function sin(rad)
      return apply(math.sin,rad)
      end
  • dot product is implemented in 2 different ways :
    • through the “power” ^ operator in classes
    • as a generic dot(p1,p2) function in glsl.lua

Dans 3D, programmation | Pas de commentaire »

LabView

5 mars 2008 par Philippe Guglielmetti

New post in english.

Dans commande, instrumentation, programmation, simulation, temps réel | Pas de commentaire »

New title in english.

3 avril 2007 par Philippe Guglielmetti

Le TGV a battu aujourd’hui son propre record de vitesse en atteignant presque 575 km/h, juste un peu moins que le Maglev japonais à sustentation magnétique (581 km/h). A la vitesse de 575 km/h, soit 160 m/s, une roue de 920 mm (pesant dans les 600 kg) fait 55 tours par seconde (!). Peut-elle tourner encore plus vite ? Lire la suite »

Dans FEA, mécanique | Comments Off

DicoLib

14 septembre 2005 par Philippe Guglielmetti

New post in english.

Dans programmation | Pas de commentaire »

[english]Shortest Path Problem.[/english]

1 septembre 2003 par Philippe Guglielmetti

[english]This page shows how to solve a common problem in geometry, with applications in CAD/CAM : How to find the shortest path going through a set of points ?

History

It all started form a “challenge” posted by Cliff Huprich on alt.machines.cnc newsgroup: find the shortest path going through 400 random X/Y points. Some people tried to solve the problem with existing (expensive) tools or simple heuristics.

We took the challenge by considering the problem as a general operations research problem, made some web searches and proposed to use a “Travelling Salesman” approach in some posts summarized below:

This is known as the “travelling salesman” problem.
see http://www.ing.unlp.edu.ar/cetad/mos/TSPBIB_home.html for a complete reference.
What you need is a program that would “sort” your list of points along the shortest path.

Made some more research on the “travelling salesman” problem (TSP) that
reminded me good old times at university…

Basically, TSP is a “NP-complete” (even “NP_hard”) problem, which means the absolute optimum path can only be found by trying all possible paths, which results in exponential complexity :  if it takes a time T to solve for N points, it will take N*T to solve for N+1 points. On a powerful PC, if you have more than about 100 points, forget it!

Luckily, there are several approximate methods and algorithms around. See http://w1.859.telia.com/~u85905224/tsp/TSP.htm for very nice, animated web-based solvers that illustrate the most common methods.

The efficiency of the various approximate methods depends on how the points are distributed : they work faster on points that are grouped in clusters or spread along a curve compared to random points.

http://www.math.princeton.edu/tsp/concorde.html is apparently the most efficient code available (check their “benchmarks” link ) but it still takes 7 mins for 1000 points, one hour for 1300, and days for 2000…
So to solve your problem, the first question is : do you accept sub-optimal solutions ?
The second is : how many points do you have ?
And the third : how are they spread in space ? (please send me a sample by e-mail)

I could compile concorde on Windows and it works pretty well in 2D now, about 5 secs for 1000 points on my dual AMD 1800.
Will modify it for 3D and ask Princeton if they allow me to release the executable
for free, because their license restricts use to academic research.

The “travelling salesman problem” (TSP) in general considers a “cost” for each pair of points (cities).
all you have to provide to the algorithm is simply this cost function.
If the function gives the (euclidian) distance between the points, it will solve the problem discussed here.
In the case where you have highway or routes, you assign them for example the travel time as cost (and even give different costs to the A->B and B->A route), and infinite (or very large) cost to pairs that have no direct route between them, which actually speeds the algorithm considerably up by limiting the search width. This is why TSP algorithms are tested/benchmarked precisely on “symmetric euclidian” problems like the one we have here.

As you see, the TSP approach is very powerful, but I still have a difficulty with the problem posed here as TSP solvers give the shortest *closed* path through all points. For an open path with a given start point, there should be a simple thing to do but I’m not sure which…

Links:

  1. http://www.ing.unlp.edu.ar/cetad/mos/TSPBIB_home.html everything on Travelling Salesman Problem (TSP)
  2. http://w1.859.telia.com/~u85905224/tsp/TSP.htm very nice, animated web-based solvers that illustrate the most common methods.
  3. http://www.math.princeton.edu/tsp/concorde.html concorde solver
  4. Kenneth Castelino Roshan D’Souza and Paul K. Wright “Tool-path Optimization for Minimizing Airtime during Machining” http://kingkong.me.berkeley.edu/~kenneth/research/pubs/airtime_minimization_joms.pdf

[/english]

Dans géométrie, informatique, optimisation, productique | Comments Off

« Entrées précédentes