ಚಿತ್ರ:Von koch 6 etapes.svg

Page contents not supported in other languages.
ವಿಕಿಪೀಡಿಯದಿಂದ, ಇದು ಮುಕ್ತ ಹಾಗೂ ಸ್ವತಂತ್ರ ವಿಶ್ವಕೋಶ

ಮೂಲ ಕಡತ(SVG ಫೈಲು, ಸುಮಾರಾಗಿ ೬೦೦ × ೧೭೪ ಚಿತ್ರಬಿಂದುಗಳು, ಫೈಲಿನ ಗಾತ್ರ: ೨ KB)

ಸಾರಾಂಶ

ವಿವರ
English: von Koch snowflake curve after 6 steps (4,097 points); initially created with Scilab, transformed into SVG by pstoedit, layout by Inkscape. New version was created by a text editor.
Français : Courbe du flocon de neige de von Koch après 6 étapes (4,097 points) ; initialement créé avec Scilab, transformé en SVG avec pstoedit, mis en forme avec Inkscape. La nouvelle version a été faite avec un éditeur de texte.
ದಿನಾಂಕ
ಆಕರ ಸ್ವಂತ ಕೆಲಸ
ಕರ್ತೃ Christophe Dang Ngoc Chan (cdang)
ಅನುಮತಿ
(ಈ ಕಡತವನ್ನು ಮರುಬಳಕೆ ಮಾಡಲಾಗುತ್ತಿದೆ)
GFDL
ಇತರೆ ಆವೃತ್ತಿಗಳು Image:Von koch 1 etape.svg, Image:Von koch 2 etapes.svg, Image:Von koch 3 etapes.svg, Image:Von koch 4 etapes.svg, Image:Von koch 5 etapes.svg, Image:Von koch 6 etapes.svg, Image:VonKoch.svg
SVG genesis
InfoField
 
The SVG code is valid.
 
This map was created with a text editor.

Scilab source

English: English version by default.
Français : Version française, si les préférences de votre compte sont réglées (voir Special:Preferences).


Iterative source code

// ******************************
// *                            *
// * "Snowflake" von Koch curve *
// *                            *
// ******************************

clear;
clf;

// **************
// * constants *
// **************

n = 6;
// number of steps 
// limited to 9 (262 145 points), otherwise the stacksize must be changed
// 6 steps (4 097 points) are enough for a good rendering
N = 4^n+1; // amount of points
sin_soixante = sqrt(3)/2; // sin(60°)
l = 1; // length of the initial line (arbitrary unit)

// ******************
// * initialisation *
// ******************

ycourbe = [zeros(1,N)];
ycourbe1 = ycourbe;

// *************
// * functions *
// *************

function [xx, yy] = etape(x, y)
  
  // from a line [(x(1),y(1)) ; (x(2),y(2))]
  // make the line [(xx(1),yy(1)) ; (xx(2),yy(2)) ; (xx(3),yy(3))]
  // x and y are 2-cells tables, the ends of the basis line
  // xx and yy are 3-cells tables
  // the edges of the equilateral triangle
  
  xu = (x(2)-x(1))/3;
  yu = (y(2)-y(1))/3;
  // third of the basis line vector
  
  xv = 0.5*xu - sin_soixante*yu;
  yv = sin_soixante*xu + 0.5*yu;
  // vector turned by +60°
  
  xx(1) = x(1)+xu; yy(1) = y(1)+yu;
  xx(3) = x(2)-xu; yy(3) = y(2)-yu;
  
  xx(2) = xx(1) + xv;
  yy(2) = yy(1) + yv;  
endfunction

