Jump to content

How do I make this?

Hi so I'm currently doing an assignment for my computer science class. The assigment consists of multiple things including delays, orbits etc using processing under the java language. In the assingment, we cannot use ellipses, popMatrix, pushMatrix, translate and rotate. I'm having some difficulty in getting my circle, to orbit, instead what I am getting is it completing the circle. I don't know if I'm missing something in my line of code or I'm doing something wrong.

This is my code so far:

int a=2;
int b=0;
int c=2;
int d=0;
int e=2;
int f=0;
void settings() {
  size(800,600);
}

void setup () {
 
}
void draw() {
  background(0);
  noFill();
  strokeWeight(1);
  stroke(255,255,255);
  arc(400,300,325,325, radians(0), radians(360)); //white outline
 
  fill(50,50,50);
  noStroke();
  arc(400,300,320,320, radians(0), radians(b)); //gray circle b
  b+=2;
    if(b>=360) {
      b=0;}

  fill(225,50,50);
  noStroke();
  arc(400,300,200,200, radians(0), radians(a)); //red circle a
  a+=1;
    if(a>=360) {
      a=0; }
         
  fill(0,0,255);
  noStroke();
  arc(400,300,25,25,radians(d),radians©); //blue orbit
  c+=2;

 

So, any help?

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×