Jump to content

File:DeCasteljau1.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 336 × 142 pixels, file size: 20 KB)

Description Depicts the de Casteljau algorithm geometrically data: created on 7th of October 2006
Date (UTC)
Source
Author
SVG development
InfoField
 
The SVG code is valid.
 
This vector image was created with Asymptote.
Source code
InfoField

Asymptote code

import settings;
outformat="pdf";

size(10cm,4cm);

real t = 0.33;

pair[][] P = {{(0,0), (0.25,1.5), (1,2), (1,0)},
 {(0,0), (0.5,1), (1,2), (1,0)},
 {(0,0), (0.5,1), (1,2), (1,0)},
 {(0,0), (0.5,1), (1,2), (1,0)}};
path C[] = {nullpath, nullpath, nullpath, nullpath};
path g,ctr,d;
g = P[0][0]..controls P[0][1] and P[0][2]..P[0][3];
d = scale(0.025)*unitcircle;

int i,j,k;
C[0] = P[0][0]--P[0][1]--P[0][2]--P[0][3];

for(i = 1; i <= 3; ++i) {
  for(j = 0; j <= 3-i; ++j) {
    P[i][j] = (1-t)*P[i-1][j] + t*P[i-1][j+1];
    C[i] = C[i]--P[i][j];
  }
}

for(k =  0; k < 3; ++k) {
  draw(shift((2*k,0)) * C[k]);

  for(i = 0; i < 4-k; ++i) {
    string L = format("$P_%d$",i);
    label(L, shift((2*k,0)) * P[k][i], i < (4-k)/2 ? W : E);
    filldraw(shift((2*k,0)) * shift(P[k][i])*d);
  }

  draw(shift((2*k,0)) * C[k+1], dashed);

  for(i = 0; i < 3-k; ++i)
    draw(shift((2*k,0)) * shift(P[k+1][i])*d);

  draw(shift((2*k,0)) * g);
}


This is a retouched picture, which means that it has been digitally altered from its original version. The original can be viewed here: DeCasteljau1.png.

I, the copyright holder of this work, hereby publish it under the following license:
This work has been released into the public domain by its author, Example, at the [[::|English Wikipedia]] project. This applies worldwide.

In case this is not legally possible:
Example grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law.

Original upload log

This image is a derivative work of the following images:

  • File:DeCasteljau1.png licensed with PD-user-w
    • 2007-03-18T19:53:43Z Angusmclellan 600x300 (15317 Bytes) {{Information |Description=author: Przemysław Koprowski source: created by in [http://asymptote.sourceforge.net/ Asymptote] description: This image depictes the de Casteljau algorithm geometrically data: created on 7th of O

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

20,955 byte

142 pixel

336 pixel

image/svg+xml

61db819070a35336b68d1b9a11978838f3e90daf

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current11:28, 30 October 2009Thumbnail for version as of 11:28, 30 October 2009336 × 142 (20 KB)LennyWikipedia~commonswiki{{Information |Description=author: Przemysław Koprowski source: created by in [http://asymptote.sourceforge.net/ Asymptote] description: This image depictes the de Casteljau algorithm geometrically data: created on 7th of October 2006 == Asymptote sour

The following page uses this file:

Global file usage

The following other wikis use this file: