프로세싱 소개 및 설치
레이더 그리기
void setup(){ size(1200, 700); background(0); } void draw(){ drawRader(); } void drawRader(){ pushMatrix(); translate(width/2, height); noFill(); strokeWeight(2); stroke(98, 245, 31); // draw the arc lines arc(0, 0, width, width, PI, TWO_PI); arc(0, 0, width*2/3, width*2/3, PI, TWO_PI); arc(0, 0, width*1/3, width*1/3, PI, TWO_PI); // draw the angle lines line(0, 0, width/2*cos(radians(30)), -width/2*sin(radians(30))); line(0, 0, width/2*cos(radians(60)), -width/2*sin(radians(60))); line(0, 0, width/2*cos(radians(90)), -width/2*sin(radians(90))); line(0, 0, width/2*cos(radians(120)), -width/2*sin(radians(120))); line(0, 0, width/2*cos(radians(150)), -width/2*sin(radians(150))); // draw text textSize(15); fill(98, 245, 31); textAlign(RIGHT); text("10cm", width*1/6, 0); text("20cm", width*2/6, 0); text("30cm", width*3/6, 0); popMatrix(); }