二十面体

 投稿者:しばっち  投稿日:2011年 8月14日(日)23時18分47秒
  OPTION BASE 0
DIM X(12),Y(12),Z(12)
LET G=(SQR(5)-1)/2
LET L=100
LET X(0)=L
LET Y(0)=L*G
LET Z(0)=0
LET X(1)=-L
LET Y(1)=L*G
LET Z(1)=0
LET X(2)=-L
LET Y(2)=-L*G
LET Z(2)=0
LET X(3)=L
LET Y(3)=-L*G
LET Z(3)=0
LET X(4)=0
LET Y(4)=L
LET Z(4)=L*G
LET X(5)=0
LET Y(5)=-L
LET Z(5)=L*G
LET X(6)=0
LET Y(6)=-L
LET Z(6)=-L*G
LET X(7)=0
LET Y(7)=L
LET Z(7)=-L*G
LET X(8)=L*G
LET Y(8)=0
LET Z(8)=L
LET X(9)=L*G
LET Y(9)=0
LET Z(9)=-L
LET X(10)=-L*G
LET Y(10)=0
LET Z(10)=-L
LET X(11)=-L*G
LET Y(11)=0
LET Z(11)=L
FILE GETSAVENAME F$,"dxfファイル|*.dxf"
IF F$="" THEN STOP
IF POS(UCASE$(F$),".DXF")=0 THEN LET F$=F$ & ".dxf"
OPEN #1:NAME F$
ERASE #1
PRINT #1:"0"
PRINT #1:"SECTION"
PRINT #1:"2"
PRINT #1:"ENTITIES"
FOR I=1 TO 20
   READ A,B,C
   PRINT #1:"0"
   PRINT #1:"3DFACE"
   PRINT #1:"8"
   PRINT #1:"LAYER1"
   PRINT #1:"62"
   PRINT #1:"1"
   PRINT #1:"10"
   PRINT #1:X(A)
   PRINT #1:"20"
   PRINT #1:Y(A)
   PRINT #1:"30"
   PRINT #1:Z(A)
   PRINT #1:"11"
   PRINT #1:X(B)
   PRINT #1:"21"
   PRINT #1:Y(B)
   PRINT #1:"31"
   PRINT #1:Z(B)
   PRINT #1:"12"
   PRINT #1:X(C)
   PRINT #1:"22"
   PRINT #1:Y(C)
   PRINT #1:"32"
   PRINT #1:Z(C)
NEXT I
PRINT #1:"0"
PRINT #1:"ENDSEC"
PRINT #1:"0"
PRINT #1:"EOF"
CLOSE #1
DATA 0,8,3
DATA 3,9,0
DATA 1,10,2
DATA 2,11,1
DATA 4,0,7
DATA 7,1,4
DATA 5,2,6
DATA 6,3,5
DATA 8,4,11
DATA 11,5,8
DATA 9,6,10
DATA 10,7,9
DATA 0,4,8
DATA 0,9,7
DATA 1,11,4
DATA 1,7,10
DATA 2,5,11
DATA 2,10,6
DATA 3,8,5
DATA 3,6,9
END
 

戻る