மூலக்கோப்பு(SVG கோப்பு, பெயரளவில் 600 × 174 பிக்சல்கள், கோப்பு அளவு: 2 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)

அனுமதி

இந்த ஆக்கத்தின் காப்புரிமையாளரான நான் இதனைப் பின்வரும் உரிமத்தின் கீழ் வெளியிடுகின்றேன்:
GNU head GNU Free Documentation License விதிமுறைகளின் கீழ் இந்த ஆவணத்தை நகலெடுக்க, விநியோகிக்க மற்றும்/அல்லது மாற்றுவதற்கு அனுமதி வழங்கப்பட்டுள்ளது, Free Software Foundation;ஆல் வெளியிடப்பட்ட பதிப்பு 1.2 அல்லது அதற்குப் பிந்தைய பதிப்பு, மாற்றமில்லாத பிரிவுகள், முன் அட்டை உரைகள் மற்றும் பின் அட்டை உரைகள் இல்லாமல் வெளியிடப்பட்டது. GNU Free Documentation License என்ற தலைப்பில் உரிமத்தின் நகல் சேர்க்கப்பட்டுள்ளது.
w:ta:கிரியேட்டிவ் காமன்ஸ்
பண்புக்கூறுகள் அதே மாதிரி பகிர்
இந்த கோப்பு 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 ஆங்கிலம்

29 சூன் 2006

source of file ஆங்கிலம்

original creation by uploader ஆங்கிலம்

கோப்பின் வரலாறு

குறித்த நேரத்தில் இருந்த படிமத்தைப் பார்க்க அந்நேரத்தின் மீது சொடுக்கவும்.

நாள்/நேரம்நகம் அளவு சிறுபடம்அளவுகள்பயனர்கருத்து
தற்போதைய11:22, 21 பெப்பிரவரி 201811:22, 21 பெப்பிரவரி 2018 இலிருந்த பதிப்புக்கான சிறு தோற்றம்600 × 174 (2 KB)Cdangeven values and indentations
21:48, 19 மே 200721:48, 19 மே 2007 இலிருந்த பதிப்புக்கான சிறு தோற்றம்621 × 180 (1 KB)FibonacciRemade from scratch with simpler code.
14:52, 29 சூன் 200614:52, 29 சூன் 2006 இலிருந்த பதிப்புக்கான சிறு தோற்றம்309 × 90 (90 KB)Cdangin plain SVG (better behaviour)
13:06, 29 சூன் 200613:06, 29 சூன் 2006 இலிருந்த பதிப்புக்கான சிறு தோற்றம்309 × 90 (96 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://ta.wikipedia.org/wiki/படிமம்:Von_koch_6_etapes.svg" இலிருந்து மீள்விக்கப்பட்டது