FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Syntax
(Moderators: fry, REAS)
   exponentially
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: exponentially  (Read 283 times)
Robert
Guest
Email
exponentially
« on: Sep 19th, 2003, 1:41am »

Dear people on this board,
 
My question is how to make the circle exponentialy grow. I've tried mutiplying a++ with 1.2 but it just won't rapidly grow.  
 
 
void setup(){
  size(200,200);
  background(102);
  noStroke();
}
 
float a = 1;
void loop(){
 
  ellipseMode(CENTER_DIAMETER);
 
  fill(203,90,70);
  ellipse(width/2, height/2, a, a++);
}
 
REAS


WWW
Re: exponentially
« Reply #1 on: Sep 19th, 2003, 1:45am »

give this a try:
 
Code:

void setup()
{  
  size(200,200);  
  background(102);  
  noStroke();  
  fill(203,90,70);  
  ellipseMode(CENTER_DIAMETER);  
}  
 
float a = 1.0;  
void loop()
{  
  a = a * 1.05;
  ellipse(width/2, height/2, a, a);  
}
 
Robert
Guest
Email
Re: exponentially
« Reply #2 on: Sep 19th, 2003, 1:53am »

Thank you very much! It works perfectly!
 
Pages: 1 

« Previous topic | Next topic »