유타 찻 주전자 그리기


20

유타 찻 주전자 원래 마틴 뉴웰에 의해 생성은, 3D 그래픽 프로그램을 테스트하기위한 편리한 개체입니다.

이 작업은 투시 투영에서 주전자의 와이어 프레임 이미지를 만드는 것입니다. 소스 코드 응용 프로그램 의 아이디어를 장려하기 위해 시청 및 카메라 제어가 분리되어 카운트에서 제외 될 수 있습니다. 따라서 매개 변수와 입력 파일을 수정하고 코드를 재사용하여 다양한 이미지를 생성 할 수 있지만 복잡한 명령 행 인수 등을 수용하는 완전한 유틸리티를 작성할 필요는 없습니다. "해커"의 균형을 추구합니다.

와이어 프레임 주전자

심판. StackOverflow : 베 지어 패치는 유타 찻 주전자에서 어떻게 작동합니까?

여기에는 세 가지 하위 작업이 있습니다.

  • 주전자 데이터원래 형식으로 읽습니다 .
  • deCasteljau splitting 또는 다른 방법을 사용하여 패치 데이터를 세분화하십시오. 다른 방법은 베 지어 기반 행렬을 사용하고 다항식 (Foley 및 van Dam, Newmann 및 Sproull과 같은 표준 참조) 또는 Bernstein 기반 방법 (아직 나에게 아직없는)을 평가하는 것입니다.
  • 포인트가 2D로 투영되고 (언어가 기본적으로 3D를 지원하지 않는 경우)보기가 LookAt 포인트를 중심으로하고 세로 축이 주전자의 세로 축과 정렬 된 아이 포인트에서 볼 때 각 작은 패치의 외곽선을 그립니다. (예 : 멋진 유리한 지점에서 "똑바로"그립니다).

파일에서 라인 중심의 텍스트 데이터를 읽는 것은 약간 문제가 있다고 가정하면,이 문제는 정말 점점 관한 실무 바이 큐빅 베 지어 패치 데이터.

뒷면 컬링에 대한 간단한 일반 테스트로는 충분하지 않으므로 (패치가 모두 바깥 쪽을 향하지는 않음) 은선 또는 표면 제거가 필요하지 않습니다. 와이어 프레임으로서, 후면이 보이는 상태에서 잘 보일 것입니다. 눈으로부터의 거리에 따라 선 너비를 조정하여 모양을 개선 할 수 있지만 꼭 필요한 것은 아닙니다 (자신의 프로그램은이 작업을 수행하지 않습니다).

이것은 입니다. 골프에서 경쟁하는 답변에는 평상시 카운트가 포함되어야합니다. 그러나 특이한 언어로 제출하는 것은 특별히 짧지 않더라도 매우 권장됩니다.

Kolmogorov- 복잡성 애호가를 위해 패치를 회전 및 미러링을 추가하여 전체 세트를 재구성 할 수 있는 보다 간결한 데이터 세트가 있습니다. Jim Blinn의 A Trip Down the Graphics Pipeline 에는 개별 패치에 회전 또는 다른 대칭이 있다는 사실을 사용하여 훨씬 간결한 생성 방법이 있습니다. 몸통 (또는 뚜껑)은 y 축을 중심으로 회전하는 단일 베 지어 곡선으로 설명 할 수 있습니다. 스파우트 및 핸들은 프로파일의 두 곡선으로 설명 된 다음 원형 제어에 근접하도록 중간 제어점을 선택합니다.


내 카운트에 포인트 배열의 개수를 포함시켜야합니까?
TheDoctor

오히려 파일에서 오는 것을 볼 수는 있지만 패치 데이터를 세지 않아도됩니다.
luser droog

내가 좋아하는 내장 매크로 허용하지 않는 게 좋을 것 glutSolidTeapotglutWireTeapot !
Anders Kaseorg

@AndersKaseorg 원본 데이터를 읽어야한다고 생각했습니다. ... 저는 이 규칙을 시행하는 데 여유가 없었습니다 . 더 긴밀한 답변 일수록 확인 표시가 쉽게 나타납니다.
luser droog

@luserdroog 원래 데이터를 읽고 무시하고 호출하는 솔루션을 상상해보십시오 glutWireTeapot.
Anders Kaseorg

답변:


9

처리 (java), 314 (카메라 제어없이 237)

