Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

177
Visualizações
Rotate circles around center point like a Solar System (Java Script)

I am working on a project as I try to learn Java Script. I managed to make the circles and a center point. I have tried using things like the rotate command, which may be completely off course, but I am trying to make the circles move in a circle around the center point/dot like a solar system would. I would also like to be able to change the speed for each circle. If possible so I can get a better understanding of setting the center point how could I make another object near one of the circles and have it rotate around the center of that circle?

My current program looks like this (I am using Khan Academy)

var x=0;
var y=0;

draw = function() {
    background(255);
    strokeWeight(5);
    point(200,200);
    strokeWeight(2);
    ellipse(x+250,y+250,50,50);
    ellipse(x+75,y+200,100,100);
    ellipse(x+125,y+125,25,25);
};
about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda