import java.awt.*; public class DNA extends BufferedApplet { int width = 0; int height = 0; double scale = 1; double startTime = getTime(); double speed = 1.5; int n = 10; int nTotal = 20; double r = 25; double rMiddle = r/3.0; double rBonds = r/4.0; double rSmall = r/2.2; double rBig = r/1.5; double rLength = r; double theta = Math.PI/15.0; double dy = Math.sqrt( Math.pow(rBig+rSmall,2) - Math.pow((rLength*2+rMiddle+rBig)*Math.sin(theta),2) ); public void render(Graphics g) { /* ************* SET UP ************ */ double time = getTime() - startTime; width = getWidth(); height = getHeight(); g.setColor(Color.black); g.fillRect(0,0,width,height); Geometry geo = new Geometry(); Matrix matrix = new Matrix(); matrix.identity(); /* ************* INITIALIZE ************ */ for (int ii=0; ii= outBigRightAfterV[0][2]) { // draw right first // draw right outside moleculars g.setColor(Color.green); for (int i=0; i