<APPLET CODE="GDView0.class" WIDTH=560 HEIGHT=540>
<param name=command0    value="read hajime">
<param name=hajime    value="
   set X -3 3; set O 0 0; color 255 255 255; fcircle O 10;
   color 0 0 0;  read sing;
   color 255 128 64; fclosedpoly; clearpoly;
   read zukei;
">
<param name=sing    value="
   set x 0; set d p/100;
   set e  2 + cos(5x) + 0.5sin(9x) - 0.2cos(17x);
   set a -2 + e cos(x) /2; set b e sin(x) /2 ;
   set A a b; read singsub 200;
">
<param name=singsub    value="
   set x x+d; set e 2 + cos(5x) + 0.5sin(9x) - 0.2cos(17x);
   set a -2 + e cos(x) / 2; set b e sin(x)/2;
   set B a b;line AB;
   copy B A;
   addpoly A;
">
<param name=zukei    value="
   set x 0; set d p/100; set e 2 sin(5x);
   set a 1 + e cos(x); set b e sin(x);
   set A a b;set n 5; read zukeisub n;
">
<param name=zukeisub    value="
   read zukeisubsub 40;
   color 255 64 128; fclosedpoly; clearpoly;
">
<param name=zukeisubsub    value="
   set x x+d;set e 2 sin(5x);set a 1 + e cos(x);
   set b e sin(x); set B a b;
    line AB;  addpoly A; copy B A;
">
</APPLET>

左図は上の アプレットを実行したものです。
set の練習です。
 戻る