function [xkoch, ykoch] = vonkoch(x, y, n)
  // builds the curve
  // initialisation
  xkoch = x;
  ykoch = y;
  xkoch1 = x;
  ykoch1 = y;
  for i=1:n
    jmax = 4^(i-1);
    // number of lines at the beginning of the step i
    for j=1:jmax/2+1
      // we work with two points which indices are j and j+1 (line #j)
      // thanks t the symmetry, we work with a half curve
      decalage = (j-1)*4; 
      // the new points shift the next points by this offset
      x_init = xkoch(j:j+1);
      y_init = ykoch(j:j+1);
      // line #j
      [x_trans, y_trans] = etape(x_init,y_init);
      // transformed line
      xkoch1(decalage+1) = x_init(1); xkoch1(decalage+5) = x_init(2);
      ykoch1(decalage+1) = y_init(1); ykoch1(decalage+5) = y_init(2);
      for k=1:3
        xkoch1(k+decalage+1) = x_trans(k);
        ykoch1(k+decalage+1) = y_trans(k);
        // values put in the global vector
      end
    end
    xkoch = xkoch1; ykoch = ykoch1;
  end
  
  for i=1:4^n
    ykoch(N-i+1) = ykoch(i);
    xkoch(N-i+1) = l-xkoch(i); 
    // 2nd half-curve
  end
endfunction

// ****************
// * main program *
// ****************

xcourbe(2) = l;
[xcourbe,ycourbe] = vonkoch(xcourbe,ycourbe,n);

// drawing the curve

xpoly(xcourbe,ycourbe)
isoview(0,l,0,l*sin_soixante/3)

The following code can be added to directly generate the file (the SVG export was not implemented at the time the file was created).

// saving the file

name = "von_koch_"+string(n)+"_steps.svg";
xs2svg(0, name)

Recursive source code

The code is more compact but the execution is slower, and does not generate the table of values.

//============================================================================
// name: von_koch.sce
// author: Christophe Dang Ngoc Chan
// date of creation: 2012-10-23
// dates of modification: 
//    2013-07-08: quotes ' -> "
//    2013-07-2: vectorisation of the calculations
//----------------------------------------------------------------------------
// version of Scilab: 5.3.1
// required Atoms modules: aucun
//----------------------------------------------------------------------------
// Objective: draws the von Koch's "snowflake"
// Inputs: none (parameters are hard coded)
// Outputs: graphical window with a curve; SVG file
//============================================================================

clear;
clf;

// *************
// * constants *
// **************

n = 6; 
// number of steps 
// limited to 9 (262 145 points), otherwise the stacksize must be changed
// 6 steps (4 097 points) are enough for a good rendering
sin_soixante = sqrt(3)/2; // sin(60°)
l = 1;
// length of the initial line (arbitrary unit)

// ******************
// * initialisation *
// ******************



// *************
// * functions *
// *************

function [] = vonkoch(A, B, i)
    u = (B - A)/3 ; // third of the AB vector
    v = [0.5*u(1) - sin_soixante*u(2) ; sin_soixante*u(1) + 0.5*u(2)] ;
    // vector turned by +60°
    C = A + u ;
    D = C + v ;
    E = B - u ;
    // points of the line
    if i == 1 then
        // drawing the smallest segments
        x = [A(1) ; C(1) ; D(1) ; E(1) ; B(1) ];
        y = [A(2) ; C(2) ; D(2) ; E(2) ; B(2) ];
        xpoly(x, y, "lines")
    else
        j = i - 1 ;
        vonkoch(A, C, j);
        vonkoch(C, D, j);
        vonkoch(D, E, j);
        vonkoch(E, B, j);
        // recursive call
    end
endfunction

// ****************
// * main program *
// ****************

beginning = [0;0] ;
ending = [l;0] ;
vonkoch(beginning, ending, n)

isoview(0,l,0,sin_soixante*l)

// Saving the file

name = "von_koch_"+string(n)+"_steps.svg" ;
xs2svg(0, name)

ಪರವಾನಗಿ

