|
REM ハート型
DEF F(X,Y) = (X^2 + Y^2 - 1)^3 - X^2 * Y^3
LET LEFT = -1.5
LET RIGHT = 1.5
LET BOTTOM = -1.5
LET TOP = 1.5
SET WINDOW LEFT, RIGHT, BOTTOM, TOP
SET AREA COLOR 1 ! 黒
PLOT AREA : LEFT,BOTTOM;RIGHT,BOTTOM;RIGHT,TOP;LEFT,TOP
SET POINT STYLE 1
SET POINT COLOR 4 ! 赤
FOR I=0 TO PIXELX(RIGHT)
FOR J=0 TO PIXELY(TOP)
LET X=WORLDX(I)
LET Y=WORLDY(J)
IF F(X,Y) < 0 THEN
PLOT POINTS: X , Y
END IF
NEXT J
NEXT I
DRAW GRID
END
|
|