Modify a text file: $/orbit/orbit2.java
$/orbit/orbit2.java
//////// Planets orbit the sun. (bam/CST112) //////// Planet[] p; int np=0; int line=0; float textX=10,textY=10; float GM=100; float theta=0; // Angle from sun to planet. float sunX= width/2; float sunY= height/2; float sunR= 80; color[] colorlist= { color(150,150,150), color(200,255,200), color(150,200,250), color(255,200,200), color(255,127,200), color(200,200,150), color(100,100,200), color(127,200,100) }; String[] namelist= { "Mercury", "Venus", "Terra", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune" }; boolean debug=false; boolean lines=true; void setup() { size(800,800); theta=0; // Angle from sun to planet. sunX= width/2; sunY= height/2; sunR= 40; p= new Planet[100]; for( int i=0; i