배열 정의를 포함하지 않음 :

void setup(){size(640,480,P3D);}void draw(){background(0);noFill();stroke(255);translate(width/2,height/2,70);scale(30);rotateX(map(mouseX,0,width,0,TWO_PI));rotateY(map(mouseY,0,height,0,TWO_PI));for(int[] p:patches){beginShape();for(int pt:p){vertex(data[pt-1][0],data[pt-1][1],data[pt-1][2]);}endShape(CLOSE);}}

데이터 배열 정의 :

float [][] data = {{1.4,0.0,2.4},
{1.4,-0.784,2.4},
{0.784,-1.4,2.4},
{0.0,-1.4,2.4},
{1.3375,0.0,2.53125},
{1.3375,-0.749,2.53125},
{0.749,-1.3375,2.53125},
{0.0,-1.3375,2.53125},
{1.4375,0.0,2.53125},
{1.4375,-0.805,2.53125},
{0.805,-1.4375,2.53125},
{0.0,-1.4375,2.53125},
{1.5,0.0,2.4},
{1.5,-0.84,2.4},
{0.84,-1.5,2.4},
{0.0,-1.5,2.4},
{-0.784,-1.4,2.4},
{-1.4,-0.784,2.4},
{-1.4,0.0,2.4},
{-0.749,-1.3375,2.53125},
{-1.3375,-0.749,2.53125},
{-1.3375,0.0,2.53125},
{-0.805,-1.4375,2.53125},
{-1.4375,-0.805,2.53125},
{-1.4375,0.0,2.53125},
{-0.84,-1.5,2.4},
{-1.5,-0.84,2.4},
{-1.5,0.0,2.4},
{-1.4,0.784,2.4},
{-0.784,1.4,2.4},
{0.0,1.4,2.4},
{-1.3375,0.749,2.53125},
{-0.749,1.3375,2.53125},
{0.0,1.3375,2.53125},
{-1.4375,0.805,2.53125},
{-0.805,1.4375,2.53125},
{0.0,1.4375,2.53125},
{-1.5,0.84,2.4},
{-0.84,1.5,2.4},
{0.0,1.5,2.4},
{0.784,1.4,2.4},
{1.4,0.784,2.4},
{0.749,1.3375,2.53125},
{1.3375,0.749,2.53125},
{0.805,1.4375,2.53125},
{1.4375,0.805,2.53125},
{0.84,1.5,2.4},
{1.5,0.84,2.4},
{1.75,0.0,1.875},
{1.75,-0.98,1.875},
{0.98,-1.75,1.875},
{0.0,-1.75,1.875},
{2.0,0.0,1.35},
{2.0,-1.12,1.35},
{1.12,-2.0,1.35},
{0.0,-2.0,1.35},
{2.0,0.0,0.9},
{2.0,-1.12,0.9},
{1.12,-2.0,0.9},
{0.0,-2.0,0.9},
{-0.98,-1.75,1.875},
{-1.75,-0.98,1.875},
{-1.75,0.0,1.875},
{-1.12,-2.0,1.35},
{-2.0,-1.12,1.35},
{-2.0,0.0,1.35},
{-1.12,-2.0,0.9},
{-2.0,-1.12,0.9},
{-2.0,0.0,0.9},
{-1.75,0.98,1.875},
{-0.98,1.75,1.875},
{0.0,1.75,1.875},
{-2.0,1.12,1.35},
{-1.12,2.0,1.35},
{0.0,2.0,1.35},
{-2.0,1.12,0.9},
{-1.12,2.0,0.9},
{0.0,2.0,0.9},
{0.98,1.75,1.875},
{1.75,0.98,1.875},
{1.12,2.0,1.35},
{2.0,1.12,1.35},
{1.12,2.0,0.9},
{2.0,1.12,0.9},
{2.0,0.0,0.45},
{2.0,-1.12,0.45},
{1.12,-2.0,0.45},
{0.0,-2.0,0.45},
{1.5,0.0,0.225},
{1.5,-0.84,0.225},
{0.84,-1.5,0.225},
{0.0,-1.5,0.225},
{1.5,0.0,0.15},
{1.5,-0.84,0.15},
{0.84,-1.5,0.15},
{0.0,-1.5,0.15},
{-1.12,-2.0,0.45},
{-2.0,-1.12,0.45},
{-2.0,0.0,0.45},
{-0.84,-1.5,0.225},
{-1.5,-0.84,0.225},
{-1.5,0.0,0.225},
{-0.84,-1.5,0.15},
{-1.5,-0.84,0.15},
{-1.5,0.0,0.15},
{-2.0,1.12,0.45},
{-1.12,2.0,0.45},
{0.0,2.0,0.45},
{-1.5,0.84,0.225},
{-0.84,1.5,0.225},
{0.0,1.5,0.225},
{-1.5,0.84,0.15},
{-0.84,1.5,0.15},
{0.0,1.5,0.15},
{1.12,2.0,0.45},
{2.0,1.12,0.45},
{0.84,1.5,0.225},
{1.5,0.84,0.225},
{0.84,1.5,0.15},
{1.5,0.84,0.15},
{-1.6,0.0,2.025},
{-1.6,-0.3,2.025},
{-1.5,-0.3,2.25},
{-1.5,0.0,2.25},
{-2.3,0.0,2.025},
{-2.3,-0.3,2.025},
{-2.5,-0.3,2.25},
{-2.5,0.0,2.25},
{-2.7,0.0,2.025},
{-2.7,-0.3,2.025},
{-3.0,-0.3,2.25},
{-3.0,0.0,2.25},
{-2.7,0.0,1.8},
{-2.7,-0.3,1.8},
{-3.0,-0.3,1.8},
{-3.0,0.0,1.8},
{-1.5,0.3,2.25},
{-1.6,0.3,2.025},
{-2.5,0.3,2.25},
{-2.3,0.3,2.025},
{-3.0,0.3,2.25},
{-2.7,0.3,2.025},
{-3.0,0.3,1.8},
{-2.7,0.3,1.8},
{-2.7,0.0,1.575},
{-2.7,-0.3,1.575},
{-3.0,-0.3,1.35},
{-3.0,0.0,1.35},
{-2.5,0.0,1.125},
{-2.5,-0.3,1.125},
{-2.65,-0.3,0.9375},
{-2.65,0.0,0.9375},
{-2.0,-0.3,0.9},
{-1.9,-0.3,0.6},
{-1.9,0.0,0.6},
{-3.0,0.3,1.35},
{-2.7,0.3,1.575},
{-2.65,0.3,0.9375},
{-2.5,0.3,1.125},
{-1.9,0.3,0.6},
{-2.0,0.3,0.9},
{1.7,0.0,1.425},
{1.7,-0.66,1.425},
{1.7,-0.66,0.6},
{1.7,0.0,0.6},
{2.6,0.0,1.425},
{2.6,-0.66,1.425},
{3.1,-0.66,0.825},
{3.1,0.0,0.825},
{2.3,0.0,2.1},
{2.3,-0.25,2.1},
{2.4,-0.25,2.025},
{2.4,0.0,2.025},
{2.7,0.0,2.4},
{2.7,-0.25,2.4},
{3.3,-0.25,2.4},
{3.3,0.0,2.4},
{1.7,0.66,0.6},
{1.7,0.66,1.425},
{3.1,0.66,0.825},
{2.6,0.66,1.425},
{2.4,0.25,2.025},
{2.3,0.25,2.1},
{3.3,0.25,2.4},
{2.7,0.25,2.4},
{2.8,0.0,2.475},
{2.8,-0.25,2.475},
{3.525,-0.25,2.49375},
{3.525,0.0,2.49375},
{2.9,0.0,2.475},
{2.9,-0.15,2.475},
{3.45,-0.15,2.5125},
{3.45,0.0,2.5125},
{2.8,0.0,2.4},
{2.8,-0.15,2.4},
{3.2,-0.15,2.4},
{3.2,0.0,2.4},
{3.525,0.25,2.49375},
{2.8,0.25,2.475},
{3.45,0.15,2.5125},
{2.9,0.15,2.475},
{3.2,0.15,2.4},
{2.8,0.15,2.4},
{0.0,0.0,3.15},
{0.0,-0.002,3.15},
{0.002,0.0,3.15},
{0.8,0.0,3.15},
{0.8,-0.45,3.15},
{0.45,-0.8,3.15},
{0.0,-0.8,3.15},
{0.0,0.0,2.85},
{0.2,0.0,2.7},
{0.2,-0.112,2.7},
{0.112,-0.2,2.7},
{0.0,-0.2,2.7},
{-0.002,0.0,3.15},
{-0.45,-0.8,3.15},
{-0.8,-0.45,3.15},
{-0.8,0.0,3.15},
{-0.112,-0.2,2.7},
{-0.2,-0.112,2.7},
{-0.2,0.0,2.7},
{0.0,0.002,3.15},
{-0.8,0.45,3.15},
{-0.45,0.8,3.15},
{0.0,0.8,3.15},
{-0.2,0.112,2.7},
{-0.112,0.2,2.7},
{0.0,0.2,2.7},
{0.45,0.8,3.15},
{0.8,0.45,3.15},
{0.112,0.2,2.7},
{0.2,0.112,2.7},
{0.4,0.0,2.55},
{0.4,-0.224,2.55},
{0.224,-0.4,2.55},
{0.0,-0.4,2.55},
{1.3,0.0,2.55},
{1.3,-0.728,2.55},
{0.728,-1.3,2.55},
{0.0,-1.3,2.55},
{1.3,0.0,2.4},
{1.3,-0.728,2.4},
{0.728,-1.3,2.4},
{0.0,-1.3,2.4},
{-0.224,-0.4,2.55},
{-0.4,-0.224,2.55},
{-0.4,0.0,2.55},
{-0.728,-1.3,2.55},
{-1.3,-0.728,2.55},
{-1.3,0.0,2.55},
{-0.728,-1.3,2.4},
{-1.3,-0.728,2.4},
{-1.3,0.0,2.4},
{-0.4,0.224,2.55},
{-0.224,0.4,2.55},
{0.0,0.4,2.55},
{-1.3,0.728,2.55},
{-0.728,1.3,2.55},
{0.0,1.3,2.55},
{-1.3,0.728,2.4},
{-0.728,1.3,2.4},
{0.0,1.3,2.4},
{0.224,0.4,2.55},
{0.4,0.224,2.55},
{0.728,1.3,2.55},
{1.3,0.728,2.55},
{0.728,1.3,2.4},
{1.3,0.728,2.4},
{0.0,0.0,0.0},
{1.5,0.0,0.15},
{1.5,0.84,0.15},
{0.84,1.5,0.15},
{0.0,1.5,0.15},
{1.5,0.0,0.075},
{1.5,0.84,0.075},
{0.84,1.5,0.075},
{0.0,1.5,0.075},
{1.425,0.0,0.0},
{1.425,0.798,0.0},
{0.798,1.425,0.0},
{0.0,1.425,0.0},
{-0.84,1.5,0.15},
{-1.5,0.84,0.15},
{-1.5,0.0,0.15},
{-0.84,1.5,0.075},
{-1.5,0.84,0.075},
{-1.5,0.0,0.075},
{-0.798,1.425,0.0},
{-1.425,0.798,0.0},
{-1.425,0.0,0.0},
{-1.5,-0.84,0.15},
{-0.84,-1.5,0.15},
{0.0,-1.5,0.15},
{-1.5,-0.84,0.075},
{-0.84,-1.5,0.075},
{0.0,-1.5,0.075},
{-1.425,-0.798,0.0},
{-0.798,-1.425,0.0},
{0.0,-1.425,0.0},
{0.84,-1.5,0.15},
{1.5,-0.84,0.15},
{0.84,-1.5,0.075},
{1.5,-0.84,0.075},
{0.798,-1.425,0.0},
{1.425,-0.798,0.0}
};

