File:Regression circulaire coope arc de cercle.svg
Original file (SVG file, nominally 442 × 363 pixels, file size: 20 KB)
Captions
Summary[edit]
DescriptionRegression circulaire coope arc de cercle.svg |
English: Circle fitting, the points describing only an arc. Kåsa and Coope linear algorithm (method of the algebraic distance). The real values are:
Français : Régression circulaire sur des points ne décrivant qu'un arc. Algorithme linéaire de Kåsa et Coope (méthode de la distance algébrique). Les valeurs réelles sont :
|
Date | |
Source | Own work |
Author | Cdang (Christophe Dang Ngoc Chan) |
Scilab source
This media was created with Scilab, a free open-source software. Here is a listing of the Scilab source used to create this file. |
Crée les données et les enregistre dans le fichier arc_cercle_bruite.txt
.
// **********
// Initialisation
// **********
clear;
chdir('monchemin/');
// **********
// Constantes
// **********
// paramètres de l'arc de cercle
centre=[1;1];
rayon = 4;
angle = %pi/3:0.1:2*%pi/3;
// paramètres du bruit
var = 0.05;
// **********
// Programme principal
// **********
// génération des données
ligne_rayon_bruite = rayon + var*rand(angle,'norm');
foo = [cos(angle);sin(angle)].* ...
[ligne_rayon_bruite;ligne_rayon_bruite];
arc_cercle_bruite(1,:) = centre(1) + foo(1,:);
arc_cercle_bruite(2,:) = centre(2) + foo(2,:);
clf
plot(arc_cercle_bruite(1,:), arc_cercle_bruite(2,:), '+')
write('arc_cercle_bruite.txt', arc_cercle_bruite')
Lit les données de arc_cercle_bruite.txt
et effectue la régression circulaire.
// **********
// Initialisation
// **********
clear;
chdir('monchemin/')
// **********
// fonctions
// **********
// régression circulaire linéaire
function [C, r, R]=regression_circulaire(X, Y)
// X, Y : points expérimentaux (vecteurs ligne)
// C : coordonnées du centre du cercle (vecteur)
// r : rayon du cercle (scalaire)
A = [X ; Y];
d = X.^2 + Y.^2;
// xetoile = 2*xcentre
// yetoile = 2*ycentre
// zetoile = r^2 - (xcentre^2 + ycentre^2)
[xyetoile, zetoile, sigma] = reglin(A, d);
C = 0.5*xyetoile;
r = sqrt(zetoile + C(1)^2 + C(2)^2);
// A'\d' si l'on ne s'intéresse pas à l'écart
R = sigma;
endfunction
// **********
// programme principal
// **********
// lecture des données
// Xdef, Ydef : vecteurs ligne
donnees = read('arc_cercle_bruite.txt', -1, 2)';
Xdef = donnees(1,:);
Ydef = donnees(2,:);
// regression
[centre, rayon, ecart] = regression_circulaire(Xdef, Ydef)
// tracé
clf;
// points
plot2d(Xdef, Ydef, style = -1) //, frameflag=4)
isoview(-2, 4, 1, 6);
xstring(-1.5, 5.5, 'C('+string(centre(1))+' ; '+string(centre(2))+') ; r = '+string(rayon))
// modèle
plot(centre(1), centre(2), 'r+')
diametre = 2*rayon;
xarc(centre(1) - rayon, centre(2) + rayon,...
diametre, diametre,...
0, 360*64)
a = get('hdl'); // ellipse
a.foreground = 5; // couleur
print(%io(2), centre)
print(%io(2), rayon)
print(%io(2), ecart)
Licensing[edit]
This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication. | |
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.
http://creativecommons.org/publicdomain/zero/1.0/deed.enCC0Creative Commons Zero, Public Domain Dedicationfalsefalse |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 15:51, 7 December 2012 | 442 × 363 (20 KB) | Cdang (talk | contribs) | {{Information |Description ={{en|1=Circle fitting, the points describing only a bow. Coope linear algorithm. The real values are: * C(1 ; 1); * ''r'' = 4. Created with Scilab, modified with Inkscape.}} {{fr|1=Régression circulaire sur des points d ... |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on en.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on ru.wikipedia.org
Metadata
This file contains additional information such as Exif metadata which may have been added by the digital camera, scanner, or software program used to create or digitize it. If the file has been modified from its original state, some details such as the timestamp may not fully reflect those of the original file. The timestamp is only as accurate as the clock in the camera, and it may be completely wrong.
Short title | Régression circulaire |
---|---|
Image title | Creator: GL2PS 1.3.2, (C) 1999-2006 Christophe Geuzaine (geuz@geuz.org)
For: Scilab CreationDate: Fri Dec 07 16:38:40 2012 |
Width | 441.95117 |
Height | 363.31445 |