I, the copyright holder of this work, hereby publish it under the following licenses:
GNU head GNU ಉಚಿತ ಡಾಕ್ಯುಮೆಂಟೇಶನ್ ಪರವಾನಗಿ, ಆವೃತ್ತಿಯ ನಿಯಮಗಳ ಅಡಿಯಲ್ಲಿ ಈ ಡಾಕ್ಯುಮೆಂಟ್ ಅನ್ನು ನಕಲಿಸಲು, ವಿತರಿಸಲು ಮತ್ತು/ಅಥವಾ ಮಾರ್ಪಡಿಸಲು ಅನುಮತಿಯನ್ನು ನೀಡಲಾಗಿದೆ. 1.2 ಅಥವಾ ಯಾವುದೇ ನಂತರದ ಆವೃತ್ತಿಯನ್ನು ಉಚಿತ ಸಾಫ್ಟ್‌ವೇರ್ ಫೌಂಡೇಶನ್ ಪ್ರಕಟಿಸಿದೆ; ಯಾವುದೇ ಅಸ್ಥಿರ ವಿಭಾಗಗಳಿಲ್ಲದೆ, ಮುಖ ಪಠ್ಯಗಳಿಲ್ಲ ಮತ್ತು ಹಿಂದಿನ ಕವರ್ ಪಠ್ಯಗಳಿಲ್ಲ. ಪರವಾನಗಿಯ ಪ್ರತಿಯನ್ನು GNU ಉಚಿತ ಡಾಕ್ಯುಮೆಂಟೇಶನ್ ಪರವಾನಗಿ ಎಂಬ ವಿಭಾಗದಲ್ಲಿ ಸೇರಿಸಲಾಗಿದೆ.
w:en:Creative Commons
ವೈಶಿಷ್ಟ್ಯ ಇರುವುದರಂತೆಯೇ ಹಂಚು
ಈ ಕಡತ ಕ್ರಿಯೇಟಿವ್ ಕಾಮನ್ಸ್ Attribution -Share Alike 3.0 Unported ಪರವಾನಗಿ ಹೊಂದಿದೆ.
ನೀವು ಮುಕ್ತ:
  • ಹಂಚಿಕೆಗೆ – ಕೆಲಸವನ್ನು ನಕಲು ಮಾಡಲು, ವಿತರಣೆ ಮತ್ತು ಸಾಗಿಸಲು
  • ರೀಮಿಕ್ಸ್ ಮಾಡಲು – ಕೆಲಸವನ್ನು ಬಳಸಿಕೊಳ್ಳಲು
ಈ ಕೆಳಗಿನ ಷರತ್ತುಗಳಲ್ಲಿ:
  • ವೈಶಿಷ್ಟ್ಯ – ನೀವು ಸೂಕ್ತವಾದ ಕ್ರೆಡಿಟ್ ನೀಡಬೇಕು, ಪರವಾನಗಿಗೆ ಲಿಂಕ್ ಅನ್ನು ಒದಗಿಸಬೇಕು ಮತ್ತು ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಮಾಡಿದ್ದರೆ ಸೂಚಿಸಬೇಕು. ನೀವು ಯಾವುದೇ ಸಮಂಜಸವಾದ ರೀತಿಯಲ್ಲಿ ಮಾಡಬಹುದು, ಆದರೆ ಪರವಾನಗಿದಾರರು ನಿಮ್ಮನ್ನು ಅಥವಾ ನಿಮ್ಮ ಯಾವುದೇ ಬಳಕೆಯನ್ನು ಅನುಮೋದಿಸಿದಂತೆ ರೀತಿಯಲ್ಲಿ ಉಪಯೋಗಿಸಬಾರದು.
  • ಇರುವುದರಂತೆಯೇ ಹಂಚು – ನೀವು ರೀಮಿಕ್ಸ್ ಮಾಡಿದರೆ, ರೂಪಾಂತರಗೊಳಿಸಿದರೆ ಅಥವಾ ವಸ್ತುವಿನ ಮೇಲೆ ನಿರ್ಮಿಸಿದರೆ, ನಿಮ್ಮ ಕೊಡುಗೆಗಳನ್ನು ನೀವು ಮೂಲದಂತೆ ಅದೇ ಅಥವಾ ಹೊಂದಾಣಿಕೆಯ ಪರವಾನಗಿ ಅಡಿಯಲ್ಲಿ ವಿತರಿಸಬೇಕು.