int [][] patches = {
    {32},
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16},
{4,17,18,19,8,20,21,22,12,23,24,25,16,26,27,28},
{19,29,30,31,22,32,33,34,25,35,36,37,28,38,39,40},
{31,41,42,1,34,43,44,5,37,45,46,9,40,47,48,13},
{13,14,15,16,49,50,51,52,53,54,55,56,57,58,59,60},
{16,26,27,28,52,61,62,63,56,64,65,66,60,67,68,69},
{28,38,39,40,63,70,71,72,66,73,74,75,69,76,77,78},
{40,47,48,13,72,79,80,49,75,81,82,53,78,83,84,57},
{57,58,59,60,85,86,87,88,89,90,91,92,93,94,95,96},
{60,67,68,69,88,97,98,99,92,100,101,102,96,103,104,105},
{69,76,77,78,99,106,107,108,102,109,110,111,105,112,113,114},
{78,83,84,57,108,115,116,85,111,117,118,89,114,119,120,93},
{121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136},
{124,137,138,121,128,139,140,125,132,141,142,129,136,143,144,133},
{133,134,135,136,145,146,147,148,149,150,151,152,69,153,154,155},
{136,143,144,133,148,156,157,145,152,158,159,149,155,160,161,69},
{162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177},
{165,178,179,162,169,180,181,166,173,182,183,170,177,184,185,174},
{174,175,176,177,186,187,188,189,190,191,192,193,194,195,196,197},
{177,184,185,174,189,198,199,186,193,200,201,190,197,202,203,194},
{204,204,204,204,207,208,209,210,211,211,211,211,212,213,214,215},
{204,204,204,204,210,217,218,219,211,211,211,211,215,220,221,222},
{204,204,204,204,219,224,225,226,211,211,211,211,222,227,228,229},
{204,204,204,204,226,230,231,207,211,211,211,211,229,232,233,212},
{212,213,214,215,234,235,236,237,238,239,240,241,242,243,244,245},
{215,220,221,222,237,246,247,248,241,249,250,251,245,252,253,254},
{222,227,228,229,248,255,256,257,251,258,259,260,254,261,262,263},
{229,232,233,212,257,264,265,234,260,266,267,238,263,268,269,242},
{270,270,270,270,279,280,281,282,275,276,277,278,271,272,273,274},
{270,270,270,270,282,289,290,291,278,286,287,288,274,283,284,285},
{270,270,270,270,291,298,299,300,288,295,296,297,285,292,293,294},
{270,270,270,270,300,305,306,279,297,303,304,275,294,301,302,271},
{306}
};

