[ale] asymptote question

George Allen glallen01 at gmail.com
Tue Aug 30 23:35:50 EDT 2011


I'm trying to make a function return a command, but not sure how. I
want to draw in radians instead of degrees and wanted to do:

import math;
import graph;
real T=2*pi;
size(200,0);

pair z0=0;
void rarc(real r1,real r2){
       arc(z0,1,degrees(r1),degrees(r2));
};

draw(circle(z0,1));
filldraw(z0--arc(z0,1,30,60)--cycle,lightgrey); // this works
filldraw(z0--arc(z0,1,degrees(T/12),degrees(T/6))--cycle,grey); // this works
filldraw(z0--rarc(T/12,T/6)--cycle,red);           // I wish this worked

What's missing?

Working on creating the all-time-super-ultimate-IP-subnetting chart. ;)


More information about the Ale mailing list