Quantcast
Channel: Library Questions - Processing 2.x and 3.x Forum
Viewing all articles
Browse latest Browse all 2896

How to rotate text around box?

$
0
0

Hi! First of all, I want to apologize for my bad English. I have the assingment in which I have to:

  • play music from mp3 file
  • create a box and make it rotating, changing sizes and colors
  • create a circle by clicking on a screen and make the circle moving down outside of the screen
  • import txt file and make lines of text from this file rotating around the box

I managed to do 3 tasks (although not very good, I think), but I have no idea how to cope with the fourth one. Any suggestions? This is my code, maybe someone may have some suggestions on how to improve other tasks.

Thank you very much.

import ddf.minim.*;
Minim minim;
AudioPlayer player;

void setup(){
  size(500,500,P3D);
  background(#F0AB16);
  smooth();

  minim=new Minim(this);
  player=minim.loadFile("music.mp3",512);
  player.play();
}

void draw(){
  background(#F0AB16);

  if (mouseButton==LEFT){
     fill(#CE2A92);
     ellipse(mouseX,mouseY,100,100);
      mouseY++;
  if (mouseY > height) {
    ;
  }
  }

  translate(width/2,height/2);
  rotateX(millis()/1000.0f);
  rotateY(millis()/1000.0f);
  fill(255.0*sin(millis()/650.0),255.0*sin(millis()/800.0),255.0*sin(millis()/1000.0));
  box(250*abs(sin(millis()/1000.0)));

}

Viewing all articles
Browse latest Browse all 2896

Trending Articles