더 읽기 쉬운 버전 :

void setup() {
  size(640,480,P3D);
}

void draw() {
  background(0);
  noFill();
  stroke(255);
  translate(width/2,height/2,70);
  scale(30);
  rotateX(map(mouseX,0,width,0,TWO_PI));
  rotateY(map(mouseY,0,height,0,TWO_PI));
  for (int[] p:patches) {
    beginShape();
    for (int pt:p) {
      vertex(data[pt-1][0],data[pt-1][2],data[pt-1][2]);
    }
    endShape(CLOSE); 
  }
}

그리고 일부 사진 :

완제품

흥미로운 효과가있는 다른 버전 :

void setup(){size(640,480,P3D);}
void draw(){
  background(0);noFill();stroke(255);
  translate(width/2,height/2,70);scale(30);
  rotateX(map(mouseX,0,width,0,TWO_PI));rotateY(map(mouseY,0,height,0,TWO_PI));
  for(int[] p:patches){
    //beginShape(QUADS);
    for(int pt:p){
      for(int pu:p){
        //vertex(data[pu-1][0],data[pu-1][4],data[pu-1][2]);
        line(data[pt-1][0],data[pt-1][5],data[pt-1][2],data[pu-1][0],data[pu-1][6],data[pu-1][2]);
    }}
    //endShape(CLOSE);
  }
}

