just feel like showing this off, because I'm so proud of it *sniff sniff*

It's basically some GUI I made in java with recursion and a bunch of math, for a school project:

It's basically some GUI I made in java with recursion and a bunch of math, for a school project:

import java.awt.*;

public class Ribbons extends GameDriver {

public Ribbons(){

}

public void draw(Graphics2D win){

win.setColor(Color.BLACK);

win.fill(new Rectangle(1,1,3000,3000));

win.setColor(Color.MAGENTA);

recursion2(win,new Rectangle(50, 50, 300, 1),3*Math.PI,1);

win.setColor(Color.gray);

recursion1(win,new Rectangle(50, 50, 300, 1),4*Math.PI,1);

}

public void recursion1(Graphics2D win, Rectangle a, double z, int k){

win.draw(a);

int side = (int)Math.abs((Math.sin(z)*250));

if(z>0&&k<500){

Rectangle c = new Rectangle(k*5-side,(int)k*5+side-500,(int)Math.pow(side,.5),(int)(z*50));

recursion1(win, c,z-.05,k+1);

}

}

public void recursion2(Graphics2D win, Rectangle a, double z, int k){

win.draw(a);

int side = (int)Math.abs((Math.sin(z)*250));

if(z>0&&k<500){

Rectangle b = new Rectangle(k*5+side,k*5-side-130,(int)Math.pow(side,.5),(int)(z*50));

recursion2(win, b,z-.05,k+1);

}

}

}

public class Ribbons extends GameDriver {

public Ribbons(){

}

public void draw(Graphics2D win){

win.setColor(Color.BLACK);

win.fill(new Rectangle(1,1,3000,3000));

win.setColor(Color.MAGENTA);

recursion2(win,new Rectangle(50, 50, 300, 1),3*Math.PI,1);

win.setColor(Color.gray);

recursion1(win,new Rectangle(50, 50, 300, 1),4*Math.PI,1);

}

public void recursion1(Graphics2D win, Rectangle a, double z, int k){

win.draw(a);

int side = (int)Math.abs((Math.sin(z)*250));

if(z>0&&k<500){

Rectangle c = new Rectangle(k*5-side,(int)k*5+side-500,(int)Math.pow(side,.5),(int)(z*50));

recursion1(win, c,z-.05,k+1);

}

}

public void recursion2(Graphics2D win, Rectangle a, double z, int k){

win.draw(a);

int side = (int)Math.abs((Math.sin(z)*250));

if(z>0&&k<500){

Rectangle b = new Rectangle(k*5+side,k*5-side-130,(int)Math.pow(side,.5),(int)(z*50));

recursion2(win, b,z-.05,k+1);

}

}

}