This licensing tag was added to this file as part of the GFDL licensing update.
ನಿಮ್ಮಿಚ್ಛೆಯ ಪರವಾನಗಿಯನ್ನು ನೀವು ಆರಿಸಿಕೊಳ್ಳಬಹುದು.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts ಇಂಗ್ಲಿಷ್

some value

author name string ಇಂಗ್ಲಿಷ್: cdang
Wikimedia username ಇಂಗ್ಲಿಷ್: Cdang

copyright status ಇಂಗ್ಲಿಷ್

copyrighted ಇಂಗ್ಲಿಷ್

೨೯ ಜೂನ್ 2006

source of file ಇಂಗ್ಲಿಷ್

original creation by uploader ಇಂಗ್ಲಿಷ್

ಕಡತದ ಇತಿಹಾಸ

ದಿನ/ಕಾಲ ಒತ್ತಿದರೆ ಆ ಸಮಯದಲ್ಲಿ ಈ ಕಡತದ ವಸ್ತುಸ್ಥಿತಿ ತೋರುತ್ತದೆ.

ದಿನ/ಕಾಲಕಿರುನೋಟಆಯಾಮಗಳುಬಳಕೆದಾರಟಿಪ್ಪಣಿ
ಪ್ರಸಕ್ತ೧೬:೫೨, ೨೧ ಫೆಬ್ರವರಿ ೨೦೧೮೧೬:೫೨, ೨೧ ಫೆಬ್ರವರಿ ೨೦೧೮ ವರೆಗಿನ ಆವೃತ್ತಿಯ ಕಿರುನೋಟ೬೦೦ × ೧೭೪ (೨ KB)Cdangeven values and indentations
೦೩:೧೮, ೨೦ ಮೇ ೨೦೦೭೦೩:೧೮, ೨೦ ಮೇ ೨೦೦೭ ವರೆಗಿನ ಆವೃತ್ತಿಯ ಕಿರುನೋಟ೬೨೧ × ೧೮೦ (೧ KB)FibonacciRemade from scratch with simpler code.
೨೦:೨೨, ೨೯ ಜೂನ್ ೨೦೦೬೨೦:೨೨, ೨೯ ಜೂನ್ ೨೦೦೬ ವರೆಗಿನ ಆವೃತ್ತಿಯ ಕಿರುನೋಟ೩೦೯ × ೯೦ (೯೦ KB)Cdangin plain SVG (better behaviour)
೧೮:೩೬, ೨೯ ಜೂನ್ ೨೦೦೬೧೮:೩೬, ೨೯ ಜೂನ್ ೨೦೦೬ ವರೆಗಿನ ಆವೃತ್ತಿಯ ಕಿರುನೋಟ೩೦೯ × ೯೦ (೯೬ KB)Cdang{{Information |Description= {{en|von Koch snow flake curve after 6 steps; created with Scilab, transformed into SVG by pstoedit, layout by Inkscape}} {{fr|Courbe du flocon de neige de von Koch après 6 étapes ; créé avec Scilab, transformé en SVG avec

ಈ ಕೆಳಗಿನ ಪುಟವು ಈ ಚಿತ್ರಕ್ಕೆ ಸಂಪರ್ಕ ಹೊಂದಿದೆ:

ಜಾಗತಿಕ ಕಡತ ಉಪಯೋಗ

ಈ ಕಡತವನ್ನು ಕೆಳಗಿನ ಬೇರೆ ವಿಕಿಗಳೂ ಉಪಯೋಗಿಸುತ್ತಿವೆ:

ಮೇಲ್ದರ್ಜೆ ಮಾಹಿತಿ

"https://kn.wikipedia.org/wiki/ಚಿತ್ರ:Von_koch_6_etapes.svg" ಇಂದ ಪಡೆಯಲ್ಪಟ್ಟಿದೆ