버전 2


스파우트가 형성되기 위해서는 패치를 적어도 한 번 분할해야합니다.
luser droog

네, 두 번째 사진이 더 좋습니다. 당신은 실제로 세분화를하고 있지는 않습니다. 각 패치의 가장자리는 베 지어 곡선입니다. 그럼에도 불구하고, +1 주전자처럼 보입니다!
luser droog

stroke(-1)1 바이트 더 짧은stroke(255)
Kritixi Lithos

11

추신

완전히 골프는 아니지만, 이것은 다항식을 평가하는 deCasteljau 세분과 다른 접근법을 보여줍니다. mat.ps를 사용 합니다 .

(mat.ps)run[    % load matrix library, begin dictionary construction

/N 17
/C [ 0 7 4 ]   % Cam
/E [ 0 0 40 ] % Eye
/R 0 roty 120 rotx 90 rotz   % Rot: pan tilt twist
          matmul   matmul

/f(teapot)(r)file
/t{token pop exch pop}      % parse a number or other ps token
/s{(,){search not{t exit}if t 3 1 roll}loop}  % parse a comma-separated list
/r{token pop{[f 99 string readline pop s]}repeat}>>begin   % parse a count-prefixed paragraph of csv numbers
[/P[f r]/V[f r]/v{1 sub V exch get}        % Patches and Vertices and vert lookup shortcut
/B[[-1 3 -3 1][3 -6 3 0][-3 3 0 0][1 0 0 0]]              % Bezier basis matrix
/A{dup dup mul exch 2 copy mul 3 1 roll 1 4 array astore} % x->[x^3 x^2 x 1]
/M{[1 index 0 4 getinterval 2 index 4 4 getinterval       % flattened matrix->rowXcolumn matrix
3 index 8 4 getinterval 4 index 12 4 getinterval]exch pop}
/J{ C{sub}vop R matmul 0 get                              % perspective proJection  [x y z]->[X Y]
    aload pop E aload pop
    4 3 roll div exch neg
    4 3 roll add 1 index mul 4 1 roll
    3 1 roll sub mul}
>>begin

300 400 translate
1 14 dup dup scale div currentlinewidth mul setlinewidth  % global scale
/newline { /line {moveto /line {lineto} store} store } def
newline
P{
    8 dict begin
        [exch{v J 2 array astore}forall]/p exch def   % load patch vertices and project to 2D
        /X[p{0 get}forall] M B exch matmul B matmul def  % multiply control points by Bezier basis
        /Y[p{1 get}forall] M B exch matmul B matmul def

        0 1 N div 1 1 index .2 mul add{A/U exch def   % interpolate the polynomial over (u,v)/(N)
            /UX U X matmul def
            /UY U Y matmul def
            0 1 N div 1 1 index .2 mul add{A/V exch 1 array astore transpose def
                /UXV UX V matmul def
                /UYV UY V matmul def
                UXV 0 get 0 get
                UYV 0 get 0 get line
            }for
            newline
        }for

        0 1 N div 1 1 index .2 mul add{A/V exch def   % interpolate the polynomial over (u,v)/(N)
            /V [V] transpose def
            /XV X V matmul def
            /YV Y V matmul def
            0 1 N div 1 1 index .2 mul add{A/U exch 1 array astore transpose def
                /UXV U XV matmul def
                /UYV U YV matmul def
                UXV 0 get 0 get
                UYV 0 get 0 get line
            }for
            newline
        }for

    end

    %exit
}forall
stroke

베 지어베이스 주전자

1112

수직선을 제거하고 매개 변수를 할인하면이 1112 문자 버전이 생성됩니다. mat.ps를 사용 합니다 .

(mat.ps)run[    % 12

/N 17
/C [ 0 7 4 ]   % Cam 
/E [ 0 0 40 ] % Eye 
/R 0 roty 120 rotx 90 rotz   % Rot: pan tilt twist
          matmul   matmul

/f(teapot)(r)file/t{token pop exch pop}/s{(,){search not{t exit}if t   % 1100
3 1 roll}loop}/r{token pop{[f 99 string readline pop 
s]}repeat}>>begin[/P[f r]/V[f r]/v{1 sub 
V exch get}/B[[-1 3 -3 1][3 -6 3 0][-3 3 0 0][1 0 0 0]]/A{dup dup mul exch
2 copy mul 3 1 roll 1 4 array astore}/M{[1 index 0 4 getinterval 2 index 4 4 getinterval    
3 index 8 4 getinterval 4 index 12 4 getinterval]exch pop}/J{C{sub}vop R matmul 0 get    
aload pop E aload pop 4 3 roll div exch neg 4 3 roll add 1 index mul 4 1 roll
3 1 roll sub mul}>>begin 300 400 translate
1 14 dup dup scale div currentlinewidth mul setlinewidth  
/newline{/line{moveto/line{lineto}store}store}def newline
P{8 dict begin[exch{v J 2 array astore}forall]/p
exch def/X[p{0 get}forall] M B exch matmul B matmul
def/Y[p{1 get}forall] M B exch matmul B matmul def 
0 1 N div 1 1 index .2 mul add{A/U exch def/UX U X matmul def/UY U Y matmul def 
0 1 N div 1 1 index .2 mul add{A/V exch 1 array astore transpose
def/UXV UX V matmul def/UYV UY V matmul def UXV 0 get 0 get UYV 0 get 0 get line}for
newline}for end}forall stroke

베 지어 기반 루프

당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.