|
!'ボクセル表現(VOXEL)
RANDOMIZE
DIM X(3000),Y(3000),Z(3000)
LET N=3000
LET A=.5
LET L=.1
LET X(1)=.1
LET Y(1)=0
LET Z(1)=0
FOR I=2 TO N
LET X(I)=Z(I-1)+A*X(I-1)+5/(1+X(I-1)*X(I-1))
LET Z(I)=-X(I-1)
LET Y(I)=X(I-1)+Z(I-1)
NEXT I
!'-----------------------------------------------------------
!'LET N=3000
!'LET A=.8
!'LET B=.3
!'LET C=.1
!'LET D=.2
!'LET L=.3
!'LET X(1)=.01
!'LET Y(1)=0
!'LET Z(1)=0
!'FOR I=2 TO N
!' LET X(I)=A*Y(I-1)+B*X(I-1)+1/(C+Y(I-1)^2)
!' LET Z(I)=D*Y(I-1)+B*X(I-1)+1/(C+Z(I-1)^2)
!' LET Y(I)=-A*X(I-1)-D*Z(I-1)
!'NEXT I
!'-----------------------------------------------------------
!'LET N=3000
!'LET A=10
!'LET B=28
!'LET C=8/3
!'LET D=.01
!'LET L=1
!'LET X(1)=1
!'LET Y(1)=1
!'LET Z(1)=1
!'FOR I=2 TO N
!' LET DX=A*(Y(I-1)-X(I-1))
!' LET DY=X(I-1)*(B-Z(I-1))-Y(I-1)
!' LET DZ=X(I-1)*Y(I-1)-C*Z(I-1)
!' LET X(I)=X(I-1)+DX*D
!' LET Y(I)=Y(I-1)+DY*D
!' LET Z(I)=Z(I-1)+DZ*D
!'NEXT I
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 N
CALL CUBE(#1,X(I),Y(I),Z(I),L)
NEXT I
PRINT #1:"0"
PRINT #1:"ENDSEC"
PRINT #1:"0"
PRINT #1:"EOF"
CLOSE #1
END
以下省略
EXTERNAL SUB CUBE(#1,X,Y,Z,L)
END SUB
|
|