could u please amend this and send it back to me?
import processing.dxf.*;
boolean record;
void setup() {
size(500, 500, P3D);
}
void draw() {
if (record) {
beginRaw(DXF, "drawing.dxf");
}
line (250,0,250,500);
line (0,250,500,250);
line (0,0,500,500);
line (0,500,500,0);
float y;
noFill();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (45*sqrt(x*x/(10000)+1.0))+128.834;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (60*sqrt(x*x/(10000)+1.0))+88.445;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (30*sqrt(x*x/(10000)+1.0))+169.222;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (75*sqrt(x*x/(10000)+1.0))+48.056;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (90*sqrt(x*x/(10000)+1.0))+7.668;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (15*sqrt(x*x/(10000)+1.0))+209.611;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (40*sqrt(x*x/(1600)+1.0))-3.18;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (80*sqrt(x*x/(6400)+1.0))-12.488;
vertex(250+x,250+y);
}
endShape();
beginShape();
for (float x=-500; x<500; x=x+1)
{
y = (10*sqrt(x*x/(100)+1.0))-0.12;
vertex(250+x,250+y);
}
endShape();
if (record) {
endRaw();
record = false;
}
}
void keyPressed() {
// Use a key press so that it doesn't make a million files
if (key == 'r') {
record = true;
}
}