in the following, there are two strings, message 1 and message2 .I want to set the program to alternate within the stack differing strings , rather than repeating one or shape or whatever
I'm calling a string , instead of a shape
But I have two strings I need read , in order and then stop , arranged in a circular relationship like the one in the motion example
float angle = 0.0 ;
float offset = 60 ;
float scalar = 130 ;
float speed = 0.05 ;
String message1 = "ardeshir" ;
String message2 = "done" ;
void setup () {
size (2016, 1152 ) ;
//size (120, 120) ;
smooth () ;
//noLoop () ;
}
void draw () {
//float x = offset + cos( angle) * scalar;
//float y = offset + sin (angle) * scalar;
float x = width/2 + cos( angle) * scalar;
float y = height/2 + sin (angle) * scalar;
textSize (36) ;
textLeading (72);
text (message1, x, y) ;
angle += speed ;
pushMatrix () ;
translate (x, y ) ;
text (message2, x, y) ;
popMatrix () ;
}