[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] asymptote question
- Subject: [ale] asymptote question
- From: glallen01 at gmail.com (George Allen)
- Date: Tue, 30 Aug 2011 23:35:50 -0400
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. ;)