while(x1 < getWidth()) { x2 = x1 + 1; y2 = (int)(340 - ((Math.sin(1.5*i*Math.PI/180) * 80))); g2.drawLine(x1, y1, x2, y2); x1 = x2; y1 = y2; i++; } x1 = 300; // x co-ordinate of interpolated origin y1 = 340; // y co-ordinate of interpolated origin while(x1 > 0) { x2 = x1 - 1; i = -1; y2 = (int)(340 - ((Math.sin(1.5*i*Math.PI/180) * 80))); g2.drawLine(x1, y1, x2, y2); x1 = x2; y1 = y2; i--; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)