-
... theta]; box.update; //--render box.render(1, 100); //1= exaggerate, 2= standard Pen.translate(width*0.5, height*0.5); Pen.strokeColor= Color.white; box.drawOutlines; Pen.fillColor= Color.white; box.draw; }; w.play; CmdPeriod.doOnce({w.close ...
-
... ld.neighbours(o).sum{|oo| oo.state} }; world.objects.do{|o, i| if(o.state==1, { Pen.addRect(Rect(o.loc[0]*wx, o.loc[1]*hy, wx, hy)); }); if(counts[i]==3, { o.state= 1; }, { if(counts[i]!=2, { o.state= 0; }); }); }; Pen.smoothing_(false); Pe ...
-
... ld.neighbours(o).sum{|oo| oo.state} }; world.objects.do{|o, i| if(o.state==1, { Pen.addRect(Rect(o.loc[0]*wx, o.loc[1]*hy, wx, hy)); }); if(counts[i]==3, { o.state= 1; }, { if(counts[i]!=2, { o.state= 0; }); }); }; Pen.smoothing_(false); Pe ...
-
... rcube.update; //--render hypercube.render(2, 500); //1= exaggerate, 2= standard Pen.translate(width*0.5, height*0.5); Pen.fillColor= Color.white; hypercube.draw; Pen.strokeColor= Color.white; hypercube.drawOutlines; }; w.play; CmdPeriod.doO ...
-
... rcube.update; //--render hypercube.render(2, 500); //1= exaggerate, 2= standard Pen.translate(width*0.5, height*0.5); Pen.fillColor= Color.white; hypercube.draw; Pen.strokeColor= Color.white; hypercube.drawOutlines; }; w.play; CmdPeriod.doO ...
-
... planes= {|i| Red3DPlane(RedVector3D[0, i+1/n-0.5, 0])}.dup(n); //--loop w.draw{ Pen.strokeColor= Color.grey(1, 0.5); Pen.translate(0, -50); world.objects.do{|o, i| thetas[i]= thetas[i]+speeds[i]; planes[i].rotation= RedVector3D[thetas[i], t ...
-
... planes= {|i| Red3DPlane(RedVector3D[0, i+1/n-0.5, 0])}.dup(n); //--loop w.draw{ Pen.strokeColor= Color.grey(1, 0.5); Pen.translate(0, -50); world.objects.do{|o, i| thetas[i]= thetas[i]+speeds[i]; planes[i].rotation= RedVector3D[thetas[i], t ...
-
... Wander2D; o.addForceArrive(world.objects[0].loc); //--plot target for testing //Pen.strokeColor= Color.red; //Pen.strokeOval(Rect.aboutRedVector2D(trg, o.wradius)); }, { world.objects[0].loc= w.mouse; }); //o.addForce(world.gravity); //no g ...
-
... Wander2D; o.addForceArrive(world.objects[0].loc); //--plot target for testing //Pen.strokeColor= Color.red; //Pen.strokeOval(Rect.aboutRedVector2D(trg, o.wradius)); }, { world.objects[0].loc= w.mouse; }); //o.addForce(world.gravity); //no g ...
-
Pen a cross-platform redirector for a GUI widget Inherits from: Object : ViewRedirect This class will return the gui kit specific version of a Pen. See also: GUI , GUI-Classes , GUI-Overview Examples and Documentation: For examples and plat ...